| 278 | | * on "quicktags" and outputted in the footer. If you are echoing JS directly from PHP, |
| 279 | | * use add_action( 'admin_print_footer_scripts', 'output_my_js', 100 ) or add_action( 'wp_footer', 'output_my_js', 100 ) |
| | 278 | * on "quicktags" and outputted in the footer. |
| | 279 | * If you are echoing JS directly from PHP use |
| | 280 | * add_action( 'admin_print_footer_scripts', 'output_my_js', 100 ) |
| | 281 | * or |
| | 282 | * add_action( 'wp_footer', 'output_my_js', 100 ) |
| | 283 | * |
| | 284 | * If echoing the addButton calls directly instead of enqueing with the 'quicktags' dependency |
| | 285 | * make sure to check that the QTags object is defined first, otherwise your code will throw errors |
| | 286 | * when no editor is present: |
| | 287 | * if ( typeof QTags != 'undefined' ) { QTags.addButton(...) } |