Pass through $_GET
-
Hi there,
I have another suggestion/question for your plugin wp-search-suggestion.
Where you localize the JS, you pass parameters to the wp ajax handler:
wp_localize_script( $this->textdomain, 'wpss_options', array( 'url' => admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'wpss-post-url' ), 'ajaxurl' => add_query_arg( array( 'action' => $this->textdomain, '_wpnonce' => wp_create_nonce( $this->textdomain ), 'l' => get_my_lang(), ), admin_url( 'admin-ajax.php' ) ), ) );
As you might recognize, I have patched this with
'l' => get_my_lang()
so the wp_query knows about the correct language for the post titles it will suggest.Now patching stranger’s plugins is never good, so my question is: maybe you can add a mechanism to pass through any $_GET values?
Thanks!
- The topic ‘Pass through $_GET’ is closed to new replies.