Merge pull request #31508 from woocommerce/update/revert-Customize-WC-logic
Revert #30044
This commit is contained in:
commit
af3c2732c1
|
@ -21,7 +21,6 @@ class WC_Shop_Customizer {
|
||||||
add_action( 'customize_controls_print_styles', array( $this, 'add_styles' ) );
|
add_action( 'customize_controls_print_styles', array( $this, 'add_styles' ) );
|
||||||
add_action( 'customize_controls_print_scripts', array( $this, 'add_scripts' ), 30 );
|
add_action( 'customize_controls_print_scripts', array( $this, 'add_scripts' ), 30 );
|
||||||
add_action( 'wp_enqueue_scripts', array( $this, 'add_frontend_scripts' ) );
|
add_action( 'wp_enqueue_scripts', array( $this, 'add_frontend_scripts' ) );
|
||||||
add_action( 'admin_menu', array( $this, 'add_fse_customize_link' ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -84,19 +83,6 @@ class WC_Shop_Customizer {
|
||||||
width: auto;
|
width: auto;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
<?php
|
|
||||||
// For FSE themes hide the back button so we only surface WooCommerce options.
|
|
||||||
if ( function_exists( 'gutenberg_is_fse_theme' ) && gutenberg_is_fse_theme() ) {
|
|
||||||
?>
|
|
||||||
#sub-accordion-panel-woocommerce .customize-panel-back{
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
#customize-controls #sub-accordion-panel-woocommerce .panel-meta.customize-info .accordion-section-title {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</style>
|
</style>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
@ -265,29 +251,6 @@ class WC_Shop_Customizer {
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* For FSE themes add a "Customize WooCommerce" link to the Appearance menu.
|
|
||||||
*
|
|
||||||
* FSE themes hide the "Customize" link in the Appearance menu. In WooCommerce we have several options that can currently
|
|
||||||
* only be edited via the Customizer. For now, we are thus adding a new link for WooCommerce specific Customizer options.
|
|
||||||
*/
|
|
||||||
public function add_fse_customize_link() {
|
|
||||||
|
|
||||||
// Exit early if the FSE theme feature isn't present or the current theme is not a FSE theme.
|
|
||||||
if ( ! function_exists( 'gutenberg_is_fse_theme' ) || function_exists( 'gutenberg_is_fse_theme' ) && ! gutenberg_is_fse_theme() ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add a link to the WooCommerce panel in the Customizer.
|
|
||||||
add_submenu_page(
|
|
||||||
'themes.php',
|
|
||||||
__( 'Customize WooCommerce', 'woocommerce' ),
|
|
||||||
__( 'Customize WooCommerce', 'woocommerce' ),
|
|
||||||
'edit_theme_options',
|
|
||||||
admin_url( 'customize.php?autofocus[panel]=woocommerce' )
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sanitize the shop page & category display setting.
|
* Sanitize the shop page & category display setting.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue