wp_signon works local, not on https

You need to set the auth cookie after wp_signon. Add this code and try and let me know the result. $user = wp_signon( $creds, false ); $userID = $user->ID; wp_set_current_user( $userID, $creds[‘user_login’] ); wp_set_auth_cookie( $userID, true, false ); do_action( ‘wp_login’,$creds[‘user_login’] );

How to escape echo for input tag?

Try this function pen_post_sidebar_twitter() { printf( ‘<input type=”text” name=”twitter_handler” value=”%s” placeholder=”Twitter handler” /> <p class=”description”>Enter twitter handler without the @ sign.</p>’, esc_attr( get_option( ‘twitter_handler’ ) ) ); } Thanks

Get original value in save_post action hooka

This is the solution: add_action(‘pre_post_update’, function($post_id, $post_data) { global $original_post; $original_post = get_post($post_id); }, 10, 2); add_action( ‘save_post_’, function($post_id, $post, $update) { global $original_post; $original_post->post_title; // original post title $post->post_title; // new post title }, 10, 3);