The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
219 views

“Notice: Undefined index:” error when adding new content?

I'm getting the following error... Notice: Undefined index: album_tracks_metabox_nonce in /Applications/MAMP/htdocs/TheToasters/wp-content/themes/Toasters/discography-post-type.php on line 124 ...
0
votes
1answer
63 views

Nonce keeps failing

I have a plugin that works for 99% of the users, but one user is having problems. The plugin opens a thickbox modal window and pushes content via the load-edit.php hook. The links are displayed in a ...
0
votes
1answer
135 views

Do I require the use of nonce?

Im creating a visit/page views counter with ajax,jquery and php, I have been reading a few articles that recommend the use of nonces for data manipulation through ajax, however i am not sure if i need ...
0
votes
1answer
90 views

Nonce failing with second argument

The plugin Plugin Maker pastebin is not working and I've narrowed it down to its nonce-mechanism failing. At one point it checks for check_admin_referer('$pluginmaker_nonce', $pluginmaker_nonce); ...
0
votes
1answer
611 views

Saving custom data via ajax with nonces

I'm trying to securely save custom data to database from plugin backend via ajax. JavaScript code that runs after clicking save button: $.ajax({ url: ajaxVars.ajaxurl, type: 'post', ...
0
votes
1answer
1k views

The Correct Way to Use Nonce Field without Settings API

I'm trying to create an admin option page without the Settings API for some reasons. Then if I do so, I've heard that I need to use nonces for security. I'd like to know the correct way to use them. ...
0
votes
1answer
647 views

Public posts - preventing duplicate form submissions

I'm creating a public form on a page that allows non-registered (public) visitors to create posts of a custom post type. I'm using nonces, which I naiveley thought would expire once they were used. ...
0
votes
1answer
27 views

Nonce and widget

I've been screening the code of several widget and haven't found any one of them handling nonce. I also took a look at the WP_Widget class and found nothing about it as well. This is from the codex: ...
0
votes
0answers
45 views

External request to Wordpress WP-API - Basic Authentication

I'm trying to hit my Wordpress API using Basic Auth with Guzzle (http tool) from my middleware (Laravel). $username = 'myAdminUserName'; $password = 'myAdminPassword'; $uri = ...
0
votes
0answers
15 views

Using wp_nonces in email links?

I would love to be able to use nonces in email links (sent out to a list of people via email to subscribe to comment notifications) My idea was to use: $Link = get_site_url() . $url_endpoint . ...
0
votes
1answer
33 views

Nonce fail after second submit attempt

I am refactoring my plugin that resets the WordPress database tables back to their defaults and came across an issue. The form submission itself works fine. However, after the first submit, and if ...
0
votes
0answers
17 views

Is it possible to use nonce server side?

I would like to create a security hash and pass it to an url as a parameter: http://example.com/somefolder/dostuff.php?nonce=hash In dostuff.php, validate the nonce hash. I can do this for logged ...
0
votes
1answer
36 views

custom metabox nonce verification fails

I'm adding a metabox on a custom post type and my nonce-verification fails. I'm not really where to look for why it's going wrong. Can anyone point me in the right direction? Here's my code: function ...
0
votes
0answers
90 views

How to use nonces for frontend AJAX voting if the page gets cached?

I'm building a custom voting solution for my site that would allow public AJAX voting on multiple posts per page. Votes can be added/changed/revoked. Values are stored in custom post meta. I ...
0
votes
0answers
31 views

One nonce for multiple forms that use the same PHP file

Here's the form that appears in multiple places with differing fields... <form method="post" action="save-settings.php"> FORM FIELDS HERE <?php wp_nonce_field( 'mynonce' ); ?> ...
0
votes
1answer
22 views

How to insert wp_nonce field within echoed string

I can't find a way to properly insert wp_nonce field, without braking the code. The code below is from a class function that sends back string, which will be echoed. $end_data .= '<input ...
0
votes
0answers
64 views

Are nonce really needed in frontent AJAX?

While doing some Wordpress development, I found that many frontend plugins, like contact forms, are using nonce values. Are they really needed? From security point they don't do much, as scraper can ...
0
votes
0answers
29 views

Is it good practice to use WordPress nonce values to restrict page access?

I'm working with a colleague on a WordPress plugin. Part of the plugin functionality is showing dynamic lists with links which allow you to open a new page. Depending on the user's role, they may or ...
0
votes
1answer
111 views

wp_create_nonce function doesn't work inside a plugin?

I am writing a WordPress plugin which is creating a form in one of its functions. It looks like this (very simplyfied): class MyPlugin { public function createForm() { $nonce = ...
0
votes
0answers
24 views

WP Meta Box Not Saving

I've been trying to get this custom meta box to save but it is not working. I've browsed around but still haven't found a solution that works. function add_link_box() { add_meta_box( ...
0
votes
1answer
152 views

How can I create a plugin installation link?

Currently, my code is generating the wrong nonce, I guess. Here is the code: $action = 'install-plugin'; $plugin = 'akismet'; wp_nonce_url( add_query_arg( array( 'action' ...
0
votes
0answers
260 views

Create nonce in frontend page to edit profile

I am trying to create a frontend edit profile form that mimics the wp-admin backend edit profile. I created the form as HTML directly in a WordPress page (I'm a PHP/WordPress beginner, so I don't know ...
0
votes
1answer
42 views

Is it necessary to use a WordPress nonce when allowing users to download public data?

I am using jQuery .load() to load the next page of WordPress posts after a button is clicked. The next page of posts is public data (no access restrictions on it whatsoever). Should I use a WordPress ...
0
votes
0answers
366 views

Nonces and Cache

It's clear that form submissions and AJAX requests, especially sensible ones, need "nonces" to avoid certain exploits. However, with heavy use of caching systems it becomes harder to generate them ...
0
votes
1answer
2k views

How to get the wpnonce value?

On using inspect element to check the 'href' attribute of 'Deactivate' links for the plugins listed on plugins.php page, I found that the url contains a wpnonce field with a certain value. I need to ...
0
votes
0answers
101 views

when saveing $meta_box i get Undefined index error

I need help to fix these Notices: PHP Notice: Undefined index: person-name in testimonials.php on line 112 PHP Notice: Undefined index: position in testimonials.php on line 112 PHP Notice: Undefined ...
0
votes
1answer
221 views

Using Nonce for my Form

Essentially I need to verify my data using a nonce, but I'm not sure that I'm doing it right. What I'm trying to do is remove a menu option for a user that isn't an admin. If a checkbox is checked and ...
0
votes
1answer
153 views

Metabox nonce not allowing update

I'm having a problem correcting saving metabox data on a custom post type. I thought I fixed it by applying the advice on this post: Metabox nonce PHP notice which does get rid of the warning but ...
0
votes
1answer
359 views

Nonce check causing issues when creating new post

I have created a new custom post type and some custom fields for it. My function for saving the custom meta fields fires on the 'save_post' hook. The problem is that I am getting a warning when I go ...
0
votes
1answer
205 views

Use of check_admin_referer with theme options and options.php

If I set up a theme options page in the way suggested by the codex (http://codex.wordpress.org/Creating_Options_Pages) then my form submits to 'option.php'. settings_fields creates a nonce, which if ...