WP_Rewrite::generate_rewrite_rule()
Generates rewrite rules with permalink structure and walking directory only.
Shorten version of WP_Rewrite::generate_rewrite_rules() that allows for shorter list of parameters. See the method for longer description of what generating rewrite rules does.
Метод класса: WP_Rewrite{}
Хуков нет.
Возвращает
Массив
. An array of rewrite rules keyed by their regex pattern.
Использование
global $wp_rewrite; $wp_rewrite->generate_rewrite_rule( $permalink_structure, $walk_dirs );
- $permalink_structure(строка) (обязательный)
- The permalink structure to generate rules.
- $walk_dirs(true|false)
- Whether to create list of directories to walk over.
По умолчанию: false
Заметки
- Смотрите: WP_Rewrite::generate_rewrite_rules() See for long description and rest of parameters.
Список изменений
С версии 1.5.0 | Введена. |
Код WP_Rewrite::generate_rewrite_rule() WP Rewrite::generate rewrite rule WP 6.6.1
public function generate_rewrite_rule( $permalink_structure, $walk_dirs = false ) { return $this->generate_rewrite_rules( $permalink_structure, EP_NONE, false, false, false, $walk_dirs ); }