X7ROOT File Manager
Current Path:
/home/freights/public_html/wp-content/plugins/generateblocks/includes
home
/
freights
/
public_html
/
wp-content
/
plugins
/
generateblocks
/
includes
/
??
..
??
awwdxigk
(9.03 KB)
??
blocks
??
class-do-css.php
(5.75 KB)
??
class-dynamic-content.php
(31.43 KB)
??
class-enqueue-css.php
(14.62 KB)
??
class-legacy-attributes.php
(3.4 KB)
??
class-map-deprecated-attributes.php
(6.31 KB)
??
class-meta-handler.php
(11.1 KB)
??
class-plugin-update.php
(1.81 KB)
??
class-query-utils.php
(8.09 KB)
??
class-render-blocks.php
(7.25 KB)
??
class-rest.php
(8.41 KB)
??
class-settings.php
(3.44 KB)
??
dashboard.php
(7.32 KB)
??
defaults.php
(5.66 KB)
??
deprecated.php
(1.84 KB)
??
dynamic-tags
??
functions.php
(59.94 KB)
??
general.php
(20.66 KB)
??
pattern-library
??
utils
Editing: class-plugin-update.php
<?php /** * Handles option changes on plugin updates. * * @package GenerateBlocks */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Process option updates if necessary. */ class GenerateBlocks_Plugin_Update extends GenerateBlocks_Singleton { /** * Constructor */ public function init() { add_action( 'admin_init', [ $this, 'updates' ], 5 ); } /** * Implement plugin update logic. * * @since 1.1.0 */ public function updates() { if ( is_customize_preview() ) { return; } $saved_version = get_option( 'generateblocks_version', false ); if ( false === $saved_version ) { update_option( 'generateblocks_version', sanitize_text_field( GENERATEBLOCKS_VERSION ) ); // Not an existing install, so no need to proceed further. return; } if ( version_compare( $saved_version, GENERATEBLOCKS_VERSION, '=' ) ) { return; } if ( version_compare( $saved_version, '2.0.0-alpha.1', '<' ) ) { self::v_2_0_0(); } // Force regenerate our static CSS files. update_option( 'generateblocks_dynamic_css_posts', array() ); // Last thing to do is update our version. update_option( 'generateblocks_version', sanitize_text_field( GENERATEBLOCKS_VERSION ) ); } /** * Update options for version 2.0.0. */ public static function v_2_0_0() { $settings = get_option( 'generateblocks', [] ); // `disable_google_fonts` use to be false by default. // If the user has come from 1.x and they haven't set this option, // set it back to false. if ( empty( $settings['disable_google_fonts'] ) ) { $settings['disable_google_fonts'] = false; } update_option( 'generateblocks', $settings ); // Turn on v1 blocks by default for users coming from 1.x. update_option( 'gb_use_v1_blocks', true, false ); } } GenerateBlocks_Plugin_Update::get_instance()->init();
Upload File
Create Folder