'bfastmag_themepacific_recent_category_widget','description' => __( 'A Widget to dispaly Category Posts With Thumbs', 'bfastmag' )); parent::__construct('tpcrn-cat-posts-widget', __( 'bfastmag - Category Posts Widget', 'bfastmag' ), $widget_ops); } /** * Display the widget */ function widget( $args, $instance ) { extract($args); if ( ! empty( $instance['title'] ) ) { $title = $instance['title']; }else{ $title = __('Recent Posts','bfastmag'); } if ( ! empty( $instance['get_catego'] ) ) { $get_catego = $instance['get_catego']; }else{ $get_catego = 'all'; } if ( ! empty( $instance['getnumpost'] ) ) { $getnumpost = $instance['getnumpost']; }else{ $getnumpost = 5; } /* Before widget (defined by themes). */ /* Display the widget title if one was input (before and after defined by themes). */ echo $args['before_widget']; if ( ! empty( $instance['title'] ) ) { $title = $instance['title']; } if ( ! empty( $title ) ) { //echo $args['before_title'] . esc_html( $title ) . $args['after_title']; echo $args['before_title']; ?>
'tpcrn-social-icons-widget', 'description' => 'Display Social Icons' ); $control_ops = array($control_ops = array('id_base' => 'bfastmag_themepacific_social_icons-widget')); parent::__construct('bfastmag-social-widget', __( 'bfast mag: Social Icons', 'bfastmag' ), $widget_ops,$control_ops); } function widget( $args, $instance ) { extract( $args ); $title = apply_filters('widget_title', $instance['title'] ); $fb = $instance['fb']; $gp = $instance['gp']; $rss = $instance['rss']; $tw = $instance['tw']; $in = $instance['in']; $yt = $instance['yt']; $fr = $instance['fr']; /* Before widget (defined by themes). */ echo $before_widget; if($title) echo $before_title . $title . $after_title; /* Display the widget title if one was input (before and after defined by themes). */ ?> __('Social' , 'bfastmag') , 'rss' =>'' , 'fb' =>'' , 'gp' =>'' , 'tw' =>'' , 'in' =>'' , 'yt' =>'' , 'fr' =>'' ); $instance = wp_parse_args( (array) $instance, $defaults ); ?>