'40758', 'slug' => 'deskhush-client-editor', 'type' => 'plugin', 'public_key' => 'pk_2467b338dd2e871d84ef835f5a803', 'is_premium' => false, 'premium_suffix' => 'Premium', 'has_addons' => false, 'has_paid_plans' => true, 'is_org_compliant' => true, 'menu' => array( 'slug' => 'deskhush-client-editor', 'support' => false, 'parent' => array( 'slug' => 'options-general.php', ), ), 'is_live' => true, ) ); } } if ( !isset( $dhce_fs ) ) { dhce_load_license(); if ( class_exists( '\\PluginSuite\\Shared\\License' ) ) { $dhce_fs = \PluginSuite\Shared\License::free_only( 'dhce' ); } else { // Do not name a method is__premium_only — Freemius Free preprocessor strips those. $dhce_fs = new class { public function __call( string $name, array $arguments ) { if ( 'is__premium_only' === $name ) { return false; } return null; } public function is_premium_build() : bool { return false; } public function is_free_plan() : bool { return true; } public function get_upgrade_url() : string { return '#'; } } ; } } return $dhce_fs; } dhce_fs(); do_action( 'dhce_fs_loaded' ); } function dhce_is_restricted_editor() : bool { if ( !is_user_logged_in() || current_user_can( 'manage_options' ) ) { return false; } if ( current_user_can( 'dhce_client_editor' ) ) { return true; } return false; } /** * Notify Pro of a restricted client save (audit log). Free is a no-op. */ function dhce_log_client_save( int $post_id ) : void { /** * Pro audit log listener. * * @param int $post_id Post ID. */ do_action( 'dhce_log_client_save', $post_id ); } function dhce_activate() : void { dhce_load_license(); // Multisite is unsupported in v1 (ADR-09). Activation must still complete cleanly; // dhce_init() shows an admin notice and skips feature boot on Multisite. DHCE_Activator::activate(); } function dhce_deactivate() : void { DHCE_Deactivator::deactivate(); } register_activation_hook( __FILE__, 'dhce_activate' ); register_deactivation_hook( __FILE__, 'dhce_deactivate' ); function dhce_init() : void { dhce_load_license(); if ( function_exists( 'plugin_suite_site_supported' ) && !plugin_suite_site_supported() ) { add_action( 'admin_notices', 'plugin_suite_unsupported_multisite_notice' ); return; } ( new DHCE_Block_Lock() )->register_hooks(); ( new DHCE_Save_Guard() )->register_hooks(); if ( is_admin() ) { ( new DHCE_Admin_Page() )->register_hooks(); } } add_action( 'plugins_loaded', 'dhce_init' ); function dhce_register_uninstall() : void { dhce_load_license(); if ( function_exists( 'plugin_suite_register_uninstall_hook' ) ) { plugin_suite_register_uninstall_hook( dhce_fs(), __FILE__, 'dhce_uninstall_cleanup' ); return; } register_uninstall_hook( __FILE__, 'dhce_uninstall_cleanup' ); } dhce_register_uninstall();