| Server IP : 5.144.175.180 / Your IP : 216.73.216.131 Web Server : Apache/2.4.63 (Unix) OpenSSL/1.1.1 System : Linux vpsgpz1.itsimplycom.it 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 User : edilchimica ( ) PHP Version : 7.4.33 Disable Function : getmyuid,passthru,leak,listen,diskfreespace,tmpfile,link,shell_exec,dl,exec,system,highlight_file,source,show_source,fpassthru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_open,proc_close,proc_nice,proc_terminate,escapeshellcmd,ini_alter,popen,pcntl_exec,socket_accept,socket_bind,socket_clear_error,socket_close,socket_connect,symlink,posix_geteuid,ini_alter,socket_listen,socket_create_listen,socket_read,socket_create_pair,stream_socket_server MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/edilchimica/webapps/edilchimica/wp-content/themes/edilchimica-child/ |
Upload File : |
<?php
/**
* Kalium WordPress Theme
*
* @author Laborator
* @link https://kaliumtheme.com
*/
if (!defined('ABSPATH')) {
exit; // Direct access not allowed.
}
/**
* After theme setup hooks.
*/
function kalium_child_after_setup_theme()
{
// Load translations for child theme
load_child_theme_textdomain('kalium-child', get_stylesheet_directory() . '/languages');
}
add_action('after_setup_theme', 'kalium_child_after_setup_theme');
/**
* This will enqueue style.css of child theme.
*/
function kalium_child_wp_enqueue_scripts()
{
// Remove if you are not going to use style.css
//wp_enqueue_style( 'kalium-child', get_stylesheet_directory_uri() . '/style.css' );
wp_enqueue_style('edilchimica', get_stylesheet_directory_uri() . '/dist/css/edilchimica.css');
}
add_action('wp_enqueue_scripts', 'kalium_child_wp_enqueue_scripts', 110);
/*
* Creating a function to create our CPT
*/
function custom_post_type()
{
// Set UI labels for Custom Post Type
$labels = array(
'name' => _x('Prodotti', 'Post Type General Name', 'edilchimica'),
'singular_name' => _x('Prodotto', 'Post Type Singular Name', 'edilchimica'),
'menu_name' => __('Prodotti', 'edilchimica'),
'parent_item_colon' => __('Prodotto genitore', 'edilchimica'),
'all_items' => __('Tutti i prodotti', 'edilchimica'),
'view_item' => __('Vedi prodotto', 'edilchimica'),
'add_new_item' => __('Aggiungi nuovo prodotto', 'edilchimica'),
'add_new' => __('Aggiungi nuovo', 'edilchimica'),
'edit_item' => __('Modifica prodotto', 'edilchimica'),
'update_item' => __('Aggiorna prodotto', 'edilchimica'),
'search_items' => __('Cerca prodotto', 'edilchimica'),
'not_found' => __('Non trovato', 'edilchimica'),
'not_found_in_trash' => __('Non trovato nel cestino', 'edilchimica'),
);
// Set other options for Custom Post Type
$args = array(
'label' => __('prodotti', 'edilchimica'),
'description' => __('Prodotti', 'edilchimica'),
'labels' => $labels,
// Features this CPT supports in Post Editor
'supports' => array('title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields',),
// You can associate this CPT with a taxonomy or custom taxonomy.
'taxonomies' => array('categorie_prodotti'),
/* A hierarchical CPT is like Pages and can have
* Parent and child items. A non-hierarchical CPT
* is like Posts.
*/
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
'show_in_rest' => true,
);
// Registering your Custom Post Type
register_post_type('prodotti', $args);
}
/* Hook into the 'init' action so that the function
* Containing our post type registration is not
* unnecessarily executed.
*/
add_action('init', 'custom_post_type', 0);
//hook into the init action and call create_book_taxonomies when it fires
add_action('init', 'create_subjects_hierarchical_taxonomy', 0);
//create a custom taxonomy name it subjects for your posts
function create_subjects_hierarchical_taxonomy()
{
// Add new taxonomy, make it hierarchical like categories
//first do the translations part for GUI
$labels = array(
'name' => _x('Categorie', 'taxonomy general name'),
'singular_name' => _x('Categoria', 'taxonomy singular name'),
'search_items' => __('Cerca categoria'),
'all_items' => __('Tutte le categorie'),
'parent_item' => __('Categoria genitore'),
'parent_item_colon' => __('Categoria genitore:'),
'edit_item' => __('Modifica categoria'),
'update_item' => __('Aggiorna categoria'),
'add_new_item' => __('Aggiungi nuova categoria'),
'new_item_name' => __('Nuovo nome categoria'),
'menu_name' => __('Categorie'),
);
// Now register the taxonomy
register_taxonomy('categorie_prodotti', array('prodotti'), array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'show_in_rest' => true,
'show_admin_column' => true,
'query_var' => true,
'public' => false
));
}