david wolfpaw
WordPress Maintenance at fixupfox.com On the Internet, everyone knows I'm a dog. They/Them/Woof
6,264 posts created yesterday*
High Growth since WP v4.9.8
https://gutenstats.blog/
A theme author would write:
h2 { color: red; }
The injected CSS would be
.editor-block-list__block h2 { color: red; }
/**
* Enqueue Gutenberg block editor style
*/
function my_gutenberg_editor_styles() {
wp_enqueue_style(
'my-block-editor-styles',
get_stylesheet_uri() . '/style-editor.css',
false,
'1.0',
'screen'
);
}
add_action(
'enqueue_block_editor_assets',
'my_gutenberg_editor_styles'
);
function my_setup_theme_supported_features() {
add_theme_support( 'editor-color-palette', array(
array(
'name' => __( 'strong magenta', 'theme' ),
'slug' => 'strong-magenta',
'color' => '#a156b4',
),
array(
'name' => __( 'light grayish magenta', 'theme' ),
'slug' => 'light-grayish-magenta',
'color' => '#d0a5db',
),
array(
'name' => __( 'very light gray', 'theme' ),
'slug' => 'very-light-gray',
'color' => '#eee',
),
) );
}
add_action( 'after_setup_theme', 'my_setup_theme_supported_features' );
function myplugin_register_book_post_type() {
$args = array(
'public' => true,
'label' => 'Books',
'show_in_rest' => true,
'template' => array(
array( 'core/image', array(
'align' => 'left',
) ),
array( 'core/heading', array(
'placeholder' => 'Add Author...',
) ),
array( 'core/paragraph', array(
'placeholder' => 'Add Description...',
) ),
),
);
register_post_type( 'book', $args );
}
add_action( 'init', 'myplugin_register_book_post_type' );
By david wolfpaw
WordPress Maintenance at fixupfox.com On the Internet, everyone knows I'm a dog. They/Them/Woof