'.$content.''; } add_shortcode( 'quote', 'and_quote' ); /*TINY MCE Quote Button*/ function and_add_quote_button() { if ( current_user_can('edit_posts') && current_user_can('edit_pages') ) { add_filter('mce_external_plugins', 'and_add_quote_plugin'); add_filter('mce_buttons_3', 'and_register_quote_button'); } } function and_register_quote_button($buttons) { array_push($buttons, "quote"); return $buttons; } function and_add_quote_plugin($plugin_array) { $plugin_array['quote'] = get_template_directory_uri().'/js/buttons.js'; return $plugin_array; } add_action('init', 'and_add_quote_button'); /**FACEBOOK LIKE BUTTON **/ /**USAGE: [fblike]**/ function and_facelike() { return ''; } add_shortcode('fblike', 'and_facelike'); /*TINY Facebook Like Button*/ function and_add_fblike_button() { if ( current_user_can('edit_posts') && current_user_can('edit_pages') ) { add_filter('mce_external_plugins', 'and_add_fblike_plugin'); add_filter('mce_buttons_3', 'and_register_fblike_button'); } } function and_register_fblike_button($buttons) { array_push($buttons, "fblike"); return $buttons; } function and_add_fblike_plugin($plugin_array) { $plugin_array['fblike'] = get_template_directory_uri().'/js/buttons.js'; return $plugin_array; } add_action('init', 'and_add_fblike_button'); /**Youtube Video Shortcode **/ /**USAGE: [youtube width="640" height="385" video_id="EhkHFenJ3rM"] **/ function and_youtube_func($atts) { //extract short code attr extract(shortcode_atts(array( 'width' => 600, 'height' => 365, 'video_id' => '', ), $atts)); $custom_id = time().rand(); $return_html = ''; return $return_html; } add_shortcode('youtube', 'and_youtube_func'); /*TINY youtube Button*/ function and_add_youtube_button() { if ( current_user_can('edit_posts') && current_user_can('edit_pages') ) { add_filter('mce_external_plugins', 'and_add_youtube_plugin'); add_filter('mce_buttons_3', 'and_register_youtube_button'); } } function and_register_youtube_button($buttons) { array_push($buttons, "youtube"); return $buttons; } function and_add_youtube_plugin($plugin_array) { $plugin_array['youtube'] = get_template_directory_uri().'/js/buttons.js'; return $plugin_array; } add_action('init', 'and_add_youtube_button'); /**Vimeo Video Shortcode **/ /**USAGE: [vimeo width="640" height="385" video_id="11770385"] **/ function and_vimeo_func($atts, $content) { //extract short code attr extract(shortcode_atts(array( 'width' => 600, 'height' => 365, 'video_id' => '', ), $atts)); $custom_id = time().rand(); $return_html = ''; return $return_html; } add_shortcode('vimeo', 'and_vimeo_func'); /*TINY Vimeo Button*/ function and_add_vimeo_button() { if ( current_user_can('edit_posts') && current_user_can('edit_pages') ) { add_filter('mce_external_plugins', 'and_add_vimeo_plugin'); add_filter('mce_buttons_3', 'and_register_vimeo_button'); } } function and_register_vimeo_button($buttons) { array_push($buttons, "vimeo"); return $buttons; } function and_add_vimeo_plugin($plugin_array) { $plugin_array['vimeo'] = get_template_directory_uri().'/js/buttons.js'; return $plugin_array; } add_action('init', 'and_add_vimeo_button'); /**Custom Button Shortcode **/ /**USAGE: [button class="violet"][/button] **/ function and_button_func($atts, $content = null) { //extract short code attr extract(shortcode_atts(array( 'url' => 'http://www.google.com'), $atts)); $return_html = '
'; return $return_html; } add_shortcode('button', 'and_button_func'); /*TINY buttons Button*/ function and_add_button_button() { if ( current_user_can('edit_posts') && current_user_can('edit_pages') ) { add_filter('mce_external_plugins', 'and_add_button_plugin'); add_filter('mce_buttons_3', 'and_register_button_button'); } } function and_register_button_button($buttons) { array_push($buttons, "button"); return $buttons; } function and_add_button_plugin($plugin_array) { $plugin_array['button'] = get_template_directory_uri().'/js/buttons.js'; return $plugin_array; } add_action('init', 'and_add_button_button');