shortcuts as $name => $id ) { if ( 'colors' === $name ) { $name = esc_html__( 'Colors', 'gp-premium' ); if ( version_compare( generate_premium_get_theme_version(), '3.1.0-alpha.1', '>=' ) && 'generate_woocommerce_colors' !== $id ) { $id = 'generate_colors_section'; } if ( ! generatepress_is_module_active( 'generate_package_colors', 'GENERATE_COLORS' ) ) { $id = false; $name = false; } } if ( 'typography' === $name ) { $name = esc_html__( 'Typography', 'gp-premium' ); if ( function_exists( 'generate_is_using_dynamic_typography' ) && generate_is_using_dynamic_typography() ) { $id = 'generate_typography_section'; } if ( ! generatepress_is_module_active( 'generate_package_typography', 'GENERATE_TYPOGRAPHY' ) ) { $id = false; $name = false; } } if ( 'backgrounds' === $name ) { $name = esc_html__( 'Backgrounds', 'gp-premium' ); if ( ! generatepress_is_module_active( 'generate_package_backgrounds', 'GENERATE_BACKGROUNDS' ) ) { $id = false; $name = false; } } if ( 'layout' === $name ) { $name = esc_html__( 'Layout', 'gp-premium' ); } if ( $id && $name ) { $shortcuts[ $id ] = $name; } } if ( ! empty( $shortcuts ) ) { $this->json['shortcuts'] = $shortcuts; } else { $this->json['shortcuts'] = false; } if ( 'WooCommerce' !== $this->element ) { $this->element = strtolower( $this->element ); } $this->json['more'] = sprintf( __( 'More %s controls:', 'gp-premium' ), '' . $this->element . '' ); $this->json['return'] = __( 'Go Back', 'gp-premium' ); $this->json['section'] = $this->section; if ( apply_filters( 'generate_disable_customizer_shortcuts', false ) ) { $this->json['shortcuts'] = false; } } public function content_template() { ?>