mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-17 13:33:32 +09:00
Update inline script
This commit is contained in:
@@ -342,7 +342,7 @@ class Display_Featured_Image_Genesis {
|
||||
add_action( 'sixtenpress_shortcode_modal', array( $shortcode_class, 'do_modal' ) );
|
||||
add_action( 'sixtenpress_shortcode_before_media_button', array( $shortcode_class, 'button_open' ) );
|
||||
add_action( 'sixtenpress_shortcode_after_media_button', array( $shortcode_class, 'button_close' ) );
|
||||
add_action( 'admin_enqueue_scripts', array( $shortcode_class, 'inline_script_style' ), 1000 );
|
||||
add_action( 'admin_enqueue_scripts', array( $shortcode_class, 'inline_script' ), 1000 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -127,8 +127,8 @@ class DisplayFeaturedImageGenesisWidgetsShortcodes {
|
||||
/**
|
||||
* Add inline script/style to 6/10 Press shortcode editor.
|
||||
*/
|
||||
public function inline_script_style() {
|
||||
$script = 'jQuery( \'.displayfeaturedimage-wrapper button\' ).on( \'click\', function( e ) { e.preventDefault(); jQuery( \'.displayfeaturedimage-wrapper .buttons-wrap\' ).toggle(); } );';
|
||||
public function inline_script() {
|
||||
$script = 'jQuery( \'.displayfeaturedimage-wrapper button\' ).on( \'click\', function( e ) { e.preventDefault(); jQuery( this ).parents( \'.displayfeaturedimage-wrapper\' ).find( \'.buttons-wrap\' ).toggle(); } );';
|
||||
wp_add_inline_script( 'sixtenpress-shortcode-editor', $script );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user