choices; $select2_options = $this->select2_options; $multiple = $this->multiple; $posttype = $this->posttype; if( $posttype ) { $defaults = array( 'post_type' => 'page', 'posts_per_page' => -1 ); $args = wp_parse_args( $this->posttype_args, $defaults ); $choices = array(); if( isset( $this->posttype_empty_first_value ) ) { $choices[''] = $this->posttype_empty_first_value; } $posts = get_posts( $args ); foreach( $posts as $post ) { $choices[$post->ID] = $post->post_title; } } ?>
label ); ?>
link(); ?> /> value(), ',' ) !== FALSE ) : $values = explode( ',', $this->value() ); $values = array_map( function( $val ){ $newval = esc_js( $val ); return "'$newval'"; }, $values ); ?>