-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/#639_ACF_Integration_Support (#762)
- Loading branch information
1 parent
f2b2b0e
commit 1c74652
Showing
7 changed files
with
333 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/** | ||
* @package PublishPress\Checklistss | ||
* @author PublishPress <[email protected]> | ||
|
@@ -53,9 +54,9 @@ public function clearPostTypesOptions($modulePostTypes = [], $postTypeSupport = | |
$allPostTypes = array_keys($this->getAllPostTypes()); | ||
foreach ($allPostTypes as $postType) { | ||
if ((isset($modulePostTypes[$postType]) && $modulePostTypes[$postType] == 'on') || post_type_supports( | ||
$postType, | ||
$postTypeSupport | ||
)) { | ||
$postType, | ||
$postTypeSupport | ||
)) { | ||
$normalizedPostTypeOptions[$postType] = 'on'; | ||
} else { | ||
$normalizedPostTypeOptions[$postType] = 'off'; | ||
|
@@ -222,8 +223,8 @@ public function printDefaultHeader($current_module, $custom_text = null) | |
|
||
if ($message && isset($current_module->messages[$message])) { | ||
$display_text .= '<div class="is-dismissible notice notice-info"><p>' . esc_html( | ||
$current_module->messages[$message] | ||
) . '</p></div>'; | ||
$current_module->messages[$message] | ||
) . '</p></div>'; | ||
} | ||
|
||
// If there's been an error, let's display it | ||
|
@@ -238,31 +239,31 @@ public function printDefaultHeader($current_module, $custom_text = null) | |
} | ||
if ($error && isset($current_module->messages[$error])) { | ||
$display_text .= '<div class="is-dismissible notice notice-error"><p>' . esc_html( | ||
$current_module->messages[$error] | ||
) . '</p></div>'; | ||
$current_module->messages[$error] | ||
) . '</p></div>'; | ||
} | ||
?> | ||
?> | ||
|
||
<div class="publishpress-checklists-admin pressshack-admin-wrapper wrap"> | ||
<header> | ||
<h1 class="wp-heading-inline"><?php echo esc_html($current_module->title); ?></h1> | ||
<header> | ||
<h1 class="wp-heading-inline"><?php echo esc_html($current_module->title); ?></h1> | ||
|
||
<?php echo !empty($display_text) ? esc_html($display_text) : ''; ?> | ||
<?php // We keep the H2 tag to keep notices tied to the header | ||
?> | ||
<h2> | ||
<?php echo !empty($display_text) ? esc_html($display_text) : ''; ?> | ||
<?php // We keep the H2 tag to keep notices tied to the header | ||
?> | ||
<h2> | ||
|
||
<?php if ($current_module->short_description && empty($custom_text)): ?> | ||
<?php echo esc_html($current_module->short_description); ?> | ||
<?php endif; ?> | ||
<?php if ($current_module->short_description && empty($custom_text)): ?> | ||
<?php echo esc_html($current_module->short_description); ?> | ||
<?php endif; ?> | ||
|
||
<?php if (!empty($custom_text)) : ?> | ||
<?php echo esc_html($custom_text); ?> | ||
<?php endif; ?> | ||
</h2> | ||
<?php if (!empty($custom_text)) : ?> | ||
<?php echo esc_html($custom_text); ?> | ||
<?php endif; ?> | ||
</h2> | ||
|
||
</header> | ||
<?php | ||
</header> | ||
<?php | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/** | ||
* @package PublishPress\Checklistss | ||
* @author PublishPress <[email protected]> | ||
|
@@ -31,9 +32,11 @@ public static function getCurrentPostType() | |
$post_type = $current_screen->post_type; | ||
} elseif (isset($_REQUEST['post_type'])) { | ||
$post_type = sanitize_key($_REQUEST['post_type']); | ||
} elseif ('post.php' == $pagenow | ||
} elseif ( | ||
'post.php' == $pagenow | ||
&& $post_id | ||
&& !empty(get_post($post_id)->post_type)) { | ||
&& !empty(get_post($post_id)->post_type) | ||
) { | ||
$post_type = get_post($post_id)->post_type; | ||
} elseif ('edit.php' == $pagenow && empty($_REQUEST['post_type'])) { | ||
$post_type = 'post'; | ||
|
@@ -167,7 +170,7 @@ private static function getDirectorySeparator() | |
*/ | ||
public static function ppch_pro_sidebar() | ||
{ | ||
?> | ||
?> | ||
<div class="ppch-advertisement-right-sidebar"> | ||
<div class="advertisement-box-content postbox ppch-advert"> | ||
<div class="postbox-header ppch-advert"> | ||
|
@@ -222,16 +225,16 @@ class="advert-link" href="https://publishpress.com/docs-category/checklists/" ta | |
</div> | ||
</div> | ||
</div><?php | ||
} | ||
} | ||
|
||
/** | ||
* Check if Checklists Pro active | ||
*/ | ||
public static function isChecklistsProActive() | ||
{ | ||
if (defined('PPCHPRO_VERSION')) { | ||
return true; | ||
/** | ||
* Check if Checklists Pro active | ||
*/ | ||
public static function isChecklistsProActive() | ||
{ | ||
if (defined('PPCHPRO_VERSION')) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
} | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.