New answers tagged wp-register-script
2
Filter script_loader_src and use add_query_arg(). You can use parse_url() or the second argument $handle to target specific scripts...
I have included multiple redundant options here:
add_filter( 'script_loader_src', 'wpse_99842_add_get_var_to_url' );
function wpse_99842_add_get_var_to_url( $url, $handle )
{
if ( 'my_handle' !== $handle )
...
1
If it is called by shortcode, then the shortcodes are fired before the page loads (which is why you never echo in a shortcode) - you could cut out the existing call to the enqueue, and add it to the shortcode function at the top.
If not, then as RRikesh suggests, you could wrap the relevant code in a if(is_page(1)) {...] statement.
1
Use the following filter named register:
add_filter( 'register', 'wpse_96892_register_link' );
function wpse_96892_register_link( $link )
{
if ( is_user_logged_in() )
return $link;
return str_replace(
// search
array (
site_url('wp-login.php?action=register', 'login'),
__('Register')
),
...
Top 50 recent answers are included