get_field_name( $widget_field_name ) ) .'" id="'. esc_attr( $instance->get_field_id( $widget_field_name ) ) .'" class="widefat"'; ?>

'category', 'show_option_none' => __( '- - Select Category - -', 'articlewave' ), 'selected' => esc_attr( $widget_field_value ), 'show_option_all' => '', 'orderby' => 'id', 'order' => 'ASC', 'show_count' => 1, 'hide_empty' => 1, 'child_of' => 0, 'exclude' => '', 'hierarchical' => 1, 'depth' => 0, 'tab_index' => 0, 'hide_if_empty' => false, 'option_none_value' => 0, 'value_field' => 'slug', ) ); $dropdown_args['echo'] = false; $dropdown = wp_dropdown_categories( $dropdown_args ); $dropdown = str_replace( '

'; foreach ( $widget_field_options as $key => $value ) { $img_path = $value['img_path']; $class = ( $widget_field_value == $key ) ? 'selector-selected': ''; echo ''; } echo ''; echo ''; break; /** * Widget upload field */ case 'upload': $image = $image_class = ""; if ( $widget_field_value ) { $image = ''; $image_class = ' hidden'; } ?>

$value ) { $multicheck_list[esc_attr( $key )] = esc_attr( $value ); } } return $multicheck_list; } elseif ( $widget_field_type == 'multi_term_list' ) { $multi_term_list = array(); if ( is_array( $new_field_value ) ) { foreach ( $new_field_value as $key => $value ) { $multi_term_list[] = esc_attr( $value ); } } return $multi_term_list; } else { return sanitize_text_field( $new_field_value ); } } endif; if ( ! function_exists( 'articlewave_trending_posts_widget_layout_choices' ) ) : /** * function to return choices of trending posts widget layout * * @since 1.0.0 */ function articlewave_trending_posts_widget_layout_choices() { $widget_layout = apply_filters( 'articlewave_trending_posts_widget_layout_choices', array( 'trending-layout--one' => array( 'label' => esc_html__( 'Layout One', 'articlewave' ), 'img_path' => get_template_directory_uri() . '/inc/widgets/assets/images/latest-post-widget-layout-one.png' ), 'trending-layout--one' => array( 'label' => esc_html__( 'Layout Two', 'articlewave' ), 'img_path' => get_template_directory_uri() . '/inc/widgets/assets/images/latest-post-widget-layout-two.png' ) ) ); return $widget_layout; } endif; if ( ! function_exists( 'articlewave_posts_query_filter_choices' ) ) : /** * function to return choices of post query filter * * @since 1.0.0 */ function articlewave_posts_query_filter_choices() { $post_query_filter = apply_filters( 'articlewave_posts_query_filter_choices', array( 'latest' => __( 'Latest Posts', 'articlewave' ), 'random' => __( 'Random Posts', 'articlewave' ) ) ); return $post_query_filter; } endif; if ( ! function_exists( 'articlewave_trending_posts_filter_choices' ) ) : /** * function to return choices of trending posts filter * * @since 1.0.0 */ function articlewave_trending_posts_filter_choices() { $trending_posts_filter = apply_filters( 'articlewave_trending_posts_filter_choices', array( 'tag' => __( 'Tag', 'articlewave' ), 'comment' => __( 'Comment', 'articlewave' ) ) ); return $trending_posts_filter; } endif;