updated plugin GP Premium
version 1.11.2
This commit is contained in:
@ -19,6 +19,11 @@ function generate_page_header_do_setup() {
|
||||
}
|
||||
|
||||
$options = generate_page_header_get_options();
|
||||
|
||||
if ( ! $options ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$global_locations = wp_parse_args( get_option( 'generate_page_header_global_locations', array() ), '' );
|
||||
|
||||
// Remove elements if they're being added as a template tag
|
||||
@ -289,6 +294,11 @@ function generate_page_header_get_image( $type = 'URL', $id = '' ) {
|
||||
}
|
||||
|
||||
$options = generate_page_header_get_options();
|
||||
|
||||
if ( ! $options ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$image_id = $options[ 'image_id' ];
|
||||
$image_url = $options[ 'image_url' ];
|
||||
|
||||
@ -335,6 +345,11 @@ function generate_page_header_get_image( $type = 'URL', $id = '' ) {
|
||||
*/
|
||||
function generate_page_header_get_image_output() {
|
||||
$options = generate_page_header_get_options();
|
||||
|
||||
if ( ! $options ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$image_url = generate_page_header_get_image( 'URL' );
|
||||
$image_id = generate_page_header_get_image( 'ID' );
|
||||
|
||||
@ -396,6 +411,10 @@ if ( ! function_exists( 'generate_combined_page_header_start' ) ) {
|
||||
function generate_combined_page_header_start() {
|
||||
$options = generate_page_header_get_options();
|
||||
|
||||
if ( ! $options ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( '' == $options[ 'merge' ] || '' == $options[ 'content' ] || '' == $options[ 'absolute' ] ) {
|
||||
return;
|
||||
}
|
||||
@ -412,6 +431,10 @@ if ( ! function_exists( 'generate_combined_page_header_end' ) ) {
|
||||
function generate_combined_page_header_end() {
|
||||
$options = generate_page_header_get_options();
|
||||
|
||||
if ( ! $options ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( '' == $options[ 'merge' ] || '' == $options[ 'content' ] || '' == $options[ 'absolute' ] ) {
|
||||
return;
|
||||
}
|
||||
@ -429,6 +452,10 @@ if ( ! function_exists( 'generate_page_header_enqueue' ) ) {
|
||||
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||
$options = generate_page_header_get_options();
|
||||
|
||||
if ( ! $options ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! empty( $options[ 'full_screen' ] ) && '' !== $options[ 'content' ] ) {
|
||||
wp_enqueue_script( 'generate-page-header-full-height', plugin_dir_url( __FILE__ ) . "js/full-height{$suffix}.js", array('jquery'), GENERATE_PAGE_HEADER_VERSION, true );
|
||||
}
|
||||
@ -646,6 +673,10 @@ add_filter( 'generate_page_header_location','generate_page_header_force_above_co
|
||||
function generate_page_header_force_above_content( $location ) {
|
||||
$options = generate_page_header_get_options();
|
||||
|
||||
if ( ! $options ) {
|
||||
return $location;
|
||||
}
|
||||
|
||||
if ( '' !== $options[ 'merge' ] && '' !== $options[ 'content' ] ) {
|
||||
$location = 'above-content';
|
||||
}
|
||||
@ -673,6 +704,10 @@ if ( ! function_exists( 'generate_page_header_combined' ) ) {
|
||||
// Get our options
|
||||
$options = generate_page_header_get_options();
|
||||
|
||||
if ( ! $options ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Bail if merge isn't activated
|
||||
if ( '' == $options[ 'merge' ] ) {
|
||||
return;
|
||||
@ -943,6 +978,11 @@ if ( ! function_exists( 'generate_page_header_replace_logo' ) ) {
|
||||
function generate_page_header_replace_logo( $logo ) {
|
||||
if ( generate_page_header_logo_exists() ) {
|
||||
$options = generate_page_header_get_options();
|
||||
|
||||
if ( ! $options ) {
|
||||
return $logo;
|
||||
}
|
||||
|
||||
return $options[ 'logo_url' ];
|
||||
}
|
||||
|
||||
@ -958,6 +998,11 @@ if ( ! function_exists( 'generate_page_header_replace_navigation_logo' ) ) {
|
||||
function generate_page_header_replace_navigation_logo( $logo ) {
|
||||
if ( generate_page_header_navigation_logo_exists() ) {
|
||||
$options = generate_page_header_get_options();
|
||||
|
||||
if ( ! $options ) {
|
||||
return $logo;
|
||||
}
|
||||
|
||||
return $options[ 'navigation_logo_url' ];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user