esc_html__( 'Displays recent posts.', 'business-way-lite' ), ), array(), false, plugin_dir_path( __FILE__ ) ); } /** * Get widget form. * * @since 1.0.0 * * @return array Widget form. */ function get_widget_form() { return array( 'title' => array( 'type' => 'text', 'label' => esc_html__( 'Title', 'business-way-lite' ), ), 'subtitle' => array( 'type' => 'text', 'label' => esc_html__( 'Subtitle', 'business-way-lite' ), ), 'heading_alignment' => array( 'label' => esc_html__( 'Title/subtitle Alignment', 'business-way-lite' ), 'type' => 'select', 'default' => 'center', 'options' => business_way_get_heading_alignment_options(), ), 'post_category' => array( 'label' => esc_html__( 'Select Category:', 'business-way-lite' ), 'type' => 'taxonomy-dropdown', 'show_option_all' => esc_html__( 'All Categories', 'business-way-lite' ), ), 'post_number' => array( 'label' => esc_html__( 'Number of Posts', 'business-way-lite' ), 'type' => 'number', 'default' => 3, ), 'featured_image' => array( 'label' => esc_html__( 'Featured Image', 'business-way-lite' ), 'type' => 'select', 'default' => 'thumbnail', 'options' => business_way_get_image_sizes_options( true, array( 'disable', 'thumbnail' ), false ), ), 'image_width' => array( 'label' => esc_html__( 'Image Width', 'business-way-lite' ), 'description' => esc_html__( 'in px', 'business-way-lite' ), 'type' => 'number', 'default' => 70, ), 'disable_date' => array( 'label' => esc_html__( 'Disable Date', 'business-way-lite' ), 'type' => 'checkbox', 'default' => false, ), ); } } siteorigin_widget_register( 'business-way-recent-posts', __FILE__, 'Business_Way_Recent_Posts_Widget' );