PATH:
home
/
centosnipponia
/
public_html
/
lifannl
/
wp-content
/
themes
/
sydney-pro-ii
/
inc
/
customizer
/
controls
<?php /** * Posts control * * @package Sydney */ class Sydney_Posts_Control extends WP_Customize_Control { /** * The type of control being rendered */ public $type = 'sydney-posts-dropdown'; private $posts = array(); public function __construct( $manager, $id, $args = array(), $options = array() ) { parent::__construct( $manager, $id, $args ); $this->posts = get_posts( $this->input_attrs ); } /** * Render the control in the customizer */ public function render_content() { ?> <div class="dropdown_posts_control"> <?php if( !empty( $this->label ) ) { ?> <label for="<?php echo esc_attr( $this->id ); ?>" class="customize-control-title"> <?php echo esc_html( $this->label ); ?> </label> <?php } ?> <?php if( !empty( $this->description ) ) { ?> <span class="customize-control-description"><?php echo esc_html( $this->description ); ?></span> <?php } ?> <select name="<?php echo esc_attr( $this->id ); ?>" id="<?php echo esc_attr( $this->id ); ?>" <?php $this->link(); ?> multiple="multiple"> <?php if( !empty( $this->posts ) ) { foreach ( $this->posts as $post ) { printf( '<option value="%s" %s>%s</option>', intval( $post->ID ), selected( $this->value(), $post->ID, false ), esc_html( $post->post_title ) ); } } ?> </select> </div> <?php } }
[+]
..
[+]
accordion
[+]
alpha-color
[+]
custom-sidebars
[+]
display-conditions
[+]
multiple-select
[+]
quick-links
[+]
radio-buttons
[+]
radio-images
[+]
repeater
[+]
responsive-slider
[+]
toggle
[+]
typography
[+]
typography-adobe
[-] class_sydney_create_page_control.php
[edit]
[-] class_sydney_divider_control.php
[edit]
[-] class_sydney_posts_control.php
[edit]
[-] class_sydney_tab_control.php
[edit]
[-] class_sydney_text_control.php
[edit]
[-] class_sydney_tinymce_control.php
[edit]
[-] control-checkbox-multiple.php
[edit]
[-] .htaccess.disabled
[edit]