'mh_affiliate', 'description' => __('MH Affiliate Widget to earn money by promoting WordPress themes by MH Themes.', 'mh-magazine-lite')); $this->WP_Widget('mh_affiliate', __('MH Affiliate Widget', 'mh-magazine-lite'), $widget_ops); } function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); $mh_username = empty($instance['mh_username']) ? 'MHthemes' : $instance['mh_username']; $mh_ads = isset($instance['mh_ads']) ? $instance['mh_ads'] : '300x250'; echo $before_widget; if (!empty($title)) { echo $before_title . $title . $after_title; } ?> MH Magazine WordPress Theme 'WordPress Magazine Theme', 'mh_username' => '', 'mh_ads' => '300x250'); $instance = wp_parse_args((array) $instance, $defaults); ?>

' . __('infopage for affiliates', 'mh-magazine-lite'). ''; ?>.

'mh_custom_posts', 'description' => __('Custom Posts Widget to display posts based on categories or tags.', 'mh-magazine-lite')); $this->WP_Widget('mh_custom_posts', __('MH Custom Posts (Lite)', 'mh-magazine-lite'), $widget_ops); } function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); $category = isset($instance['category']) ? $instance['category'] : ''; $tags = empty($instance['tags']) ? '' : $instance['tags']; $postcount = empty($instance['postcount']) ? '5' : $instance['postcount']; $offset = empty($instance['offset']) ? '' : $instance['offset']; $sticky = isset($instance['sticky']) ? $instance['sticky'] : 0; if ($category) { $cat_url = get_category_link($category); $before_title = $before_title . ''; $after_title = '' . $after_title; } echo $before_widget; if (!empty( $title)) { echo $before_title . esc_attr($title) . $after_title; } ?> '', 'category' => '', 'tags' => '', 'postcount' => '5', 'offset' => '0', 'sticky' => 0); $instance = wp_parse_args((array) $instance, $defaults); ?>

/>

Info:

'mh_facebook', 'description' => __('Widget to display a Facebook likebox in your sidebar.', 'mh-magazine-lite')); $this->WP_Widget('mh_facebook', __('MH Facebook Likebox', 'mh-magazine-lite'), $widget_ops); } function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); $facebook_url = isset($instance['facebook_url']) ? $instance['facebook_url'] : 'https://www.facebook.com/MHthemes'; $width = isset($instance['width']) ? $instance['width'] : '300'; $height = isset($instance['height']) ? $instance['height'] : '240'; $faces = !isset($instance['faces']) || $instance['faces'] == 1 ? 'true' : 'false'; $stream = isset($instance['stream']) && $instance['stream'] == 1 ? 'true' : 'false'; $header = isset($instance['header']) && $instance['header'] == 1 ? 'true' : 'false'; $border = isset($instance['border']) && $instance['border'] == 1 ? 'true' : 'false'; echo $before_widget; if (!empty( $title)) { echo $before_title . $title . $after_title; } if ($facebook_url) { echo '
'. "\n"; } echo $after_widget; } function update($new_instance, $old_instance) { $instance = $old_instance; $instance['title'] = sanitize_text_field($new_instance['title']); $instance['facebook_url'] = esc_url_raw($new_instance['facebook_url']); $instance['width'] = absint($new_instance['width']); $instance['height'] = absint($new_instance['height']); $instance['faces'] = isset($new_instance['faces']) ? strip_tags($new_instance['faces']) : ''; $instance['stream'] = isset($new_instance['stream']) ? strip_tags($new_instance['stream']) : ''; $instance['header'] = isset($new_instance['header']) ? strip_tags($new_instance['header']) : ''; $instance['border'] = isset($new_instance['border']) ? strip_tags($new_instance['border']) : ''; return $instance; } function form($instance) { $defaults = array('title' => __('Connect with us on Facebook', 'mh-magazine-lite'), 'facebook_url' => 'https://www.facebook.com/MHthemes', 'width' => '300', 'height' => '240', 'faces' => true, 'stream' => false, 'header' => false, 'border' => false); $instance = wp_parse_args((array) $instance, $defaults); ?>

px

px

/>

/>

/>

/>

'mh_slider_hp', 'description' => __('Slider widget for use on homepage template.', 'mh-magazine-lite')); $this->WP_Widget('mh_slider_hp', __('MH Slider Widget (Lite)', 'mh-magazine-lite'), $widget_ops); } function widget($args, $instance) { extract($args); $category = isset($instance['category']) ? $instance['category'] : ''; $tags = empty($instance['tags']) ? '' : $instance['tags']; $postcount = empty($instance['postcount']) ? '5' : $instance['postcount']; $offset = empty($instance['offset']) ? '' : $instance['offset']; $sticky = isset($instance['sticky']) ? $instance['sticky'] : 0; echo $before_widget; ?>
'', 'tags' => '', 'postcount' => '5', 'offset' => '0', 'sticky' => 0); $instance = wp_parse_args((array) $instance, $defaults); ?>

/>

Info: