lightspeeddevelopment /
lsx-team
| 1 | <?php |
||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 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 ); |
||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 65 | $show_job_title = '1' == $show_job_title ? 'true' : 'false'; |
||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 70 | |||
| 71 | if ( $title_link ) { |
||
|
0 ignored issues
–
show
|
|||
| 72 | //$link_open = '<a href="' . $title_link . '">'; |
||
|
0 ignored issues
–
show
|
|||
| 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. Loading history...
|
|||
| 74 | $link_btn_open = '<a href="' . $title_link . '" class="btn border-btn">'; |
||
| 75 | //$link_close = '</a>'; |
||
|
0 ignored issues
–
show
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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, |
||
| 98 | 'orderby' => $orderby, |
||
| 99 | 'order' => $order, |
||
| 100 | 'role' => $role, |
||
| 101 | 'limit' => $limit, |
||
| 102 | 'include' => $include, |
||
| 103 | 'display' => $display, |
||
| 104 | 'size' => $size, |
||
| 105 | 'show_link' => $show_link, |
||
| 106 | 'show_image' => $show_image, |
||
| 107 | 'show_roles' => $show_roles, |
||
| 108 | 'show_job_title' => $show_job_title, |
||
| 109 | 'show_desc' => $show_desc, |
||
| 110 | 'show_social' => $show_social, |
||
| 111 | 'carousel' => $carousel, |
||
| 112 | 'featured' => $featured, |
||
| 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.
Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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', |
||
| 154 | 'title_link' => '', |
||
| 155 | 'tagline' => '', |
||
| 156 | 'columns' => '1', |
||
| 157 | 'orderby' => 'name', |
||
| 158 | 'order' => 'ASC', |
||
| 159 | 'role' => '', |
||
| 160 | 'limit' => '', |
||
| 161 | 'include' => '', |
||
| 162 | 'display' => 'excerpt', |
||
| 163 | 'size' => 'lsx-team-archive', |
||
| 164 | 'show_link' => 0, |
||
| 165 | 'show_image' => 1, |
||
| 166 | 'show_roles' => 0, |
||
| 167 | 'show_job_title' => 1, |
||
| 168 | 'show_desc' => 1, |
||
| 169 | 'show_social' => 1, |
||
| 170 | 'button_text' => '', |
||
| 171 | 'carousel' => 1, |
||
| 172 | 'featured' => 0, |
||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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. Loading history...
|
|||
| 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>'; |
||
| 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', |
||
| 230 | esc_html__( 'ID', 'lsx-team' ) => 'ID', |
||
| 231 | esc_html__( 'Name', 'lsx-team' ) => 'name', |
||
| 232 | esc_html__( 'Date', 'lsx-team' ) => 'date', |
||
| 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>'; |
||
| 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', |
||
| 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>'; |
||
| 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>'; |
||
| 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>'; |
||
| 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 |