Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // download plugin from http://keith-wood.name/maxlength.html
- // yourthemes/functions.php
- function load_custom_wp_admin_style() {
- wp_register_style( 'maxlength', get_template_directory_uri() . '/js/maxlength/jquery.maxlength.css', false, '1.0.0' );
- wp_enqueue_style( 'maxlength' );
- wp_enqueue_script('maxlength-plugin', get_template_directory_uri() . '/js/maxlength/jquery.plugin.min.js', array(), '', true);
- wp_enqueue_script('maxlength-core', get_template_directory_uri() . '/js/maxlength/jquery.maxlength.min.js', array(), '', true);
- wp_enqueue_script('maxlength-options', get_template_directory_uri() . '/js/maxlength/maxlength-options.js', array(), '', true);
- }
- add_action( 'admin_enqueue_scripts', 'load_custom_wp_admin_style' );
- // yourthemes/js/maxlength/maxlength-options.js
- jQuery(document).ready(function() { jQuery('#excerpt').maxlength({max: 250}); });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement