-
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.
Browse files
Browse the repository at this point in the history
…-on-page-builder fix/#504-disable-checklists-on-page-builder
- Loading branch information
Showing
5 changed files
with
155 additions
and
110 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* @package PublishPress\Checklists | ||
* @author PublishPress <[email protected]> | ||
* @copyright Copyright (C) 2019 PublishPress. All rights reserved. | ||
* @license GPLv2 or later | ||
* @since 1.0.0 | ||
*/ | ||
|
||
namespace PublishPress\Checklists\Core\Utils; | ||
|
||
class ElementorUtils | ||
{ | ||
/** | ||
* Check if Elementor is enabled for the current post | ||
* | ||
* @return bool | ||
*/ | ||
public static function isElementorEnabled() | ||
{ | ||
if (!function_exists('get_post_meta') || !function_exists('get_the_ID')) { | ||
return false; | ||
} | ||
|
||
return get_post_meta(get_the_ID(), '_elementor_edit_mode', true) === 'builder'; | ||
} | ||
} |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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