How to get the wpnonce value?

That value is a random-ish string generated for one-time use with a lifespan of, if I remember correctly, 12 hours. I am not sure what you mean by “get” the value. Assuming you mean “generate the nonce” then… You want wp_nonce_url or one of the related functions. wp_nonce_url( $actionurl, $action, $name ); For example: wp_nonce_url( … Read more

Multisite Widget/Content

Could you use the admin bar at the top instead? To me short messages look better up there. add_action( ‘admin_bar_menu’, ‘toolbar_link_to_mypage’, 999 ); function toolbar_link_to_mypage( $wp_admin_bar ) { $args = array( ‘id’ => ‘my_admin_bar_text’, ‘title’ => ‘WELCOME TO SYDNEY’, ‘meta’ => array( ‘class’ => ‘my-toolbar-page’ ) ); $wp_admin_bar->add_node( $args ); } Likewise though, you can … Read more

javascript onload calling a function of a plugin

I did not test this, but something like this should work. Edit the function all_js in your plugin file and add these lines: $.post(“/wp-admin/admin-ajax.php”, { idPost: $(“.post-read”).data(“id”), action: “read” }, function(response) { // Handle errors etc. }); You also need to ensure that the button data changes when the AJAX request is made. Here is … Read more

custom taxonomy and custom post type url conflict

Try this code. It may help you. class Tax_Seo_Perma { public function __construct() { // Hooks add_filter(‘rewrite_rules_array’,array($this, ‘create_rewrite_rules’)); add_filter(‘wp_loaded’, array($this, ‘flush_rules’)); add_filter(‘post_link’, array($this, ‘modify_link_addresses’), 10, 3); //add_filter(‘post_type_link’, ‘tsp_write_link_addresses’, 10, 3); } public function flush_rules(){ global $wp_rewrite; $wp_rewrite->flush_rules(); } public function create_rewrite_rules($rewrite) { global $wp_rewrite; // loop through custom taxonomies $args = array( ‘public’ => true, … Read more