1 | <?php |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
2 | /** |
||
3 | * LSX Team Widget Class |
||
4 | * |
||
5 | * @package LSX Team |
||
6 | * @author LightSpeed |
||
7 | * @license GPL3 |
||
8 | * @link |
||
9 | * @copyright 2016 LightSpeed |
||
10 | */ |
||
11 | class LSX_Team_Widget extends WP_Widget { |
||
12 | |||
13 | public function __construct() { |
||
0 ignored issues
–
show
|
|||
14 | $widget_ops = array( |
||
15 | 'classname' => 'lsx-team', |
||
16 | ); |
||
17 | |||
18 | parent::__construct( 'LSX_Team_Widget', esc_html__( 'LSX Team Members', 'lsx-team' ), $widget_ops ); |
||
19 | } |
||
0 ignored issues
–
show
|
|||
20 | |||
21 | public function widget( $args, $instance ) { |
||
0 ignored issues
–
show
|
|||
22 | extract( $args ); |
||
0 ignored issues
–
show
|
|||
23 | |||
24 | $title = $instance['title']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 10 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
25 | $title_link = $instance['title_link']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
26 | $tagline = $instance['tagline']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
27 | $columns = $instance['columns']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
28 | $orderby = $instance['orderby']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
29 | $order = $instance['order']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 10 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
30 | $role = $instance['role']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 11 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
31 | $limit = $instance['limit']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 10 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
32 | $include = $instance['include']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
33 | $display = $instance['display']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
34 | $size = $instance['size']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 11 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
35 | $show_link = $instance['show_link']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
36 | $show_image = $instance['show_image']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
37 | $show_roles = $instance['show_roles']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
38 | $show_job_title = $instance['show_job_title']; |
||
39 | $show_desc = $instance['show_desc']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
40 | $show_social = $instance['show_social']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
41 | $button_text = $instance['button_text']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
42 | $carousel = $instance['carousel']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
43 | $featured = $instance['featured']; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
44 | |||
45 | // If limit not set, display 99 posts |
||
0 ignored issues
–
show
|
|||
46 | if ( empty( $limit ) ) { |
||
0 ignored issues
–
show
|
|||
47 | $limit = '99'; |
||
48 | } |
||
49 | |||
50 | // If specific posts included, display 99 posts |
||
0 ignored issues
–
show
|
|||
51 | if ( ! empty( $include ) ) { |
||
0 ignored issues
–
show
|
|||
52 | $limit = '99'; |
||
53 | } |
||
54 | |||
55 | // Disregard specific ID setting if specific role is defined |
||
0 ignored issues
–
show
|
|||
56 | if ( 'all' !== $role ) { |
||
0 ignored issues
–
show
|
|||
57 | $include = ''; |
||
58 | } else { |
||
59 | $role = ''; |
||
60 | } |
||
61 | |||
62 | $show_link = '1' == $show_link ? 'true' : 'false'; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
63 | $show_image = '1' == $show_image ? 'true' : 'false'; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
64 | $show_roles = '1' == $show_roles ? 'true' : 'false'; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
65 | $show_job_title = '1' == $show_job_title ? 'true' : 'false'; |
||
0 ignored issues
–
show
|
|||
66 | $show_desc = '1' == $show_desc ? 'true' : 'false'; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
67 | $show_social = '1' == $show_social ? 'true' : 'false'; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
68 | $carousel = '1' == $carousel ? 'true' : 'false'; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
69 | $featured = '1' == $featured ? 'true' : 'false'; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
70 | |||
71 | if ( $title_link ) { |
||
0 ignored issues
–
show
|
|||
72 | //$link_open = '<a href="' . $title_link . '">'; |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
43% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
73 | $link_open = ''; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
74 | $link_btn_open = '<a href="' . $title_link . '" class="btn border-btn">'; |
||
75 | //$link_close = '</a>'; |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
67% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
76 | $link_close = ''; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
77 | $link_btn_close = '</a>'; |
||
78 | } else { |
||
79 | $link_open = ''; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
80 | $link_btn_open = ''; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
81 | $link_close = ''; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
82 | $link_btn_close = ''; |
||
83 | } |
||
84 | |||
85 | echo wp_kses_post( $before_widget ); |
||
86 | |||
87 | if ( $title ) { |
||
0 ignored issues
–
show
|
|||
88 | echo wp_kses_post( $before_title . $link_open . $title . $link_close . $after_title ); |
||
89 | } |
||
90 | |||
91 | if ( $tagline ) { |
||
0 ignored issues
–
show
|
|||
92 | echo '<p class="tagline text-center">' . esc_html( $tagline ) . '</p>'; |
||
93 | } |
||
94 | |||
95 | if ( class_exists( 'LSX_Team' ) ) { |
||
0 ignored issues
–
show
|
|||
96 | lsx_team( array( |
||
0 ignored issues
–
show
|
|||
97 | 'columns' => $columns, |
||
0 ignored issues
–
show
|
|||
98 | 'orderby' => $orderby, |
||
0 ignored issues
–
show
|
|||
99 | 'order' => $order, |
||
0 ignored issues
–
show
|
|||
100 | 'role' => $role, |
||
0 ignored issues
–
show
|
|||
101 | 'limit' => $limit, |
||
0 ignored issues
–
show
|
|||
102 | 'include' => $include, |
||
0 ignored issues
–
show
|
|||
103 | 'display' => $display, |
||
0 ignored issues
–
show
|
|||
104 | 'size' => $size, |
||
0 ignored issues
–
show
|
|||
105 | 'show_link' => $show_link, |
||
0 ignored issues
–
show
|
|||
106 | 'show_image' => $show_image, |
||
0 ignored issues
–
show
|
|||
107 | 'show_roles' => $show_roles, |
||
0 ignored issues
–
show
|
|||
108 | 'show_job_title' => $show_job_title, |
||
109 | 'show_desc' => $show_desc, |
||
0 ignored issues
–
show
|
|||
110 | 'show_social' => $show_social, |
||
0 ignored issues
–
show
|
|||
111 | 'carousel' => $carousel, |
||
0 ignored issues
–
show
|
|||
112 | 'featured' => $featured, |
||
0 ignored issues
–
show
|
|||
113 | ) ); |
||
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
![]() |
|||
114 | |||
0 ignored issues
–
show
|
|||
115 | }; |
||
116 | |||
117 | if ( $button_text && $title_link ) { |
||
0 ignored issues
–
show
|
|||
118 | echo wp_kses_post( '<p class="text-center lsx-team-archive-link-wrap"><span class="lsx-team-archive-link">' . $link_btn_open . $button_text . ' <i class="fa fa-angle-right"></i>' . $link_btn_close . '</span></p>' ); |
||
119 | } |
||
120 | |||
121 | echo wp_kses_post( $after_widget ); |
||
122 | } |
||
0 ignored issues
–
show
|
|||
123 | |||
124 | public function update( $new_instance, $old_instance ) { |
||
0 ignored issues
–
show
|
|||
125 | $instance = $old_instance; |
||
126 | |||
127 | $instance['title'] = wp_kses_post( force_balance_tags( $new_instance['title'] ) ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 10 spaces but found 14 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
128 | $instance['title_link'] = strip_tags( $new_instance['title_link'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 9 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
129 | $instance['tagline'] = strip_tags( $new_instance['tagline'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 12 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
130 | $instance['columns'] = strip_tags( $new_instance['columns'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 12 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
131 | $instance['orderby'] = strip_tags( $new_instance['orderby'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 12 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
132 | $instance['order'] = strip_tags( $new_instance['order'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 10 spaces but found 14 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
133 | $instance['role'] = strip_tags( $new_instance['role'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 11 spaces but found 15 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
134 | $instance['limit'] = strip_tags( $new_instance['limit'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 10 spaces but found 14 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
135 | $instance['include'] = strip_tags( $new_instance['include'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 12 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
136 | $instance['display'] = strip_tags( $new_instance['display'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 12 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
137 | $instance['size'] = strip_tags( $new_instance['size'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 11 spaces but found 15 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
138 | $instance['show_link'] = strip_tags( $new_instance['show_link'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 10 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
139 | $instance['show_image'] = strip_tags( $new_instance['show_image'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 9 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
140 | $instance['show_roles'] = strip_tags( $new_instance['show_roles'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 9 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
141 | $instance['show_job_title'] = strip_tags( $new_instance['show_job_title'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 1 space but found 5 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
142 | $instance['show_desc'] = strip_tags( $new_instance['show_desc'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 10 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
143 | $instance['show_social'] = strip_tags( $new_instance['show_social'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 8 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
144 | $instance['button_text'] = strip_tags( $new_instance['button_text'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 8 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
145 | $instance['carousel'] = strip_tags( $new_instance['carousel'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 11 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
146 | $instance['featured'] = strip_tags( $new_instance['featured'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 11 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
147 | |||
148 | return $instance; |
||
149 | } |
||
0 ignored issues
–
show
|
|||
150 | |||
151 | public function form( $instance ) { |
||
0 ignored issues
–
show
|
|||
152 | $defaults = array( |
||
153 | 'title' => 'Team Members', |
||
0 ignored issues
–
show
|
|||
154 | 'title_link' => '', |
||
0 ignored issues
–
show
|
|||
155 | 'tagline' => '', |
||
0 ignored issues
–
show
|
|||
156 | 'columns' => '1', |
||
0 ignored issues
–
show
|
|||
157 | 'orderby' => 'name', |
||
0 ignored issues
–
show
|
|||
158 | 'order' => 'ASC', |
||
0 ignored issues
–
show
|
|||
159 | 'role' => '', |
||
0 ignored issues
–
show
|
|||
160 | 'limit' => '', |
||
0 ignored issues
–
show
|
|||
161 | 'include' => '', |
||
0 ignored issues
–
show
|
|||
162 | 'display' => 'excerpt', |
||
0 ignored issues
–
show
|
|||
163 | 'size' => 'lsx-team-archive', |
||
0 ignored issues
–
show
|
|||
164 | 'show_link' => 0, |
||
0 ignored issues
–
show
|
|||
165 | 'show_image' => 1, |
||
0 ignored issues
–
show
|
|||
166 | 'show_roles' => 0, |
||
0 ignored issues
–
show
|
|||
167 | 'show_job_title' => 1, |
||
168 | 'show_desc' => 1, |
||
0 ignored issues
–
show
|
|||
169 | 'show_social' => 1, |
||
0 ignored issues
–
show
|
|||
170 | 'button_text' => '', |
||
0 ignored issues
–
show
|
|||
171 | 'carousel' => 1, |
||
0 ignored issues
–
show
|
|||
172 | 'featured' => 0, |
||
0 ignored issues
–
show
|
|||
173 | ); |
||
174 | |||
175 | $instance = wp_parse_args( (array) $instance, $defaults ); |
||
176 | |||
177 | $title = esc_attr( $instance['title'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 10 spaces but found 14 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
178 | $title_link = esc_attr( $instance['title_link'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 9 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
179 | $tagline = esc_attr( $instance['tagline'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 12 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
180 | $columns = esc_attr( $instance['columns'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 12 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
181 | $orderby = esc_attr( $instance['orderby'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 12 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
182 | $order = esc_attr( $instance['order'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 10 spaces but found 14 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
183 | $role = esc_attr( $instance['role'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 11 spaces but found 15 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
184 | $limit = esc_attr( $instance['limit'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 10 spaces but found 14 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
185 | $include = esc_attr( $instance['include'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 12 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
186 | $display = esc_attr( $instance['display'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 12 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
187 | $size = esc_attr( $instance['size'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 11 spaces but found 15 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
188 | $show_link = esc_attr( $instance['show_link'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 10 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
189 | $show_image = esc_attr( $instance['show_image'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 9 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
190 | $show_roles = esc_attr( $instance['show_roles'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 9 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
191 | $show_job_title = esc_attr( $instance['show_job_title'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 1 space but found 5 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
192 | $show_desc = esc_attr( $instance['show_desc'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 10 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
193 | $show_social = esc_attr( $instance['show_social'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 8 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
194 | $button_text = esc_attr( $instance['button_text'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 8 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
195 | $carousel = esc_attr( $instance['carousel'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 11 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
196 | $featured = esc_attr( $instance['featured'] ); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 11 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
197 | ?> |
||
198 | <p> |
||
199 | <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title:', 'lsx-team' ); ?></label> |
||
200 | <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /> |
||
201 | </p> |
||
202 | <p> |
||
203 | <label for="<?php echo esc_attr( $this->get_field_id( 'title_link' ) ); ?>"><?php esc_html_e( 'Page Link:', 'lsx-team' ); ?></label> |
||
204 | <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title_link' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title_link' ) ); ?>" type="text" value="<?php echo esc_attr( $title_link ); ?>" /> |
||
205 | <small><?php esc_html_e( 'Link the widget to a page', 'lsx-team' ); ?></small> |
||
206 | </p> |
||
207 | <p> |
||
208 | <label for="<?php echo esc_attr( $this->get_field_id( 'tagline' ) ); ?>"><?php esc_html_e( 'Tagline:', 'lsx-team' ); ?></label> |
||
209 | <textarea class="widefat" rows="8" cols="20" id="<?php echo esc_attr( $this->get_field_id( 'tagline' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'tagline' ) ); ?>"><?php echo esc_html( $tagline ); ?></textarea> |
||
210 | <small><?php esc_html_e( 'Tagline to display below the widget title', 'lsx-team' ); ?></small> |
||
211 | </p> |
||
212 | <p> |
||
213 | <label for="<?php echo esc_attr( $this->get_field_id( 'columns' ) ); ?>"><?php esc_html_e( 'Columns:', 'lsx-team' ); ?></label> |
||
214 | <select name="<?php echo esc_attr( $this->get_field_name( 'columns' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'columns' ) ); ?>" class="widefat layout"> |
||
215 | <?php |
||
216 | $options = array( '1', '2', '3', '4' ); |
||
217 | |||
218 | foreach ( $options as $option ) { |
||
0 ignored issues
–
show
|
|||
219 | echo '<option value="' . lcfirst( esc_attr( $option ) ) . '" id="' . esc_attr( $option ) . '"', lcfirst( $option ) == $columns ? ' selected="selected"' : '', '>', esc_html( $option ), '</option>'; |
||
0 ignored issues
–
show
|
|||
220 | } |
||
221 | ?> |
||
222 | </select> |
||
223 | </p> |
||
224 | <p> |
||
225 | <label for="<?php echo esc_attr( $this->get_field_id( 'orderby' ) ); ?>"><?php esc_html_e( 'Order By:', 'lsx-team' ); ?></label> |
||
226 | <select name="<?php echo esc_attr( $this->get_field_name( 'orderby' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'orderby' ) ); ?>" class="widefat"> |
||
227 | <?php |
||
228 | $options = array( |
||
229 | esc_html__( 'None', 'lsx-team' ) => 'none', |
||
0 ignored issues
–
show
|
|||
230 | esc_html__( 'ID', 'lsx-team' ) => 'ID', |
||
0 ignored issues
–
show
|
|||
231 | esc_html__( 'Name', 'lsx-team' ) => 'name', |
||
0 ignored issues
–
show
|
|||
232 | esc_html__( 'Date', 'lsx-team' ) => 'date', |
||
0 ignored issues
–
show
|
|||
233 | esc_html__( 'Modified Date', 'lsx-team' ) => 'modified', |
||
234 | esc_html__( 'Random', 'lsx-team' ) => 'rand', |
||
235 | esc_html__( 'Menu (WP dashboard order)', 'lsx-team' ) => 'menu_order', |
||
236 | ); |
||
237 | |||
238 | foreach ( $options as $name => $value ) { |
||
0 ignored issues
–
show
|
|||
239 | echo '<option value="' . esc_attr( $value ) . '" id="' . esc_attr( $value ) . '"', $orderby == $value ? ' selected="selected"' : '', '>', esc_html( $name ), '</option>'; |
||
0 ignored issues
–
show
|
|||
240 | } |
||
241 | ?> |
||
242 | </select> |
||
243 | </p> |
||
244 | <p> |
||
245 | <label for="<?php echo esc_attr( $this->get_field_id( 'order' ) ); ?>"><?php esc_html_e( 'Order:', 'lsx-team' ); ?></label> |
||
246 | <select name="<?php echo esc_attr( $this->get_field_name( 'order' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'order' ) ); ?>" class="widefat"> |
||
247 | <?php |
||
248 | $options = array( |
||
249 | esc_html__( 'Ascending', 'lsx-team' ) => 'ASC', |
||
0 ignored issues
–
show
|
|||
250 | esc_html__( 'Descending', 'lsx-team' ) => 'DESC', |
||
251 | ); |
||
252 | |||
253 | foreach ( $options as $name => $value ) { |
||
0 ignored issues
–
show
|
|||
254 | echo '<option value="' . esc_attr( $value ) . '" id="' . esc_attr( $value ) . '"', $order == $value ? ' selected="selected"' : '', '>', esc_html( $name ), '</option>'; |
||
0 ignored issues
–
show
|
|||
255 | } |
||
256 | ?> |
||
257 | </select> |
||
258 | </p> |
||
259 | <p> |
||
260 | <label for="<?php echo esc_attr( $this->get_field_id( 'role' ) ); ?>"><?php esc_html_e( 'Role:', 'lsx-team' ); ?></label> |
||
261 | <select name="<?php echo esc_attr( $this->get_field_name( 'role' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'role' ) ); ?>" class="widefat"> |
||
262 | <?php |
||
263 | $options = get_terms( 'team_role' ); |
||
264 | ?> |
||
265 | <option value="all" id="all"> |
||
266 | <?php esc_html_e( 'All Roles', 'lsx-team' ); ?> |
||
267 | </option> |
||
268 | <?php |
||
269 | foreach ( $options as $option ) { |
||
0 ignored issues
–
show
|
|||
270 | echo '<option value="' . esc_attr( $option->slug ) . '" id="' . esc_attr( $option->slug ) . '"', $role == $option->slug ? ' selected="selected"' : '', '>', esc_html( $option->name ), '</option>'; |
||
0 ignored issues
–
show
|
|||
271 | } |
||
272 | ?> |
||
273 | </select> |
||
274 | <small><?php esc_html_e( 'Display team members within a specific role', 'lsx-team' ); ?></small> |
||
275 | </p> |
||
276 | <p> |
||
277 | <label for="<?php echo esc_attr( $this->get_field_id( 'limit' ) ); ?>"><?php esc_html_e( 'Maximum amount:', 'lsx-team' ); ?></label> |
||
278 | <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'limit' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'limit' ) ); ?>" type="text" value="<?php echo esc_attr( $limit ); ?>" /> |
||
279 | <small><?php esc_html_e( 'Leave empty to display all', 'lsx-team' ); ?></small> |
||
280 | </p> |
||
281 | <p> |
||
282 | <label for="<?php echo esc_attr( $this->get_field_id( 'include' ) ); ?>"><?php esc_html_e( 'Specify Team Members by ID:', 'lsx-team' ); ?></label> |
||
283 | <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'include' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'include' ) ); ?>" type="text" value="<?php echo esc_attr( $include ); ?>" /> |
||
284 | <small><?php esc_html_e( 'Comma separated list, overrides limit setting', 'lsx-team' ); ?></small> |
||
285 | </p> |
||
286 | <p> |
||
287 | <label for="<?php echo esc_attr( $this->get_field_id( 'display' ) ); ?>"><?php esc_html_e( 'Display:', 'lsx-team' ); ?></label> |
||
288 | <select name="<?php echo esc_attr( $this->get_field_name( 'display' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'display' ) ); ?>" class="widefat"> |
||
289 | <?php |
||
290 | $options = array( |
||
291 | esc_html__( 'Excerpt', 'lsx-team' ) => 'excerpt', |
||
292 | esc_html__( 'Full Content', 'lsx-team' ) => 'full', |
||
293 | ); |
||
294 | |||
295 | foreach ( $options as $name => $value ) { |
||
0 ignored issues
–
show
|
|||
296 | echo '<option value="' . esc_attr( $value ) . '" id="' . esc_attr( $value ) . '"', $display == $value ? ' selected="selected"' : '', '>', esc_html( $name ), '</option>'; |
||
0 ignored issues
–
show
|
|||
297 | } |
||
298 | ?> |
||
299 | </select> |
||
300 | </p> |
||
301 | <p> |
||
302 | <label for="<?php echo esc_attr( $this->get_field_id( 'size' ) ); ?>"><?php esc_html_e( 'Image size:', 'lsx-team' ); ?></label> |
||
303 | <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'size' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'size' ) ); ?>" type="text" value="<?php echo esc_attr( $size ); ?>" /> |
||
304 | </p> |
||
305 | <p> |
||
306 | <label for="<?php echo esc_attr( $this->get_field_id( 'button_text' ) ); ?>"><?php esc_html_e( 'Button "view all" text:', 'lsx-team' ); ?></label> |
||
307 | <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'button_text' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'button_text' ) ); ?>" type="text" value="<?php echo esc_attr( $button_text ); ?>" /> |
||
308 | <small><?php esc_html_e( 'Leave empty to not display the button', 'lsx-team' ); ?></small> |
||
309 | </p> |
||
310 | <p> |
||
311 | <input id="<?php echo esc_attr( $this->get_field_id( 'show_link' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'show_link' ) ); ?>" type="checkbox" value="1" <?php checked( '1', $show_link ); ?> /> |
||
312 | <label for="<?php echo esc_attr( $this->get_field_id( 'show_link' ) ); ?>"><?php esc_html_e( 'Link to Single', 'lsx-team' ); ?></label> |
||
313 | </p> |
||
314 | <p> |
||
315 | <input id="<?php echo esc_attr( $this->get_field_id( 'show_image' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'show_image' ) ); ?>" type="checkbox" value="1" <?php checked( '1', $show_image ); ?> /> |
||
316 | <label for="<?php echo esc_attr( $this->get_field_id( 'show_image' ) ); ?>"><?php esc_html_e( 'Show Images', 'lsx-team' ); ?></label> |
||
317 | </p> |
||
318 | <p> |
||
319 | <input id="<?php echo esc_attr( $this->get_field_id( 'show_roles' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'show_roles' ) ); ?>" type="checkbox" value="1" <?php checked( '1', $show_roles ); ?> /> |
||
320 | <label for="<?php echo esc_attr( $this->get_field_id( 'show_roles' ) ); ?>"><?php esc_html_e( 'Show Roles', 'lsx-team' ); ?></label> |
||
321 | </p> |
||
322 | <p> |
||
323 | <input id="<?php echo esc_attr( $this->get_field_id( 'show_job_title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'show_job_title' ) ); ?>" type="checkbox" value="1" <?php checked( '1', $show_job_title ); ?> /> |
||
324 | <label for="<?php echo esc_attr( $this->get_field_id( 'show_job_title' ) ); ?>"><?php esc_html_e( 'Show Job Title', 'lsx-team' ); ?></label> |
||
325 | </p> |
||
326 | <p> |
||
327 | <input id="<?php echo esc_attr( $this->get_field_id( 'show_desc' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'show_desc' ) ); ?>" type="checkbox" value="1" <?php checked( '1', $show_desc ); ?> /> |
||
328 | <label for="<?php echo esc_attr( $this->get_field_id( 'show_desc' ) ); ?>"><?php esc_html_e( 'Show Description', 'lsx-team' ); ?></label> |
||
329 | </p> |
||
330 | <p> |
||
331 | <input id="<?php echo esc_attr( $this->get_field_id( 'show_social' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'show_social' ) ); ?>" type="checkbox" value="1" <?php checked( '1', $show_social ); ?> /> |
||
332 | <label for="<?php echo esc_attr( $this->get_field_id( 'show_social' ) ); ?>"><?php esc_html_e( 'Show Social Icons', 'lsx-team' ); ?></label> |
||
333 | </p> |
||
334 | <p> |
||
335 | <input id="<?php echo esc_attr( $this->get_field_id( 'carousel' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'carousel' ) ); ?>" type="checkbox" value="1" <?php checked( '1', $carousel ); ?> /> |
||
336 | <label for="<?php echo esc_attr( $this->get_field_id( 'carousel' ) ); ?>"><?php esc_html_e( 'Carousel', 'lsx-team' ); ?></label> |
||
337 | </p> |
||
338 | <p> |
||
339 | <input id="<?php echo esc_attr( $this->get_field_id( 'featured' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'featured' ) ); ?>" type="checkbox" value="1" <?php checked( '1', $featured ); ?> /> |
||
340 | <label for="<?php echo esc_attr( $this->get_field_id( 'featured' ) ); ?>"><?php esc_html_e( 'Featured posts', 'lsx-team' ); ?></label> |
||
341 | </p> |
||
342 | <?php |
||
343 | } |
||
0 ignored issues
–
show
|
|||
344 | |||
345 | } |
||
346 | |||
347 | /** |
||
348 | * Registers the Widget |
||
0 ignored issues
–
show
|
|||
349 | */ |
||
0 ignored issues
–
show
|
|||
350 | function lsx_team_widget() { |
||
0 ignored issues
–
show
|
|||
351 | register_widget( 'LSX_Team_Widget' ); |
||
352 | } |
||
0 ignored issues
–
show
|
|||
353 | |||
354 | add_action( 'widgets_init', 'lsx_team_widget' ); |
||
355 |