This file contains 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 characters
function register_book_post_type() { | |
$args = array ( | |
'label' => esc_html__( 'Books', 'text-domain' ), | |
'labels' => array( | |
'menu_name' => esc_html__( 'Books', 'text-domain' ), | |
'name_admin_bar' => esc_html__( 'Book', 'text-domain' ), | |
'add_new' => esc_html__( 'Add new', 'text-domain' ), | |
'add_new_item' => esc_html__( 'Add new Book', 'text-domain' ), | |
'new_item' => esc_html__( 'New Book', 'text-domain' ), |
This file contains 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 characters
<?php | |
add_action( 'mb_relationships_init', function() { | |
MB_Relationships_API::register( array( | |
'id' => 'books_to_authors', | |
'from' => array( | |
'object_type' => 'post', | |
'post_type' => 'book', | |
'admin_column' => 'before title', // THIS! |