Title: ACF: Google Font Selector
Author: danielpataki
Published: <strong>2014-02-04</strong>
Last modified: 2015-04-28

---

Szukaj wtyczek

![](https://ps.w.org/acf-google-font-selector-field/assets/banner-772x250.png?rev
=1141057)

Wtyczka **nie została przetestowana z trzema ostatnimi głównymi wydaniami WordPressa**.
Może nie być już utrzymywana lub obsługiwana, co może skutkować problemem ze zgodnością
z nowszymi wersjami WordPressa.

![](https://ps.w.org/acf-google-font-selector-field/assets/icon-256x256.png?rev=
1141057)

# ACF: Google Font Selector

 Autor: [danielpataki](https://profiles.wordpress.org/danielpataki/)

[Pobierz](https://downloads.wordpress.org/plugin/acf-google-font-selector-field.zip)

 * [Szczegóły](https://pl.wordpress.org/plugins/acf-google-font-selector-field/#description)
 * [Recenzje](https://pl.wordpress.org/plugins/acf-google-font-selector-field/#reviews)
 *  [Instalacja](https://pl.wordpress.org/plugins/acf-google-font-selector-field/#installation)
 * [Rozwój](https://pl.wordpress.org/plugins/acf-google-font-selector-field/#developers)

 [Wsparcie](https://wordpress.org/support/plugin/acf-google-font-selector-field/)

## Opis

This plugin allows you to create a Google font selector field with different options.
The plugin also creates the font request in the theme header to autoload the fonts
if you’d like. Font variants and charsets can be selected separately to make font
loading more flexible and optimized.

Font options added to any options page will always be enqueued. Any fonts added 
to post pages will only be enqueued when that specific post is displayed.

#### Google API Key

To grab the font list from Google you’ll need an API key. This is free and easy 
to do, take a look at [this guide](https://developers.google.com/api-client-library/python/guide/aaa_apikeys)
to get an API key.

#### ACF Compatibility

This ACF field type is compatible with both _ACF 4_ and _ACF 5_.

#### Thanks

 * [Advanced Custom Fields](http://www.advancedcustomfields.com/) for the awesome
   base plugin.
 * [Iconjam](https://www.iconfinder.com/Icojam) for the T icon.

### Usage

Once installed the list of Google Fonts will be retrieved from a static file included
in the plugin. If you would like the list to be pulled from the Google API you will
need to define your API key. You can do this in Settings->Google Font Selector in
the admin.

#### For Developers

There are a few more advanced controls you can set to make the plugin do your bidding.
If you would like to hard-code the API key and disable users from seeing the nag
screen and setting panel you can define the `ACFGFS_API_KEY` constant.

    ```
    define( 'ACFGFS_API_KEY', 'your_google_api_key' );
    ```

The `ACFGFS_REFRESH` constant can controls how frequently the plugin checks the 
Google API for updates. The value is in seconds, 86400 would be a day. The default
is set to 7 days.

    ```
    define( 'ACFGFS_REFRESH', 259200 );
    ```

If you would like to disable the automatic enqueueing of fonts you can use the `
ACFGFS_NOENQUEUE` constant. The fonts are only enqueued automatically when this 
constant is not defined. Define the constant to disable enqueueing.

    ```
    define( 'ACFGFS_NOENQUEUE', true );
    ```

If you want to modify the fonts that are loaded on a page you can use the `acfgfs/
enqueued_fonts` filter. This should return an array of fonts with variants and subsets
needed, something like this:

    ```
    array(
        'font' => 'Open Sans',
        'variants' => array( 'regular', '700' ),
        'subsets' => array( 'latin' )
    )
    ```

New in 3.0.1 is the ability to control the fonts displayed in the dropdown. If you
only want to give your users access to a smaller portion of Google fonts you can
use the `acfgfs/font_dropdown_array` filter to modify the array that is used to 
generate the dropdown. Please return an array where the key and the value are both
the names of the font.

    ```
    add_filter( 'acfgfs/font_dropdown_array', 'my_font_list' );
    function my_font_list( $fonts ) {
        $fonts = array(
            'Raleway' => 'Raleway',
            'Lato' => 'Lato'
        );
        return $fonts;
    }
    ```

## Zrzuty ekranu

[⌊ACF control for field creation⌉⌊ACF control for field creation⌉[

ACF control for field creation

[⌊The user-facing font settings⌉⌊The user-facing font settings⌉[

The user-facing font settings

## Instalacja

#### Automatic Installation

Installing this plugin automatically is the easiest option. You can install the 
plugin automatically by going to the plugins section in WordPress and clicking Add
New. Type „ACF Google Font Selector” in the search bar and install the plugin by
clicking the Install Now button.

#### Manual Installation

 1. Copy the `acf-google-font-selector-field` folder into your `wp-content/plugins`
    folder
 2. Activate the Google Font Selector plugin via the plugins admin page
 3. Create a new field via ACF and select the Role Selector type
 4. Please refer to the description for more info regarding the field type settings

## Recenzje

![](https://secure.gravatar.com/avatar/f926d2f0e37ae5c38a0e74907f09fc55aff13baebb6079fae8d85c081523b6ef?
s=60&d=retro&r=g)

### 󠀁[Works with a quick fix](https://wordpress.org/support/topic/works-with-a-quick-fix/)󠁿

 [Tibow](https://profiles.wordpress.org/pyho/) 2020-04-13

It works like a charm with a quick fix : https://wordpress.org/support/topic/preview-
display-bug-fix/ Should really be updated by the author because it's absolutely 
what we need with ACF !

![](https://secure.gravatar.com/avatar/7105984cb8835dbbc2ccf7a19ff53ffb4aae22a7dc1cfa5826db1a4a18ecb382?
s=60&d=retro&r=g)

### 󠀁[Keeps saying API is incorrect](https://wordpress.org/support/topic/keeps-saying-api-is-incorrect/)󠁿

 [Ricardo](https://profiles.wordpress.org/rhormazar/) 2017-06-15

Great plugin in concept, but it seems like it needs to be updated in order for it
to work. The API keeps saying that it is incorrect. Also, in the ACF it doesn't 
seem to display what it is supposed to. Very unfortunate. I was looking forward 
for a plugin like this.

![](https://secure.gravatar.com/avatar/224e2d05eb97de95c6f3eedad07319c3b07fb22ec601b299f70e9349427342d7?
s=60&d=retro&r=g)

### 󠀁[Doesn’t work anymore](https://wordpress.org/support/topic/doesnt-work-anymore-80/)󠁿

 [Gabor Lippert](https://profiles.wordpress.org/lunule/) 2017-06-06

Doesn't work — 🙁 —, probably due to the fact that there were no plugin updates 
in the past 2 years. Abandoned?

 [ Przeczytaj 7 recenzji ](https://wordpress.org/support/plugin/acf-google-font-selector-field/reviews/)

## Kontrybutorzy i deweloperzy

„ACF: Google Font Selector” jest oprogramowaniem open source. Poniższe osoby miały
wkład w rozwój wtyczki.

Zaangażowani

 *   [ danielpataki ](https://profiles.wordpress.org/danielpataki/)

[Przetłumacz wtyczkę “ACF: Google Font Selector” na swój język.](https://translate.wordpress.org/projects/wp-plugins/acf-google-font-selector-field)

### Interesuje cię rozwój wtyczki?

[Przeglądaj kod](https://plugins.trac.wordpress.org/browser/acf-google-font-selector-field/),
sprawdź [repozytorium SVN](https://plugins.svn.wordpress.org/acf-google-font-selector-field/)
lub czytaj [dziennik rozwoju](https://plugins.trac.wordpress.org/log/acf-google-font-selector-field/)
przez [RSS](https://plugins.trac.wordpress.org/log/acf-google-font-selector-field/?limit=100&mode=stop_on_copy&format=rss).

## Rejestr zmian

#### 3.0.1 (2015-04-26)

 * Added acfgfs/font_dropdown_array filter
 * Fixed a faulty font preview mechanism when multiple font options are added
 * Fixed an error when web safe fonts were selected

#### 3.0.0 (2015-04-21)

 * Updated for WordPress 4.2
 * Font previews in the backend
 * Added Hungarian translation
 * Complete rewritten and better documented
 * Uses transients to store fonts
 * Better behaviour on font change

#### 2.2.1

 * Updated for WordPress 4.1

#### 2.2

 * Much more efficient font enqueueing
 * Separated out common functions: ie: code is better 🙂

#### 2.1

 * Font requests are now merged properly
 * Added field checks and syncing

#### 2.0

 * Complete rewrite, fonts will need to be set up again
 * Font loading is now much better and selectable
 * Dropped ACF 3 support
 * Added ACF 5 support

#### 1.0

 * Initial Release.

## Meta

 *  Wersja **3.0.1**
 *  Ostatnia aktualizacja **11 lat temu**
 *  Włączone instalacje **3,000+**
 *  Wersja WordPressa ** 3.5 lub nowszej **
 *  Testowano do **4.2.39**
 *  Język
 * [English (US)](https://wordpress.org/plugins/acf-google-font-selector-field/)
 * Tagi
 * [acf](https://pl.wordpress.org/plugins/tags/acf/)[fonts](https://pl.wordpress.org/plugins/tags/fonts/)
   [google](https://pl.wordpress.org/plugins/tags/google/)
 *  [Widok zaawansowany](https://pl.wordpress.org/plugins/acf-google-font-selector-field/advanced/)

## Oceny

 3.5 na 5 gwiazdek.

 *  [  3 recenzje 5-gwiazdkowe     ](https://wordpress.org/support/plugin/acf-google-font-selector-field/reviews/?filter=5)
 *  [  1 recenzja 4-gwiazdkowa     ](https://wordpress.org/support/plugin/acf-google-font-selector-field/reviews/?filter=4)
 *  [  0 recenzji 3-gwiazdkowych     ](https://wordpress.org/support/plugin/acf-google-font-selector-field/reviews/?filter=3)
 *  [  0 recenzji 2-gwiazdkowych     ](https://wordpress.org/support/plugin/acf-google-font-selector-field/reviews/?filter=2)
 *  [  2 recenzje 1-gwiazdkowe     ](https://wordpress.org/support/plugin/acf-google-font-selector-field/reviews/?filter=1)

[Twoja opinia](https://wordpress.org/support/plugin/acf-google-font-selector-field/reviews/#new-post)

[Zobacz wszystkierecenzje.](https://wordpress.org/support/plugin/acf-google-font-selector-field/reviews/)

## Zaangażowani

 *   [ danielpataki ](https://profiles.wordpress.org/danielpataki/)

## Wsparcie

Masz coś do dodania? Potrzebujesz pomocy?

 [Zobacz forum wsparcia](https://wordpress.org/support/plugin/acf-google-font-selector-field/)