'business_insights_popular_post_widget', 'description' => esc_html__('Displays post form selected category specific for popular post in sidebars.', 'business-insights'), 'customize_selective_refresh' => true, ); $fields = array( 'title' => array( 'label' => esc_html__('Title:', 'business-insights'), 'type' => 'text', 'class' => 'widefat', ), 'post_category' => array( 'label' => esc_html__('Select Category:', 'business-insights'), 'type' => 'dropdown-taxonomies', 'show_option_all' => esc_html__('All Categories', 'business-insights'), ), 'post_number' => array( 'label' => esc_html__('Number of Posts:', 'business-insights'), 'type' => 'number', 'default' => 4, 'css' => 'max-width:60px;', 'min' => 1, 'max' => 10, ), ); parent::__construct('business-insights-popular-sidebar-layout', esc_html__('BI: Recent Post', 'business-insights'), $opts, array(), $fields); } /** * Outputs the content for the current widget instance. * * @since 1.0.0 * * @param array $args Display arguments. * @param array $instance Settings for the current widget instance. */ function widget($args, $instance) { $params = $this->get_params($instance); echo $args['before_widget']; if (!empty($params['title'])) { echo $args['before_title'] . esc_html( $params['title'] ) . $args['after_title']; } $qargs = array( 'posts_per_page' => esc_attr($params['post_number']), 'no_found_rows' => true, ); if (absint($params['post_category']) > 0) { $qargs['cat'] = absint($params['post_category']); } $recent_posts_query = new WP_Query($qargs); $count = 1; if ($recent_posts_query->have_posts()) : ?>
    have_posts()) : $recent_posts_query->the_post(); ?>
  • the_title_attribute(array( 'echo' => false, )), )); ?>

'business_insights_author_widget', 'description' => esc_html__('Displays authors details in post.', 'business-insights'), 'customize_selective_refresh' => true, ); $fields = array( 'title' => array( 'label' => esc_html__('Title:', 'business-insights'), 'type' => 'text', 'class' => 'widefat', ), 'author-name' => array( 'label' => esc_html__('Name:', 'business-insights'), 'type' => 'text', 'class' => 'widefat', ), 'description' => array( 'label' => esc_html__('Description:', 'business-insights'), 'type' => 'textarea', 'class' => 'widget-content widefat' ), 'image_url' => array( 'label' => esc_html__('Author Image:', 'business-insights'), 'type' => 'image', ), 'url-fb' => array( 'label' => esc_html__('Facebook URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), 'url-tw' => array( 'label' => esc_html__('Twitter URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), 'url-gp' => array( 'label' => esc_html__('Googleplus URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), ); parent::__construct('business-insights-author-layout', esc_html__('BI: Author Widget', 'business-insights'), $opts, array(), $fields); } /** * Outputs the content for the current widget instance. * * @since 1.0.0 * * @param array $args Display arguments. * @param array $instance Settings for the current widget instance. */ function widget($args, $instance) { $params = $this->get_params($instance); echo $args['before_widget']; if (!empty($params['title'])) { echo $args['before_title'] . esc_html( $params['title'] ) . $args['after_title']; } ?>

'business_insights_social_widget', 'description' => esc_html__('Displays Social share.', 'business-insights'), 'customize_selective_refresh' => true, ); $fields = array( 'title' => array( 'label' => esc_html__('Title:', 'business-insights'), 'type' => 'text', 'class' => 'widefat', ), 'url-fb' => array( 'label' => esc_html__('Facebook URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), 'url-tw' => array( 'label' => esc_html__('Twitter URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), 'url-gp' => array( 'label' => esc_html__('Googleplus URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), 'url-lt' => array( 'label' => esc_html__('Linkedin URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), 'url-ig' => array( 'label' => esc_html__('Instagram URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), 'url-pt' => array( 'label' => esc_html__('Pinterest URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), 'url-sk' => array( 'label' => esc_html__('Skype URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), 'url-tr' => array( 'label' => esc_html__('Tumblr URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), 'url-yt' => array( 'label' => esc_html__('Youtube URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), 'url-vo' => array( 'label' => esc_html__('Vimeo URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), 'url-wa' => array( 'label' => esc_html__('Whatsapp URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), 'url-wp' => array( 'label' => esc_html__('WordPress URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), 'url-db' => array( 'label' => esc_html__('Dribbble URL:', 'business-insights'), 'type' => 'url', 'class' => 'widefat', ), ); parent::__construct('business-insights-social-layout', esc_html__('BI: Social Widget', 'business-insights'), $opts, array(), $fields); } /** * Outputs the content for the current widget instance. * * @since 1.0.0 * * @param array $args Display arguments. * @param array $instance Settings for the current widget instance. */ function widget($args, $instance) { $params = $this->get_params($instance); echo $args['before_widget']; if (!empty($params['title'])) { echo $args['before_title'] . esc_html( $params['title'] ) . $args['after_title']; } ?>