add_permastruct( string $name, string $struct, array $args = array() )
Add permalink structure.
描述
参数
- $name
-
(string)
(Required)
Name for permalink structure. - $struct
-
(string)
(Required)
Permalink structure. - $args
-
(array)
(Optional)
Arguments for building the rules from the permalink structure, see WP_Rewrite::add_permastruct() for full details.Default value: array()
源代码
File: wp-includes/rewrite.php
function add_permastruct( $name, $struct, $args = array() ) {
global $wp_rewrite;
// Back-compat for the old parameters: $with_front and $ep_mask.
if ( ! is_array( $args ) )
$args = array( 'with_front' => $args );
if ( func_num_args() == 4 )
$args['ep_mask'] = func_get_arg( 3 );
$wp_rewrite->add_permastruct( $name, $struct, $args );
}
更新日志
Version | 描述 |
---|---|
3.0.0 | Introduced. |
相关函数
Uses
-
wp-includes/class-wp-rewrite.php:
WP_Rewrite::add_permastruct()
Used By
-
wp-includes/class-wp-taxonomy.php:
WP_Taxonomy::add_rewrite_rules() -
wp-includes/class-wp-post-type.php:
WP_Post_Type::add_rewrite_rules()
User Contributed Notes
你可能对这些文章感兴趣:
- wordpress函数get_author_template()用法示例
- wordpress函数get_author_name()用法示例
- wordpress函数get_author_posts_url()用法示例
- wordpress函数get_author_rss_link()用法示例
- wordpress函数get_author_feed_link()用法示例
- wordpress函数get_author_link()用法示例
- wordpress函数get_attachment_taxonomies()用法示例
- wordpress函数get_attachment_template()用法示例
- wordpress函数get_attachment_innerHTML()用法示例
- wordpress函数get_attachment_link()用法示例
- wordpress函数get_attachment_icon_src()用法示例
- wordpress函数get_attachment_icon()用法示例
- wordpress函数get_attached_media()用法示例
- wordpress函数get_attachment_fields_to_edit()用法示例
如有疑问,请前往问答中心反馈!
反馈