Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // INCLUDE THE WP_ALCHEMY CLASS FOR EASIER METABOX CREATION ------------------------------------------
- // WPAlchemy makes for easier metaboxes
- include_once 'metaboxes/setup.php';
- include_once 'metaboxes/metaboxes.php';
- // include_once 'metaboxes/demo-filer/full-spec.php';
- // include_once 'metaboxes/demo-filer/checkbox-spec.php';
- // include_once 'metaboxes/demo-filer/radio-spec.php';
- // include_once 'metaboxes/demo-filer/select-spec.php';
- // Add support for WYSIWYG in WPAlchemy. Wrap textboxes in a div with the class of "customEditor" to use it.
- add_action('admin_print_footer_scripts','my_admin_print_footer_scripts',99);
- function my_admin_print_footer_scripts()
- {
- ?><script type="text/javascript">/* <![CDATA[ */
- jQuery(function($)
- {
- var i=1;
- $('.customEditor textarea').each(function(e)
- {
- var id = $(this).attr('id');
- if (!id)
- {
- id = 'customEditor-' + i++;
- $(this).attr('id',id);
- }
- tinyMCE.execCommand('mceAddControl', false, id);
- });
- });
- /* ]]> */
- </script><?php
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement