mirror of
https://github.com/ulaulaman/eduinaf.git
synced 2025-03-05 22:47:43 +01:00
Pulizia file obsoleti
This commit is contained in:
parent
23c49ebe8a
commit
bf3ba4b709
Binary file not shown.
Before Width: | Height: | Size: 421 KiB |
@ -1,45 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
#contacaratteri
|
|
||||||
|
|
||||||
# Excerpt/Riassunto
|
|
||||||
function excerpt_count_js(){
|
|
||||||
|
|
||||||
if ('page' != get_post_type()) {
|
|
||||||
|
|
||||||
echo '<script>jQuery(document).ready(function(){
|
|
||||||
jQuery("#postexcerpt .handlediv").after("<div style=\"position:absolute;top:12px;right:34px;color:#666;\"><small>Numero caratteri: </small><span id=\"excerpt_counter\"></span><span style=\"font-weight:bold; padding-left:7px;\">/ 500</span><small><span style=\"font-weight:bold; padding-left:7px;\">caratteri.</span></small></div>");
|
|
||||||
jQuery("span#excerpt_counter").text(jQuery("#excerpt").val().length);
|
|
||||||
jQuery("#excerpt").keyup( function() {
|
|
||||||
if(jQuery(this).val().length > 500){
|
|
||||||
jQuery(this).val(jQuery(this).val().substr(0, 500));
|
|
||||||
}
|
|
||||||
jQuery("span#excerpt_counter").text(jQuery("#excerpt").val().length);
|
|
||||||
});
|
|
||||||
});</script>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
add_action( 'admin_head-post.php', 'excerpt_count_js');
|
|
||||||
add_action( 'admin_head-post-new.php', 'excerpt_count_js');
|
|
||||||
|
|
||||||
# Content/Contenuto
|
|
||||||
function content_char_count() {
|
|
||||||
?>
|
|
||||||
<script type="text/javascript">
|
|
||||||
(function($) {
|
|
||||||
wpCharCount = function(txt) {
|
|
||||||
$('.char-count').html("" + txt.length);
|
|
||||||
};
|
|
||||||
$(document).ready(function() {
|
|
||||||
$('#wp-word-count').append('<br />Numero caratteri: <span class="char-count">0</span>');
|
|
||||||
}).bind( 'wpcountwords', function(e, txt) {
|
|
||||||
wpCharCount(txt);
|
|
||||||
});
|
|
||||||
$('#content').bind('keyup', function() {
|
|
||||||
wpCharCount($('#content').val());
|
|
||||||
});
|
|
||||||
}(jQuery));
|
|
||||||
</script>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
add_action('dbx_post_sidebar', 'content_char_count');
|
|
Loading…
x
Reference in New Issue
Block a user