classic mode
[01-Aug-2023 04:48:32 UTC] PHP Warning: Constant WP_DEVELOPMENT_MODE already defined in /.../wp-config.php on line 128
クラッシックテーマでは、HTMLテンプレートは使えない
removed searchform.php fatal
$emulsion_attributes = array(
'label' => esc_html__( 'Search', 'emulsion' ),
'placeholder' => esc_html__( 'Search', 'emulsion' ),
'buttonText' => esc_html__( 'Search', 'emulsion' ),
);
// correct non space attribute
$search_form = str_replace('"class="','" class="', render_block_core_search( $emulsion_attributes ) );
echo ent2ncr( $search_form );
removed emulsion/shape-recipe
ページ基盤レイアウトfinal – Theme emulsion
front example – Theme emulsion
fixed front page example template
del, ins,big,samp,tt,var,cite,i,b,
fix gallery CSS conflict
Added add_theme_support( ‘disable-layout-styles’ );
create pattern
Memo
function filter_metadata_registration( $metadata ) {
if ( $metadata['name'] === 'core/column' ) {
$metadata['supports']['__experimentalLayout'] = false;
}
return $metadata;
};
add_filter( 'block_type_metadata', 'filter_metadata_registration' );
/** This filter is documented in wp-includes/link-template.php */
$path = apply_filters( 'theme_file_path', $path, 'theme.json' );
$block_css = $tree->get_styles_for_block( $metadata );
if ( ! wp_should_load_separate_core_block_assets() ) {
wp_add_inline_style( 'global-styles', $block_css );
continue;
}
/////
$custom_css = wp_get_custom_css();
$custom_css .= wp_get_global_styles_custom_css();
if ( ! empty( $custom_css ) ) {
wp_add_inline_style( 'global-styles', $custom_css );
}
// Opt in to remove layout styles.
add_theme_support( 'disable-layout-styles' );
/* $min_content_width = isset( $block['attrs']['layout']['minimumColumnWidth'] ) ? $block['attrs']['layout']['minimumColumnWidth'] : '';
$min_content_width_value = ! empty( $min_content_width ) ? 'grid-template-columns: repeat(auto-fill, minmax(min(' . $style_value . ' , 100%), 1fr));' : '';
if ( ! empty( $min_content_width_value ) ) {
if ( false !== strpos( $target[0], 'style="' ) ) {
$new_element = str_replace( ' style="', ' style="' . $min_content_width_value, $target[0] );
} else {
$new_element = str_replace( '>', ' style="' . $min_content_width_value . '">', $target[0] );
}
$block_content = str_replace( $target[0], $new_element, $block_content );
}*/
PWA style 保留
@media (display-mode: minimal-ui){
.fse-header{
//display:none;
}
}