-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5980615
commit 12bb729
Showing
46 changed files
with
1,801 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# OS generated files # | ||
###################### | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
# ACF-Custom-Icon-Selector | ||
# ACF Field Type Template | ||
|
||
Welcome to the official Advanced Custom Fields - Field Type Template repository on GitHub. Here you will find a starter-kit for creating a new field type plugin. | ||
|
||
Looking for documentation? Please read the [Creating a new field type guide](https://www.advancedcustomfields.com/resources/creating-a-new-field-type/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?php | ||
|
||
/* | ||
Plugin Name: Advanced Custom Fields: PE Font Icons | ||
Plugin URI: PLUGIN_URL | ||
Description: SHORT_DESCRIPTION | ||
Version: 1.0.0 | ||
Author: AUTHOR_NAME | ||
Author URI: AUTHOR_URL | ||
License: GPLv2 or later | ||
License URI: http://www.gnu.org/licenses/gpl-2.0.html | ||
*/ | ||
|
||
// exit if accessed directly | ||
if( ! defined( 'ABSPATH' ) ) exit; | ||
|
||
|
||
// check if class already exists | ||
if( !class_exists('pe_acf_plugin_pe_font_icons') ) : | ||
|
||
class pe_acf_plugin_pe_font_icons { | ||
|
||
// vars | ||
var $settings; | ||
|
||
|
||
/* | ||
* __construct | ||
* | ||
* This function will setup the class functionality | ||
* | ||
* @type function | ||
* @date 17/02/2016 | ||
* @since 1.0.0 | ||
* | ||
* @param void | ||
* @return void | ||
*/ | ||
|
||
function __construct() { | ||
|
||
// settings | ||
// - these will be passed into the field class. | ||
$this->settings = array( | ||
'version' => '1.0.0', | ||
'url' => plugin_dir_url( __FILE__ ), | ||
'path' => plugin_dir_path( __FILE__ ) | ||
); | ||
|
||
|
||
// include field | ||
add_action('acf/include_field_types', array($this, 'include_field')); // v5 | ||
add_action('acf/register_fields', array($this, 'include_field')); // v4 | ||
} | ||
|
||
|
||
/* | ||
* include_field | ||
* | ||
* This function will include the field type class | ||
* | ||
* @type function | ||
* @date 17/02/2016 | ||
* @since 1.0.0 | ||
* | ||
* @param $version (int) major ACF version. Defaults to false | ||
* @return void | ||
*/ | ||
|
||
function include_field( $version = false ) { | ||
|
||
// support empty $version | ||
if( !$version ) $version = 4; | ||
|
||
wp_enqueue_style( 'pe-custom-icons', '/wp-content/plugins/' . plugin_basename( dirname( __FILE__ ) ) . '/assets/css/icons.css' ); | ||
|
||
// load textdomain | ||
load_plugin_textdomain( 'TEXTDOMAIN', false, plugin_basename( dirname( __FILE__ ) ) . '/lang' ); | ||
|
||
|
||
// include | ||
include_once('fields/class-pe-font-icons-acf-field-icon-select-v' . $version . '.php'); | ||
} | ||
|
||
} | ||
|
||
|
||
// initialize | ||
new pe_acf_plugin_pe_font_icons(); | ||
|
||
|
||
// class_exists check | ||
endif; | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# assets directory | ||
|
||
Use this directory to store asset files such as CSS, JS and images. | ||
|
||
This directory can be removed if not used. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# CSS directory | ||
|
||
Use this directory to store CSS files. | ||
|
||
This directory can be removed if not used. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
@font-face { | ||
font-family: 'icomoon'; | ||
src: url("../fonts/icomoon.eot?yr7voz"); | ||
src: url("../fonts/icomoon.eot?yr7voz#iefix") format("embedded-opentype"), url("../fonts/icomoon.ttf?yr7voz") format("truetype"), url("../fonts/icomoon.woff?yr7voz") format("woff"), url("../fonts/icomoon.svg?yr7voz#icomoon") format("svg"); | ||
font-weight: normal; | ||
font-style: normal; | ||
font-display: block; | ||
} | ||
|
||
.pe { | ||
/* use !important to prevent issues with browser extensions that change fonts */ | ||
font-family: 'icomoon' !important; | ||
speak: never; | ||
font-style: normal; | ||
font-weight: normal; | ||
font-variant: normal; | ||
text-transform: none; | ||
line-height: 1; | ||
/* Better Font Rendering =========== */ | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
|
||
.pe.pe-alcohol-bottle:before { | ||
content: "\e900"; | ||
} | ||
|
||
.pe.pe-announce:before { | ||
content: "\e901"; | ||
} | ||
|
||
.pe.pe-annual-report:before { | ||
content: "\e902"; | ||
} | ||
|
||
.pe.pe-anti-bottle:before { | ||
content: "\e903"; | ||
} | ||
|
||
.pe.pe-arrow:before { | ||
content: "\e904"; | ||
} | ||
|
||
.pe.pe-binoculars:before { | ||
content: "\e905"; | ||
} | ||
|
||
.pe.pe-brain:before { | ||
content: "\e906"; | ||
} | ||
|
||
.pe.pe-calendar:before { | ||
content: "\e907"; | ||
} | ||
|
||
.pe.pe-check-list:before { | ||
content: "\e908"; | ||
} | ||
|
||
.pe.pe-close:before { | ||
content: "\e909"; | ||
} | ||
|
||
.pe.pe-exclamaition-point:before { | ||
content: "\e90a"; | ||
} | ||
|
||
.pe.pe-face:before { | ||
content: "\e90b"; | ||
} | ||
|
||
.pe.pe-file-folder:before { | ||
content: "\e90c"; | ||
} | ||
|
||
.pe.pe-game-controller:before { | ||
content: "\e90d"; | ||
} | ||
|
||
.pe.pe-gavel:before { | ||
content: "\e90e"; | ||
} | ||
|
||
.pe.pe-hand:before { | ||
content: "\e90f"; | ||
} | ||
|
||
.pe.pe-hand-shake:before { | ||
content: "\e910"; | ||
} | ||
|
||
.pe.pe-kid:before { | ||
content: "\e911"; | ||
} | ||
|
||
.pe.pe-newspaper:before { | ||
content: "\e912"; | ||
} | ||
|
||
.pe.pe-nine:before { | ||
content: "\e913"; | ||
} | ||
|
||
.pe.pe-pdf:before { | ||
content: "\e914"; | ||
} | ||
|
||
.pe.pe-plus:before { | ||
content: "\e915"; | ||
} | ||
|
||
.pe.pe-profile:before { | ||
content: "\e916"; | ||
} | ||
|
||
.pe.pe-question-mark:before { | ||
content: "\e917"; | ||
} | ||
|
||
.pe.pe-sad-face:before { | ||
content: "\e918"; | ||
} | ||
|
||
.pe.pe-search:before { | ||
content: "\e919"; | ||
} | ||
|
||
.pe.pe-speech-bubbles:before { | ||
content: "\e91a"; | ||
} | ||
|
||
.pe.pe-video:before { | ||
content: "\e91b"; | ||
} |
Oops, something went wrong.