h1 dont le texte est centré horizontalement acec une barre horizontale qui s’affiche à gauche et à droite du texte, centrée verticalement par rapport au texte. Compatible Ie8+.
A Pen by Jean-Marc Caillat-Grenier on CodePen.
| $(document).ready(function () { | |
| //called when key is pressed in textbox | |
| $("#quantity").keypress(function (e) { | |
| //if the letter is not digit then display error and don't type anything | |
| if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) { | |
| //display error message | |
| $("#errmsg").html("Digits Only").show().fadeOut("slow"); | |
| return false; | |
| } | |
| }); |
| // Antispambot | |
| // From http://www.guylabbe.ca/blog/wp-antispambot.html | |
| function asb($content){ | |
| return preg_replace('/([_a-zA-Z0-9.\-]*@[a-zA-Z0-9]([_a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,10})/e',"antispambot('\\1')",$content); | |
| } | |
| add_filter('the_content','asb'); |
h1 dont le texte est centré horizontalement acec une barre horizontale qui s’affiche à gauche et à droite du texte, centrée verticalement par rapport au texte. Compatible Ie8+.
A Pen by Jean-Marc Caillat-Grenier on CodePen.
| <?php | |
| //Example from Codex page : http://codex.wordpress.org/Function_Reference/add_submenu_page | |
| //Add this in your functions.php file, or use it in your plugin | |
| add_action('admin_menu', 'register_my_custom_submenu_page'); | |
| function register_my_custom_submenu_page() { | |
| add_submenu_page( 'edit.php?post_type=book', 'My Custom Submenu Page', 'My Custom Submenu Page', 'manage_options', 'my-custom-submenu-page', 'my_custom_submenu_page_callback' ); | |
| } |