updated plugin GP Premium version 1.10.0

This commit is contained in:
2020-05-04 15:57:08 +00:00
committed by Gitium
parent bedbe7cc3f
commit 6a7ce488aa
68 changed files with 483 additions and 39245 deletions

View File

@ -1,10 +1,6 @@
<?php
defined( 'WPINC' ) or die;
if ( ! defined( 'GP_IMAGE_RESIZER' ) ) {
require_once GP_LIBRARY_DIRECTORY . 'image-processing-queue/image-processing-queue.php';
}
require plugin_dir_path( __FILE__ ) . 'post-type.php';
require plugin_dir_path( __FILE__ ) . 'global-locations.php';
require plugin_dir_path( __FILE__ ) . 'metabox.php';
@ -370,8 +366,14 @@ function generate_page_header_get_image_output() {
}
}
if ( ! empty( $image_atts ) && 'enable' == $options[ 'image_resize' ] && function_exists( 'ipq_get_theme_image' ) ) {
return ipq_get_theme_image( $image_id, array( array( $image_atts[ 'width' ], $image_atts[ 'height' ], $image_atts[ 'crop' ] ) ) );
if ( ! empty( $image_atts ) && 'enable' == $options[ 'image_resize' ] ) {
return apply_filters( 'post_thumbnail_html',
wp_get_attachment_image( $image_id, array( $image_atts['width'], $image_atts['height'], $image_atts['crop'] ), '', array( 'itemprop' => 'image' ) ),
get_the_ID(),
$image_id,
apply_filters( 'generate_page_header_default_size', 'full' ),
''
);
} else {
return apply_filters( 'post_thumbnail_html',
wp_get_attachment_image( $image_id, apply_filters( 'generate_page_header_default_size', 'full' ), '', array( 'itemprop' => 'image' ) ),

View File

@ -253,17 +253,20 @@ if ( ! function_exists( 'show_generate_page_header_meta_box' ) ) {
</p>
<div id="crop-enabled" style="display:none">
<p>
<label for="_meta-generate-page-header-image-width" class="example-row-title"><strong><?php _e( 'Image Width', 'gp-premium' );?></strong></label><br />
<input style="width:45px" type="text" name="_meta-generate-page-header-image-width" id="_meta-generate-page-header-image-width" value="<?php echo intval( generate_page_header_get_post_meta( get_the_ID(), '_meta-generate-page-header-image-width', true ) ); ?>" /><label for="_meta-generate-page-header-image-width"><span class="pixels">px</span></label>
</p>
<p><?php _e( 'These options are no longer available as of GP Premium 1.10.0.', 'gp-premium' ); ?>
<div style="display: none;">
<p>
<label for="_meta-generate-page-header-image-width" class="example-row-title"><strong><?php _e( 'Image Width', 'gp-premium' );?></strong></label><br />
<input style="width:45px" type="text" name="_meta-generate-page-header-image-width" id="_meta-generate-page-header-image-width" value="<?php echo intval( generate_page_header_get_post_meta( get_the_ID(), '_meta-generate-page-header-image-width', true ) ); ?>" /><label for="_meta-generate-page-header-image-width"><span class="pixels">px</span></label>
</p>
<p style="margin-bottom:0;">
<label for="_meta-generate-page-header-image-height" class="example-row-title"><strong><?php _e( 'Image Height', 'gp-premium' );?></strong></label><br />
<input placeholder="" style="width:45px" type="text" name="_meta-generate-page-header-image-height" id="_meta-generate-page-header-image-height" value="<?php echo intval( generate_page_header_get_post_meta( get_the_ID(), '_meta-generate-page-header-image-height', true ) ); ?>" />
<label for="_meta-generate-page-header-image-height"><span class="pixels">px</span></label>
<span class="description" style="display:block;"><?php _e( 'Use "0" or leave blank for proportional resizing.', 'gp-premium' );?></span>
</p>
<p style="margin-bottom:0;">
<label for="_meta-generate-page-header-image-height" class="example-row-title"><strong><?php _e( 'Image Height', 'gp-premium' );?></strong></label><br />
<input placeholder="" style="width:45px" type="text" name="_meta-generate-page-header-image-height" id="_meta-generate-page-header-image-height" value="<?php echo intval( generate_page_header_get_post_meta( get_the_ID(), '_meta-generate-page-header-image-height', true ) ); ?>" />
<label for="_meta-generate-page-header-image-height"><span class="pixels">px</span></label>
<span class="description" style="display:block;"><?php _e( 'Use "0" or leave blank for proportional resizing.', 'gp-premium' );?></span>
</p>
</div>
</div>
</div>
</div>