__( '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 );
?>