output_features = array( // Featured Image 'featured_image' => array( 'link' => true // Enable/disable linking ), // Post Title 'post_title' => array( 'link' => true // Enable/disable linking ), // Post Content 'post_content' => array( 'edit_content_type' => true // Content type (special case) ), // Read More 'read_more' => array( 'link' => true, // Enable/disable linking 'edit_label' => array( 'default' => baton_more_link_label( true ) ) // Edit label (pass a default) ) ); // Call the parent constructor here parent::__construct( $manager, $id, $args ); } /** * This function enqueues scripts and styles */ public function enqueue() { // Stylesheets wp_enqueue_style( 'baton-conductor', get_template_directory_uri() . '/css/baton-conductor.css', array( 'dashicons' ) ); // Scripts wp_enqueue_script( 'baton-conductor', get_template_directory_uri() . '/js/baton-conductor.js', array( 'backbone', 'jquery-ui-sortable' ), $this->version, true ); wp_localize_script( 'baton-conductor', 'baton_conductor', array( 'customizer' => array( 'section_sup_label' => _x( 'by Conductor', 'label applied to tag within Customizer section title for Baton Conductor', 'baton' ), 'control_enabled_label' => _x( 'Enabled', 'label applied to Customizer control title for Baton Conductor', 'baton' ) ), 'output' => array( 'priority_step_size' => 10 ) ) ); // Call the parent enqueue method here parent::enqueue(); } /** * This function renders the control's content. */ public function render_content() { global $_wp_additional_image_sizes; if ( ! empty( $this->description ) ) : ?> description; ?> settings['title'] ) ) : ?>


settings['title']->value() ); ?>" link( 'title' ); ?> />


settings['posts_per_page'] ) ) : ?>
settings['category'] ) ) : ?>

'baton_conductor[category]', 'selected' => $this->settings['category']->value(), 'orderby' => 'NAME', 'hierarchical' => true, 'show_option_all' => __( 'All Categories', 'baton' ), 'hide_empty' => false, 'id' => 'baton_conductor_category', 'class' => 'baton-conductor-select', 'echo' => false ) ); // Add the Customizer "link" for this field (only replacing once to ensure only the outer most wrapper element gets the adjustment) $category_dropdown = preg_replace( '/link( 'flexbox_columns' ); ?> /> settings['flexbox_columns']->value(); ?>

settings['output'] ) ) : // Grab the value $baton_conductor_output = $this->settings['output']->value(); ?>

    $element ) { $id = $element['id']; $type = $element['type']; // Determine the features this element supports (first by id) $supports = ( isset( $this->output_features[$id] ) ) ? $this->output_features[$id] : array(); // Find support by type if not found by id if ( empty( $supports ) ) $supports = ( isset( $this->output_features[$type] ) ) ? $this->output_features[$type] : array(); // Generate CSS Classes $css_classes = array( 'ui-state-default', 'baton-conductor-output-element', 'baton-conductor-output-element-' . $element['id'] ); // Visible CSS Class if ( isset( $element['visible'] ) && $element['visible'] ) $css_classes[] = 'visible'; // Link CSS Class if ( $supports && array_key_exists( 'link', $supports ) && isset( $element['link'] ) && $element['link'] ) $css_classes[] = 'link'; $output = '
  • '; $output .= '
    '; $output .= '
    '; $output .= ''; $output .= '
    '; $output .= '
    '; $output .= ''; $output .= '
    '; $output .= '
    '; $output .= '
    '; $output .= ''; } // Regular Label else $output .= ' ' . $element['label'] . ''; // Controls $output .= ' '; // Link if ( $supports && array_key_exists( 'link', $supports ) ) $output .= ' '; // Removal if ( $supports && array_key_exists( 'remove', $supports ) ) $output .= '
    '; // Visibility $output .= '
    '; $output .= '
    '; $output .= '
  • '; // Output echo $output; } ?>
link( 'output' ); ?> />

settings['post_thumbnails_size'] ) ) : ?>


settings['excerpt_length'] ) ) : ?>