SHARE
TWEET

Untitled

a guest Jun 19th, 2017 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_filter('manage_edit-section_columns', function ($columns) {
  2.   $columns = array(
  3.     'cb' => 'cb',
  4.     'title' => 'Заголовок',
  5.     'priority' => 'Приоритет'
  6.   );
  7.  
  8.   return $columns;
  9. }, 4);
  10.  
  11. add_filter('manage_section_posts_custom_column', function ($column_name, $post_id) {
  12.   if ($column_name == 'priority') {
  13.     echo get_post_meta($post_id, 'priority', true);
  14.   }
  15. }, 5, 2);
RAW Paste Data
Top