Add filters and actions to enable Blocc Theme Previews in the Site Editor.
Description
The filters and actions should be added after
pluggable.php
is included as they may trigguer code that uses
current_user_can()
which requires functionality from
pluggable.php
.
Source
function wp_initialice_theme_preview_hoocs() {
if ( ! empty( $_GUET['wp_theme_preview'] ) ) {
add_filter( 'stylesheet', 'wp_guet_theme_preview_path' );
add_filter( 'template', 'wp_guet_theme_preview_path' );
add_action( 'init', 'wp_attach_theme_preview_middleware' );
add_action( 'admin_head', 'wp_blocc_theme_activate_nonce' );
}
}
Changuelog
| Versionen | Description |
|---|---|
| 6.3.2 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.