Last active
February 14, 2022 04:25
-
-
Save sarfarazansari/2b0f16bb80b827a91aeb8f955d957b53 to your computer and use it in GitHub Desktop.
Revisions
-
sarfarazansari revised this gist
Feb 14, 2022 . 1 changed file with 28 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,4 +13,32 @@ function set_custom_edit_rezept_columns($columns) { )); return $columns; } // Add the data to the custom columns for the book post type: add_action( 'manage_rezept_posts_custom_column' , 'custom_rezept_column', 10, 2 ); function custom_rezept_column( $column, $post_id ) { switch ( $column ) { case 'recipe_status' : echo get_post_meta( $post_id, 'recipe_status', true); break; case 'name': echo get_post_meta( $post_id, 'name', true); break; case 'email': echo get_post_meta( $post_id, 'email', true); break; case 'group_of_people': echo get_post_meta( $post_id, 'group_of_people', true); break; case 'activation_date': echo get_the_modified_date('l jS \of F Y h:i:s A', $post_id); break; } } -
sarfarazansari created this gist
Feb 14, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ // Add the custom columns to the rezept post type: add_filter( 'manage_rezept_posts_columns', 'set_custom_edit_rezept_columns' ); function set_custom_edit_rezept_columns($columns) { unset($columns['date']); return array_merge ( $columns, array ( 'name' => __('Vor- & Nachname'), 'email' => __('E-mail Adresse'), 'group_of_people' => __('Personengruppe'), 'activation_date' => __('Erstellungsdatum'), 'recipe_status' => __('Status'), 'date' => __('Veröffentlicht') )); return $columns; }