/home/techb158/balacoffee.com/wp-content/plugins/coming-soon/includes
NameSizeModeActions
class-seedprod-abilities.php53730644editdlrm
class-seedprod-init.php29810644editdlrm
class-seedprod-loader.php41260644editdlrm
Edit: /home/techb158/balacoffee.com/wp-content/plugins/coming-soon/includes/class-seedprod-abilities.php (5373B)
__( 'SeedProd', 'coming-soon' ), 'description' => __( 'SeedProd page builder and website customization operations.', 'coming-soon' ), ) ); } /** * Register all SeedProd abilities. */ public function register_abilities() { // Available in both Pro and Lite. $this->register_get_status(); } // ------------------------------------------------------------------------- // Status // ------------------------------------------------------------------------- /** * Register the get-status ability. */ private function register_get_status() { wp_register_ability( 'seedprod/get-status', array( 'label' => __( 'Get SeedProd Status', 'coming-soon' ), 'description' => __( 'Get the current status of SeedProd including coming soon mode, maintenance mode, theme builder status, and license information.', 'coming-soon' ), 'category' => 'seedprod', 'input_schema' => array( 'type' => array( 'object', 'null' ), 'properties' => array(), ), 'output_schema' => array( 'type' => 'object', 'properties' => array( 'coming_soon_enabled' => array( 'type' => 'boolean', 'description' => __( 'Whether coming soon mode is enabled.', 'coming-soon' ), ), 'coming_soon_page_id' => array( 'type' => 'integer', 'description' => __( 'The ID of the coming soon page.', 'coming-soon' ), ), 'maintenance_enabled' => array( 'type' => 'boolean', 'description' => __( 'Whether maintenance mode is enabled.', 'coming-soon' ), ), 'maintenance_page_id' => array( 'type' => 'integer', 'description' => __( 'The ID of the maintenance mode page.', 'coming-soon' ), ), 'theme_enabled' => array( 'type' => 'boolean', 'description' => __( 'Whether the SeedProd theme builder is enabled.', 'coming-soon' ), ), 'license_active' => array( 'type' => 'boolean', 'description' => __( 'Whether a valid license is active.', 'coming-soon' ), ), 'license_type' => array( 'type' => 'string', 'description' => __( 'The type of license (e.g., Basic, Plus, Pro, Elite).', 'coming-soon' ), ), 'version' => array( 'type' => 'string', 'description' => __( 'The current SeedProd plugin version.', 'coming-soon' ), ), 'build' => array( 'type' => 'string', 'description' => __( 'The build type (pro or lite).', 'coming-soon' ), ), ), ), 'execute_callback' => array( $this, 'execute_get_status' ), 'permission_callback' => function () { return current_user_can( 'manage_options' ); }, 'meta' => array( 'show_in_rest' => true, 'annotations' => array( 'readonly' => true, ), ), ) ); } /** * Execute the get-status ability. * * @param array $input The input parameters (unused). * @return array The current SeedProd status. */ public function execute_get_status( $input ) { $settings = $this->get_settings(); // Theme is enabled if EITHER the new JSON format or legacy standalone option reports it on. $theme_enabled = ! empty( $settings['enable_seedprod_theme'] ) || ! empty( get_option( 'seedprod_theme_enabled', false ) ); return array( 'coming_soon_enabled' => ! empty( $settings['enable_coming_soon_mode'] ), 'coming_soon_page_id' => absint( get_option( 'seedprod_coming_soon_page_id', 0 ) ), 'maintenance_enabled' => ! empty( $settings['enable_maintenance_mode'] ), 'maintenance_page_id' => absint( get_option( 'seedprod_maintenance_mode_page_id', 0 ) ), 'theme_enabled' => $theme_enabled, 'license_active' => (bool) get_option( 'seedprod_a', false ), 'license_type' => get_option( 'seedprod_license_name', '' ), 'version' => SEEDPROD_VERSION, 'build' => SEEDPROD_BUILD, ); } /** * Get the SeedProd settings as an array. * * @return array The settings array. */ private function get_settings() { $settings = get_option( 'seedprod_settings', array() ); if ( is_string( $settings ) ) { $settings = json_decode( $settings, true ); } if ( ! is_array( $settings ) ) { $settings = array(); } return $settings; } } // Initialize the abilities. new SeedProd_Lite_Abilities();