Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

funkynothing on "Beginner having trouble with filters"

$
0
0

Hi I am a WordPress and coding beginner and I am having trouble with hooking filters. This is the code in the parent theme:

'ajaxURL' => apply_filters( 'ae_ajax_url', admin_url( 'admin-ajax.php' ) ),

I want to hook that filter in such a way to replace the admin_url( 'admin-ajax.php' ) to admin_url( 'admin-ajax.php', is_ssl() ? 'admin' : 'http' ),

I tried many different ways and I cannot get it. Please help. This is one way I tried with no success:

add_filter( 'ae_ajax_url', 'admin_ajax_ssl' );
function admin_ajax_ssl() {
return admin_url( 'admin-ajax.php', is_ssl() ? 'admin' : 'http' );
}
?>

Thanks in advance.


Viewing all articles
Browse latest Browse all 8245

Trending Articles