Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions dro-posttype.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,15 @@
add_filter('manage_edit-pizza_columns', function($pizza_columns) {
$pizza_columns['type_pizza'] = __('Type de Pizza');
$pizza_columns['prices'] = __('Prix');


$pizza_columns['promo'] = __('Pomo');

return $pizza_columns;
});
add_action('manage_pizza_posts_custom_column', 'manage_pizza_colums', 10, 2);

function manage_pizza_colums($column_name, $id) {
global $wpdb;
switch ($column_name) {

case 'type_pizza':
$type_pizza_sql = "SELECT t.term_id, t.name
FROM $wpdb->terms t
Expand All @@ -79,7 +76,6 @@ function manage_pizza_colums($column_name, $id) {
break;
}
}

add_action('admin_enqueue_scripts', 'dro_posttype_scripts');
});

Expand Down Expand Up @@ -107,8 +103,6 @@ function dro_posttype_scripts($hook) {

$screen = get_current_screen();
if ($hook == 'post-new.php' || $hook == 'post.php' || $hook == 'edit.php') {


if ($screen->post_type === 'pizza') {
wp_enqueue_style('dro-posttype-css', plugins_url('assets/css/dro-posttype-css.css', __FILE__));
//js
Expand Down