Skip to content

Commit 9cc8edf

Browse files
fix builder header issue
1 parent 37cc186 commit 9cc8edf

File tree

7 files changed

+34
-33
lines changed

7 files changed

+34
-33
lines changed

assets/js/aae-admin-actions.min.js

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/src/code-snippet/code-snippet.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ COLOR PLATES
147147
border-radius: 10px;
148148
text-decoration: none;
149149
gap: 5px;
150+
cursor: pointer;
150151
&:hover{
151152
color: rgba(252, 104, 72, 1);
152153
background-color: rgba(254, 225, 218, 1);

assets/src/js/wcf-template-library.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
remotetemplates.forEach((template, index) => {
6464
if (
6565
(WCF_TEMPLATE_LIBRARY?.config?.wcf_valid &&
66-
WCF_TEMPLATE_LIBRARY?.config?.wcf_valid === true) || template?.is_pro == '0'
66+
WCF_TEMPLATE_LIBRARY?.config?.wcf_valid === true) ||
67+
template?.is_pro == '0'
6768
) {
6869
template["valid"] = "yes";
6970
}

inc/CodeSnippet/CodeSnippetFrontend.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ private function check_page_visibility( $visibility_condition ) {
315315

316316
default:
317317
// Check for custom post-types.
318+
318319
if ( ! empty( $visibility_condition ) && str_contains( $visibility_condition, 'singulars' ) ) {
319320
$post_type = str_replace( '-singulars', '', $visibility_condition );
320321
return is_singular( $post_type );

inc/admin/base/WXRImporter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ public function parse_authors($file)
334334
*/
335335
public function import($file)
336336
{
337-
add_filter('import_post_meta_key', array($this, 'is_valid_meta_key'));
337+
add_filter('aae_import_post_meta_key', array($this, 'is_valid_meta_key'));
338338
add_filter('http_request_timeout', array(&$this, 'bump_request_timeout'));
339339

340340
/*
@@ -1230,7 +1230,7 @@ protected function process_post_meta($meta, $post_id, $post)
12301230
return false;
12311231
}
12321232

1233-
$key = apply_filters('import_post_meta_key', $meta_item['key'], $post_id, $post);
1233+
$key = apply_filters('aae_import_post_meta_key', $meta_item['key'], $post_id, $post);
12341234
$value = false;
12351235

12361236
if ('_edit_last' === $key) {
@@ -1250,7 +1250,7 @@ protected function process_post_meta($meta, $post_id, $post)
12501250
}
12511251

12521252
add_post_meta($post_id, wp_slash($key), wp_slash($value));
1253-
do_action('import_post_meta', $post_id, $key, $value);
1253+
do_action('aae_import_post_meta', $post_id, $key, $value);
12541254

12551255
// if the post has a featured image, take note of this in case of remap
12561256
if ('_thumbnail_id' === $key) {

inc/theme-builder/theme-builder.php

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -468,34 +468,38 @@ public function get_current_post_by_condition($tmpType = '')
468468
if (is_singular()) {
469469
// check for specific post format current post format
470470

471-
if (is_singular('post') && isset($templates['post-singular']) && is_numeric($templates['post-singular'])) {
471+
if (is_singular('post') && isset($templates['post-singulars']) && is_numeric($templates['post-singulars'])) {
472472
// get category slug
473-
474473
$get_queried_object = get_queried_object();
474+
475+
if(get_post_type($templates['post-singulars']) === 'post') {
476+
477+
$query_args['meta_query'][] = array(
478+
'key' => self::CPT_META . '_location',
479+
'value' => 'post-singular',
480+
'compare' => 'LIKE',
481+
);
475482

476-
$query_args['meta_query'][] = array(
477-
'key' => self::CPT_META . '_location',
478-
'value' => 'post-singular',
479-
'compare' => 'LIKE',
480-
);
481-
482-
$query = new \WP_Query($query_args);
483-
$cat_id = null;
484-
foreach ($query->posts as $key => $post_id) {
485-
$format = get_post_format($post_id) ?: 'standard';
486-
$location = get_post_meta(absint($post_id), self::CPT_META . '_location', true);
487-
$splocation = json_decode(get_post_meta(absint($post_id), self::CPT_META . '_splocation', true));
488-
if (! empty($location) && ! empty($splocation)) {
489-
490-
if ('post-singular' === $location && $splocation[0] === $get_queried_object->slug) {
491-
$cat_id = $post_id;
483+
$query = new \WP_Query($query_args);
484+
$cat_id = null;
485+
foreach ($query->posts as $key => $post_id) {
486+
$format = get_post_format($post_id) ?: 'standard';
487+
$location = get_post_meta(absint($post_id), self::CPT_META . '_location', true);
488+
$splocation = json_decode(get_post_meta(absint($post_id), self::CPT_META . '_splocation', true));
489+
if (! empty($location) && ! empty($splocation)) {
490+
491+
if ('post-singular' === $location && $splocation[0] === $get_queried_object->slug) {
492+
$cat_id = $post_id;
493+
}
492494
}
493495
}
496+
wp_reset_postdata();
497+
if (is_numeric($cat_id)) {
498+
return $cat_id;
499+
}
494500
}
495-
wp_reset_postdata();
496-
if (is_numeric($cat_id)) {
497-
return $cat_id;
498-
}
501+
502+
return $templates['post-singulars'];
499503
}
500504
// if template type single ignore post type page
501505
if (('page' === get_post_type() || self::CPTTYPE === get_post_type()) && 'single' === $tmpType) {

templates/header.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
<head>
1414
<meta charset="<?php bloginfo( 'charset' ); ?>" />
1515
<meta name="viewport" content="width=device-width, initial-scale=1" />
16-
<link rel="profile" href="http://gmpg.org/xfn/11" />
17-
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
1816
<?php wp_head(); ?>
1917
</head>
2018

0 commit comments

Comments
 (0)