0

I use a theme, that includes sharing functions of a service called "Sharethis" and Font-Awesome. As far as I can see the functions are loaded from the following lines in the functions.php.

TT_ENQUEUE::add_css(array('//netdna.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css')); TT_ENQUEUE::add_js(array('https://ws.sharethis.com/button/buttons.js'));

How can I use a child function (since the changes in the parent would be gone after an update) to:

completely disable the sharethis-feature tell the theme to load font-awesome from the local server?

Any help is appreciated :)

Greetings Markus

1

I'll assume add_css and add_js are wrappers for wp_enqueue_style and wp_enqueue_script.

As such, the way you register any style / script is through either wp_dequeue_style and wp_dequeue_script, where you pass the handle of the scripts.

See: https://developer.wordpress.org/reference/functions/wp_dequeue_script/

Now, from that code alone, it doesn't seem like he's passing any handles to these "register" functions, so take a look at the source, he has to pass their names within that class' static methods.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.