I noticed your logic to check for the source files first check in the site’s upload folder and if no upload basedir is set, it checks in the default uploads folder.
The code is the following:
$uploads = wp_upload_dir (); if ( empty( $uploads['error'] ) && ! empty( $uploads['basedir'] ) ) $basedir = $uploads['basedir']; else $basedir = WP_CONTENT_DIR . '/uploads'; $status = true; if ( ! file_exists ( $basedir . '/shadowbox-js/src/intro.js' ) ) $status = false;
Which basically checks for the site upload directory before checking for the default wp-content/uploads folder. I would however suggestion change the logic around so it checks in wp-content/uploads first.
I am currently working on a multisite installation of over 200 sites and I have to make sure the source files are present in each of the blogs.dir folders for each site, which could be very tedious. If you would however switch the logic around, meaning it checks for the default uploads first and then the site’s uploads folder, it would save a lot of time for multisite admins.
Thank you for the consideration.
- The topic ‘[Plugin: Shadowbox JS] Suggestion: function check_for_src_file ()’ is closed to new replies.