Changeset 643580
- Timestamp:
- 12/23/2012 04:03:49 AM (13 years ago)
- Location:
- quicktag-extender/trunk
- Files:
-
- 1 deleted
- 2 edited
-
quicktag-extender.js (deleted)
-
quicktag-extender.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
quicktag-extender/trunk/quicktag-extender.php
r377166 r643580 4 4 Plugin URI: http://benjaminsterling.com/wordpress-plugins/wordpress-quicktag-extender/ 5 5 Description: This plugin adds more buttons to the non-visual editor view for creating/editing posts/pages 6 Version: 0.1. 26 Version: 0.1.3 7 7 Author: Benjamin Sterling 8 8 Author URI: http://kenzomedia.com … … 26 26 */ 27 27 28 29 28 30 function gte_admin_print_scripts( $arg ){ 29 global $pagenow;30 if (is_admin() && ( $pagenow == 'post-new.php' || $pagenow == 'post.php' ) ) {31 $js = plugins_url('/quicktag-extender.js', __FILE__);32 wp_enqueue_script("qtescript", $js, array('quicktags') );33 }31 global $pagenow; 32 if (is_admin() && ( $pagenow == 'post-new.php' || $pagenow == 'post.php' ) ) { 33 $js = admin_url( 'admin-ajax.php?action=gte_action', 'relative' ); 34 wp_enqueue_script("qtescript", $js, array('quicktags') ); 35 } 34 36 } 37 add_action( 'admin_print_scripts', 'gte_admin_print_scripts' ); 35 38 36 add_action( 'admin_print_scripts', 'gte_admin_print_scripts' ); 39 function gte_action_callback () { 40 header("Content-type: text/javascript"); 41 42 $tags = array( 43 'h1', 44 'h2', 45 'h3', 46 'h4', 47 'h5', 48 'q', 49 'cite', 50 'sub', 51 'sup', 52 'dl', 53 'dt', 54 'dd' 55 ); 56 57 for ($i=0; $i<count($tags); $i++) { 58 $tag = $tags[$i]; 37 59 ?> 60 edButtons[edButtons.length] = 61 new edButton('ed_<?php echo $tag;?>' 62 ,'<?php echo $tag;?>' 63 ,'<<?php echo $tag;?>>' 64 ,'</<?php echo $tag;?>>' 65 ,'<?php echo $i+1;?>' 66 ); 67 <?php 68 } 69 die(); 70 } 71 add_action('wp_ajax_gte_action', 'gte_action_callback'); 72 ?> -
quicktag-extender/trunk/readme.txt
r377166 r643580 4 4 Tags: quicktags, visual editor, edit 5 5 Requires at least: 3.0 6 Tested up to: 3.1.1 7 Stable tag: 0.1.2 6 Tested up to: 3.5 7 Stable tag: 0.1.3 8 License: GPLv2 or later 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 8 10 9 11 This plugin adds more buttons to the non-visual editor view for creating/editing posts/pages … … 27 29 * dd 28 30 29 Need this plugin customized or need a plugin created, contact me via my contact form at <a href=\"http://kenzomedia.com\">http://kenzomedia.com</a>30 31 Also available through twitter, @bmsterling32 33 31 == Installation == 34 32 … … 47 45 == Credits == 48 46 49 Copyright 201 1 Benjamin Sterling47 Copyright 2012 Benjamin Sterling (benjamin.sterling@kenzomedia.com) 50 48 51 49 This program is free software; you can redistribute it and/or modify
Note: See TracChangeset
for help on using the changeset viewer.