• im trying to use wordpress get)submit_button() to create some buttons on my plugin page to delete meta keys

    i used

    get_submit_button( __( 'Delete' ), "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce deletemeta", "deletemeta[{$entry['meta_id']}]", false, array( 'tabindex' => '6' ) );

    have also created new nonce code for that.

    but im getting – you have no permissions or something like that

    how can i solve this ?

    thanks

Viewing 1 replies (of 1 total)
  • “or something like that”? The actual error would help.

    I thought your second parameter was wrong

    $type
        (string) (optional) The type of button. One of: primary, secondary, delete

    … but the docs are. 🙂 It is possible to pass custom values. That is one monster of a class name you have going there, though.

    How are you submitting the form? It is ajax I’m guessing? Are you hooking into wp_ajax, wp_ajax_nopriv, or are you submitting to some handler script you’ve created? This is probably where you are going wrong but you need to provide more information.

Viewing 1 replies (of 1 total)
  • The topic ‘get_submit button’ is closed to new replies.