[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@13.59.35.116: ~ $
<?php
/**
 * Upgrading Gutenberg's database.
 *
 * @package gutenberg
 */

if ( ! defined( '_GUTENBERG_VERSION_MIGRATION' ) ) {
	// It's necessary to update this version every time a new migration is needed.
	define( '_GUTENBERG_VERSION_MIGRATION', '9.8.0' );
}

/**
 * Migrate Gutenberg's database on upgrade.
 *
 * @access private
 * @internal
 */
function _gutenberg_migrate_database() {
	// The default value used here is the first version before migrations were added.
	$gutenberg_installed_version = get_option( 'gutenberg_version_migration', '9.7.0' );

	if ( _GUTENBERG_VERSION_MIGRATION !== $gutenberg_installed_version ) {
		if ( version_compare( $gutenberg_installed_version, '9.8.0', '<' ) ) {
			_gutenberg_migrate_remove_fse_drafts();
		}

		update_option( 'gutenberg_version_migration', _GUTENBERG_VERSION_MIGRATION );
	}
}

/**
 * Remove FSE auto drafts and associated terms.
 *
 * @access private
 * @internal
 */
function _gutenberg_migrate_remove_fse_drafts() {
	// Delete auto-draft templates and template parts.
	$delete_query = new WP_Query(
		array(
			'post_status'    => array( 'auto-draft' ),
			'post_type'      => array( 'wp_template', 'wp_template_part' ),
			'posts_per_page' => -1,
		)
	);
	foreach ( $delete_query->posts as $post ) {
		wp_delete_post( $post->ID, true );
	}

	// Delete _wp_file_based term.
	$term = get_term_by( 'name', '_wp_file_based', 'wp_theme' );
	if ( $term ) {
		wp_delete_term( $term->term_id, 'wp_theme' );
	}

	// Delete useless options.
	delete_option( 'gutenberg_last_synchronize_theme_template_checks' );
	delete_option( 'gutenberg_last_synchronize_theme_template-part_checks' );
}

// Deletion of the `_wp_file_based` term (in _gutenberg_migrate_remove_fse_drafts) must happen
// after its taxonomy (`wp_theme`) is registered. This happens in `gutenberg_register_wp_theme_taxonomy`,
// which is hooked into `init` (default priority, i.e. 10).
add_action( 'init', '_gutenberg_migrate_database', 20 );

Filemanager

Name Type Size Permission Actions
block-supports Folder 0755
compat Folder 0755
experimental Folder 0755
README.md File 10 KB 0644
block-editor-settings.php File 6.4 KB 0644
block-template-utils.php File 3.48 KB 0644
blocks.php File 17.26 KB 0644
class-wp-duotone-gutenberg.php File 35.61 KB 0644
class-wp-rest-edit-site-export-controller-gutenberg.php File 1.25 KB 0644
class-wp-rest-global-styles-controller-gutenberg.php File 21.86 KB 0644
class-wp-theme-json-data-gutenberg.php File 1.74 KB 0644
class-wp-theme-json-gutenberg.php File 158.1 KB 0644
class-wp-theme-json-resolver-gutenberg.php File 34.94 KB 0644
class-wp-theme-json-schema-gutenberg.php File 7.34 KB 0644
client-assets.php File 22.67 KB 0644
demo.php File 1.64 KB 0644
experiments-page.php File 7.21 KB 0644
global-styles-and-settings.php File 14.92 KB 0644
init.php File 1.12 KB 0644
interactivity-api.php File 1.24 KB 0644
load.php File 8.53 KB 0644
rest-api.php File 1.28 KB 0644
script-loader.php File 3.51 KB 0644
theme-i18n.json File 1.49 KB 0644
theme.json File 8.63 KB 0644
upgrade.php File 1.92 KB 0644