wp_stateless_get_non_library_files

wp_stateless_get_non_library_files

Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wp-stateless.4.1.2

do_action('wp_stateless_get_non_library_files') is found 2 times:

  • /lib/classes/class-sync-non-media.php line 218
           * @return array
           */
          public function sync_non_media_files($files = array()) {
            $upload_dir = wp_upload_dir();
            $files = array_merge( $files, apply_filters('wp_stateless_get_non_library_files', array(), '') );
            foreach ($this->registered_dir as $key => $dir) {
              $dir = $upload_dir['basedir'] . "/" . trim($dir, '/') . "/";
              if (is_dir($dir)) {
                // Getting all the files from dir recursively.
                $_files = Utility::get_files($dir);
                // validating and adding to the $files array.
    
  • /lib/classes/class-sync-non-media.php line 284
              return;
            }
    
            // Removing the files one by one.
            $files = apply_filters('wp_stateless_get_non_library_files', array(), $dir);
    
            if ( !empty($files) ) {
              foreach ($files as $key => $file) {
                if (strpos($file, $dir) !== false) {
                  $this->client->remove_media($file, "", 0);
                  do_action('sm:sync::removeFile', $file);
    

See this hook used in plugins: