@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | */ |
107 | 107 | protected function run_for_network() { |
108 | 108 | |
109 | - if ( ! empty( $this->uninstall_routines['network'] ) ) { |
|
110 | - $this->run_routines( $this->uninstall_routines['network'] ); |
|
109 | + if ( ! empty( $this->uninstall_routines[ 'network' ] ) ) { |
|
110 | + $this->run_routines( $this->uninstall_routines[ 'network' ] ); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | $this->installable->unset_db_version( true ); |
@@ -127,8 +127,8 @@ discard block |
||
127 | 127 | */ |
128 | 128 | protected function run_for_site() { |
129 | 129 | |
130 | - if ( ! empty( $this->uninstall_routines['site'] ) ) { |
|
131 | - $this->run_routines( $this->uninstall_routines['site'] ); |
|
130 | + if ( ! empty( $this->uninstall_routines[ 'site' ] ) ) { |
|
131 | + $this->run_routines( $this->uninstall_routines[ 'site' ] ); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | $this->installable->unset_db_version(); |
@@ -139,8 +139,8 @@ discard block |
||
139 | 139 | */ |
140 | 140 | protected function run_for_single() { |
141 | 141 | |
142 | - if ( ! empty( $this->uninstall_routines['single'] ) ) { |
|
143 | - $this->run_routines( $this->uninstall_routines['single'] ); |
|
142 | + if ( ! empty( $this->uninstall_routines[ 'single' ] ) ) { |
|
143 | + $this->run_routines( $this->uninstall_routines[ 'single' ] ); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | $this->installable->unset_db_version(); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function start() { |
102 | 102 | |
103 | - echo '<select id="', esc_attr( $this->args['id'] ), '" name="', esc_attr( $this->args['name'] ), '" class="', esc_attr( $this->args['class'] ), '">'; |
|
103 | + echo '<select id="', esc_attr( $this->args[ 'id' ] ), '" name="', esc_attr( $this->args[ 'name' ] ), '" class="', esc_attr( $this->args[ 'class' ] ), '">'; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -110,20 +110,20 @@ discard block |
||
110 | 110 | */ |
111 | 111 | public function options() { |
112 | 112 | |
113 | - if ( ! empty( $this->args['show_option_none'] ) ) { |
|
113 | + if ( ! empty( $this->args[ 'show_option_none' ] ) ) { |
|
114 | 114 | |
115 | - echo '<option value="-1"', selected( '-1', $this->args['selected'], false ), '>', esc_html( $this->args['show_option_none'] ), '</option>'; |
|
115 | + echo '<option value="-1"', selected( '-1', $this->args[ 'selected' ], false ), '>', esc_html( $this->args[ 'show_option_none' ] ), '</option>'; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | foreach ( $this->options as $value => $option ) { |
119 | 119 | |
120 | - if ( isset( $this->args['values_key'], $this->args['options_key'] ) ) { |
|
120 | + if ( isset( $this->args[ 'values_key' ], $this->args[ 'options_key' ] ) ) { |
|
121 | 121 | $option = (array) $option; |
122 | - $value = $option[ $this->args['values_key'] ]; |
|
123 | - $option = $option[ $this->args['options_key'] ]; |
|
122 | + $value = $option[ $this->args[ 'values_key' ] ]; |
|
123 | + $option = $option[ $this->args[ 'options_key' ] ]; |
|
124 | 124 | } |
125 | 125 | |
126 | - echo '<option value="', esc_attr( $value ), '"', selected( $value, $this->args['selected'], false ), '>', esc_html( $option ), '</option>'; |
|
126 | + echo '<option value="', esc_attr( $value ), '"', selected( $value, $this->args[ 'selected' ], false ), '>', esc_html( $option ), '</option>'; |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 |
@@ -53,7 +53,7 @@ |
||
53 | 53 | , $is_multisite |
54 | 54 | ); |
55 | 55 | |
56 | - $merged[] = $this->extension; |
|
56 | + $merged[ ] = $this->extension; |
|
57 | 57 | |
58 | 58 | wordpoints_update_maybe_network_option( |
59 | 59 | 'wordpoints_merged_extensions' |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | |
193 | 193 | foreach ( $extensions as $extension ) { |
194 | 194 | if ( ! $this->check_extension( $extension ) ) { |
195 | - $incompatible_extensions[] = $extension; |
|
195 | + $incompatible_extensions[ ] = $extension; |
|
196 | 196 | $this->checked_extensions[ $extension ] = false; |
197 | 197 | } |
198 | 198 | } |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | unset( $extensions[ $index ] ); |
225 | 225 | |
226 | 226 | if ( ! $this->checked_extensions[ $extension ] ) { |
227 | - $incompatible[] = $extension; |
|
227 | + $incompatible[ ] = $extension; |
|
228 | 228 | } |
229 | 229 | } |
230 | 230 |
@@ -100,11 +100,11 @@ |
||
100 | 100 | $class = $data; |
101 | 101 | $args = array(); |
102 | 102 | } else { |
103 | - $class = $data['class']; |
|
104 | - $args = $data['args']; |
|
103 | + $class = $data[ 'class' ]; |
|
104 | + $args = $data[ 'args' ]; |
|
105 | 105 | } |
106 | 106 | |
107 | - $routines[] = wordpoints_construct_class_with_args( $class, $args ); |
|
107 | + $routines[ ] = wordpoints_construct_class_with_args( $class, $args ); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | return $routines; |
@@ -59,12 +59,12 @@ discard block |
||
59 | 59 | |
60 | 60 | if ( 'wordpoints' === $this->slug ) { |
61 | 61 | |
62 | - if ( isset( $wordpoints_data['version'] ) ) { |
|
63 | - return $wordpoints_data['version']; |
|
62 | + if ( isset( $wordpoints_data[ 'version' ] ) ) { |
|
63 | + return $wordpoints_data[ 'version' ]; |
|
64 | 64 | } |
65 | 65 | |
66 | - } elseif ( isset( $wordpoints_data[ "{$this->type}s" ][ $this->slug ]['version'] ) ) { |
|
67 | - return $wordpoints_data[ "{$this->type}s" ][ $this->slug ]['version']; |
|
66 | + } elseif ( isset( $wordpoints_data[ "{$this->type}s" ][ $this->slug ][ 'version' ] ) ) { |
|
67 | + return $wordpoints_data[ "{$this->type}s" ][ $this->slug ][ 'version' ]; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | return false; |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | ); |
86 | 86 | |
87 | 87 | if ( 'wordpoints' === $this->slug ) { |
88 | - $wordpoints_data['version'] = $version; |
|
88 | + $wordpoints_data[ 'version' ] = $version; |
|
89 | 89 | } else { |
90 | - $wordpoints_data[ "{$this->type}s" ][ $this->slug ]['version'] = $version; |
|
90 | + $wordpoints_data[ "{$this->type}s" ][ $this->slug ][ 'version' ] = $version; |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | wordpoints_update_maybe_network_option( |
@@ -108,9 +108,9 @@ discard block |
||
108 | 108 | ); |
109 | 109 | |
110 | 110 | if ( 'wordpoints' === $this->slug ) { |
111 | - unset( $wordpoints_data['version'] ); |
|
111 | + unset( $wordpoints_data[ 'version' ] ); |
|
112 | 112 | } else { |
113 | - unset( $wordpoints_data[ "{$this->type}s" ][ $this->slug ]['version'] ); |
|
113 | + unset( $wordpoints_data[ "{$this->type}s" ][ $this->slug ][ 'version' ] ); |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | wordpoints_update_maybe_network_option( |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | |
322 | 322 | if ( ! in_array( $id, $sites, true ) ) { |
323 | 323 | |
324 | - $sites[] = $id; |
|
324 | + $sites[ ] = $id; |
|
325 | 325 | |
326 | 326 | update_site_option( $option_name, $sites ); |
327 | 327 | } |
@@ -358,22 +358,22 @@ discard block |
||
358 | 358 | |
359 | 359 | $db_tables = wordpoints_map_context_shortcuts( $this->get_db_tables() ); |
360 | 360 | |
361 | - if ( isset( $db_tables['single'] ) ) { |
|
362 | - $routines['single'][] = new WordPoints_Installer_DB_Tables( |
|
363 | - $db_tables['single'] |
|
361 | + if ( isset( $db_tables[ 'single' ] ) ) { |
|
362 | + $routines[ 'single' ][ ] = new WordPoints_Installer_DB_Tables( |
|
363 | + $db_tables[ 'single' ] |
|
364 | 364 | , 'base' |
365 | 365 | ); |
366 | 366 | } |
367 | 367 | |
368 | - if ( isset( $db_tables['site'] ) ) { |
|
369 | - $routines['site'][] = new WordPoints_Installer_DB_Tables( |
|
370 | - $db_tables['site'] |
|
368 | + if ( isset( $db_tables[ 'site' ] ) ) { |
|
369 | + $routines[ 'site' ][ ] = new WordPoints_Installer_DB_Tables( |
|
370 | + $db_tables[ 'site' ] |
|
371 | 371 | ); |
372 | 372 | } |
373 | 373 | |
374 | - if ( isset( $db_tables['network'] ) ) { |
|
375 | - $routines['network'][] = new WordPoints_Installer_DB_Tables( |
|
376 | - $db_tables['network'] |
|
374 | + if ( isset( $db_tables[ 'network' ] ) ) { |
|
375 | + $routines[ 'network' ][ ] = new WordPoints_Installer_DB_Tables( |
|
376 | + $db_tables[ 'network' ] |
|
377 | 377 | , 'base' |
378 | 378 | ); |
379 | 379 | } |
@@ -467,11 +467,11 @@ discard block |
||
467 | 467 | foreach ( $factories as $factory ) { |
468 | 468 | |
469 | 469 | if ( $factory instanceof WordPoints_Uninstaller_Factory_SiteI ) { |
470 | - $routines['site'] = array_merge( $routines['site'], $factory->get_for_site() ); |
|
470 | + $routines[ 'site' ] = array_merge( $routines[ 'site' ], $factory->get_for_site() ); |
|
471 | 471 | } |
472 | 472 | |
473 | 473 | if ( $factory instanceof WordPoints_Uninstaller_Factory_NetworkI ) { |
474 | - $routines['network'] = array_merge( $routines['network'], $factory->get_for_network() ); |
|
474 | + $routines[ 'network' ] = array_merge( $routines[ 'network' ], $factory->get_for_network() ); |
|
475 | 475 | } |
476 | 476 | } |
477 | 477 | |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | |
480 | 480 | foreach ( $factories as $factory ) { |
481 | 481 | if ( $factory instanceof WordPoints_Uninstaller_Factory_SingleI ) { |
482 | - $routines['single'] = array_merge( $routines['single'], $factory->get_for_single() ); |
|
482 | + $routines[ 'single' ] = array_merge( $routines[ 'single' ], $factory->get_for_single() ); |
|
483 | 483 | } |
484 | 484 | } |
485 | 485 | } |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | $db_tables = $this->get_db_tables(); |
502 | 502 | |
503 | 503 | if ( ! empty( $db_tables ) ) { |
504 | - $factories[] = new WordPoints_Uninstaller_Factory_DB_Tables( |
|
504 | + $factories[ ] = new WordPoints_Uninstaller_Factory_DB_Tables( |
|
505 | 505 | array_map( 'array_keys', $db_tables ) |
506 | 506 | ); |
507 | 507 | } |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | $custom_caps = $this->get_custom_caps(); |
510 | 510 | |
511 | 511 | if ( ! empty( $custom_caps ) ) { |
512 | - $factories[] = new WordPoints_Uninstaller_Factory_Caps( |
|
512 | + $factories[ ] = new WordPoints_Uninstaller_Factory_Caps( |
|
513 | 513 | array_keys( $custom_caps ) |
514 | 514 | ); |
515 | 515 | } |
@@ -234,8 +234,8 @@ discard block |
||
234 | 234 | */ |
235 | 235 | public function __construct( $args = array() ) { |
236 | 236 | |
237 | - if ( ! isset( $this->deprecated_args['start'] ) ) { |
|
238 | - $this->deprecated_args['start'] = array( |
|
237 | + if ( ! isset( $this->deprecated_args[ 'start' ] ) ) { |
|
238 | + $this->deprecated_args[ 'start' ] = array( |
|
239 | 239 | 'class' => __CLASS__, |
240 | 240 | 'version' => '2.4.0', |
241 | 241 | 'replacement' => 'offset', |
@@ -246,12 +246,12 @@ discard block |
||
246 | 246 | if ( isset( $args[ $arg ] ) ) { |
247 | 247 | |
248 | 248 | _deprecated_argument( |
249 | - esc_html( "{$data['class']}::__construct" ) |
|
250 | - , esc_html( $data['version'] ) |
|
251 | - , esc_html( "{$arg} is deprecated, use {$data['replacement']} instead" ) |
|
249 | + esc_html( "{$data[ 'class' ]}::__construct" ) |
|
250 | + , esc_html( $data[ 'version' ] ) |
|
251 | + , esc_html( "{$arg} is deprecated, use {$data[ 'replacement' ]} instead" ) |
|
252 | 252 | ); |
253 | 253 | |
254 | - $args[ $data['replacement'] ] = $args[ $arg ]; |
|
254 | + $args[ $data[ 'replacement' ] ] = $args[ $arg ]; |
|
255 | 255 | |
256 | 256 | unset( $args[ $arg ] ); |
257 | 257 | } |
@@ -274,12 +274,12 @@ discard block |
||
274 | 274 | if ( isset( $this->deprecated_args[ $arg ] ) ) { |
275 | 275 | |
276 | 276 | _deprecated_argument( |
277 | - esc_html( "{$this->deprecated_args[ $arg ]['class']}::get_arg" ) |
|
278 | - , esc_html( $this->deprecated_args[ $arg ]['version'] ) |
|
279 | - , esc_html( "{$arg} is deprecated, use {$this->deprecated_args[ $arg ]['replacement']} instead" ) |
|
277 | + esc_html( "{$this->deprecated_args[ $arg ][ 'class' ]}::get_arg" ) |
|
278 | + , esc_html( $this->deprecated_args[ $arg ][ 'version' ] ) |
|
279 | + , esc_html( "{$arg} is deprecated, use {$this->deprecated_args[ $arg ][ 'replacement' ]} instead" ) |
|
280 | 280 | ); |
281 | 281 | |
282 | - $arg = $this->deprecated_args[ $arg ]['replacement']; |
|
282 | + $arg = $this->deprecated_args[ $arg ][ 'replacement' ]; |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | if ( isset( $this->args[ $arg ] ) ) { |
@@ -307,12 +307,12 @@ discard block |
||
307 | 307 | if ( isset( $args[ $arg ] ) ) { |
308 | 308 | |
309 | 309 | _deprecated_argument( |
310 | - esc_html( "{$data['class']}::set_args" ) |
|
311 | - , esc_html( $data['version'] ) |
|
312 | - , esc_html( "{$arg} is deprecated, use {$data['replacement']} instead" ) |
|
310 | + esc_html( "{$data[ 'class' ]}::set_args" ) |
|
311 | + , esc_html( $data[ 'version' ] ) |
|
312 | + , esc_html( "{$arg} is deprecated, use {$data[ 'replacement' ]} instead" ) |
|
313 | 313 | ); |
314 | 314 | |
315 | - $args[ $data['replacement'] ] = $args[ $arg ]; |
|
315 | + $args[ $data[ 'replacement' ] ] = $args[ $arg ]; |
|
316 | 316 | |
317 | 317 | unset( $args[ $arg ] ); |
318 | 318 | } |
@@ -469,9 +469,9 @@ discard block |
||
469 | 469 | $all_fields = array_keys( $this->columns ); |
470 | 470 | $fields = array(); |
471 | 471 | |
472 | - if ( ! empty( $this->args['fields'] ) ) { |
|
472 | + if ( ! empty( $this->args[ 'fields' ] ) ) { |
|
473 | 473 | |
474 | - $fields = (array) $this->args['fields']; |
|
474 | + $fields = (array) $this->args[ 'fields' ]; |
|
475 | 475 | $diff = array_diff( $fields, $all_fields ); |
476 | 476 | $fields = array_intersect( $all_fields, $fields ); |
477 | 477 | |
@@ -573,11 +573,11 @@ discard block |
||
573 | 573 | $validators = array(); |
574 | 574 | |
575 | 575 | // Default validators for integer columns. |
576 | - if ( '%d' === $data['format'] ) { |
|
577 | - if ( ! empty( $data['unsigned'] ) ) { |
|
578 | - $validators[] = array( $this, 'validate_unsigned_column' ); |
|
576 | + if ( '%d' === $data[ 'format' ] ) { |
|
577 | + if ( ! empty( $data[ 'unsigned' ] ) ) { |
|
578 | + $validators[ ] = array( $this, 'validate_unsigned_column' ); |
|
579 | 579 | } else { |
580 | - $validators[] = 'wordpoints_int'; |
|
580 | + $validators[ ] = 'wordpoints_int'; |
|
581 | 581 | } |
582 | 582 | } |
583 | 583 | |
@@ -617,8 +617,8 @@ discard block |
||
617 | 617 | global $wpdb; |
618 | 618 | |
619 | 619 | if ( |
620 | - isset( $data['values'] ) |
|
621 | - && ! in_array( $this->args[ $column ], $data['values'], true ) |
|
620 | + isset( $data[ 'values' ] ) |
|
621 | + && ! in_array( $this->args[ $column ], $data[ 'values' ], true ) |
|
622 | 622 | ) { |
623 | 623 | return; |
624 | 624 | } |
@@ -636,8 +636,8 @@ discard block |
||
636 | 636 | |
637 | 637 | $column = wordpoints_escape_mysql_identifier( $column ); |
638 | 638 | |
639 | - $this->wheres[] = $wpdb->prepare( // WPCS: unprepared SQL OK. |
|
640 | - "{$column} {$compare} {$data['format']}" |
|
639 | + $this->wheres[ ] = $wpdb->prepare( // WPCS: unprepared SQL OK. |
|
640 | + "{$column} {$compare} {$data[ 'format' ]}" |
|
641 | 641 | , $value |
642 | 642 | ); |
643 | 643 | } |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | |
659 | 659 | // MySQL doesn't support LIKE and NOT LIKE for int columns. |
660 | 660 | // See https://stackoverflow.com/q/8422455/1924128 |
661 | - if ( '%s' === $data['format'] ) { |
|
661 | + if ( '%s' === $data[ 'format' ] ) { |
|
662 | 662 | $comparisons = array_merge( $comparisons, array( 'LIKE', 'NOT LIKE' ) ); |
663 | 663 | } |
664 | 664 | |
@@ -693,8 +693,8 @@ discard block |
||
693 | 693 | |
694 | 694 | $values = $this->args[ $key ]; |
695 | 695 | |
696 | - if ( isset( $data['values'] ) ) { |
|
697 | - $values = array_intersect( $values, $data['values'] ); |
|
696 | + if ( isset( $data[ 'values' ] ) ) { |
|
697 | + $values = array_intersect( $values, $data[ 'values' ] ); |
|
698 | 698 | } else { |
699 | 699 | $values = $this->validate_values( |
700 | 700 | $values |
@@ -706,7 +706,7 @@ discard block |
||
706 | 706 | return; |
707 | 707 | } |
708 | 708 | |
709 | - $in = wordpoints_prepare__in( $values, $data['format'] ); |
|
709 | + $in = wordpoints_prepare__in( $values, $data[ 'format' ] ); |
|
710 | 710 | |
711 | 711 | if ( false === $in ) { |
712 | 712 | return; |
@@ -714,7 +714,7 @@ discard block |
||
714 | 714 | |
715 | 715 | $column = wordpoints_escape_mysql_identifier( $column ); |
716 | 716 | |
717 | - $this->wheres[] = "{$column} {$type} ({$in})"; |
|
717 | + $this->wheres[ ] = "{$column} {$type} ({$in})"; |
|
718 | 718 | } |
719 | 719 | |
720 | 720 | /** |
@@ -728,7 +728,7 @@ discard block |
||
728 | 728 | |
729 | 729 | foreach ( $this->columns as $column => $data ) { |
730 | 730 | |
731 | - if ( ! empty( $data['is_date'] ) ) { |
|
731 | + if ( ! empty( $data[ 'is_date' ] ) ) { |
|
732 | 732 | $this->prepare_date_where( $column ); |
733 | 733 | } else { |
734 | 734 | $this->prepare_column_where( $column, $data ); |
@@ -751,7 +751,7 @@ discard block |
||
751 | 751 | |
752 | 752 | // MySQL doesn't allow for the offset without a limit, so if no limit is set |
753 | 753 | // we can ignore the offset arg. See https://stackoverflow.com/a/271650/1924128 |
754 | - if ( ! isset( $this->args['limit'] ) ) { |
|
754 | + if ( ! isset( $this->args[ 'limit' ] ) ) { |
|
755 | 755 | return; |
756 | 756 | } |
757 | 757 | |
@@ -776,8 +776,8 @@ discard block |
||
776 | 776 | } |
777 | 777 | } |
778 | 778 | |
779 | - if ( $this->args['limit'] > 0 && $this->args['offset'] >= 0 ) { |
|
780 | - $this->limit = "LIMIT {$this->args['offset']}, {$this->args['limit']}"; |
|
779 | + if ( $this->args[ 'limit' ] > 0 && $this->args[ 'offset' ] >= 0 ) { |
|
780 | + $this->limit = "LIMIT {$this->args[ 'offset' ]}, {$this->args[ 'limit' ]}"; |
|
781 | 781 | } |
782 | 782 | } |
783 | 783 | |
@@ -788,13 +788,13 @@ discard block |
||
788 | 788 | */ |
789 | 789 | protected function prepare_order_by() { |
790 | 790 | |
791 | - if ( empty( $this->args['order_by'] ) ) { |
|
791 | + if ( empty( $this->args[ 'order_by' ] ) ) { |
|
792 | 792 | $this->order = ''; |
793 | 793 | return; |
794 | 794 | } |
795 | 795 | |
796 | - $order = $this->args['order']; |
|
797 | - $order_by = $this->args['order_by']; |
|
796 | + $order = $this->args[ 'order' ]; |
|
797 | + $order_by = $this->args[ 'order_by' ]; |
|
798 | 798 | |
799 | 799 | if ( ! in_array( $order, array( 'DESC', 'ASC' ), true ) ) { |
800 | 800 | |
@@ -810,9 +810,9 @@ discard block |
||
810 | 810 | $wpdb->{"{$this->meta_type}meta"} |
811 | 811 | ); |
812 | 812 | |
813 | - if ( isset( $this->args['meta_type'] ) ) { |
|
813 | + if ( isset( $this->args[ 'meta_type' ] ) ) { |
|
814 | 814 | |
815 | - $meta_type = $this->meta_query->get_cast_for_type( $this->args['meta_type'] ); |
|
815 | + $meta_type = $this->meta_query->get_cast_for_type( $this->args[ 'meta_type' ] ); |
|
816 | 816 | $order_by = "CAST({$meta_table_name}.meta_value AS {$meta_type})"; |
817 | 817 | |
818 | 818 | } else { |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | $date_query = $date_query->get_sql(); |
856 | 856 | |
857 | 857 | if ( ! empty( $date_query ) ) { |
858 | - $this->wheres[] = ltrim( $date_query, ' AND' ); |
|
858 | + $this->wheres[ ] = ltrim( $date_query, ' AND' ); |
|
859 | 859 | } |
860 | 860 | |
861 | 861 | remove_filter( 'date_query_valid_columns', array( $this, 'date_query_valid_columns_filter' ) ); |
@@ -897,11 +897,11 @@ discard block |
||
897 | 897 | , $this |
898 | 898 | ); |
899 | 899 | |
900 | - if ( ! empty( $meta_query['where'] ) ) { |
|
901 | - $this->wheres[] = ltrim( $meta_query['where'], ' AND' ); |
|
900 | + if ( ! empty( $meta_query[ 'where' ] ) ) { |
|
901 | + $this->wheres[ ] = ltrim( $meta_query[ 'where' ], ' AND' ); |
|
902 | 902 | } |
903 | 903 | |
904 | - $this->meta_join = $meta_query['join'] . "\n"; |
|
904 | + $this->meta_join = $meta_query[ 'join' ] . "\n"; |
|
905 | 905 | } |
906 | 906 | } |
907 | 907 |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | |
488 | 488 | $fields = implode( ', ', array_map( 'wordpoints_escape_mysql_identifier', $fields ) ); |
489 | 489 | |
490 | - $this->select = "SELECT {$fields}"; |
|
490 | + $this->select = "select {$fields}"; |
|
491 | 491 | } |
492 | 492 | |
493 | 493 | /** |
@@ -777,7 +777,7 @@ discard block |
||
777 | 777 | } |
778 | 778 | |
779 | 779 | if ( $this->args['limit'] > 0 && $this->args['offset'] >= 0 ) { |
780 | - $this->limit = "LIMIT {$this->args['offset']}, {$this->args['limit']}"; |
|
780 | + $this->limit = "limit {$this->args['offset']}, {$this->args['limit']}"; |
|
781 | 781 | } |
782 | 782 | } |
783 | 783 |
@@ -84,16 +84,16 @@ |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | if ( 'network' === $context ) { |
87 | - $routines[] = new WordPoints_Uninstaller_Options_Wildcards_Network( $option ); |
|
87 | + $routines[ ] = new WordPoints_Uninstaller_Options_Wildcards_Network( $option ); |
|
88 | 88 | } else { |
89 | - $routines[] = new WordPoints_Uninstaller_Options_Wildcards( $option ); |
|
89 | + $routines[ ] = new WordPoints_Uninstaller_Options_Wildcards( $option ); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | unset( $options[ $index ] ); |
93 | 93 | } |
94 | 94 | |
95 | 95 | if ( ! empty( $options ) ) { |
96 | - $routines[] = new WordPoints_Uninstaller_Callback( |
|
96 | + $routines[ ] = new WordPoints_Uninstaller_Callback( |
|
97 | 97 | 'network' === $context ? 'delete_site_option' : 'delete_option' |
98 | 98 | , $options |
99 | 99 | ); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $options = array(); |
36 | 36 | |
37 | 37 | foreach ( $widgets as $widget ) { |
38 | - $options[] = 'widget_' . $widget; |
|
38 | + $options[ ] = 'widget_' . $widget; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | $this->routines = array( |