FEATURED POSTS
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
', 'type' => 'content', 'conditions' => [ [ 'comparison' => 'contain', 'value' => [ 'top_content' ], 'attribute' => 'showing_items', ], ], ], 'button_breaker' => [ 'component' => 'LineBreaker', 'conditions' => $button_conditions, ], 'button_group_definition' => [ 'component' => 'GroupDefinition', 'title' => __( 'Button', 'yaymail' ), 'description' => __( 'Handle button settings', 'yaymail' ), 'conditions' => $button_conditions, ], 'button_label' => [ 'value_path' => 'button_label', 'component' => 'TextInput', 'title' => __( 'Button text', 'yaymail' ), 'default_value' => isset( $attributes['button_label'] ) ? $attributes['button_label'] : __( 'READ MORE', 'yaymail' ), 'type' => 'content', 'conditions' => $button_conditions, ], 'button_background_color' => [ 'value_path' => 'button_background_color', 'component' => 'Color', 'title' => __( 'Button background color', 'yaymail' ), 'default_value' => isset( $attributes['button_background_color'] ) ? $attributes['button_background_color'] : '#ec4770', 'type' => 'style', 'conditions' => $button_conditions, ], 'button_text_color' => [ 'value_path' => 'button_text_color', 'component' => 'Color', 'title' => __( 'Button text color', 'yaymail' ), 'default_value' => isset( $attributes['button_text_color'] ) ? $attributes['button_text_color'] : '#ffffff', 'type' => 'style', 'conditions' => $button_conditions, ], 'posts_breaker' => [ 'component' => 'LineBreaker', ], 'posts_group_definition' => [ 'component' => 'GroupDefinition', 'title' => __( 'Posts', 'yaymail' ), 'description' => __( 'Handle posts settings', 'yaymail' ), ], 'posts_per_row' => [ 'value_path' => 'posts_per_row', 'component' => 'NumberInput', 'title' => __( 'Posts per row', 'yaymail' ), 'default_value' => isset( $attributes['posts_per_row'] ) ? $attributes['posts_per_row'] : '2', 'min' => 1, 'max' => 3, 'type' => 'content', ], 'post_type' => [ 'value_path' => 'post_type', 'component' => 'Selector', 'title' => __( 'Post type', 'yaymail' ), 'default_value' => isset( $attributes['post_type'] ) ? $attributes['post_type'] : 'newest', 'type' => 'content', 'options' => [ [ 'label' => __( 'Newest', 'yaymail' ), 'value' => 'newest', ], [ 'label' => __( 'Category selections', 'yaymail' ), 'value' => 'category_selections', ], [ 'label' => __( 'Tag selections', 'yaymail' ), 'value' => 'tag_selections', ], [ 'label' => __( 'Post selections', 'yaymail' ), 'value' => 'post_selections', ], ], ], 'categories' => [ 'value_path' => 'categories', 'component' => 'EntitiesSelector', 'title' => __( 'Post categories', 'yaymail' ), 'default_value' => isset( $attributes['categories'] ) ? $attributes['categories'] : [], 'type' => 'content', 'entity_type' => 'post_categories', 'conditions' => [ [ 'value' => 'category_selections', 'attribute' => 'post_type', ], ], ], 'tags' => [ 'value_path' => 'tags', 'component' => 'EntitiesSelector', 'title' => __( 'Post tags', 'yaymail' ), 'default_value' => isset( $attributes['tags'] ) ? $attributes['tags'] : [], 'type' => 'content', 'entity_type' => 'post_tags', 'conditions' => [ [ 'value' => 'tag_selections', 'attribute' => 'post_type', ], ], ], 'posts' => [ 'value_path' => 'posts', 'component' => 'EntitiesSelector', 'title' => __( 'Posts', 'yaymail' ), 'default_value' => isset( $attributes['posts'] ) ? $attributes['posts'] : [], 'type' => 'content', 'entity_type' => 'posts', 'conditions' => [ [ 'value' => 'post_selections', 'attribute' => 'post_type', ], ], ], 'sorted_by' => [ 'value_path' => 'sorted_by', 'component' => 'Selector', 'title' => __( 'Sorted by', 'yaymail' ), 'default_value' => isset( $attributes['sorted_by'] ) ? $attributes['sorted_by'] : 'none', 'options' => [ [ 'label' => __( 'None', 'yaymail' ), 'value' => 'none', ], [ 'label' => __( 'Name A-Z', 'yaymail' ), 'value' => 'name_a_z', ], [ 'label' => __( 'Name Z-A', 'yaymail' ), 'value' => 'name_z_a', ], [ 'label' => __( 'Date ascending', 'yaymail' ), 'value' => 'date_ascending', ], [ 'label' => __( 'Date descending', 'yaymail' ), 'value' => 'date_descending', ], [ 'label' => __( 'Random', 'yaymail' ), 'value' => 'random', ], ], 'type' => 'content', ], 'number_of_posts' => [ 'value_path' => 'number_of_posts', 'component' => 'NumberInput', 'title' => __( 'Number of featured posts', 'yaymail' ), 'default_value' => isset( $attributes['number_of_posts'] ) ? $attributes['number_of_posts'] : '4', 'type' => 'content', 'min' => 1, 'max' => 20, 'is_debounce' => true, 'conditions' => [ [ 'comparison' => '!=', 'value' => 'post_selections', 'attribute' => 'post_type', ], ], ], ], ]; } }