Aggiungere permessi personalizzati ad un custom post type in WordPress
29 April 2016
Comments (0)
[:it]In questa semplice guida vi faccio vedere come aggiungere permessi personalizzati ad un custom post type in WordPress. add_filter( ‘wpcf_type’, ‘pwd_add_product_caps’, 10, 2); function pwd_add_product_caps($data, $post_type) { if($post_type == ‘product’){ $args = array( ‘capability_type’ => ‘product’, ‘capabilities’ => array( ‘publish_posts’ => ‘publish_products’, ‘edit_posts’ => ‘edit_products’, ‘edit_others_posts’ => ‘edit_others_products’, ‘delete_posts’ => ‘delete_products’, ‘delete_others_posts’ => ‘delete_others_products’, ‘read_private_posts’ […]