/**
  * Check if the muut directory exists under the wp-content/uploads directory, and if not then create it.
  *
  * @param string $sub_dir A subdirectory or path to check beneath the main Muut uploads directory.
  * @return bool Whether the directory exists or not (or was created if it previously didn't).
  * @author Paul Hughes
  * @since 3.0.2
  */
 public static function checkMuutUploadsDirectory($sub_dir = '')
 {
     $wp_upload_dir = wp_upload_dir();
     $dir_path = trailingslashit($wp_upload_dir['basedir']) . self::UPLOADS_DIR_NAME;
     $sub_path = trailingslashit($dir_path) . $sub_dir;
     // If the uploads directory (and specified subdirectory) do not exist, create them with proper permissions.
     if (!file_exists($sub_path)) {
         if (@(!mkdir($sub_path, 0755, true))) {
             return false;
         }
     }
     // Verify that the directory is writeable.
     if (!is_writable($sub_path)) {
         return false;
     }
     // Store the directory path.
     self::$uploads_path = $dir_path;
     return true;
 }