wp_stateless_unhandle_root_dir

wp_stateless_unhandle_root_dir

Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wp-stateless.3.4.1

apply_filters('wp_stateless_unhandle_root_dir') is found 2 times:

  • /lib/classes/class-bootstrap.php line 973
            $root_dir_regex = '~^' . apply_filters("wp_stateless_handle_root_dir", $root_dir, true) . '/~';
            /**
             * Retrieve Y/M and other tags from current path
             */
            $path_elements = apply_filters('wp_stateless_unhandle_root_dir', $current_path);
            $root_dir = apply_filters("wp_stateless_handle_root_dir", $root_dir, false, $path_elements);
    
            $upload_dir = wp_upload_dir();
            $current_path = str_replace(wp_normalize_path(trailingslashit($upload_dir['basedir'])), '', wp_normalize_path($current_path));
            $current_path = str_replace(wp_normalize_path(trailingslashit($upload_dir['baseurl'])), '', wp_normalize_path($current_path));
            $current_path = str_replace(trailingslashit($this->get_gs_host()), '', $current_path);
    
  • /lib/classes/class-bootstrap.php line 1850
     
              if (empty($post_id)) {
                $gs_base_url =  $this->get_gs_host();
                $root_dir = $this->get('sm.root_dir');
                $path_elements = apply_filters('wp_stateless_unhandle_root_dir', $url);
                $root_dir = apply_filters("wp_stateless_handle_root_dir", $root_dir, false, $path_elements);
                $gs_url =  $this->get_gs_host() . '/' . $root_dir;
                $site_url = parse_url($gs_url);
                $image_path = parse_url($url);
    
                //force the protocols to match if needed
    

See this hook used in plugins: