mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-19 22:43:24 +09:00
Update shortcodes library
This commit is contained in:
@@ -102,6 +102,9 @@ If an image ID is required, Six/Ten Press image fields in a group will work, as
|
||||
|
||||
### Changelog
|
||||
|
||||
#### 0.7.1
|
||||
* fixed: prevent scripts/styles loading if the post type doesn't support the editor
|
||||
|
||||
#### 0.7.0
|
||||
* changed: moved all actions past a block editor/Gutenberg check to prevent media button scripts/modals loading when they shouldn't
|
||||
|
||||
|
||||
@@ -130,6 +130,9 @@ class SixTenPressShortcodes {
|
||||
* Load all needful functions for the editor.
|
||||
*/
|
||||
public function start_editor() {
|
||||
if ( $this->quit() ) {
|
||||
return;
|
||||
}
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ), 4 );
|
||||
do_action( 'sixtenpress_shortcode_load' );
|
||||
}
|
||||
@@ -138,9 +141,6 @@ class SixTenPressShortcodes {
|
||||
* Do not enqueue scripts if we're on a block editor page.
|
||||
*/
|
||||
public function enqueue() {
|
||||
if ( $this->quit() ) {
|
||||
return;
|
||||
}
|
||||
add_action( 'media_buttons', array( $this, 'media_buttons' ), 98 );
|
||||
add_action( 'admin_footer', array( $this, 'widget_builder_modal' ) );
|
||||
add_filter( 'sixtenpress_admin_color_picker', '__return_true' );
|
||||
@@ -270,6 +270,9 @@ class SixTenPressShortcodes {
|
||||
return true;
|
||||
}
|
||||
$screen = get_current_screen();
|
||||
if ( ! post_type_supports( $screen->post_type, 'editor' ) ) {
|
||||
return true;
|
||||
}
|
||||
if ( method_exists( $screen, 'is_block_editor' ) && $screen->is_block_editor() ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @copyright 2017-2018 Robin Cornett <hello@robincornett.com>
|
||||
* @license GPL-2.0+
|
||||
* @version 0.7.0
|
||||
* @version 0.7.1
|
||||
* @link https://gitlab.com/robincornett/sixtenpress-shortcodes
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@@ -37,7 +37,7 @@
|
||||
* Loader versioning: http://jtsternberg.github.io/wp-lib-loader/
|
||||
*/
|
||||
|
||||
if ( ! class_exists( 'SixTenPressShortcodes_070', false ) ) {
|
||||
if ( ! class_exists( 'SixTenPressShortcodes_071', false ) ) {
|
||||
|
||||
/**
|
||||
* Versioned loader class-name
|
||||
@@ -48,18 +48,18 @@ if ( ! class_exists( 'SixTenPressShortcodes_070', false ) ) {
|
||||
* @package SixTenPressShortcodes
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @license GPL-2.0+
|
||||
* @version 0.7.0
|
||||
* @version 0.7.1
|
||||
* @link https://gitlab.com/robincornett/sixtenpress-shortcodes
|
||||
* @since 0.1.0
|
||||
*/
|
||||
class SixTenPressShortcodes_070 {
|
||||
class SixTenPressShortcodes_071 {
|
||||
|
||||
/**
|
||||
* SixTenPressShortcodes version number
|
||||
* @var string
|
||||
* @since 0.1.0
|
||||
*/
|
||||
const VERSION = '0.7.0';
|
||||
const VERSION = '0.7.1';
|
||||
|
||||
/**
|
||||
* Current version hook priority.
|
||||
@@ -68,7 +68,7 @@ if ( ! class_exists( 'SixTenPressShortcodes_070', false ) ) {
|
||||
* @var int
|
||||
* @since 0.1.0
|
||||
*/
|
||||
const PRIORITY = 9980;
|
||||
const PRIORITY = 9979;
|
||||
|
||||
/**
|
||||
* Starts the version checking process.
|
||||
@@ -142,7 +142,7 @@ if ( ! class_exists( 'SixTenPressShortcodes_070', false ) ) {
|
||||
/**
|
||||
* Defines the directory of the currently loaded version of SixTenPressShortcodes.
|
||||
*/
|
||||
define( 'SIXTENPRESSSHORTCODES_DIR', dirname( __FILE__ ) . '/' );
|
||||
define( 'SIXTENPRESSSHORTCODES_DIR', trailingslashit( __DIR__ ) );
|
||||
}
|
||||
|
||||
// Include and initiate SixTenPressShortcodes.
|
||||
@@ -156,5 +156,5 @@ if ( ! class_exists( 'SixTenPressShortcodes_070', false ) ) {
|
||||
}
|
||||
|
||||
// Kick it off.
|
||||
new SixTenPressShortcodes_070();
|
||||
new SixTenPressShortcodes_071();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user