updated theme GeneratePress
version 3.4.0
This commit is contained in:
@ -158,11 +158,14 @@ function generate_enqueue_backend_block_editor_assets() {
|
||||
$text_color = $color_settings['content_text_color'];
|
||||
}
|
||||
|
||||
$sidebar_layout = get_post_meta( get_the_ID(), '_generate_sidebar_layout', true );
|
||||
$content_area_type = get_post_meta( get_the_ID(), '_generate-full-width-content', true );
|
||||
|
||||
wp_localize_script(
|
||||
'generate-block-editor',
|
||||
'generatepressBlockEditor',
|
||||
array(
|
||||
'globalSidebarLayout' => generate_get_block_editor_sidebar_layout( false ),
|
||||
'sidebarLayout' => $sidebar_layout ? $sidebar_layout : generate_get_block_editor_sidebar_layout( false ),
|
||||
'containerWidth' => generate_get_option( 'container_width' ),
|
||||
'contentPaddingRight' => absint( $spacing_settings['content_right'] ) . 'px',
|
||||
'contentPaddingLeft' => absint( $spacing_settings['content_left'] ) . 'px',
|
||||
@ -170,7 +173,7 @@ function generate_enqueue_backend_block_editor_assets() {
|
||||
'leftSidebarWidth' => apply_filters( 'generate_left_sidebar_width', '25' ),
|
||||
'text_color' => $text_color,
|
||||
'show_editor_styles' => apply_filters( 'generate_show_block_editor_styles', true ),
|
||||
'contentAreaType' => apply_filters( 'generate_block_editor_content_area_type', '' ),
|
||||
'contentAreaType' => $content_area_type ? $content_area_type : apply_filters( 'generate_block_editor_content_area_type', '' ),
|
||||
'customContentWidth' => apply_filters( 'generate_block_editor_container_width', '' ),
|
||||
)
|
||||
);
|
||||
@ -360,16 +363,10 @@ function generate_do_inline_block_editor_css( $for = 'block-content' ) {
|
||||
$css->add_property( 'margin-top', '0' );
|
||||
}
|
||||
|
||||
if ( $color_settings['h1_color'] ) {
|
||||
$css->add_property( 'color', $color_settings['h1_color'] );
|
||||
} elseif ( $color_settings['content_text_color'] ) {
|
||||
$css->add_property( 'color', $color_settings['content_text_color'] );
|
||||
} else {
|
||||
$css->add_property( 'color', generate_get_option( 'text_color' ) );
|
||||
}
|
||||
$css->add_property( 'color', $color_settings['h1_color'] );
|
||||
|
||||
if ( $color_settings['content_title_color'] ) {
|
||||
$css->set_selector( '.editor-styles-wrapper .editor-post-title__input' );
|
||||
$css->set_selector( '.edit-post-visual-editor__post-title-wrapper h1' );
|
||||
$css->add_property( 'color', $color_settings['content_title_color'] );
|
||||
}
|
||||
|
||||
@ -385,13 +382,7 @@ function generate_do_inline_block_editor_css( $for = 'block-content' ) {
|
||||
$css->add_property( 'margin-top', '0' );
|
||||
}
|
||||
|
||||
if ( $color_settings['h2_color'] ) {
|
||||
$css->add_property( 'color', $color_settings['h2_color'] );
|
||||
} elseif ( $color_settings['content_text_color'] ) {
|
||||
$css->add_property( 'color', $color_settings['content_text_color'] );
|
||||
} else {
|
||||
$css->add_property( 'color', generate_get_option( 'text_color' ) );
|
||||
}
|
||||
$css->add_property( 'color', $color_settings['h2_color'] );
|
||||
|
||||
$css->set_selector( 'h3' );
|
||||
|
||||
@ -405,13 +396,7 @@ function generate_do_inline_block_editor_css( $for = 'block-content' ) {
|
||||
$css->add_property( 'margin-top', '0' );
|
||||
}
|
||||
|
||||
if ( $color_settings['h3_color'] ) {
|
||||
$css->add_property( 'color', $color_settings['h3_color'] );
|
||||
} elseif ( $color_settings['content_text_color'] ) {
|
||||
$css->add_property( 'color', $color_settings['content_text_color'] );
|
||||
} else {
|
||||
$css->add_property( 'color', generate_get_option( 'text_color' ) );
|
||||
}
|
||||
$css->add_property( 'color', $color_settings['h3_color'] );
|
||||
|
||||
$css->set_selector( 'h4' );
|
||||
|
||||
@ -433,13 +418,7 @@ function generate_do_inline_block_editor_css( $for = 'block-content' ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( $color_settings['h4_color'] ) {
|
||||
$css->add_property( 'color', $color_settings['h4_color'] );
|
||||
} elseif ( $color_settings['content_text_color'] ) {
|
||||
$css->add_property( 'color', $color_settings['content_text_color'] );
|
||||
} else {
|
||||
$css->add_property( 'color', generate_get_option( 'text_color' ) );
|
||||
}
|
||||
$css->add_property( 'color', $color_settings['h4_color'] );
|
||||
|
||||
$css->set_selector( 'h5' );
|
||||
|
||||
@ -461,13 +440,7 @@ function generate_do_inline_block_editor_css( $for = 'block-content' ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( $color_settings['h5_color'] ) {
|
||||
$css->add_property( 'color', $color_settings['h5_color'] );
|
||||
} elseif ( $color_settings['content_text_color'] ) {
|
||||
$css->add_property( 'color', $color_settings['content_text_color'] );
|
||||
} else {
|
||||
$css->add_property( 'color', generate_get_option( 'text_color' ) );
|
||||
}
|
||||
$css->add_property( 'color', $color_settings['h5_color'] );
|
||||
|
||||
$css->set_selector( 'h6' );
|
||||
|
||||
@ -489,13 +462,7 @@ function generate_do_inline_block_editor_css( $for = 'block-content' ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( $color_settings['h6_color'] ) {
|
||||
$css->add_property( 'color', $color_settings['h6_color'] );
|
||||
} elseif ( $color_settings['content_text_color'] ) {
|
||||
$css->add_property( 'color', $color_settings['content_text_color'] );
|
||||
} else {
|
||||
$css->add_property( 'color', generate_get_option( 'text_color' ) );
|
||||
}
|
||||
$css->add_property( 'color', $color_settings['h6_color'] );
|
||||
|
||||
$css->set_selector( 'a.button, .block-editor-block-list__layout .wp-block-button .wp-block-button__link' );
|
||||
|
||||
|
Reference in New Issue
Block a user