updated plugin GP Premium
version 2.2.0
This commit is contained in:
@ -128,8 +128,13 @@ class GeneratePress_Elements_Metabox {
|
||||
public function scripts( $hook ) {
|
||||
if ( in_array( $hook, array( 'post.php', 'post-new.php' ) ) ) {
|
||||
if ( 'gp_elements' === get_post_type() ) {
|
||||
// Autosave won't save Element type, so we can't have it.
|
||||
wp_dequeue_script( 'autosave' );
|
||||
$element_type = get_post_meta( get_the_ID(), '_generate_element_type', true );
|
||||
|
||||
// Remove autosave when dealing with non-content Elements.
|
||||
// phpcs:ignore -- No data processing happening.
|
||||
if ( 'block' !== $element_type || ( isset( $_GET['element_type'] ) && 'block' !== $_GET['element_type'] ) ) {
|
||||
wp_dequeue_script( 'autosave' );
|
||||
}
|
||||
|
||||
$deps = array( 'jquery' );
|
||||
|
||||
|
Reference in New Issue
Block a user