setting->default ); // defaults $values = json_decode( $this->value() ); // values ?>
$control ) : if ( false === $control->option ) { $dash_icon = 'hidden'; $item_wrap_class = ' cv-block-hide'; } else { $dash_icon = 'visibility'; $item_wrap_class = ''; } switch ( $control->type ) { case 'ad-block' : ?>

option, true ); ?>/>
__( 'Ad Block Image', 'azure-news' ), 'name' => 'imgSrc', 'value' => $control->imgSrc ); self::render_field( 'upload', $ad_img_arg ); /** * url field for ad image link */ $img_link_arg = array( 'title' => __( 'Ad Block Image Link', 'azure-news' ), 'name' => 'imgUrl', 'value' => $control->imgUrl ); self::render_field( 'url', $img_link_arg ); /** * toggle field for link open in new tab. */ $new_tab_args = array( 'title' => __( 'Link open in new tab.', 'azure-news' ), 'name' => 'newTab', 'value' => $control->newTab, ); self::render_field( 'toggle', $new_tab_args ); ?>

option, true ); ?>/>
__( 'Block Title', 'azure-news' ), 'description' => __( 'Leave blank to hide title.', 'azure-news' ), 'name' => 'blockTitle', 'value' => $control->blockTitle ); self::render_field( 'text', $block_title_arg ); /** * block query group */ $block_query_group_arg = array( 'title' => __( 'Block Query', 'azure-news' ), 'description' => __( 'Click Icon to expand the fields.', 'azure-news' ) ); self::render_field( 'group_title', $block_query_group_arg ); /** * block query wrap start */ self::render_field( 'field_group_start' ); /** * category dropdown field for block category */ $block_cat_args = array( 'title' => __( 'Block Category', 'azure-news' ), 'name' => 'category', 'value' => $control->category ); self::render_field( 'category_dropdown', $block_cat_args ); /** * select field for posts orderby */ $posts_orderby_args = array( 'title' => __( 'Posts Order by', 'azure-news' ), 'name' => 'postOrderby', 'value' => $control->postOrderby, 'options' => array( 'date-desc' => __( 'Newest - Oldest', 'azure-news' ), 'date-asc' => __( 'Oldest - Newest', 'azure-news' ), 'title-asc' => __( 'A - Z', 'azure-news' ), 'title-desc' => __( 'Z - A', 'azure-news' ), 'rand-desc' => __( 'Random', 'azure-news' ), ) ); self::render_field( 'select', $posts_orderby_args ); /** * select field for posts date filter */ $posts_datefilter_args = array( 'title' => __( 'Posts date filter', 'azure-news' ), 'name' => 'postDatefilter', 'value' => $control->postDatefilter, 'options' => array( 'all' => __( 'All', 'azure-news' ), 'today' => __( 'Today', 'azure-news' ), 'this-week' => __( 'This Week', 'azure-news' ), 'last-week' => __( 'Last Week', 'azure-news' ), 'this-month' => __( 'This Month', 'azure-news' ), 'last-month' => __( 'Last Month', 'azure-news' ), ) ); self::render_field( 'select', $posts_datefilter_args ); /** * number field for post count */ $block_postcount_args = array( 'title' => __( 'Number of posts', 'azure-news' ), 'name' => 'postCount', 'value' => $control->postCount, 'input_attrs' => array( 'min' => 1, 'max' => 7, 'step' => 1 ) ); self::render_field( 'number', $block_postcount_args ); /** * block query wrap end */ self::render_field( 'field_group_end' ); /** * toggle field for posts cats */ $posts_cats_args = array( 'title' => __( 'Show posts categories lists', 'azure-news' ), 'name' => 'postCats', 'value' => $control->postCats, ); self::render_field( 'toggle', $posts_cats_args ); /** * toggle field for posts author */ $posts_author_args = array( 'title' => __( 'Show posts author', 'azure-news' ), 'name' => 'postAuthor', 'value' => $control->postAuthor, ); self::render_field( 'toggle', $posts_author_args ); /** * toggle field for posts date */ $posts_date_args = array( 'title' => __( 'Show posts date', 'azure-news' ), 'name' => 'postDate', 'value' => $control->postDate, ); self::render_field( 'toggle', $posts_date_args ); /** * toggle field for posts comment */ $posts_comment_args = array( 'title' => __( 'Show posts comment', 'azure-news' ), 'name' => 'postComment', 'value' => $control->postComment, ); self::render_field( 'toggle', $posts_comment_args ); /** * toggle field for posts more */ $posts_more_args = array( 'title' => __( 'Show posts more', 'azure-news' ), 'name' => 'postMore', 'value' => $control->postMore, ); self::render_field( 'toggle', $posts_more_args ); ?>
link() ); ?> class="blocks-repeater-control" value="value() ); ?>" />

>
'block-category', 'echo' => 0, 'show_option_none' => esc_html__( 'Latest Posts', 'azure-news' ), 'value_field' => 'slug', 'option_none_value' => 'all', 'selected' => esc_attr( $field_args['value'] ), 'show_count' => 1, 'hierarchical' => 1, 'hide_empty' => 1 ) ); $replace_select = ' '; break; case 'field_group_end'; echo ''; break; case 'group_title'; echo '
'; break; default: // code... break; } } } endif;