sm:sync::addFile

sm:sync::addFile

Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wp-stateless.4.1.2

do_action('sm:sync::addFile') is found 2 times:

  • /lib/classes/class-sync-non-media.php line 198
              }
    
              if (!$args['skip_db']) {
                // add file_path to the file list.
                do_action('sm:sync::addFile', $media, self::STATUS_SYNCED);
              }
              return $media;
            } elseif (!$local_file_exists && $args['remove_from_queue']) {
              if (!$this->client->media_exists($name)) {
                do_action('sm:sync::removeFile', $name);
                if ($args['manual_sync']) {
    
  • /lib/classes/class-sync-non-media.php line 336
     
              // Copying file on GCS
              $media = $client->copy_media($old_file, $new_file);
    
              do_action('sm:sync::addFile', $media, $status);
    
              return true;
            } catch (\Exception $e) {
              return false;
            }
          }
    

See this hook used in plugins: