• Resolved user5672

    (@user5672)


    Hi,
    how to disable awesome fonts in NextGEN Gallery?
    For reasons of data privecy protection, I want to deliver all fonts localley…

    Thanks in advance for any helpful suggestions. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @user5672!

    Our plugin’s currently using Font Awesome Free 5.3.1
    Although it’s not recommended, the way to remove the Font Awesome reference from NextGen Gallery is the following:

    Edit the file:
    /wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/module.nextgen_gallery_display.php

    On the code line 195, there is a method called enqueue_fontawesome() … just remove everything between the { …. } characters.

    Note: with NextGen Gallery, some icons might be missing.

    We hope this helps!

    Thread Starter user5672

    (@user5672)

    Thanks a lot. This helps a lot, since by just modifying the url in the method I could refer to my local folder containing the called sources instead of the web hosted ones.

    Hello,
    the solution works however I am wondering what happens if nextgen is updated.
    Unfortunately dequeuing does not work. Have you any ideas how to dequeue or deregister it without manipulating the original theme file?
    Thanks

    in case others looking for solution without editing the plugin files, you can use this snippets below. just put these in your theme functions.php file:

    
    //* Remove NextGen Fontawesome CSS
    add_action( 'wp_print_styles', 'theme_remove_nextgen_fontawesome_css', 100 );
    function theme_remove_nextgen_fontawesome_css() {
    	wp_dequeue_style( 'fontawesome' );
    	wp_dequeue_style( 'fontawesome_v4_shim_style' );
    }
    
    // Remove NextGen Fontawesome JS
    add_action( 'wp_print_scripts', 'theme_remove_nextgen_fontawesome_js', 100 );
    function theme_remove_nextgen_fontawesome_js() {
    	wp_dequeue_script('fontawesome_v4_shim');
    	wp_deregister_script( 'fontawesome_v4_shim' );
    }
    

    For the users interested on this.

    This has been officially released on NextGEN version 3.2.23.

    I just updated mine and saw that.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘disable awesome fonts in NextGEN Gallery’ is closed to new replies.