PluginProbe
Polylang / 2.8
Polylang v2.8
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | settings/table-languages.php +21 -23 3.02.8 View file →
@@ -29,14 +29,13 @@
29 29 );
30 30 }
31 31
32 32 /**
33 - * Generates content for a single row of the table.
33 + * Generates content for a single row of the table
34 34 *
35 35 * @since 1.8
36 36 *
37 - * @param PLL_Language $item The language item.
38 - * @return void
37 + * @param object $item The current item
39 38 */
40 39 public function single_row( $item ) {
41 40 /**
42 41 * Filter the list of classes assigned a row in the languages list table
@@ -42,10 +41,10 @@
42 41 * Filter the list of classes assigned a row in the languages list table
43 42 *
44 43 * @since 1.8
45 44 *
46 - * @param array $classes The list of class names.
47 - * @param PLL_Language $item The language item.
45 + * @param array $classes list of class names
46 + * @param object $item the current item
48 47 */
49 48 $classes = apply_filters( 'pll_languages_row_classes', array(), $item );
50 49 echo '<tr' . ( empty( $classes ) ? '>' : ' class="' . esc_attr( implode( ' ', $classes ) ) . '">' );
51 50 $this->single_row_columns( $item );
@@ -52,15 +51,15 @@
52 51 echo '</tr>';
53 52 }
54 53
55 54 /**
56 - * Displays the item information in a column ( default case ).
55 + * Displays the item information in a column ( default case )
57 56 *
58 57 * @since 0.1
59 58 *
60 - * @param PLL_Language $item The language item.
61 - * @param string $column_name The column name.
62 - * @return string|int
59 + * @param object $item
60 + * @param string $column_name
61 + * @return string
63 62 */
64 63 public function column_default( $item, $column_name ) {
65 64 switch ( $column_name ) {
66 65 case 'locale':
@@ -71,9 +70,9 @@
71 70 case 'count':
72 71 return (int) $item->$column_name;
73 72
74 73 default:
75 - return $item->$column_name; // Flag.
74 + return $item->$column_name; // flag
76 75 }
77 76 }
78 77
79 78 /**
@@ -81,9 +80,9 @@
81 80 * Displays the edit and delete action links
82 81 *
83 82 * @since 0.1
84 83 *
85 - * @param PLL_Language $item The language item.
84 + * @param object $item
86 85 * @return string
87 86 */
88 87 public function column_name( $item ) {
89 88 return sprintf(
@@ -99,9 +98,9 @@
99 98 * Displays the 'make default' action link
100 99 *
101 100 * @since 1.8
102 101 *
103 - * @param PLL_Language $item The language item.
102 + * @param object $item
104 103 * @return string
105 104 */
106 105 public function column_default_lang( $item ) {
107 106 $options = get_option( 'polylang' );
@@ -117,14 +116,14 @@
117 116 esc_html( sprintf( __( 'Choose %s as default language', 'polylang' ), $item->name ) )
118 117 );
119 118
120 119 /**
121 - * Filters the default language row action in the languages list table.
120 + * Filter the default language row action in the languages list table
122 121 *
123 122 * @since 1.8
124 123 *
125 - * @param string $s The html markup of the action.
126 - * @param PLL_Language $item The language item.
124 + * @param string $s html markup of the action
125 + * @param object $item
127 126 */
128 127 $s = apply_filters( 'pll_default_lang_row_action', $s, $item );
129 128 } else {
130 129 $s = sprintf(
@@ -141,9 +140,9 @@
141 140 * Gets the list of columns
142 141 *
143 142 * @since 0.1
144 143 *
145 - * @return string[] The list of column titles.
144 + * @return array the list of column titles
146 145 */
147 146 public function get_columns() {
148 147 return array(
149 148 'name' => esc_html__( 'Full name', 'polylang' ),
@@ -188,11 +187,11 @@
188 187 * Generates and display row actions links for the list table.
189 188 *
190 189 * @since 1.8
191 190 *
192 - * @param PLL_Language $item The language item being acted upon.
193 - * @param string $column_name Current column name.
194 - * @param string $primary Primary column name.
191 + * @param object $item The item being acted upon.
192 + * @param string $column_name Current column name.
193 + * @param string $primary Primary column name.
195 194 * @return string The row actions output.
196 195 */
197 196 protected function handle_row_actions( $item, $column_name, $primary ) {
198 197 if ( $primary !== $column_name ) {
@@ -215,14 +214,14 @@
215 214 ),
216 215 );
217 216
218 217 /**
219 - * Filters the list of row actions in the languages list table.
218 + * Filter the list of row actions in the languages list table
220 219 *
221 220 * @since 1.8
222 221 *
223 - * @param array $actions A list of html markup actions.
224 - * @param PLL_Language $item The language item.
222 + * @param array $actions list of html markup actions
223 + * @param object $item
225 224 */
226 225 $actions = apply_filters( 'pll_languages_row_actions', $actions, $item );
227 226
228 227 return $this->row_actions( $actions );
@@ -254,9 +253,8 @@
254 253 *
255 254 * @since 0.1
256 255 *
257 256 * @param array $data
258 - * @return void
259 257 */
260 258 public function prepare_items( $data = array() ) {
261 259 $per_page = $this->get_items_per_page( 'pll_lang_per_page' );
262 260 $this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns() );