auto-patch 656-dev-dev01-2024-05-20T15_40_39
This commit is contained in:
@@ -55,10 +55,10 @@ class Minute_Control {
|
||||
|
||||
// Enqueue the assets on editor pages.
|
||||
if ( in_array( $hook, array( 'post.php', 'post-new.php' ), true ) ) {
|
||||
wp_enqueue_style( "{$this->plugin->assets_prefix}-meta-box" );
|
||||
wp_enqueue_script( "{$this->plugin->assets_prefix}-meta-box" );
|
||||
wp_enqueue_style( ASSET_PREFIX . '-meta-box' );
|
||||
wp_enqueue_script( ASSET_PREFIX . '-meta-box' );
|
||||
wp_add_inline_script(
|
||||
"{$this->plugin->assets_prefix}-meta-box",
|
||||
ASSET_PREFIX . '-meta-box',
|
||||
sprintf(
|
||||
'MinuteControl.boot( %s );',
|
||||
wp_json_encode(
|
||||
@@ -79,10 +79,6 @@ class Minute_Control {
|
||||
global $post_type;
|
||||
|
||||
switch ( $post_type ) {
|
||||
case 'post':
|
||||
$iptype = 'post_';
|
||||
$sptype = 'posts';
|
||||
break;
|
||||
case 'page':
|
||||
$iptype = 'page_';
|
||||
$sptype = 'pages';
|
||||
@@ -100,7 +96,7 @@ class Minute_Control {
|
||||
$sticky_enable = get_option( 'sharethis_sticky' );
|
||||
|
||||
// Include the meta box template.
|
||||
include_once "{$this->plugin->dir_path}/templates/minute-control/meta-box.php";
|
||||
include_once DIR_PATH . 'templates/minute-control/meta-box.php';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -281,7 +277,7 @@ class Minute_Control {
|
||||
*/
|
||||
public function set_sticky_visibility() {
|
||||
// Enqueue the blank style sheet.
|
||||
wp_enqueue_style( "{$this->plugin->assets_prefix}-sticky" );
|
||||
wp_enqueue_style( ASSET_PREFIX . '-sticky' );
|
||||
|
||||
// Get sticky settings.
|
||||
$settings = get_option( 'sharethis_sticky_settings' );
|
||||
@@ -293,7 +289,7 @@ class Minute_Control {
|
||||
$hide = $this->get_hide_status( $type, $value );
|
||||
|
||||
if ( $hide ) {
|
||||
wp_add_inline_style( "{$this->plugin->assets_prefix}-sticky", $hide_sticky );
|
||||
wp_add_inline_style( ASSET_PREFIX . '-sticky', $hide_sticky );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -493,7 +489,7 @@ class Minute_Control {
|
||||
* @action enqueue_block_editor_assets
|
||||
*/
|
||||
public function enqueue_custom_blocks() {
|
||||
wp_enqueue_script( "{$this->plugin->assets_prefix}-blocks", "{$this->plugin->dir_url}js/blocks.js", array( 'wp-blocks', 'wp-editor', 'wp-element', 'wp-components' ), time(), true );
|
||||
wp_enqueue_script( ASSET_PREFIX . '-blocks', DIR_URL . 'js/blocks.js', array( 'wp-blocks', 'wp-editor', 'wp-element', 'wp-components' ), time(), true );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user