views/noticias/wp-content/themes/supermag/acmethemes/customizer/custom-controls.php
/**

         * Function to  render the content on the theme customizer page

         *

         * @access public

         * @since 1.0.0

         *

         * @param null

         * @return void

         *

         */
Function to  render the content on the theme customizer page



@param null
@return void
Function to render the content on the theme customizer page @param null @return void
public function render_content() {
            $supermag_customizer_post_args = array(
                'posts_per_page'   => 100,
            );
            $supermag_posts = get_posts( $supermag_customizer_post_args );
            if( !empty( $supermag_posts ) )  {
                ?>
                <label>
                    <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
                    <select <?php $this->link(); ?>>
                        <?php
                        $supermag_default_value = $this->value();
                        if( -1 == $supermag_default_value || empty($supermag_default_value)){
                            $supermag_default_selected = 1;
                        }
                        else{
                            $supermag_default_selected = 0;
                        }
                        printf('<option value="0" %s>%s</option>',selected($supermag_default_selected, 1, false),__('Select','supermag'));
                        foreach ( $supermag_posts as $supermag_post ) {
                            printf('<option value="%s" %s>%s</option>', $supermag_post->ID, selected($this->value(), $supermag_post->ID, false), $supermag_post->post_title);
                        }
                        ?>
                    </select>
                </label>
                <?php
            }
        }
public function render_content ( ) { $ supermag_customizer_post_args = array ( 'posts_per_page' => 100 , ) ; $ supermag_posts = get_posts ( $ supermag_customizer_post_args ) ; if ( ! empty ( $ supermag_posts ) ) { ?> <label>

                    <span class="customize-control-title"> <?php echo esc_html ( $ this -> label ) ; ?> </span>

                    <select  <?php $ this -> link ( ) ; ?> >

                         <?php $ supermag_default_value = $ this -> value ( ) ; if ( - 1 == $ supermag_default_value || empty ( $ supermag_default_value ) ) { $ supermag_default_selected = 1 ; } else { $ supermag_default_selected = 0 ; } printf ( '<option value="0" %s>%s</option>' , selected ( $ supermag_default_selected , 1 , false ) , __ ( 'Select' , 'supermag' ) ) ; foreach ( $ supermag_posts as $ supermag_post ) { printf ( '<option value="%s" %s>%s</option>' , $ supermag_post -> ID , selected ( $ this -> value ( ) , $ supermag_post -> ID , false ) , $ supermag_post -> post_title ) ; } ?> </select>

                </label>

                 <?php } }
Function to  render the content on the theme customizer page
Function to render the content on the theme customizer page