| @@ -20,9 +20,9 @@ | ||
| 20 | 20 | return $response; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | $folders_to_sync = get_site_transient( 'imagify_themes_plugins_to_sync' ); |
| 24 | - $folders_to_sync = is_array( $folders_to_sync ) ? $folders_to_sync : array(); | |
| 24 | + $folders_to_sync = is_array( $folders_to_sync ) ? $folders_to_sync : []; | |
| 25 | 25 | |
| 26 | 26 | $folders_to_sync[] = $result['destination']; |
| 27 | 27 | |
| 28 | 28 | set_site_transient( 'imagify_themes_plugins_to_sync', $folders_to_sync, DAY_IN_SECONDS ); |
| @@ -72,14 +72,16 @@ | ||
| 72 | 72 | continue; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | // Sync the folder files. |
| 76 | - Imagify_Custom_Folders::synchronize_files_from_folders( array( | |
| 77 | - $folder['folder_id'] => array( | |
| 78 | - 'folder_id' => $folder['folder_id'], | |
| 79 | - 'path' => $placeholder, | |
| 80 | - 'active' => $folder['active'], | |
| 81 | - 'folder_path' => $folder_path, | |
| 82 | - ), | |
| 83 | - ) ); | |
| 76 | + Imagify_Custom_Folders::synchronize_files_from_folders( | |
| 77 | + [ | |
| 78 | + $folder['folder_id'] => [ | |
| 79 | + 'folder_id' => $folder['folder_id'], | |
| 80 | + 'path' => $placeholder, | |
| 81 | + 'active' => $folder['active'], | |
| 82 | + 'folder_path' => $folder_path, | |
| 83 | + ], | |
| 84 | + ] | |
| 85 | + ); | |
| 84 | 86 | } |
| 85 | 87 | } |