wp_stateless_root_dir_wildcard

wp_stateless_root_dir_wildcard

Hook Type: filter

See hook in core

Displaying hooks found in version: wp-stateless.4.1.2

apply_filters('wp_stateless_root_dir_wildcard') is found 3 times:

  • /lib/classes/class-settings.php line 371
           */
          public function root_dir_wildcards( $root_dir, $regex = false, $current_values = [] ) {
    
            $not_allowed_char = '/[^A-Za-z0-9\/_.\.\-]/';
            $wildcards = apply_filters('wp_stateless_root_dir_wildcard', $this->wildcards);
    
            if($regex){
              $root_dir = preg_quote($root_dir);
              $not_allowed_char = '/[^A-Za-z0-9\/_.\.\-\\\\{}]/';
            }
    
    
  • /lib/classes/class-settings.php line 424
            /**
             * removing filename and last slash
             */
            $path = untrailingslashit( str_replace(basename($path), '', $path) );
            $wildcards = apply_filters('wp_stateless_root_dir_wildcard', $this->wildcards);
    
            /**
             * Checking if a wildcard have regex field in it.
             * Then return the matching value using regex.
             */
            foreach ($wildcards as $key => $value) {
    
  • /lib/classes/class-settings.php line 573
           * Outputs 'Compatibility' tab content on the settings page.
           * 
           */
          public function settings_tab_content() {
            $wildcards = apply_filters('wp_stateless_root_dir_wildcard', $this->wildcards);
            $wildcard_year_month = '%date_year/date_month%';
            $root_dir = $this->get( 'sm.root_dir' );
    
            $use_year_month = (strpos($root_dir, $wildcard_year_month) !== false) ?: false;
    
            /**