Exemple #1
0
/**
 * Initialize the Better Font Awesome Library.
 *
 * @since  2.0.0
 */
function trestle_load_bfa()
{
    // Set the library initialization args.
    $args = array('version' => 'latest', 'minified' => true, 'remove_existing_fa' => false, 'load_styles' => true, 'load_admin_styles' => true, 'load_shortcode' => true, 'load_tinymce_plugin' => true);
    // Initialize the Better Font Awesome Library.
    Better_Font_Awesome_Library::get_instance($args);
}
/**
 * Initialize the Better Font Awesome Library.
 *
 * @since  2.0.0
 */
function trestle_load_bfa()
{
    // Better Font Awesome Library
    require_once trailingslashit(get_stylesheet_directory()) . 'lib/better-font-awesome-library/better-font-awesome-library.php';
    // Set the library initialization args.
    $args = array('version' => 'latest', 'minified' => true, 'remove_existing_fa' => false, 'load_styles' => true, 'load_admin_styles' => true, 'load_shortcode' => true, 'load_tinymce_plugin' => true);
    // Initialize the Better Font Awesome Library.
    Better_Font_Awesome_Library::get_instance($args);
}
 function get_icons()
 {
     require_once dirname(__FILE__) . '/better-font-awesome-library/better-font-awesome-library.php';
     $args = array('version' => 'latest', 'minified' => true, 'remove_existing_fa' => false, 'load_styles' => false, 'load_admin_styles' => false, 'load_shortcode' => false, 'load_tinymce_plugin' => false);
     $bfa = Better_Font_Awesome_Library::get_instance($args);
     $bfa_icons = $bfa->get_icons();
     $bfa_prefix = $bfa->get_prefix() . '-';
     $new_icons = array();
     $this->stylesheet = $bfa->get_stylesheet_url();
     $this->version = $bfa->get_version();
     foreach ($bfa_icons as $hex => $class) {
         $unicode = '&#x' . ltrim($hex, '\\') . ';';
         $new_icons[$bfa_prefix . $class] = $unicode . ' ' . $bfa_prefix . $class;
     }
     return $new_icons;
 }
 /**
  * Initialize the Better Font Awesome Library object.
  *
  * @since  0.9.0
  *
  * @param  array  $options  Plugin options.
  */
 private function initialize_better_font_awesome_library($options)
 {
     // Hide admin notices if setting is checked.
     if (isset($options['hide_admin_notices'])) {
         add_filter('bfa_show_errors', '__return_false');
     }
     // Initialize BFA library.
     $args = array('version' => isset($options['version']) ? $options['version'] : $this->option_defaults['version'], 'minified' => isset($options['minified']) ? $options['minified'] : '', 'remove_existing_fa' => isset($options['remove_existing_fa']) ? $options['remove_existing_fa'] : '', 'load_styles' => true, 'load_admin_styles' => true, 'load_shortcode' => true, 'load_tinymce_plugin' => true);
     $this->bfa_lib = Better_Font_Awesome_Library::get_instance($args);
 }
/**
 * Initialize the Better Font Awesome Library.
 *
 * @since  1.0.0
 */
function mm_components_load_bfa()
{
    if (!class_exists('Better_Font_Awesome_Library')) {
        require_once MM_COMPONENTS_PATH . 'lib/better-font-awesome-library/better-font-awesome-library.php';
    }
    $args = array('version' => 'latest', 'minified' => true, 'remove_existing_fa' => false, 'load_styles' => true, 'load_admin_styles' => true, 'load_shortcode' => true, 'load_tinymce_plugin' => true);
    Better_Font_Awesome_Library::get_instance($args);
}
/**
 * Get array of icons to use.
 *
 * @since   1.0.0
 *
 * @return  array  Icon array.
 */
function tax_icons_get_icon_array()
{
    // Get Better Font Awesome instance
    $bfa = Better_Font_Awesome_Library::get_instance();
    // Get icons array
    $icons = $bfa->get_icons();
    // Add prefix to icon array
    $prefix = $bfa->get_prefix();
    foreach ($icons as $index => $icon) {
        $updated_icons[$icon] = $prefix ? "{$prefix} {$prefix}-{$icon}" : $icon;
    }
    /**
     * Filter the icon array.
     *
     * @since  1.0.0
     *
     * @param  array  $icons  Array of icons.
     */
    return apply_filters('tax_icons_icon_array', $updated_icons);
}
Exemple #7
0
/**
 * Include and initialize the Better Font Awesome Library.
 *
 * @since  1.0.0
 */
function alcatraz_init_bfa()
{
    $args = array('version' => 'latest', 'minified' => true, 'remove_existing_fa' => false, 'load_styles' => true, 'load_admin_styles' => true, 'load_shortcode' => true, 'load_tinymce_plugin' => true);
    Better_Font_Awesome_Library::get_instance($args);
}