Plugin Directory

Changeset 2735665


Ignore:
Timestamp:
06/01/2022 01:07:23 PM (4 years ago)
Author:
Lugat
Message:

Make hooks run before everything else.
Ipdated readme.txt

Location:
wrap-google-fonts/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wrap-google-fonts/trunk/index.php

    r2734556 r2735665  
    55   * Plugin URI: https://wordpress.org/plugins/wrap-google-fonts/
    66   * Description: Downloads Google Fonts to your server
    7    * Version: 0.4.1
     7   * Version: 0.4.2
    88   * Author: SquareFlower Websolutions (Lukas Rydygel) <hallo@squareflower.de>
    99   * Author URI: http://squareflower.de
     
    2626    register_activation_hook(__FILE__, array('GoogleFontsWrapper', 'install'));
    2727     
    28     add_filter('style_loader_tag', array('GoogleFontsWrapper', 'rewriteStyleTags'), 9999, 4);
     28    add_filter('style_loader_tag', array('GoogleFontsWrapper', 'rewriteStyleTags'), 0, 4);
    2929 
    30     add_filter('wp_resource_hints', array('GoogleFontsWrapper', 'removeDnsPrefetch'), 9999, 2);
     30    add_filter('wp_resource_hints', array('GoogleFontsWrapper', 'removeDnsPrefetch'), 0, 2);
    3131   
    3232    add_action('admin_bar_menu', array('GoogleFontsWrapper', 'addAdminBar'), 999);
  • wrap-google-fonts/trunk/readme.txt

    r2734556 r2735665  
    2323== Usage ==
    2424
    25 Simply include the fonts from Google by using 'wp_enqueue_scripts'.
     25Simply include the fonts from Google by using `wp_enqueue_scripts`.
    2626
    2727The plugin will parse the URL from the enqueued stylesheets and detect front from Google.
     
    3535When using multiple fonts in one style-tag, please make sure to use no load the script without a version, to avoid WordPress from normalizing the URL.
    3636
    37 ```wp_enqueue_style('...', '...', [], null);```
     37`wp_enqueue_style('...', '...', [], null);`
    3838
    39 As Google will accept the parameter 'family' multiple times, WordPress will merge them into one.
     39As Google will accept the parameter `family` multiple times, WordPress will merge them into one.
     40
     41Be aware, that some caching plugins which also provide minification, may cause this plugin to break, as the fonts will be parsed before the plugin hook.
Note: See TracChangeset for help on using the changeset viewer.