HEX
Server: Apache
System: Linux web2213.uni5.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64
User: clinicamaciel (596848)
PHP: 7.3.33
Disabled: apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,eval,exec,leak,link,myshellexec,openlog,passthru,pclose,pcntl_exec,php_check_syntax,php_strip_whitespace,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,symlink,system,socket_listen,socket_create_listen,putenv
Upload Files
File: /home/clinicamaciel/www/wp-content/plugins/trx_addons/cpt/certificates/certificates.php
<?php
/**
 * ThemeREX Addons Custom post type: Certificates
 *
 * @package WordPress
 * @subpackage ThemeREX Addons
 * @since v1.5
 */

// Don't load directly
if ( ! defined( 'TRX_ADDONS_VERSION' ) ) {
	die( '-1' );
}


// -----------------------------------------------------------------
// -- Custom post type registration
// -----------------------------------------------------------------

// Define Custom post type and taxonomy constants
if ( ! defined('TRX_ADDONS_CPT_CERTIFICATES_PT') ) define('TRX_ADDONS_CPT_CERTIFICATES_PT', trx_addons_cpt_param('certificates', 'post_type'));

// Register post type and taxonomy
if (!function_exists('trx_addons_cpt_certificates_init')) {
	add_action( 'init', 'trx_addons_cpt_certificates_init' );
	function trx_addons_cpt_certificates_init() {
		
		// Add Services parameters to the Meta Box support
		global $TRX_ADDONS_STORAGE;
		$TRX_ADDONS_STORAGE['post_types'][] = TRX_ADDONS_CPT_CERTIFICATES_PT;
		$TRX_ADDONS_STORAGE['meta_box_'.TRX_ADDONS_CPT_CERTIFICATES_PT] = array(
			"subtitle" => array(
				"title" => esc_html__("Item's subtitle",  'trx_addons'),
				"desc" => wp_kses_data( __("Certificate description or any other text", 'trx_addons') ),
				"std" => "",
				"type" => "text"
			)
		);
		
		// Register post type
		register_post_type( TRX_ADDONS_CPT_CERTIFICATES_PT, array(
			'label'               => esc_html__( 'Certificate', 'trx_addons' ),
			'description'         => esc_html__( 'Certificate Description', 'trx_addons' ),
			'labels'              => array(
				'name'                => esc_html__( 'Certificates', 'trx_addons' ),
				'singular_name'       => esc_html__( 'Certificate', 'trx_addons' ),
				'menu_name'           => esc_html__( 'Certificates', 'trx_addons' ),
				'parent_item_colon'   => esc_html__( 'Parent Item:', 'trx_addons' ),
				'all_items'           => esc_html__( 'All Certificates', 'trx_addons' ),
				'view_item'           => esc_html__( 'View Certificate', 'trx_addons' ),
				'add_new_item'        => esc_html__( 'Add New Certificate', 'trx_addons' ),
				'add_new'             => esc_html__( 'Add New', 'trx_addons' ),
				'edit_item'           => esc_html__( 'Edit Certificate', 'trx_addons' ),
				'update_item'         => esc_html__( 'Update Certificate', 'trx_addons' ),
				'search_items'        => esc_html__( 'Search Certificate', 'trx_addons' ),
				'not_found'           => esc_html__( 'Not found', 'trx_addons' ),
				'not_found_in_trash'  => esc_html__( 'Not found in Trash', 'trx_addons' ),
			),
			'supports'            => trx_addons_cpt_param('certificates', 'supports'),
			'public'              => true,
			'hierarchical'        => false,
			'has_archive'         => false,
			'can_export'          => true,
			'show_in_admin_bar'   => true,
			'show_ui'             => true,
			'show_in_menu'        => true,
			'menu_position'       => '52.2',
			'menu_icon'			  => 'dashicons-awards',
			'capability_type'     => 'post',
			'rewrite'             => array( 'slug' => trx_addons_cpt_param('certificates', 'post_type_slug') )
			)
		);
	}
}
?>