sm:sync::nonMediaFiles

sm:sync::nonMediaFiles

Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wp-stateless.3.4.1

apply_filters('sm:sync::nonMediaFiles') is found 3 times:

  • /lib/classes/sync/class-non-library-sync.php line 28
      /**
       * Extended construct
       */
      public function __construct() {
       //$this->items = array_filter(array_unique(apply_filters('sm:sync::nonMediaFiles', [])));
        parent::__construct();
      }
    
      /**
       * Get sync name
       * 
    
  • /lib/classes/sync/class-non-library-sync.php line 65
     
          // Make sure there is no orphaned data and state
          delete_site_option($this->get_stopped_option_key());
          $this->clear_process_meta();
          $this->items = array_filter(array_unique(apply_filters('sm:sync::nonMediaFiles', [])));
    
          $chunks = array_chunk($this->items, $this->get_max_batch_size());
          if (!empty($chunks)) {
            foreach ($chunks as $chunk) {
              foreach ($chunk as $item) {
                $this->push_to_queue($item);
    
  • /lib/classes/sync/class-non-library-sync.php line 177
       * 
       * @return int
       */
      public function get_total_items() {
        $this->items = array_filter(array_unique(apply_filters('sm:sync::nonMediaFiles', [])));
        return count($this->items);
      }
    
      public function extend_queue() {
        // Not needed for this kind of sync
      }
    

See this hook used in plugins: