json['attributes'] = $this->input_attrs; } public function render_content() { ?> label ); ?> description ) ) : ?> description ); ?> choices === 'all' ) { $options = array( 'all' => __( 'All', 'allegiant' ), 'homepage' => __( 'Homepage', 'allegiant' ), 'all_posts' => __( 'All posts', 'allegiant' ), 'all_pages' => __( 'All pages', 'allegiant' ), 'all_portfolio_items' => __( 'All portfolio items', 'allegiant' ), 'all_services' => __( 'All services', 'allegiant' ), '404_page' => __( '404 page', 'allegiant' ), 'archive' => __( 'Archive page', 'allegiant' ), 'search' => __( 'Search page', 'allegiant' ), ); foreach ( $this->value() as $value ) : if ( ! isset( $options[ $value ] ) ) { $options[ $value ] = '#' . $value; } endforeach; } if ( $this->choices === 'pages' ) { $posts = wp_cache_get( 'allegiant_pages' ); if ( $posts === false ) { $args = array( 'post_status' => 'publish', 'post_type' => 'page', 'posts_per_page' => -1, ); $query = new WP_Query( $args ); wp_cache_set( 'allegiant_pages', $query->posts ); $posts = $query->posts; } foreach ( $posts as $post ) : $options[ $post->ID ] = $post->post_title; endforeach; } ?>