updated plugin GP Premium version 2.2.0

This commit is contained in:
2022-10-27 11:14:35 +00:00
committed by Gitium
parent 1465186bc5
commit a626bfa106
77 changed files with 418 additions and 152 deletions

View File

@ -61,12 +61,6 @@
clear: both;
}
.post-image-aligned-left .inside-article,
.post-image-aligned-right .inside-article {
zoom: 1;
/* For IE 6/7 (trigger hasLayout) */
}
.one-container.post-image-above-header .page-header + .no-featured-image-padding .inside-article .post-image,
.one-container.post-image-above-header .no-featured-image-padding.generate-columns .inside-article .post-image {
margin-top: 0;

View File

@ -1 +1 @@
.post-image-above-header .inside-article .featured-image,.post-image-above-header .inside-article .post-image{margin-top:0;margin-bottom:2em}.post-image-aligned-left .inside-article .featured-image,.post-image-aligned-left .inside-article .post-image{margin-top:0;margin-right:2em;float:left;text-align:left}.post-image-aligned-center .featured-image,.post-image-aligned-center .post-image{text-align:center}.post-image-aligned-right .inside-article .featured-image,.post-image-aligned-right .inside-article .post-image{margin-top:0;margin-left:2em;float:right;text-align:right}.post-image-below-header.post-image-aligned-center .inside-article .featured-image,.post-image-below-header.post-image-aligned-left .inside-article .featured-image,.post-image-below-header.post-image-aligned-left .inside-article .post-image,.post-image-below-header.post-image-aligned-right .inside-article .featured-image,.post-image-below-header.post-image-aligned-right .inside-article .post-image{margin-top:2em}.post-image-aligned-left>.featured-image,.post-image-aligned-right>.featured-image{float:none;margin-left:auto;margin-right:auto}.post-image-aligned-left .featured-image{text-align:left}.post-image-aligned-right .featured-image{text-align:right}.post-image-aligned-left .inside-article:after,.post-image-aligned-left .inside-article:before,.post-image-aligned-right .inside-article:after,.post-image-aligned-right .inside-article:before{content:"";display:table}.post-image-aligned-left .inside-article:after,.post-image-aligned-right .inside-article:after{clear:both}.post-image-aligned-left .inside-article,.post-image-aligned-right .inside-article{zoom:1}.one-container.post-image-above-header .no-featured-image-padding.generate-columns .inside-article .post-image,.one-container.post-image-above-header .page-header+.no-featured-image-padding .inside-article .post-image{margin-top:0}.one-container.both-right.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-right.post-image-aligned-center .no-featured-image-padding .post-image,.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .post-image{margin-right:0}.one-container.both-left.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-left.post-image-aligned-center .no-featured-image-padding .post-image,.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .post-image{margin-left:0}.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .post-image{margin-left:0;margin-right:0}.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .featured-image,.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .post-image{margin-left:0;margin-right:0}@media (max-width:768px){body:not(.post-image-aligned-center) .featured-image,body:not(.post-image-aligned-center) .inside-article .featured-image,body:not(.post-image-aligned-center) .inside-article .post-image{margin-right:0;margin-left:0;float:none;text-align:center}}
.post-image-above-header .inside-article .featured-image,.post-image-above-header .inside-article .post-image{margin-top:0;margin-bottom:2em}.post-image-aligned-left .inside-article .featured-image,.post-image-aligned-left .inside-article .post-image{margin-top:0;margin-right:2em;float:left;text-align:left}.post-image-aligned-center .featured-image,.post-image-aligned-center .post-image{text-align:center}.post-image-aligned-right .inside-article .featured-image,.post-image-aligned-right .inside-article .post-image{margin-top:0;margin-left:2em;float:right;text-align:right}.post-image-below-header.post-image-aligned-center .inside-article .featured-image,.post-image-below-header.post-image-aligned-left .inside-article .featured-image,.post-image-below-header.post-image-aligned-left .inside-article .post-image,.post-image-below-header.post-image-aligned-right .inside-article .featured-image,.post-image-below-header.post-image-aligned-right .inside-article .post-image{margin-top:2em}.post-image-aligned-left>.featured-image,.post-image-aligned-right>.featured-image{float:none;margin-left:auto;margin-right:auto}.post-image-aligned-left .featured-image{text-align:left}.post-image-aligned-right .featured-image{text-align:right}.post-image-aligned-left .inside-article:after,.post-image-aligned-left .inside-article:before,.post-image-aligned-right .inside-article:after,.post-image-aligned-right .inside-article:before{content:"";display:table}.post-image-aligned-left .inside-article:after,.post-image-aligned-right .inside-article:after{clear:both}.one-container.post-image-above-header .no-featured-image-padding.generate-columns .inside-article .post-image,.one-container.post-image-above-header .page-header+.no-featured-image-padding .inside-article .post-image{margin-top:0}.one-container.both-right.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-right.post-image-aligned-center .no-featured-image-padding .post-image,.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .post-image{margin-right:0}.one-container.both-left.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-left.post-image-aligned-center .no-featured-image-padding .post-image,.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .post-image{margin-left:0}.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .post-image{margin-left:0;margin-right:0}.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .featured-image,.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .post-image{margin-left:0;margin-right:0}@media (max-width:768px){body:not(.post-image-aligned-center) .featured-image,body:not(.post-image-aligned-center) .inside-article .featured-image,body:not(.post-image-aligned-center) .inside-article .post-image{margin-right:0;margin-left:0;float:none;text-align:center}}

View File

@ -61,12 +61,6 @@
clear: both;
}
.post-image-aligned-left .inside-article,
.post-image-aligned-right .inside-article {
zoom: 1;
/* For IE 6/7 (trigger hasLayout) */
}
.one-container.post-image-above-header .page-header + .no-featured-image-padding .inside-article .post-image,
.one-container.post-image-above-header .no-featured-image-padding.generate-columns .inside-article .post-image {
margin-top: 0;

File diff suppressed because one or more lines are too long

View File

@ -28,6 +28,79 @@ if ( ! function_exists( 'generate_blog_customize_register' ) ) {
$wp_customize->register_control_type( 'Generate_Control_Toggle_Customize_Control' );
}
$wp_customize->add_section(
'generate_blog_loop_template_section',
array(
'title' => __( 'Blog', 'gp-premium' ),
'capability' => 'edit_theme_options',
'panel' => 'generate_layout_panel',
'priority' => 40,
'active_callback' => function() {
return generate_has_active_element( 'loop-template', true );
},
)
);
$wp_customize->add_control(
new GeneratePress_Information_Customize_Control(
$wp_customize,
'generate_using_loop_template',
array(
'section' => 'generate_blog_loop_template_section',
'description' => sprintf(
/* translators: URL to the Elements dashboard. */
__( 'This page is using a <a href="%s">Loop Template Element</a>. Other options can be found within that Element.', 'gp-premium' ),
admin_url( 'edit.php?post_type=gp_elements' )
),
'notice' => true,
'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname',
'active_callback' => function() {
return generate_has_active_element( 'loop-template', true );
},
'priority' => 0,
)
)
);
$wp_customize->add_setting(
'generate_blog_settings[excerpt_length]', array(
'default' => $defaults['excerpt_length'],
'capability' => 'edit_theme_options',
'type' => 'option',
'sanitize_callback' => 'absint',
)
);
$wp_customize->add_control(
'generate_loop_template_excerpt_length',
array(
'type' => 'number',
'label' => __( 'Excerpt word count', 'gp-premium' ),
'section' => 'generate_blog_loop_template_section',
'settings' => 'generate_blog_settings[excerpt_length]',
)
);
$wp_customize->add_setting(
'generate_blog_settings[read_more]',
array(
'default' => $defaults['read_more'],
'capability' => 'edit_theme_options',
'type' => 'option',
'sanitize_callback' => 'wp_kses_post',
)
);
$wp_customize->add_control(
'generate_loop_template_read_more',
array(
'type' => 'text',
'label' => __( 'Read more label', 'gp-premium' ),
'section' => 'generate_blog_loop_template_section',
'settings' => 'generate_blog_settings[read_more]',
)
);
// Blog content section.
$wp_customize->add_section(
'generate_blog_section',
@ -36,6 +109,9 @@ if ( ! function_exists( 'generate_blog_customize_register' ) ) {
'capability' => 'edit_theme_options',
'panel' => 'generate_layout_panel',
'priority' => 40,
'active_callback' => function() {
return ! generate_has_active_element( 'loop-template', true );
},
)
);
@ -83,16 +159,6 @@ if ( ! function_exists( 'generate_blog_customize_register' ) ) {
)
);
// Excerpt length
$wp_customize->add_setting(
'generate_blog_settings[excerpt_length]', array(
'default' => $defaults['excerpt_length'],
'capability' => 'edit_theme_options',
'type' => 'option',
'sanitize_callback' => 'absint',
)
);
$wp_customize->add_control(
'generate_blog_settings[excerpt_length]', array(
'type' => 'number',
@ -103,16 +169,6 @@ if ( ! function_exists( 'generate_blog_customize_register' ) ) {
)
);
// Read more text
$wp_customize->add_setting(
'generate_blog_settings[read_more]', array(
'default' => $defaults['read_more'],
'capability' => 'edit_theme_options',
'type' => 'option',
'sanitize_callback' => 'wp_kses_post',
)
);
$wp_customize->add_control(
'generate_blog_settings[read_more]', array(
'type' => 'text',
@ -122,7 +178,6 @@ if ( ! function_exists( 'generate_blog_customize_register' ) ) {
)
);
// Read more button
$wp_customize->add_setting(
'generate_blog_settings[read_more_button]',
array(

View File

@ -650,6 +650,10 @@ if ( ! function_exists( 'generate_blog_load_more' ) ) {
return;
}
if ( is_tax( 'product_cat' ) ) {
return;
}
$icon = '';
if ( function_exists( 'generate_get_svg_icon' ) ) {

View File

@ -243,6 +243,10 @@ function generate_blog_single_featured_image() {
}
}
if ( function_exists( 'wp_get_loading_attr_default' ) ) {
$attrs['loading'] = wp_get_loading_attr_default( 'the_post_thumbnail' );
}
$image_html = apply_filters(
'post_thumbnail_html', // phpcs:ignore -- Core filter.
wp_get_attachment_image(