mirror of
https://ghproxy.net/https://github.com/AlxMedia/curver.git
synced 2025-08-28 11:50:25 +08:00
Kirki 3.0.38
This commit is contained in:
parent
2c33dc1f57
commit
2ed8bc86b4
10 changed files with 72 additions and 19 deletions
|
@ -104,6 +104,8 @@ class Kirki_Modules_CSS {
|
|||
// Admin styles, adds compatibility with the new WordPress editor (Gutenberg).
|
||||
add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_styles' ), 100 );
|
||||
|
||||
add_action( 'wp', array( $this, 'print_styles_action' ) );
|
||||
|
||||
if ( ! apply_filters( 'kirki_output_inline_styles', true ) ) {
|
||||
$config = apply_filters( 'kirki_config', array() );
|
||||
$priority = 999;
|
||||
|
@ -111,13 +113,9 @@ class Kirki_Modules_CSS {
|
|||
$priority = absint( $config['styles_priority'] );
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ), $priority );
|
||||
|
||||
// Prints the styles.
|
||||
add_action( 'wp', array( $this, 'print_styles_action' ) );
|
||||
return;
|
||||
} else {
|
||||
add_action( 'wp_head', array( $this, 'print_styles_inline' ), 999 );
|
||||
}
|
||||
|
||||
add_action( 'wp_head', array( $this, 'print_styles_inline' ), 999 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -142,14 +140,17 @@ class Kirki_Modules_CSS {
|
|||
*/
|
||||
public function enqueue_styles() {
|
||||
|
||||
$args = array(
|
||||
'action' => apply_filters( 'kirki_styles_action_handle', 'kirki-styles' ),
|
||||
);
|
||||
if ( is_admin() && ! is_customize_preview() ) {
|
||||
$args['editor'] = '1';
|
||||
}
|
||||
|
||||
// Enqueue the dynamic stylesheet.
|
||||
wp_enqueue_style(
|
||||
'kirki-styles',
|
||||
add_query_arg(
|
||||
'action',
|
||||
apply_filters( 'kirki_styles_action_handle', 'kirki-styles' ),
|
||||
site_url()
|
||||
),
|
||||
add_query_arg( $args, site_url() ),
|
||||
array(),
|
||||
KIRKI_VERSION
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue