本文整理汇总了PHP中getFontAwesomeIconArray函数的典型用法代码示例。如果您正苦于以下问题:PHP getFontAwesomeIconArray函数的具体用法?PHP getFontAwesomeIconArray怎么用?PHP getFontAwesomeIconArray使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getFontAwesomeIconArray函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFontAwesomeIconArray
<div class="input">
<label>Text Color</label>
<div class="colorSelector"><div style=""></div></div>
<input type="text" name="text_color" id="text_color" value="" size="10" maxlength="10" />
</div>
<div class="input">
<label>Icon Color</label>
<div class="colorSelector"><div style=""></div></div>
<input type="text" name="icon_color" id="icon_color" value="" size="10" maxlength="10" />
</div>
<div class="input">
<label>Icon</label>
<select id="icon" name="icon">
<option value=""></option>
<?php
$fa_icons = getFontAwesomeIconArray();
foreach ($fa_icons as $key => $value) {
?>
<option value="<?php
echo $key;
?>
"><?php
echo $key;
?>
</option>
<?php
}
?>
</select>
</div>
<div class="input">
示例2: array
<?php
#-----------------------------------------------------------------
# Elements
#-----------------------------------------------------------------
$thb_shortcodes['header_2'] = array('type' => 'heading', 'title' => __('Elements'));
$thb_shortcodes['small_title'] = array('type' => 'regular', 'title' => __('Small Title'), 'attr' => array('title' => array('type' => 'text', 'title' => 'Title')));
$thb_shortcodes['large_title'] = array('type' => 'regular', 'title' => __('Large Title'), 'attr' => array('title' => array('type' => 'text', 'title' => 'Title'), 'center' => array('type' => 'checkbox', 'title' => __('Center?'), 'desc' => 'Center the title?')));
$thb_shortcodes['thb_button'] = array('type' => 'regular', 'title' => __('Button', THB_THEME_NAME), 'attr' => array('size' => array('type' => 'radio', 'title' => __('Size', THB_THEME_NAME), 'opt' => array('small' => 'Small', 'medium' => 'Medium', 'large' => 'Large')), 'color' => array('type' => 'radio', 'title' => __('Color', THB_THEME_NAME), 'opt' => array('white' => 'White', 'grey' => 'Light Grey', 'black' => 'Black', 'blue' => 'Blue', 'green' => 'Green', 'yellow' => 'Yellow', 'orange' => 'Orange', 'pink' => 'Pink', 'petrol' => 'Petrol Green', 'darkgrey' => 'Gray')), 'animation' => array('type' => 'radio', 'title' => __('Animation', THB_THEME_NAME), 'opt' => array("" => "None", "animation right-to-left" => "Left", "animation left-to-right" => "Right", "animation bottom-to-top" => "Top", "animation top-to-bottom" => "Bottom", "animation scale" => "Scale", "animation fade-in" => "Fade")), 'icon' => array('type' => 'text', 'title' => __('Icon', THB_THEME_NAME)), 'title' => array('type' => 'text', 'title' => __('Buton Text', THB_THEME_NAME)), 'link' => array('type' => 'text', 'title' => __('Buton Link', THB_THEME_NAME)), 'blank' => array('type' => 'checkbox', 'title' => __('Open in new window?', THB_THEME_NAME), 'desc' => 'Enable this to open link in new window')));
$thb_shortcodes['quote'] = array('type' => 'regular', 'title' => __('Quotes'), 'attr' => array('align' => array('type' => 'radio', 'title' => __('Alignment'), 'opt' => array('normal' => 'Normal', 'pullleft' => 'Pull Left', 'pullright' => 'Pull Right')), 'content' => array('type' => 'textarea', 'title' => __('Content')), 'author' => array('type' => 'text', 'title' => 'Quote Author')));
$thb_shortcodes['tags'] = array('type' => 'regular', 'title' => __('Tags', THB_THEME_NAME), 'attr' => array('color' => array('type' => 'radio', 'title' => __('Color', THB_THEME_NAME), 'opt' => array('black' => 'Black', 'red' => 'Red', 'blue' => 'Blue', 'green' => 'Green', 'grey' => 'Grey', 'yellow' => 'Yellow')), 'text' => array('type' => 'text', 'title' => __('Text', THB_THEME_NAME))));
$thb_shortcodes['dropcap'] = array('type' => 'regular', 'title' => __('Dropcap', THB_THEME_NAME), 'attr' => array('boxed' => array('type' => 'checkbox', 'title' => __('Boxed?', THB_THEME_NAME), 'desc' => 'Makes the dropcap boxed')));
$thb_shortcodes['single_icon'] = array('type' => 'regular', 'title' => __('Single Icon'), 'attr' => array('icon' => array('type' => 'select', 'title' => __('Icon'), 'values' => getFontAwesomeIconArray()), 'size' => array('type' => 'radio', 'title' => __('Icon Size'), 'opt' => array('icon-1x' => '1x', 'icon-2x' => '2x', 'icon-3x' => '3x', 'icon-4x' => '4x')), 'boxed' => array('type' => 'checkbox', 'title' => __('Boxed?'), 'desc' => 'Boxed contains the icon inside a box'), 'icon_link' => array('type' => 'text', 'title' => __('Icon Link'), 'desc' => 'If you would like to link the icon to an url, enter it here. (Boxed option should be checked)')));
示例3: TheShortcodesForVC
function TheShortcodesForVC()
{
if (!class_exists('WPBakeryVisualComposerAbstract')) {
// or using plugins path function
return;
}
// Remove Front End
vc_disable_frontend();
// Settings
vc_set_as_theme(true);
// Removing Default shortcodes
vc_remove_element("vc_widget_sidebar");
vc_remove_element("vc_wp_search");
vc_remove_element("vc_wp_meta");
vc_remove_element("vc_wp_recentcomments");
vc_remove_element("vc_wp_calendar");
vc_remove_element("vc_wp_pages");
vc_remove_element("vc_wp_tagcloud");
vc_remove_element("vc_wp_custommenu");
vc_remove_element("vc_wp_text");
vc_remove_element("vc_wp_posts");
vc_remove_element("vc_wp_links");
vc_remove_element("vc_wp_categories");
vc_remove_element("vc_wp_archives");
vc_remove_element("vc_wp_rss");
vc_remove_element("vc_teaser_grid");
vc_remove_element("vc_button");
vc_remove_element("vc_button2");
vc_remove_element("vc_cta_button");
vc_remove_element("vc_message");
vc_remove_element("vc_progress_bar");
vc_remove_element("vc_pie");
vc_remove_element("vc_posts_slider");
vc_remove_element("vc_posts_grid");
vc_remove_element("vc_images_carousel");
vc_remove_element("vc_carousel");
vc_remove_element("vc_gallery");
vc_remove_element("vc_single_image");
vc_remove_element("vc_facebook");
vc_remove_element("vc_tweetmeme");
vc_remove_element("vc_googleplus");
vc_remove_element("vc_pinterest");
vc_remove_element("vc_single_image");
vc_remove_element("vc_cta_button2");
vc_remove_element("vc_gmaps");
vc_remove_element("vc_raw_js");
vc_remove_element("vc_flickr");
vc_remove_element("vc_separator");
vc_remove_element("vc_text_separator");
vc_remove_element("vc_empty_space");
vc_remove_element("vc_custom_heading");
add_action('admin_head', 'remove_my_meta_box');
function remove_my_meta_box()
{
remove_meta_box("vc_teaser", "portfolio", "side");
remove_meta_box("vc_teaser", "page", "side");
remove_meta_box("vc_teaser", "product", "side");
}
// Adding Extra Shortcodes
require_once THB_THEME_ROOT_ABS . '/vc_templates/button/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/image/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/styled_header/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/product/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/product_list/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/product_cat/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/post/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/portfolio/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/iconlist/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/iconbox/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/lookbook/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/product_grid/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/counter/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/notification/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/banner/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/progress_bar/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/team_member/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/testimonials/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/clients/shortcode.php';
require_once THB_THEME_ROOT_ABS . '/vc_templates/gap/shortcode.php';
/* Visual Composer Mappings */
// Adding animation to columns
vc_add_param("vc_column", array("type" => "dropdown", "class" => "", "heading" => __("Animation"), "admin_label" => true, "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => ""));
// Add parameters to rows
vc_add_param("vc_row", array("type" => "dropdown", "class" => "", "heading" => "Type", "param_name" => "type", "value" => array("In Container" => "in_container", "Full Width Background" => "full_width_background", "Full Width Content" => "full_width_content")));
vc_add_param("vc_row", array("type" => "checkbox", "class" => "", "heading" => __("Enable parallax"), "param_name" => "enable_parallax", "value" => array("" => "false")));
vc_add_param("vc_row", array("type" => "textfield", "class" => "", "heading" => __("Parallax Speed"), "param_name" => "parallax_speed", "value" => "1", "dependency" => array("element" => "enable_parallax", "not_empty" => true), "description" => __("A value between 0 and 1 is recommended")));
vc_add_param("vc_row", array("type" => "textfield", "class" => "", "heading" => __("Video background (mp4)"), "param_name" => "bg_video_src_mp4", "value" => "", "description" => _("You must include the ogv & the mp4 format to render your video with cross browser compatibility. OGV is optional. Video must be in a 16:9 aspect ratio. The row background image will be used as in mobile devices.")));
vc_add_param("vc_row", array("type" => "textfield", "class" => "", "heading" => __("Video background (ogv)"), "param_name" => "bg_video_src_ogv", "value" => ""));
vc_add_param("vc_row", array("type" => "textfield", "class" => "", "heading" => __("Video background (webm)"), "param_name" => "bg_video_src_webm", "value" => ""));
vc_add_param("vc_row", array("type" => "colorpicker", "class" => "", "heading" => __("Video Overlay Color"), "param_name" => "bg_video_overlay_color", "value" => "", "description" => __("If you want, you can select an overlay color.")));
// Button shortcode
vc_map(array("name" => __("Button"), "base" => "thb_button", "icon" => "thb_vc_ico_button", "class" => "thb_vc_sc_button", "category" => "by Fuel Themes", "params" => array(array("type" => "textfield", "class" => "", "heading" => __("Caption"), "admin_label" => true, "param_name" => "content", "value" => "", "description" => ""), array("type" => "textfield", "class" => "", "heading" => __("Link URL"), "param_name" => "link", "value" => "", "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Icon"), "param_name" => "icon", "value" => getFontAwesomeIconArray(), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Open link in"), "param_name" => "target_blank", "value" => array("Same window" => "", "New window" => "true"), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Style"), "param_name" => "size", "value" => array("Small button" => "small", "Medium button" => "medium", "Big button" => "large"), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Button color"), "param_name" => "color", "value" => array("White" => "white", "Light Grey" => "grey", "Black" => "black", "Blue" => "blue", "Green" => "green", "Yellow" => "yellow", "Orange" => "orange", "Pink" => "pink", "Petrol Green" => "petrol", "Gray" => "darkgrey"), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Animation"), "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => ""))));
// Image shortcode
vc_map(array("name" => __("Image"), "base" => "thb_image", "icon" => "thb_vc_ico_image", "class" => "thb_vc_sc_image", "category" => "by Fuel Themes", "params" => array(array("type" => "attach_image", "class" => "", "heading" => __("Select Image"), "param_name" => "image", "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Animation"), "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => ""), array("type" => "textfield", "heading" => __("Image size"), "param_name" => "img_size", "description" => __("Enter image size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height). Leave empty to use 'thumbnail' size.")), array("type" => "dropdown", "heading" => __("Image alignment"), "param_name" => "alignment", "value" => array(__("Align left") => "", __("Align right") => "right", __("Align center") => "center"), "description" => __("Select image alignment.")), array("type" => "checkbox", "class" => "", "heading" => __("Link to Full-Width Image?"), "param_name" => "lightbox", "value" => array("" => "true")), array("type" => "vc_link", "heading" => "Image link", "param_name" => "img_link", "description" => "Enter url if you want this image to have link.", "dependency" => array('element' => "lightbox", 'is_empty' => true)))));
// Styled Header
vc_map(array("name" => __("Styled Header"), "base" => "thb_header", "icon" => "thb_vc_ico_styled", "class" => "thb_vc_sc_styled", "category" => "by Fuel Themes", "params" => array(array("type" => "textfield", "heading" => __("Title"), "param_name" => "title", "admin_label" => true, "description" => __("Title of the header")), array("type" => "textfield", "heading" => __("Sub-Title"), "param_name" => "sub_title", "description" => __("Sub - Title of the header. It's actually above the title.")), array("type" => "dropdown", "class" => "", "heading" => __("Icon"), "param_name" => "icon", "value" => getFontAwesomeIconArray(), "description" => ""), array("type" => "checkbox", "class" => "", "heading" => __("Use image instead of icon?"), "param_name" => "is_image", "value" => array("" => "true"), "description" => __("20px width is recommended (40px) for retina.")), array("type" => "attach_image", "class" => "", "heading" => __("Select Image"), "param_name" => "image", "description" => "", "dependency" => array('element' => "is_image", 'not_empty' => true)))));
// Products
vc_map(array("name" => __("Products"), "base" => "thb_product", "icon" => "thb_vc_ico_product", "class" => "thb_vc_sc_product", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "heading" => __("Product Sort"), "param_name" => "product_sort", "value" => array(__('Best Sellers') => "best-sellers", __('Latest Products') => "latest-products", __('Featured Products') => "featured-products", __('Top Rated Products') => "top-rated", __('Sale Products') => "sale-products", __('By Category') => "by-category", __('By Product ID') => "by-id"), "description" => __("Select the order of the products you'd like to show.")), array("type" => "checkbox", "heading" => __("Product Category"), "param_name" => "cat", "value" => thb_productCategories(), "description" => __("Select the order of the products you'd like to show."), "dependency" => array('element' => "product_sort", 'value' => array('by-category'))), array("type" => "textfield", "heading" => __("Product IDs"), "param_name" => "product_ids", "description" => __("Enter the products IDs you would like to display seperated by comma"), "dependency" => array('element' => "product_sort", 'value' => array('by-id'))), array("type" => "dropdown", "heading" => __("Carousel"), "param_name" => "carousel", "value" => array('Yes' => "yes", 'No' => "no"), "description" => __("Select yes to display the products in a carousel.")), array("type" => "textfield", "class" => "", "heading" => __("Number of items"), "param_name" => "item_count", "value" => "4", "description" => __("The number of products to show."), "dependency" => array('element' => "product_sort", 'value' => array('by-category', 'featured-products', 'sale-products', 'top-rated', 'latest-products', 'best-sellers'))), array("type" => "dropdown", "heading" => __("Columns"), "param_name" => "columns", "admin_label" => true, "value" => array(__('Four Columns') => "4", __('Three Columns') => "3", __('Two Columns') => "2"), "description" => __("Select the layout of the products.")))));
// Product List
vc_map(array("name" => __("Product List"), "base" => "thb_product_list", "icon" => "thb_vc_ico_product_list", "class" => "thb_vc_sc_product_list", "category" => "by Fuel Themes", "params" => array(array("type" => "textfield", "class" => "", "heading" => __("Title"), "param_name" => "title", "value" => "", "admin_label" => true, "description" => __("Title of the widget")), array("type" => "dropdown", "heading" => __("Product Sort"), "param_name" => "product_sort", "value" => array(__('Best Sellers') => "best-sellers", __('Featured Products') => "featured-products", __('Latest Products') => "latest-products", __('Top Rated') => "top-rated", __('Sale Products') => "sale-products", __('By Product ID') => "by-id"), "admin_label" => true, "description" => __("Select the order of the products you'd like to show.")), array("type" => "textfield", "heading" => __("Product IDs"), "param_name" => "product_ids", "description" => __("Enter the products IDs you would like to display seperated by comma"), "dependency" => array('element' => "product_sort", 'value' => array('by-id'))), array("type" => "textfield", "class" => "", "heading" => __("Number of items"), "param_name" => "item_count", "value" => "4", "description" => __("The number of products to show."), "dependency" => array('element' => "product_sort", 'value' => array('by-category', 'featured-products', 'sale-products', 'top-rated', 'latest-products', 'best-sellers'))))));
//.........这里部分代码省略.........
示例4: start_el
//.........这里部分代码省略.........
<option value="wide_icons" <?php
if (esc_attr($item->type_menu) == "wide_icons") {
echo 'selected="selected"';
}
?>
>wide with icons</option>
</select>
</label>
</p>
<p class="field-custom description description-thin description-thin-custom">
<label for="edit-menu-item-icon-<?php
echo $item_id;
?>
">
<?php
_e('Icon', 'qode');
?>
<br />
<select id="edit-menu-item-icon<?php
echo $item_id;
?>
" name="menu-item-icon[<?php
echo $item_id;
?>
]">
<option value="" <?php
if (esc_attr($item->icon) == "") {
echo 'selected="selected"';
}
?>
></option>
<?php
$fa_icons = getFontAwesomeIconArray();
foreach ($fa_icons as $key => $value) {
?>
<option value="<?php
echo $key;
?>
" <?php
if (esc_attr($item->icon) == $key) {
echo 'selected="selected"';
}
?>
><?php
echo $key;
?>
</option>
<?php
}
?>
</select>
<br/><?php
_e('Only with "wide with icons" menu type', 'qode');
?>
</label>
</p>
<p class="field-custom description description-thin description-thin-custom">
</p>
<p class="field-custom description description-thin description-thin-custom">
<label for="edit-menu-item-sidebar-<?php
echo $item_id;
?>
">
<?php
_e('Custom widget area', 'qode');