From 8421cbdd1ceac193e6ac228b4dd2abaf3f3985d9 Mon Sep 17 00:00:00 2001 From: Jean-Marc Pigeon Date: Tue, 2 Sep 2025 06:00:23 -0400 Subject: [PATCH] Starting to investigate on javascript --- www/complex.java | 41 +++++++++++++++++++++++++++++++ www/testing.html | 64 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 www/complex.java create mode 100644 www/testing.html diff --git a/www/complex.java b/www/complex.java new file mode 100644 index 0000000..65fcb2f --- /dev/null +++ b/www/complex.java @@ -0,0 +1,41 @@ +add_filter( 'the_password_form', 'wpse_12172023_custom_post_password_wrong_msg' ); + +/** + * Add a message to the password form. + * + * @wp-hook the_password_form + * @param string $form + * @return string + */ +function wpse_12172023_custom_post_password_wrong_msg( $form ) +{ + // No cookie, the user has not sent anything until now. + if ( ! isset( $_COOKIE[ 'wp-postpass_' . COOKIEHASH ] ) ) { + return $form; + } + + // The refresh came from a different page, the user has not sent anything until now. + if ( wp_get_raw_referer() != get_permalink() ) { + return $form; + } + + // Translate and escape. + $msg = esc_html__( 'Oops! Looks like your password is incorrect. Just ask your proctor for the right one.', 'your_text_domain' ); + + // We have a cookie, but it doesn’t match the password. + $msg = "

$msg

"; + ?> + + + +Using DHTML to Create Sliding Menus (From JavaScript For Dummies, 4th Edition) + + + + + + + + + +ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd + + + -- 2.47.3