'athemes_employees_widget', 'description' => __( 'Display your team members in a stylish way.', 'talon') ); parent::__construct(false, $name = __('Talon: Employees', 'talon'), $widget_ops); $this->alt_option_name = 'athemes_employees_widget'; } function form($instance) { $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : -1; $category = isset( $instance['category'] ) ? esc_attr( $instance['category'] ) : ''; $see_all = isset( $instance['see_all'] ) ? esc_url( $instance['see_all'] ) : ''; $see_all_text = isset( $instance['see_all_text'] ) ? esc_html( $instance['see_all_text'] ) : ''; ?>
id; } $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : ''; $see_all = isset( $instance['see_all'] ) ? esc_url($instance['see_all']) : ''; $see_all_text = isset( $instance['see_all_text'] ) ? esc_html($instance['see_all_text']) : ''; $number = ( ! empty( $instance['number'] ) ) ? intval( $instance['number'] ) : -1; if ( ! $number ) $number = -1; $category = isset( $instance['category'] ) ? esc_attr($instance['category']) : ''; $employees = new WP_Query(array( 'no_found_rows' => true, 'post_status' => 'publish', 'post_type' => 'employees', 'posts_per_page' => $number, 'category_name' => $category ) ); echo $args['before_widget']; if ($employees->have_posts()) : ?> ' . sprintf( _x('Info: you have not created any employees. Make sure you have installed the %1$s plugin and then create some employees %2$s', 'no posts info', 'talon'), 'aThemes Toolbox', '' . __('here', 'talon') . '' ) . ''; endif; echo $args['after_widget']; } }