Download the PHP package rareloop/wp-font-fout without Composer

On this page you can find all versions of the php package rareloop/wp-font-fout. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-font-fout

Font FOUT

WordPress plugin that allows browsers to show a Flash Of Unstyled Text (FOUT) when using web fonts.

Setup

Install & activate the plugin, then tell the plugin what font families to listen for:

``

This will add the required JavaScript inline to the bottom of your <body>. When all the fonts have loaded the fonts-loaded class will be added to your <html> element. You can use this in your CSS to control when your web font is used:

`

More Configuration

The init function also take additional arguments that lets you control the cookie that is created to know when fonts are loaded. If you wanted to change the cookie name to _fonts_cached_in_browser and make it last 30 days you could do the following:

``

Optimising for future page views

The JavaScript injected into your page will set a cookie once all fonts are loaded. Once loaded you can assume that your users browser will have cached the font so shouldn't need to download again. In this instance you can have the fonts-loaded class added to your <html> element before it's sent to the browser.

To add this optimisation you can use the following shortcode in your template:

`

The shortcode will only add the class when the cookie is detected. It will also prevent the inline JavaScript from being injected, reducing the payload of future page loads.

The plugin adds the following cookie: fonts-loaded, which you should add to your Cookie/Privacy Policy.


All versions of wp-font-fout with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rareloop/wp-font-fout contains the following files

Loading the files please wait ....