WPSEO_Sitemaps::register_xsl
Register your own XSL file. Call this during 'init'.
Метод класса: WPSEO_Sitemaps{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$WPSEO_Sitemaps = new WPSEO_Sitemaps(); $WPSEO_Sitemaps->register_xsl( $name, $building_function, $rewrite );
- $name(строка) (обязательный)
- The name of the XSL file.
- $building_function(callback) (обязательный)
- Function to build your XSL file.
- $rewrite(строка)
- Regular expression to match your sitemap with.
По умолчанию:''
Список изменений
| С версии 1.4.23 | Введена. |
Код WPSEO_Sitemaps::register_xsl() WPSEO Sitemaps::register xsl Yoast 27.6
public function register_xsl( $name, $building_function, $rewrite = '' ) {
add_action( 'wpseo_xsl_' . $name, $building_function );
if ( $rewrite ) {
Yoast_Dynamic_Rewrites::instance()->add_rule( $rewrite, 'index.php?yoast-sitemap-xsl=' . $name, 'top' );
}
}