Advertisement
ikamal7

Service to course.php

Sep 15th, 2020
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.10 KB | None | 0 0
  1.  
  2.  
  3. add_action( 'init', 'service_change_labels', 20 );
  4.  
  5. function service_change_labels() {
  6.     $p_object = get_post_type_object( 'service' );
  7.  
  8.     if ( !$p_object ) {
  9.         return FALSE;
  10.     }
  11.     // see get_post_type_labels()
  12.     $p_object->label                      = 'Courses';
  13.     $p_object->labels->name               = 'Courses';
  14.     $p_object->labels->singular_name      = 'Course';
  15.     $p_object->labels->add_new            = 'Add Course';
  16.     $p_object->labels->add_new_item       = 'Add new Course';
  17.     $p_object->labels->all_items          = 'All Courses';
  18.     $p_object->labels->edit_item          = 'Edit Course';
  19.     $p_object->labels->name_admin_bar     = 'Course';
  20.     $p_object->labels->menu_name          = 'Course';
  21.     $p_object->labels->new_item           = 'New Course';
  22.     $p_object->labels->not_found          = 'No Courses found';
  23.     $p_object->labels->not_found_in_trash = 'No Courses found in trash';
  24.     $p_object->labels->search_items       = 'Search Courses';
  25.     $p_object->labels->view_item          = 'View Course';
  26.  
  27.     //var_dump( $p_object );
  28.     return TRUE;
  29.    
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement