最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

ajax - How to check nonce lifetime value of plugins?

matteradmin8PV0评论

Dear StackExchange users,

I currently use the premium version of WP Fastest Cache Premium. My website loads very fast, but I always get a 403 error for wp-admin/ajax.

I believe there is a plugin with a tremendously low nonce lifetime value.

Does anybody know how and where I can check the none lifetime value of my plugins.

Any help is appreciated.

Thanks!

Dear StackExchange users,

I currently use the premium version of WP Fastest Cache Premium. My website loads very fast, but I always get a 403 error for wp-admin/ajax.

I believe there is a plugin with a tremendously low nonce lifetime value.

Does anybody know how and where I can check the none lifetime value of my plugins.

Any help is appreciated.

Thanks!

Share Improve this question asked Feb 21, 2019 at 21:55 NiklasNiklas 531 silver badge7 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Check codex info about Nonces life time here.

Here is a quick code that will echo life time of nonces in footer of your site's front-end as html comment. Put it in your functions.php file.

$n  = "";
add_filter('nonce_life', 'wptuts_change_nonce_hourly');
function wptuts_change_nonce_hourly( $nonce_life ) {
    global $n ;
    $n = $nonce_life;
    return $nonce_life;
}

// Display in footer comments
add_filter("wp_footer","d");
function d(){
    global $n;
    echo "<!- Nonce Life =". $n ."-->";
}

NOTE: This code does not give the ideal way to check life time of nonce, but a quick fix to get the desired info. You should delete this code from functions.php once you get the info.

Post a comment

comment list (0)

  1. No comments so far