
Brotli压缩:GZIP压缩替代方案
add_permastruct ( $name, $struct, $args = array() )
add_permastruct: 一个为特定文章类型添加自定义固定结构的函数。它允许开发者为自定义的文章类型定义一个URL结构,这样他们的URL就更方便用户使用和容易记忆。
添加一个固定结构。
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 ); }