This commit is contained in:
proelements
2026-02-16 11:44:35 +02:00
parent 08ec8d01f1
commit b499583e5a
348 changed files with 3915 additions and 1414 deletions

View File

@@ -2,12 +2,15 @@
namespace ElementorPro\Modules\Notes;
use Elementor\Modules\EditorOne\Classes\Menu_Data_Provider;
use Elementor\Settings;
use ElementorPro\Base\Editor_One_Trait;
use ElementorPro\Modules\Notes\Database\Models\Note;
use ElementorPro\Modules\Notes\EditorOneMenuItems\Editor_One_Notes_Proxy_Menu_Item;
use ElementorPro\Modules\Notes\User\Capabilities;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
exit;
}
/**
@@ -16,18 +19,23 @@ if ( ! defined( 'ABSPATH' ) ) {
* before accessing a Note (since Notes aren't available for unauthorized users).
*/
class Admin_Page {
use Editor_One_Trait;
const PAGE_ID = 'elementor-pro-notes-proxy';
/**
* Register actions and hooks.
*
* @return void
*/
const PRIORITY_AFTER_ELEMENTOR = 206;
public function register() {
if ( $this->is_editor_one_active() ) {
add_action( 'elementor/editor-one/menu/register', function ( Menu_Data_Provider $menu_data_provider ) {
$menu_data_provider->register_menu( new Editor_One_Notes_Proxy_Menu_Item( $this ) );
} );
return;
}
add_action( 'admin_menu', function () {
$this->register_admin_menu();
}, 206 ); // After Elementor.
}, static::PRIORITY_AFTER_ELEMENTOR );
add_action( 'admin_head', function () {
$this->hide_menu_item();