Skip to content

Commit 459eec4

Browse files
committed
apply phpcbf
1 parent d8fb2e7 commit 459eec4

51 files changed

Lines changed: 472 additions & 480 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bea-content-sync-fusion.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@
111111
require BEA_CSF_DIR . 'classes/admin/admin-dashboard-widgets.php';
112112

113113
// Plugin activate/desactive hooks
114-
register_activation_hook( __FILE__, array( 'BEA_CSF_Plugin', 'activate' ) );
115-
register_deactivation_hook( __FILE__, array( 'BEA_CSF_Plugin', 'deactivate' ) );
114+
register_activation_hook( __FILE__, [ 'BEA_CSF_Plugin', 'activate' ] );
115+
register_deactivation_hook( __FILE__, [ 'BEA_CSF_Plugin', 'deactivate' ] );
116116

117117
// Init !
118118
add_action( 'plugins_loaded', 'init_bea_content_sync_fusion' );

classes/addons/advanced-custom-fields-exclusion.php

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
*
88
*/
99
class BEA_CSF_Addon_ACF_Exclusion {
10-
static $acf_fields = array();
11-
static $meta_data = array();
10+
static $acf_fields = [];
11+
static $meta_data = [];
1212

1313
/**
1414
* BEA_CSF_Addon_ACF_Exclusion constructor.
@@ -21,23 +21,23 @@ public function __construct() {
2121
// Fields
2222
if ( apply_filters( 'bea/csf/acf-addon-exclusion/allow-fieds-exclusion', false ) !== false ) {
2323

24-
add_action( 'save_post', array( __CLASS__, 'save_post_fields' ), 10, 1 );
25-
add_action( 'acf/include_field_types', array( __CLASS__, 'acf_include_field_types' ), 9999999 );
26-
add_filter( 'bea_csf_client_' . 'Attachment' . '_' . 'merge' . '_data_to_transfer', array( __CLASS__, 'filter_acf_fields' ), 11, 3 );
27-
add_filter( 'bea_csf_client_' . 'PostType' . '_' . 'merge' . '_data_to_transfer', array( __CLASS__, 'filter_acf_fields' ), 11, 3 );
24+
add_action( 'save_post', [ __CLASS__, 'save_post_fields' ], 10, 1 );
25+
add_action( 'acf/include_field_types', [ __CLASS__, 'acf_include_field_types' ], 9999999 );
26+
add_filter( 'bea_csf_client_' . 'Attachment' . '_' . 'merge' . '_data_to_transfer', [ __CLASS__, 'filter_acf_fields' ], 11, 3 );
27+
add_filter( 'bea_csf_client_' . 'PostType' . '_' . 'merge' . '_data_to_transfer', [ __CLASS__, 'filter_acf_fields' ], 11, 3 );
2828

2929
}
3030

3131
// Groups
32-
add_action( 'save_post', array( __CLASS__, 'save_post_groups' ), 10, 1 );
33-
add_filter( 'bea_csf_client_' . 'Attachment' . '_' . 'merge' . '_data_to_transfer', array( __CLASS__, 'filter_acf_groups' ), 10, 3 );
34-
add_filter( 'bea_csf_client_' . 'PostType' . '_' . 'merge' . '_data_to_transfer', array( __CLASS__, 'filter_acf_groups' ), 10, 3 );
35-
add_action( 'post_edit_form_tag', array( __CLASS__, 'post_edit_form_tag' ), 1 );
32+
add_action( 'save_post', [ __CLASS__, 'save_post_groups' ], 10, 1 );
33+
add_filter( 'bea_csf_client_' . 'Attachment' . '_' . 'merge' . '_data_to_transfer', [ __CLASS__, 'filter_acf_groups' ], 10, 3 );
34+
add_filter( 'bea_csf_client_' . 'PostType' . '_' . 'merge' . '_data_to_transfer', [ __CLASS__, 'filter_acf_groups' ], 10, 3 );
35+
add_action( 'post_edit_form_tag', [ __CLASS__, 'post_edit_form_tag' ], 1 );
3636

3737
// Flexible
38-
add_action( 'save_post', array( __CLASS__, 'save_post_flexibles' ), 10, 1 );
39-
add_filter( 'bea_csf_client_' . 'Attachment' . '_' . 'merge' . '_data_to_transfer', array( __CLASS__, 'filter_acf_flexibles' ), 10, 3 );
40-
add_filter( 'bea_csf_client_' . 'PostType' . '_' . 'merge' . '_data_to_transfer', array( __CLASS__, 'filter_acf_flexibles' ), 10, 3 );
38+
add_action( 'save_post', [ __CLASS__, 'save_post_flexibles' ], 10, 1 );
39+
add_filter( 'bea_csf_client_' . 'Attachment' . '_' . 'merge' . '_data_to_transfer', [ __CLASS__, 'filter_acf_flexibles' ], 10, 3 );
40+
add_filter( 'bea_csf_client_' . 'PostType' . '_' . 'merge' . '_data_to_transfer', [ __CLASS__, 'filter_acf_flexibles' ], 10, 3 );
4141

4242
return true;
4343
}
@@ -119,8 +119,8 @@ public static function save_post_flexibles( $post_id ) {
119119
public static function acf_include_field_types() {
120120
foreach ( acf_get_field_types() as $sections => $fields ) {
121121
foreach ( $fields as $field_type => $field_label ) {
122-
add_action( 'acf/render_field/type=' . $field_type, array( __CLASS__, 'acf_render_field_before' ), 8, 1 );
123-
add_action( 'acf/render_field/type=' . $field_type, array( __CLASS__, 'acf_render_field_after' ), 10, 1 );
122+
add_action( 'acf/render_field/type=' . $field_type, [ __CLASS__, 'acf_render_field_before' ], 8, 1 );
123+
add_action( 'acf/render_field/type=' . $field_type, [ __CLASS__, 'acf_render_field_after' ], 10, 1 );
124124
}
125125
}
126126
}
@@ -135,7 +135,7 @@ public static function acf_render_field_before( $field ) {
135135
return false;
136136
}
137137

138-
if ( in_array( $field['type'], array( 'flexible_content', 'repeater' ) ) ) {
138+
if ( in_array( $field['type'], [ 'flexible_content', 'repeater' ] ) ) {
139139
self::build_html_checkbox( $field, __( 'Exclude this group from future synchro', 'bea-content-sync-fusion' ) );
140140
}
141141

@@ -152,7 +152,7 @@ public static function acf_render_field_after( $field ) {
152152
return false;
153153
}
154154

155-
if ( ! in_array( $field['type'], array( 'flexible_content', 'repeater' ) ) ) {
155+
if ( ! in_array( $field['type'], [ 'flexible_content', 'repeater' ] ) ) {
156156
self::build_html_checkbox( $field, __( 'Exclude this field from future synchro', 'bea-content-sync-fusion' ) );
157157
}
158158

@@ -214,7 +214,7 @@ public static function filter_acf_groups( $data, $sync_receiver_blog_id, $sync_f
214214
return $data;
215215
}
216216

217-
$fields = array();
217+
$fields = [];
218218
foreach ( $groups as $group ) {
219219
if ( ! in_array( $group['key'], $current_excluded_groups ) ) {
220220
continue;
@@ -231,7 +231,7 @@ public static function filter_acf_groups( $data, $sync_receiver_blog_id, $sync_f
231231
}
232232

233233
// Get only fields
234-
self::$acf_fields = array();
234+
self::$acf_fields = [];
235235
self::prepare_acf_fields( $fields );
236236

237237
// Loop on each meta
@@ -303,11 +303,11 @@ public static function prepare_acf_fields( $fields ) {
303303
foreach ( (array) $fields as $field ) {
304304
self::$acf_fields[ $field['key'] ] = $field;
305305

306-
if ( in_array( $field['type'], array( 'flexible_content' ) ) ) { // Flexible is recursive structure with layouts
306+
if ( in_array( $field['type'], [ 'flexible_content' ] ) ) { // Flexible is recursive structure with layouts
307307
foreach ( $field['layouts'] as $layout_field ) {
308308
self::prepare_acf_fields( $layout_field['sub_fields'] );
309309
}
310-
} elseif ( in_array( $field['type'], array( 'repeater' ) ) ) { // Repeater is recursive structure
310+
} elseif ( in_array( $field['type'], [ 'repeater' ] ) ) { // Repeater is recursive structure
311311
self::prepare_acf_fields( $field['sub_fields'] );
312312
}
313313
}
@@ -347,7 +347,7 @@ public static function filter_acf_fields( $data, $sync_receiver_blog_id, $sync_f
347347

348348
// Delete all metadata from flexible/repeater
349349
$acf_field = acf_maybe_get_field( $raw_meta_value[0] );
350-
if ( $acf_field != false && in_array( $acf_field['type'], array( 'flexible_content', 'repeater' ) ) ) {
350+
if ( $acf_field != false && in_array( $acf_field['type'], [ 'flexible_content', 'repeater' ] ) ) {
351351
foreach ( (array) $data['meta_data'] as $sub_meta_key => $sub_meta_value ) {
352352
if ( ! preg_match( '/' . preg_quote( $acf_field['name'] ) . '[\_]\d*[\_]/', $sub_meta_key ) !== false ) {
353353
continue;
@@ -373,7 +373,7 @@ public static function filter_acf_fields( $data, $sync_receiver_blog_id, $sync_f
373373
if ( $meta_key == $translated_acf_name ) {
374374
// Delete all metadata from flexible/repeater
375375
$acf_field = acf_maybe_get_field( $matches[1][0] );
376-
if ( $acf_field != false && in_array( $acf_field['type'], array( 'flexible_content', 'repeater' ) ) ) {
376+
if ( $acf_field != false && in_array( $acf_field['type'], [ 'flexible_content', 'repeater' ] ) ) {
377377
foreach ( (array) $data['meta_data'] as $sub_meta_key => $sub_meta_value ) {
378378
if ( ! preg_match( '/' . preg_quote( $acf_field['name'] ) . '[\_]\d*[\_]/', $sub_meta_key ) !== false ) {
379379
continue;

classes/addons/advanced-custom-fields.php

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @author Amaury BALMER
77
*/
88
class BEA_CSF_Addon_ACF {
9-
static $acf_fields = array();
9+
static $acf_fields = [];
1010

1111
/**
1212
* BEA_CSF_Addon_ACF constructor.
@@ -16,11 +16,11 @@ public function __construct() {
1616
return false;
1717
}
1818

19-
add_action( 'bea_csf.client.posttype.merge', array( __CLASS__, 'bea_csf_client_posttype_merge' ), 10, 3 );
20-
add_action( 'bea_csf.client.attachment.merge', array( __CLASS__, 'bea_csf_client_posttype_merge' ), 10, 3 );
19+
add_action( 'bea_csf.client.posttype.merge', [ __CLASS__, 'bea_csf_client_posttype_merge' ], 10, 3 );
20+
add_action( 'bea_csf.client.attachment.merge', [ __CLASS__, 'bea_csf_client_posttype_merge' ], 10, 3 );
2121

22-
add_action( 'bea_csf.client.taxonomy.merge', array( __CLASS__, 'bea_csf_client_taxonomy_merge' ), 10, 3 );
23-
add_filter( 'bea_csf_gutenberg_translate_block_attributes', array( __CLASS__, 'translate_acf_blocks' ), 10, 4 );
22+
add_action( 'bea_csf.client.taxonomy.merge', [ __CLASS__, 'bea_csf_client_taxonomy_merge' ], 10, 3 );
23+
add_filter( 'bea_csf_gutenberg_translate_block_attributes', [ __CLASS__, 'translate_acf_blocks' ], 10, 4 );
2424

2525
return true;
2626
}
@@ -46,7 +46,7 @@ public static function bea_csf_client_posttype_merge( $data, $sync_fields, $new_
4646
return $data;
4747
}
4848

49-
$fields = array();
49+
$fields = [];
5050
foreach ( $groups as $group ) {
5151
$_fields = (array) acf_get_fields( $group );
5252
foreach ( $_fields as $_field ) {
@@ -59,7 +59,7 @@ public static function bea_csf_client_posttype_merge( $data, $sync_fields, $new_
5959
}
6060

6161
// Get only fields
62-
self::$acf_fields = array();
62+
self::$acf_fields = [];
6363
self::prepare_acf_fields( $fields );
6464

6565
// Translate
@@ -94,7 +94,7 @@ public static function bea_csf_client_taxonomy_merge( $data, $sync_fields, $new_
9494
return $data;
9595
}
9696

97-
$fields = array();
97+
$fields = [];
9898
foreach ( $groups as $group ) {
9999
$_fields = (array) acf_get_fields( $group );
100100
foreach ( $_fields as $_field ) {
@@ -107,7 +107,7 @@ public static function bea_csf_client_taxonomy_merge( $data, $sync_fields, $new_
107107
}
108108

109109
// Get only fields
110-
self::$acf_fields = array();
110+
self::$acf_fields = [];
111111
self::prepare_acf_fields( $fields );
112112

113113
// Translate
@@ -131,7 +131,7 @@ public static function bea_csf_client_taxonomy_merge( $data, $sync_fields, $new_
131131
* @return array
132132
*/
133133
public static function translate_dynamic_acf_fields( $meta_data, $data, $sync_fields ) {
134-
$meta_data_to_update = array();
134+
$meta_data_to_update = [];
135135

136136
// Reloop on meta from sync
137137
foreach ( $meta_data as $key => $values ) {
@@ -155,10 +155,10 @@ public static function translate_dynamic_acf_fields( $meta_data, $data, $sync_fi
155155
$meta_value_to_translate = maybe_unserialize( $meta_data[ $meta_key_to_translate ][0] );
156156

157157
$types = false;
158-
if ( in_array( $acf_field['type'], array( 'image', 'post_object', 'file', 'page_link', 'gallery', 'relationship' ) ) ) {
159-
$types = array( 'attachment', 'posttype' );
160-
} elseif ( in_array( $acf_field['type'], array( 'taxonomy' ) ) ) {
161-
$types = array( 'taxonomy' );
158+
if ( in_array( $acf_field['type'], [ 'image', 'post_object', 'file', 'page_link', 'gallery', 'relationship' ] ) ) {
159+
$types = [ 'attachment', 'posttype' ];
160+
} elseif ( in_array( $acf_field['type'], [ 'taxonomy' ] ) ) {
161+
$types = [ 'taxonomy' ];
162162
}
163163

164164
// Array or singular value ?
@@ -206,13 +206,13 @@ public static function translate_dynamic_acf_fields( $meta_data, $data, $sync_fi
206206
*/
207207
public static function prepare_acf_fields( $fields ) {
208208
foreach ( (array) $fields as $field ) {
209-
if ( in_array( $field['type'], array( 'flexible_content' ) ) ) { // Flexible is recursive structure with layouts
209+
if ( in_array( $field['type'], [ 'flexible_content' ] ) ) { // Flexible is recursive structure with layouts
210210
foreach ( $field['layouts'] as $layout_field ) {
211211
self::prepare_acf_fields( $layout_field['sub_fields'] );
212212
}
213-
} elseif ( in_array( $field['type'], array( 'repeater', 'group' ) ) ) { // Repeater is recursive structure
213+
} elseif ( in_array( $field['type'], [ 'repeater', 'group' ] ) ) { // Repeater is recursive structure
214214
self::prepare_acf_fields( $field['sub_fields'] );
215-
} elseif ( in_array( $field['type'], array( 'image', 'gallery', 'post_object', 'relationship', 'file', 'page_link', 'taxonomy' ) ) ) {
215+
} elseif ( in_array( $field['type'], [ 'image', 'gallery', 'post_object', 'relationship', 'file', 'page_link', 'taxonomy' ] ) ) {
216216
self::$acf_fields[ $field['key'] ] = $field;
217217
}
218218
}
@@ -321,5 +321,4 @@ public static function get_type_relation( $field_object ): string {
321321

322322
return '';
323323
}
324-
325324
}

classes/addons/events-calendar-series.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@ public function __construct() {
1414
return false;
1515
}
1616

17-
add_action( 'save_post', array( __CLASS__, 'save_post' ), 10, 1 );
17+
add_action( 'save_post', [ __CLASS__, 'save_post' ], 10, 1 );
1818

19-
add_action( 'bea_csf.server.posttype.merge', array( __CLASS__, 'bea_csf_server_posttype_merge' ), 10, 2 );
19+
add_action( 'bea_csf.server.posttype.merge', [ __CLASS__, 'bea_csf_server_posttype_merge' ], 10, 2 );
2020
add_action(
2121
'bea_csf.client.posttype.merge',
22-
array(
22+
[
2323
__CLASS__,
2424
'bea_csf_client_posttype_merge_tickets',
25-
),
25+
],
2626
10,
2727
3
2828
);
29-
add_action( 'bea_csf.client.posttype.merge', array( __CLASS__, 'bea_csf_client_posttype_merge_venue' ), 10, 3 );
29+
add_action( 'bea_csf.client.posttype.merge', [ __CLASS__, 'bea_csf_client_posttype_merge_venue' ], 10, 3 );
3030
add_action(
3131
'bea_csf.client.posttype.merge',
32-
array(
32+
[
3333
__CLASS__,
3434
'bea_csf_client_posttype_merge_organizer',
35-
),
35+
],
3636
10,
3737
3
3838
);
@@ -92,7 +92,7 @@ public static function bea_csf_server_posttype_merge( $data, $sync_fields ) {
9292
// Get tickets
9393
$tickets = Tribe__Tickets__Tickets::get_event_tickets( $data['ID'] );
9494
if ( $tickets != false && ! empty( $tickets ) ) {
95-
$data['tickets'] = array();
95+
$data['tickets'] = [];
9696

9797
foreach ( $tickets as $ticket ) {
9898
$data['tickets'][] = BEA_CSF_Server_PostType::get_data( $ticket->ID, $sync_fields );
@@ -129,19 +129,19 @@ public static function bea_csf_client_posttype_merge_organizer( $data, $sync_fie
129129
}
130130

131131
// Get local event
132-
$local_event_id = BEA_CSF_Relations::get_object_for_any( array( 'posttype' ), $data['blogid'], $sync_fields['_current_receiver_blog_id'], $data['ID'], $data['ID'] );
132+
$local_event_id = BEA_CSF_Relations::get_object_for_any( [ 'posttype' ], $data['blogid'], $sync_fields['_current_receiver_blog_id'], $data['ID'], $data['ID'] );
133133
if ( false == $local_event_id ) {
134134
return $data;
135135
}
136136

137137
// Create organizer on client if not exists
138-
$local_organizer_id = BEA_CSF_Relations::get_object_for_any( array( 'posttype' ), $data['blogid'], $sync_fields['_current_receiver_blog_id'], $data['_EventOrganizerID'], $data['_EventOrganizerID'] );
138+
$local_organizer_id = BEA_CSF_Relations::get_object_for_any( [ 'posttype' ], $data['blogid'], $sync_fields['_current_receiver_blog_id'], $data['_EventOrganizerID'], $data['_EventOrganizerID'] );
139139
if ( false == $local_organizer_id ) {
140140
$data['_EventOrganizer']['blogid'] = $data['blogid'];
141141
BEA_CSF_Client_PostType::merge( $data['_EventOrganizer'], $sync_fields );
142142

143143
// Renew mapping ID
144-
$local_organizer_id = BEA_CSF_Relations::get_object_for_any( array( 'posttype' ), $data['blogid'], $sync_fields['_current_receiver_blog_id'], $data['_EventOrganizerID'], $data['_EventOrganizerID'] );
144+
$local_organizer_id = BEA_CSF_Relations::get_object_for_any( [ 'posttype' ], $data['blogid'], $sync_fields['_current_receiver_blog_id'], $data['_EventOrganizerID'], $data['_EventOrganizerID'] );
145145
}
146146

147147
// Update local organizer
@@ -165,19 +165,19 @@ public static function bea_csf_client_posttype_merge_venue( $data, $sync_fields,
165165
}
166166

167167
// Get local event
168-
$local_event_id = BEA_CSF_Relations::get_object_for_any( array( 'posttype' ), $data['blogid'], $sync_fields['_current_receiver_blog_id'], $data['ID'], $data['ID'] );
168+
$local_event_id = BEA_CSF_Relations::get_object_for_any( [ 'posttype' ], $data['blogid'], $sync_fields['_current_receiver_blog_id'], $data['ID'], $data['ID'] );
169169
if ( false == $local_event_id ) {
170170
return $data;
171171
}
172172

173173
// Create venue on client if not exists
174-
$local_venue_id = BEA_CSF_Relations::get_object_for_any( array( 'posttype' ), $data['blogid'], $sync_fields['_current_receiver_blog_id'], $data['_EventVenueID'], $data['_EventVenueID'] );
174+
$local_venue_id = BEA_CSF_Relations::get_object_for_any( [ 'posttype' ], $data['blogid'], $sync_fields['_current_receiver_blog_id'], $data['_EventVenueID'], $data['_EventVenueID'] );
175175
if ( false == $local_venue_id ) {
176176
$data['_EventVenue']['blogid'] = $data['blogid'];
177177
BEA_CSF_Client_PostType::merge( $data['_EventVenue'], $sync_fields );
178178

179179
// Renew mapping ID
180-
$local_venue_id = BEA_CSF_Relations::get_object_for_any( array( 'posttype' ), $data['blogid'], $sync_fields['_current_receiver_blog_id'], $data['_EventVenueID'], $data['_EventVenueID'] );
180+
$local_venue_id = BEA_CSF_Relations::get_object_for_any( [ 'posttype' ], $data['blogid'], $sync_fields['_current_receiver_blog_id'], $data['_EventVenueID'], $data['_EventVenueID'] );
181181
}
182182

183183
// Update local venue
@@ -202,7 +202,7 @@ public static function bea_csf_client_posttype_merge_tickets( $data, $sync_field
202202
}
203203

204204
// Get local event
205-
$local_event_id = BEA_CSF_Relations::get_object_for_any( array( 'posttype' ), $data['blogid'], $sync_fields['_current_receiver_blog_id'], $data['ID'], $data['ID'] );
205+
$local_event_id = BEA_CSF_Relations::get_object_for_any( [ 'posttype' ], $data['blogid'], $sync_fields['_current_receiver_blog_id'], $data['ID'], $data['ID'] );
206206
if ( false == $local_event_id ) {
207207
return $data;
208208
}
@@ -212,7 +212,7 @@ public static function bea_csf_client_posttype_merge_tickets( $data, $sync_field
212212
$local_tickets_id = wp_list_pluck( $local_tickets, 'ID' );
213213

214214
// Loop on each tickets for insertion, and keep ID
215-
$remote_tickets_id = array();
215+
$remote_tickets_id = [];
216216
foreach ( $data['tickets'] as &$ticket ) {
217217
// Fix event ID with local value
218218
if ( isset( $ticket['meta_data']['_tribe_rsvp_for_event'] ) ) {
@@ -223,7 +223,7 @@ public static function bea_csf_client_posttype_merge_tickets( $data, $sync_field
223223
BEA_CSF_Client_PostType::merge( $ticket, $sync_fields );
224224

225225
// Translated remote tickets with current ID
226-
$local_ticket_id = BEA_CSF_Relations::get_object_for_any( array( 'posttype' ), $data['blogid'], $sync_fields['_current_receiver_blog_id'], $ticket['ID'], $ticket['ID'] );
226+
$local_ticket_id = BEA_CSF_Relations::get_object_for_any( [ 'posttype' ], $data['blogid'], $sync_fields['_current_receiver_blog_id'], $ticket['ID'], $ticket['ID'] );
227227
if ( false != $local_ticket_id ) {
228228
$remote_tickets_id[] = (int) $local_ticket_id;
229229
}

classes/addons/multisite-clone-duplicator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function __construct() {
1515
// Force deactive files duplication on FS
1616
add_filter( 'mucd_copy_dirs', '__return_empty_array' );
1717

18-
add_action( 'mucd_after_copy_data', array( $this, 'mucd_after_copy_data' ), 10, 2 );
18+
add_action( 'mucd_after_copy_data', [ $this, 'mucd_after_copy_data' ], 10, 2 );
1919
}
2020

2121
/**
@@ -62,14 +62,14 @@ public function create_missing_relations( $from_site_id, $to_site_id ) {
6262
switch_to_blog( $to_site_id );
6363

6464
$media_query = new WP_Query(
65-
array(
65+
[
6666
'post_type' => 'attachment',
6767
'bea_csf_filter' => 'local-only',
6868
'nopaging' => true,
6969
'fields' => 'ids',
7070
'suppress_filters' => false,
7171
'post_status' => 'any',
72-
)
72+
]
7373
);
7474

7575
if ( $media_query->have_posts() ) {

classes/addons/post-types-order.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
class BEA_CSF_Addon_Post_Types_Order {
1212
public function __construct() {
13-
add_filter( 'post-types-order_save-ajax-order', array( $this, 'wp_update_post_order' ), 1, 3 );
13+
add_filter( 'post-types-order_save-ajax-order', [ $this, 'wp_update_post_order' ], 1, 3 );
1414
}
1515

1616
/**

0 commit comments

Comments
 (0)