• Resolved DannyCooper

    (@dannycooper)


    It’s not possible to modify asl_custom_fonts using the filter provided, most likely because of how the surrounding methods are called.

    Here’s a simple example:

    apply_filters( 'asl_custom_fonts', '__return_empty_array' );

    This should remove the default font from being output, but it doesn’t.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi,

    You can achieve the same effect by turning off this option. It will short-circuit the custom fonts feature completely.

    All the best,
    Ernest M.

    Thread Starter DannyCooper

    (@dannycooper)

    Thanks, Ernest. Maybe there is a way to make the filter work too?

    Plugin Author wpdreams

    (@wpdreams)

    It should work just fine, I just checked the source code. I think you may have an error in your code though, it should be add_filter() and not apply_filters()

    add_filter( 'asl_custom_fonts', '__return_empty_array' );
    • This reply was modified 1 year, 6 months ago by wpdreams. Reason: Added code
    Thread Starter DannyCooper

    (@dannycooper)

    You’re right 🙂 Thanks for double-checking.

    Plugin Author wpdreams

    (@wpdreams)

    No problem, I didn’t see it the first time. It is very easy to mix up these functions, it happens to more often than you may think 🙂

    I will mark this as resolved then, feel free to rate the plugin, it is greatly appreciated 🙂

    All the best,
    Ernest M.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘asl_custom_fonts is inaccessible’ is closed to new replies.