'galway_popular_post_widget', 'description' => esc_html__('Displays post form selected category specific for popular post in sidebars.', 'galway-lite'), 'customize_selective_refresh' => true, ); $fields = array( 'title' => array( 'label' => esc_html__('Title:', 'galway-lite'), 'type' => 'text', 'class' => 'widefat', ), 'post_category' => array( 'label' => esc_html__('Select Category:', 'galway-lite'), 'type' => 'dropdown-taxonomies', 'show_option_all' => esc_html__('All Categories', 'galway-lite'), ), 'post_number' => array( 'label' => esc_html__('Number of Posts:', 'galway-lite'), 'type' => 'number', 'default' => 4, 'css' => 'max-width:60px;', 'min' => 1, 'max' => 10, ), ); parent::__construct('galway-popular-sidebar-layout', esc_html__('GW: Recent Post', 'galway-lite'), $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['category'] = absint($params['post_category']); } $all_posts = get_posts($qargs); ?>
'galway_author_widget', 'description' => esc_html__('Displays authors details in post.', 'galway-lite'), 'customize_selective_refresh' => true, ); $fields = array( 'title' => array( 'label' => esc_html__('Title:', 'galway-lite'), 'type' => 'text', 'class' => 'widefat', ), 'author-name' => array( 'label' => esc_html__('Name:', 'galway-lite'), 'type' => 'text', 'class' => 'widefat', ), 'discription' => array( 'label' => esc_html__('Discription:', 'galway-lite'), 'type' => 'textarea', 'class' => 'widget-content widefat' ), 'image_url' => array( 'label' => esc_html__('Author Image:', 'galway-lite'), 'type' => 'image', ), 'url-fb' => array( 'label' => esc_html__('Facebook URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-tw' => array( 'label' => esc_html__('Twitter URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-gp' => array( 'label' => esc_html__('Googleplus URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), ); parent::__construct('galway-author-layout', esc_html__('GW: Author Widget', 'galway-lite'), $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']; } ?> 'galway_social_widget', 'description' => esc_html__('Displays Social share.', 'galway-lite'), 'customize_selective_refresh' => true, ); $fields = array( 'title' => array( 'label' => esc_html__('Title:', 'galway-lite'), 'type' => 'text', 'class' => 'widefat', ), 'url-fb' => array( 'label' => esc_html__('Facebook URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-tw' => array( 'label' => esc_html__('Twitter URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-gp' => array( 'label' => esc_html__('Googleplus URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-lt' => array( 'label' => esc_html__('Linkedin URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-ig' => array( 'label' => esc_html__('Instagram URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-pt' => array( 'label' => esc_html__('Pinterest URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-rt' => array( 'label' => esc_html__('Reddit URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-sk' => array( 'label' => esc_html__('Skype URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-sc' => array( 'label' => esc_html__('Snapchat URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-tr' => array( 'label' => esc_html__('Tumblr URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-th' => array( 'label' => esc_html__('Twitch URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-yt' => array( 'label' => esc_html__('Youtube URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-vo' => array( 'label' => esc_html__('Vimeo URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-wa' => array( 'label' => esc_html__('Whatsapp URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-wp' => array( 'label' => esc_html__('WordPress URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-gh' => array( 'label' => esc_html__('Github URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-fs' => array( 'label' => esc_html__('FourSquare URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), 'url-db' => array( 'label' => esc_html__('Dribbble URL:', 'galway-lite'), 'type' => 'url', 'class' => 'widefat', ), ); parent::__construct('galway-social-layout', esc_html__('GW: Social Widget', 'galway-lite'), $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']; } ?>