Skip to content

Instantly share code, notes, and snippets.

@shelleyhoward
shelleyhoward / CustomTinyMCE
Last active August 29, 2015 13:57
Custom TinyMCE
// TinyMCE: First line toolbar customizations
if( !function_exists('base_extended_editor_mce_buttons') ){
function base_extended_editor_mce_buttons($buttons) {
// The settings are returned in this array. Customize to suite your needs.
return array(
'formatselect', 'styleselect', 'bold', 'italic', 'strikethrough', 'separator', 'bullist', 'numlist', 'blockquote', 'separator', 'justifyleft', 'justifycenter', 'justifyright', 'separator', 'link', 'unlink', 'separator', 'spellchecker', 'wp_adv'
);
/* WordPress Default
return array(
'bold', 'italic', 'strikethrough', 'separator',
@shelleyhoward
shelleyhoward / custom_media_cat_tags.php
Created February 4, 2014 16:37
Adds custom categories and tags to media attachemnts
<?php
/*
Plugin Name: Custom Media Categories and Tags
Description: Plugin adds custom categories and tags to media attachemnts
Version: 1.0
Author: Shelley Howard
Author URI: http://shelleyhoward.com
*/
// register new taxonomies which appliy 'Media Category' and 'Media Tag' to attachments
@shelleyhoward
shelleyhoward / media_cat_tags.php
Created February 4, 2014 15:58
Use categories and tags on media
<?php
/*
Plugin Name: Media Categories and Tags
Description: Plugin adds the ability to use categories and tags on media
Version: 1.0
Author: Shelley Howard
Author URI: http://shelleyhoward.com
*/
// apply categories to media attachments
<?php
add_action( 'admin_menu', 'custom_admin_menu' );
function custom_admin_menu() {
remove_submenu_page( 'edit.php?post_type=better_post_template', 'edit-tags.php?taxonomy=store&amp;post_type=better_post_template' );
}
?>
<?php
/**
* Add Taxonomies
* @author Shelley Howard
* @link http://shelleyhoward.com
* http://codex.wordpress.org/Function_Reference/register_taxonomy
*/
// hook into the init action and call create_taxonomies when it fires