mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-06-05 15:08:20 +09:00
Add block editor styling
This commit is contained in:
@@ -0,0 +1 @@
|
||||
div[class^="wp-block-displayfeaturedimagegenesis"]:before{position:absolute;top:0;right:0;bottom:0;left:0;content:' ';background-color:rgba(255,255,255,0)}
|
||||
@@ -39,6 +39,7 @@ class DisplayFeaturedImageGenesisOutputBlock {
|
||||
"{$this->name}{$block}",
|
||||
array(
|
||||
'editor_script' => "{$this->block}block",
|
||||
'editor_style' => "{$this->block}block",
|
||||
'attributes' => $this->fields( $block ),
|
||||
'render_callback' => array( $this, "render_{$data['nickname']}" ),
|
||||
)
|
||||
@@ -133,6 +134,7 @@ class DisplayFeaturedImageGenesisOutputBlock {
|
||||
public function register_script_style() {
|
||||
$minify = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : ' . min';
|
||||
$version = displayfeaturedimagegenesis_get()->version;
|
||||
wp_register_style( "{$this->block}block", plugin_dir_url( dirname( __FILE__ ) ) . 'css/blocks.css', array(), $version, 'screen' );
|
||||
if ( ! $minify ) {
|
||||
$version .= current_time( 'gmt' );
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
div[class^="wp-block-displayfeaturedimagegenesis"] {
|
||||
&:before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
content: ' ';
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user