Skip to content

Instantly share code, notes, and snippets.

add_action( 'init', prefix_book_posttype' );
function prefix_book_posttype() {
$labels = array(
'name' => _x( 'Books', 'post type general name', 'your-plugin-textdomain' ),
'singular_name' => _x( 'Book', 'post type singular name', 'your-plugin-textdomain' ),
'menu_name' => _x( 'Books', 'admin menu', 'your-plugin-textdomain' ),
'name_admin_bar' => _x( 'Book', 'add new on admin bar', 'your-plugin-textdomain' ),
'add_new' => _x( 'Add New', 'book', 'your-plugin-textdomain' ),
'add_new_item' => __( 'Add New Book', 'your-plugin-textdomain' ),
'new_item' => __( 'New Book', 'your-plugin-textdomain' ),
@bacoords
bacoords / wp-tinymce-fontsize.md
Last active June 9, 2016 17:03
Snippet to change TINYMCE fontsize to EMs

functions.php snippet to change TINYMCE fontsize to EMs

Source: wpexplorer.com

// Customize mce editor font sizes
if ( ! function_exists( 'wpex_mce_text_sizes' ) ) {
	function wpex_mce_text_sizes( $initArray ){
		$initArray['fontsize_formats'] = "0.25em 0.5em 0.75em 1em 1.25em 1.5em 1.75em 2em 2.25em 2.5em 2.75em 3em 3.25em 3.5em 3.75em 4em 4.25em 4.5em 4.75em 5em 5.25em 5.5em 5.75em 6em";
 return $initArray;