add_filter('get_custom_logo', 'emulsion_fallback_custom_logo',10,2);
function emulsion_fallback_custom_logo($html, $blog_id){
$url = get_site_icon_url();
if(empty($html) && ! empty($url) ){
$id= get_option( 'site_icon' );
return wp_get_attachment_image( $id );
}
return $html;
}
foreach( wp_styles()->registered as $key => $val){
echo $val->handle.'<br>';
}
- colors
- common
- forms
- admin-menu
- dashboard
- list-tables
- edit
- revisions
- media
- themes
- about
- nav-menus
- widgets
- site-icon
- l10n
- code-editor
- site-health
- wp-admin
- login
- install
- wp-color-picker
- customize-controls
- customize-widgets
- customize-nav-menus
- buttons
- dashicons
- admin-bar
- wp-auth-check
- editor-buttons
- media-views
- wp-pointer
- customize-preview
- wp-embed-template-ie
- imgareaselect
- wp-jquery-ui-dialog
- mediaelement
- wp-mediaelement
- thickbox
- wp-codemirror
- deprecated-media
- farbtastic
- jcrop
- colors-fresh
- open-sans
- wp-editor-font
- wp-block-library-theme
- wp-reset-editor-styles
- wp-editor-classic-layout-styles
- wp-block-editor-content
- wp-edit-blocks
- wp-block-editor
- wp-block-library
- wp-block-directory
- wp-components
- wp-commands
- wp-edit-post
- wp-editor
- wp-format-library
- wp-list-reusable-blocks
- wp-reusable-blocks
- wp-patterns
- wp-preferences
- wp-nux
- wp-widgets
- wp-edit-widgets
- wp-customize-widgets
- wp-edit-site
function attachment_url_to_path( $url ){
$parsed_url = parse_url( $url );
if(empty($parsed_url['path'])){
return false;
}
$file = dirname(ABSPATH) . $parsed_url['path'];
if (is_readable( $file)){
//var_dump( $file);
return $file;
}
return false;
}
削除しようと思ったがやめた
サイトエディタで、ヘッダーの幅を変更する場合に、テンプレートパートの編集を行うと、そのテンプレートパートを使用するすべてのテンプレートで反映されるため、テンプレートのスタイルバリエーションを使う意味がある。特定のテンプレートの変更に留まるためだ
/*
wp.blocks.registerBlockStyle('core/group', {
name: 'layout-flow',
label: 'Flow Layout',
isDefault: false
});
wp.blocks.registerBlockStyle('core/post-template', {
name: 'layout-flow',
label: 'Flow Layout',
isDefault: false
});
wp.blocks.registerBlockStyle('core/post-template', {
name: 'layout-wide',
label: 'Contents Alignwide',
isDefault: false
});
*/