| @@ -16,8 +16,10 @@ | ||
| 16 | 16 | */ |
| 17 | 17 | public $options; |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | + * Instance of PLL_Model. | |
| 21 | + * | |
| 20 | 22 | * @var PLL_Model |
| 21 | 23 | */ |
| 22 | 24 | public $model; |
| 23 | 25 | |
| @@ -158,10 +160,8 @@ | ||
| 158 | 160 | /** |
| 159 | 161 | * Activates the module |
| 160 | 162 | * |
| 161 | 163 | * @since 1.8 |
| 162 | - * | |
| 163 | - * @return void | |
| 164 | 164 | */ |
| 165 | 165 | public function activate() { |
| 166 | 166 | if ( ! empty( $this->active_option ) ) { |
| 167 | 167 | $this->options[ $this->active_option ] = true; |
| @@ -172,10 +172,8 @@ | ||
| 172 | 172 | /** |
| 173 | 173 | * Deactivates the module |
| 174 | 174 | * |
| 175 | 175 | * @since 1.8 |
| 176 | - * | |
| 177 | - * @return void | |
| 178 | 176 | */ |
| 179 | 177 | public function deactivate() { |
| 180 | 178 | if ( ! empty( $this->active_option ) ) { |
| 181 | 179 | $this->options[ $this->active_option ] = false; |
| @@ -186,10 +184,8 @@ | ||
| 186 | 184 | /** |
| 187 | 185 | * Protected method to display a configuration form |
| 188 | 186 | * |
| 189 | 187 | * @since 1.8 |
| 190 | - * | |
| 191 | - * @return void | |
| 192 | 188 | */ |
| 193 | 189 | protected function form() { |
| 194 | 190 | // Child classes can provide a form |
| 195 | 191 | } |
| @@ -219,9 +215,9 @@ | ||
| 219 | 215 | * |
| 220 | 216 | * @param array $options Raw options |
| 221 | 217 | * @return array Options |
| 222 | 218 | */ |
| 223 | - protected function update( $options ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable | |
| 219 | + protected function update( $options ) { | |
| 224 | 220 | return array(); // It's responsibility of the child class to decide what is saved |
| 225 | 221 | } |
| 226 | 222 | |
| 227 | 223 | /** |
| @@ -227,10 +223,8 @@ | ||
| 227 | 223 | /** |
| 228 | 224 | * Ajax method to save the options |
| 229 | 225 | * |
| 230 | 226 | * @since 1.8 |
| 231 | - * | |
| 232 | - * @return void | |
| 233 | 227 | */ |
| 234 | 228 | public function save_options() { |
| 235 | 229 | check_ajax_referer( 'pll_options', '_pll_nonce' ); |
| 236 | 230 | if ( ! current_user_can( 'manage_options' ) ) { |
| @@ -268,13 +262,13 @@ | ||
| 268 | 262 | } |
| 269 | 263 | } |
| 270 | 264 | |
| 271 | 265 | /** |
| 272 | - * Get the row actions. | |
| 266 | + * Get the row actions | |
| 273 | 267 | * |
| 274 | 268 | * @since 1.8 |
| 275 | 269 | * |
| 276 | - * @return string[] | |
| 270 | + * @return array | |
| 277 | 271 | */ |
| 278 | 272 | protected function get_actions() { |
| 279 | 273 | $actions = array(); |
| 280 | 274 | |
| @@ -293,13 +287,13 @@ | ||
| 293 | 287 | return $actions; |
| 294 | 288 | } |
| 295 | 289 | |
| 296 | 290 | /** |
| 297 | - * Get the actions links. | |
| 291 | + * Get the actions links | |
| 298 | 292 | * |
| 299 | 293 | * @since 1.8 |
| 300 | 294 | * |
| 301 | - * @return string[] Action links. | |
| 295 | + * @return array | |
| 302 | 296 | */ |
| 303 | 297 | public function get_action_links() { |
| 304 | 298 | return array_intersect_key( $this->action_links, array_flip( $this->get_actions() ) ); |
| 305 | 299 | } |
| @@ -331,13 +325,13 @@ | ||
| 331 | 325 | return ''; |
| 332 | 326 | } |
| 333 | 327 | |
| 334 | 328 | /** |
| 335 | - * Get the buttons. | |
| 329 | + * Get the buttons | |
| 336 | 330 | * |
| 337 | 331 | * @since 1.9 |
| 338 | 332 | * |
| 339 | - * @return string[] An array of html fragment for the buttons. | |
| 333 | + * @return array | |
| 340 | 334 | */ |
| 341 | 335 | public function get_buttons() { |
| 342 | 336 | return $this->buttons; |
| 343 | 337 | } |