*/ /** * applies the 'selected' attribute to option element if the value of the option matches the saved data * * @since 1.1.0 * @access public * @var string $setting Saved meta value. * @var string $value Option value. */ function get_selected_attribute($setting, $value) { if (strcmp($setting, $value) == 0) { echo ' selected'; } } /** * Outputs the option element for the select html element * * @since 1.1.0 * @access public * @var string $setting Saved meta value. * @var string $value Option value. */ function get_select_option_tag($setting, $value) { if (strcmp($setting, $value) == 0) { echo ' '; } else { echo ' '; } } /** * Save the data * * @since 1.1.0 * @access public * @var string $id The ID of this post. * @var string $setting_id The ID of this post. * @var string $default The ID of this post. */ function get_post_meta_values($id, $setting_id, $default) { $value = get_post_meta($id, $setting_id, true); if($value == null){ return $default; } else { return $value; } } /** * Save the data * * @since 1.1.0 * @access public * @var array $args field input name, meta key name */ function display_list($args) { echo ''; } /** * Save the data * * @since 1.2.0 * @access public * @var array $args settings for row, columns, height & margin */ function display_device_settings($args) { ?>
| = $args['device_title'] ?> Layout Properties | ||||
|---|---|---|---|---|
| = display_list( array('input_name' => $args['rows']['input_name'], 'key' => get_post_meta_values($args['post_id'], $args['rows']['meta_key'], "1") ) ) ?> | = display_list( array('input_name' => $args['columns']['input_name'], 'key' => get_post_meta_values($args['post_id'], $args['columns']['meta_key'], "1") ) ) ?> | |||
| " style="width: 70px;"> | " style="width: 70px;"> | |||
| " style="width: 70px;"> | ||||