Version Description
Download this release
Release Info
Developer | silkalns |
Plugin | Illdy Companion |
Version | 1.0.3 |
Comparing to | |
See all releases |
Version 1.0.3
- css/admin.css +13 -0
- illdy-companion.php +386 -0
- illdy-demo-content.php +34 -0
- js/admin.js +26 -0
- readme.txt +67 -0
- widgets/class-widget-counter.php +109 -0
- widgets/class-widget-person.php +194 -0
- widgets/class-widget-project.php +100 -0
- widgets/class-widget-recent-posts.php +125 -0
- widgets/class-widget-service.php +819 -0
- widgets/class-widget-skill.php +768 -0
css/admin.css
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#demo_content {
|
2 |
+
text-align: center;
|
3 |
+
}
|
4 |
+
#demo_content .spinner {
|
5 |
+
float: none;
|
6 |
+
}
|
7 |
+
#demo_content .updated-message,
|
8 |
+
#demo_content .spinner {
|
9 |
+
display: none;
|
10 |
+
}
|
11 |
+
#demo_content .spinner.is-active {
|
12 |
+
display: inline-block;
|
13 |
+
}
|
illdy-companion.php
ADDED
@@ -0,0 +1,386 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Plugin Name: Illdy Companion
|
4 |
+
* Plugin URI: http://colorlib.com/wp/themes/illdy/
|
5 |
+
* Description: Illdy Companion is a companion for Illdy theme.
|
6 |
+
* Version: 1.0.3
|
7 |
+
* Author: Colorlib
|
8 |
+
* Author URI: https://colorlib.com/
|
9 |
+
* License: GPL-2.0+
|
10 |
+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
11 |
+
* Text Domain: illdy-companion
|
12 |
+
* Domain Path: /languages
|
13 |
+
*/
|
14 |
+
|
15 |
+
define( 'ILLDY_COMPANION', '1.0.3' );
|
16 |
+
|
17 |
+
// Widgets
|
18 |
+
require_once( 'widgets/class-widget-recent-posts.php' );
|
19 |
+
require_once( 'widgets/class-widget-skill.php' );
|
20 |
+
require_once( 'widgets/class-widget-project.php' );
|
21 |
+
require_once( 'widgets/class-widget-service.php' );
|
22 |
+
require_once( 'widgets/class-widget-counter.php' );
|
23 |
+
require_once( 'widgets/class-widget-person.php' );
|
24 |
+
|
25 |
+
|
26 |
+
if( !function_exists( 'illdy_companion_add_default_widgets' ) ) {
|
27 |
+
/**
|
28 |
+
* Function to import widgets based on a JSON config file
|
29 |
+
* JSON file is generated using plugin: Widget Importer / Exporter
|
30 |
+
* @link https://github.com/stevengliebe/widget-importer-exporter
|
31 |
+
*/
|
32 |
+
function illdy_companion_add_default_widgets() {
|
33 |
+
$json = '{"footer-sidebar-1":{"text-5":{"title":"PRODUCTS","text":"<ul><li><a href=\"#\" title=\"Our work\">Our work<\/a><\/li><li><a href=\"#\" title=\"Club\">Club<\/a><\/li><li><a href=\"#\" title=\"News\">News<\/a><\/li><li><a href=\"#\" title=\"Announcement\">Announcement<\/a><\/li><\/ul>","filter":false}},"footer-sidebar-2":{"text-6":{"title":"INFORMATION","text":"<ul><li><a href=\"#\" title=\"Pricing\">Pricing<\/a><\/li><li><a href=\"#\" title=\"Terms\">Terms<\/a><\/li><li><a href=\"#\" title=\"Affiliates\">Affiliates<\/a><\/li><li><a href=\"#\" title=\"Blog\">Blog<\/a><\/li><\/ul>","filter":false}},"footer-sidebar-3":{"text-7":{"title":"SUPPORT","text":"<ul><li><a href=\"#\" title=\"Documentation\">Documentation<\/a><\/li><li><a href=\"#\" title=\"FAQs\">FAQs<\/a><\/li><li><a href=\"#\" title=\"Forums\">Forums<\/a><\/li><li><a href=\"#\" title=\"Contact\">Contact<\/a><\/li><\/ul>","filter":false}},"front-page-about-sidebar":{"illdy_skill-2":{"title":"Typography","percentage":60,"icon":"fa-font","color":"#f18b6d"},"illdy_skill-3":{"title":"Design","percentage":82,"icon":"fa-pencil","color":"#f1d204"},"illdy_skill-4":{"title":"Development","percentage":86,"icon":"fa-code","color":"#6a4d8a"}},"front-page-projects-sidebar":{"illdy_project-3":{"title":"Project 1","image":"\/layout\/images\/front-page\/front-page-project-1.jpg","url":"#"},"illdy_project-4":{"title":"Project 2","image":"\/layout\/images\/front-page\/front-page-project-2.jpg","url":"#"},"illdy_project-5":{"title":"Project 3","image":"\/layout\/images\/front-page\/front-page-project-3.jpg","url":"#"},"illdy_project-6":{"title":"Project 4","image":"\/layout\/images\/front-page\/front-page-project-4.jpg","url":"#"}},"front-page-services-sidebar":{"illdy_service-2":{"title":"Web Design","icon":"fa-pencil","entry":"Consectetur adipiscing elit. Praesent molestie urna hendrerit erat tincidunt tempus. Aliquam a leo risus. Fusce a metus non augue dapibus porttitor at in mauris. Pellentesque commodo...","color":"#f18b6d"},"illdy_service-3":{"title":"WEB DEVELOPMENT","icon":"fa-code","entry":"Consectetur adipiscing elit. Praesent molestie urna hendrerit erat tincidunt tempus. Aliquam a leo risus. Fusce a metus non augue dapibus porttitor at in mauris. Pellentesque commodo...","color":"#f1d204"},"illdy_service-4":{"title":"SEO Analisys","icon":"fa-search","entry":"Consectetur adipiscing elit. Praesent molestie urna hendrerit erat tincidunt tempus. Aliquam a leo risus. Fusce a metus non augue dapibus porttitor at in mauris. Pellentesque commodo...","color":"#6a4d8a"}},"front-page-counter-sidebar":{"illdy_counter-4":{"title":"Projects","data_from":1,"data_to":260,"data_speed":2000,"data_refresh_interval":100},"illdy_counter-3":{"title":"Clients","data_from":1,"data_to":120,"data_speed":2000,"data_refresh_interval":100},"illdy_counter-2":{"title":"Coffes","data_from":1,"data_to":260,"data_speed":2000,"data_refresh_interval":100}},"front-page-team-sidebar":{"illdy_person-5":{"title":"Mark Lawrance","image":"\/layout\/images\/front-page\/front-page-team-1.jpg","position":"Web Designer","entry":"Creative, detail-oriented, always focused.","facebook_url":"#","twitter_url":"#","linkedin_url":"#","color":"#f18b6d"},"illdy_person-4":{"title":"Jane Stenton","image":"\/layout\/images\/front-page\/front-page-team-2.jpg","position":"SEO Specialist","entry":"Curious, tech-geeck and gets serious when it comes to work.","facebook_url":"#","twitter_url":"#","linkedin_url":"#","color":"#f1d204"},"illdy_person-2":{"title":"John Smith","image":"\/layout\/images\/front-page\/front-page-team-3.jpg","position":"Developer","entry":"Enthusiastic, passionate with great sense of humor.","facebook_url":"#","twitter_url":"#","linkedin_url":"#","color":"#6a4d8a"}}}';
|
34 |
+
$config = json_decode($json);
|
35 |
+
$sidebars_widgets = get_option( 'sidebars_widgets' );
|
36 |
+
# Parse config
|
37 |
+
foreach ( $config as $sidebar => $elemements ) {
|
38 |
+
# verify if the sidebar doesn't have ny widgets
|
39 |
+
if ( strpos( $sidebar, 'orphaned_widgets' ) === false && !is_active_sidebar($sidebar) ) {
|
40 |
+
# create an empty array for active widgets
|
41 |
+
$this_sidebar_active_widgets = array();
|
42 |
+
# parse all widgets for current sidebar
|
43 |
+
foreach ( $elemements as $id_widget => $args ) {
|
44 |
+
# add current widget to current sidebar
|
45 |
+
$this_sidebar_active_widgets[] = $id_widget;
|
46 |
+
# split widget name in order to get widget name and index
|
47 |
+
$id_widget_parts = explode('-',$id_widget);
|
48 |
+
# get widget index
|
49 |
+
$index_widget = end($id_widget_parts);
|
50 |
+
#remove widget index from array
|
51 |
+
array_pop($id_widget_parts);
|
52 |
+
#generate widget name
|
53 |
+
$widget_name = implode('-', $id_widget_parts);
|
54 |
+
#get all widgets who are like current widget
|
55 |
+
$widgets = get_option( 'widget_'.$widget_name );
|
56 |
+
#check if current index exist in array
|
57 |
+
if ( !isset($widgets[$index_widget]) ) {
|
58 |
+
#add current widget with his index and args
|
59 |
+
$widgets[$index_widget] = get_object_vars($args);
|
60 |
+
}
|
61 |
+
#update widgets who are like current widget
|
62 |
+
update_option( 'widget_'.$widget_name, $widgets );
|
63 |
+
}
|
64 |
+
$sidebars_widgets[$sidebar] = $this_sidebar_active_widgets;
|
65 |
+
}
|
66 |
+
}
|
67 |
+
update_option( 'sidebars_widgets', $sidebars_widgets );
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
if( !function_exists( 'illdy_companion_add_default_customizer' ) ) {
|
72 |
+
function illdy_companion_add_default_customizer( $force = false ) {
|
73 |
+
$illdy_customizer_defaults = array(
|
74 |
+
'_services_general' => 1,
|
75 |
+
'_services_general_title' => __( 'Services', 'illdy-companion' ),
|
76 |
+
'_services_general_entry' => __( 'In order to help you grow your business, our carefully selected experts can advise you in in the following areas:', 'illdy-companion' ),
|
77 |
+
'_preloader_enable' => 1,
|
78 |
+
'_preloader_background_color' => '#ffffff',
|
79 |
+
'_preloader_primary_color' => '#f1d204',
|
80 |
+
'_preloader_secondly_color' => '#ffffff',
|
81 |
+
'_text_logo' => __('Illdy', 'illdy-companion'),
|
82 |
+
'_contact_bar_facebook_url' => '#',
|
83 |
+
'_contact_bar_twitter_url' => '#',
|
84 |
+
'_contact_bar_linkedin_url' => '#',
|
85 |
+
'_email' => __( 'contact@site.com', 'illdy-companion' ),
|
86 |
+
'_phone' => __( '(555) 555-5555', 'illdy-companion' ),
|
87 |
+
'_address1' => __( 'Street 221B Baker Street, ', 'illdy-companion' ),
|
88 |
+
'_address2' => __( 'London, UK', 'illdy-companion' ),
|
89 |
+
'_general_footer_display_copyright' => 1,
|
90 |
+
'_footer_copyright' => __( '© Copyright 2016. All Rights Reserved.', 'illdy-companion' ),
|
91 |
+
'_img_footer_logo' => esc_url_raw( get_template_directory_uri() . '/layout/images/footer-logo.png' ),
|
92 |
+
'_enable_post_posted_on_blog_posts' => 1,
|
93 |
+
'_enable_post_category_blog_posts' => 1,
|
94 |
+
'_enable_post_tags_blog_posts' => 1,
|
95 |
+
'_enable_post_comments_blog_posts' => 1,
|
96 |
+
'_enable_social_sharing_blog_posts' => 1,
|
97 |
+
'_enable_author_box_blog_posts' => 1,
|
98 |
+
'_team_general_show' => 1,
|
99 |
+
'_team_general_title' => __( 'Team', 'illdy-companion' ),
|
100 |
+
'_team_general_entry' => __( 'Meet the people that are going to take your business to the next level.', 'illdy-companion' ),
|
101 |
+
'_testimonials_general_show' => 1,
|
102 |
+
'_testimonials_general_title' => __( 'Testimonials', 'illdy-companion' ),
|
103 |
+
'_testimonials_number_of_posts' => 4,
|
104 |
+
'_about_general_show' => 1,
|
105 |
+
'_about_general_title' => __( 'About', 'illdy-companion' ),
|
106 |
+
'_about_general_entry' => __( 'It is an amazng one-page theme with great features that offers an incredible experience. It is easy to install, make changes, adapt for your business. A modern design with clean lines and styling for a wide variety of content, exactly how a business design should be. You can add as many images as you want to the main header area and turn them into slider.', 'illdy-companion' ),
|
107 |
+
'_contact_us_general_show' => 1,
|
108 |
+
'_contact_us_general_title' => __( 'Contact us', 'illdy-companion' ),
|
109 |
+
'_contact_us_general_entry' => __( 'And we will get in touch as son as possible.', 'illdy-companion' ),
|
110 |
+
'_contact_us_general_address_title' => __( 'Address', 'illdy-companion' ),
|
111 |
+
'_contact_us_general_customer_support_title' => __( 'Customer Support', 'illdy-companion' ),
|
112 |
+
'_counter_general_show' => 1,
|
113 |
+
'_counter_background_type' => 'image',
|
114 |
+
'_counter_background_image' => esc_url( get_template_directory_uri() . '/layout/images/front-page/front-page-counter.jpg' ),
|
115 |
+
'_counter_background_color' => '#000000',
|
116 |
+
'_jumbotron_general_image' => esc_url_raw( get_template_directory_uri() . '/layout/images/front-page/front-page-header.png' ),
|
117 |
+
'_jumbotron_general_first_row_from_title' => __( 'Clean', 'illdy-companion' ),
|
118 |
+
'_jumbotron_general_second_row_from_title' => __( 'Slick', 'illdy-companion' ),
|
119 |
+
'_jumbotron_general_third_row_from_title' => __( 'Pixel Perfect', 'illdy-companion' ),
|
120 |
+
'_jumbotron_general_entry' => __( 'lldy is a great one-page theme, perfect for developers and designers but also for someone who just wants a new website for his business. Try it now!', 'illdy-companion' ),
|
121 |
+
'_jumbotron_general_first_button_title' => __( 'Learn more', 'illdy-companion' ),
|
122 |
+
'illdy_jumbotron_general_first_button_url' => '#',
|
123 |
+
'_jumbotron_general_second_button_title' => __( 'Download', 'illdy-companion' ),
|
124 |
+
'illdy_jumbotron_general_second_button_url' => '#',
|
125 |
+
'_latest_news_general_show' => 1,
|
126 |
+
'_latest_news_general_title' => __( 'Latest News', 'illdy-companion' ),
|
127 |
+
'_latest_news_general_entry' => __( 'If you are interested in the latest articles in the industry, take a sneak peek at our blog. You have nothing to loose!', 'illdy-companion' ),
|
128 |
+
'_latest_news_button_text' => __( 'See blog', 'illdy-companion' ),
|
129 |
+
'_latest_news_number_of_posts' => 3,
|
130 |
+
'_projects_general_show' => 1,
|
131 |
+
'_projects_general_title' => __( 'Projects', 'illdy-companion' ),
|
132 |
+
'_projects_general_entry' => __( 'You\'ll love our work. Check it out!', 'illdy-companion' ),
|
133 |
+
'_general_sections_order_first_section' => 1,
|
134 |
+
'_general_sections_order_second_section' => 2,
|
135 |
+
'_general_sections_order_third_section' => 3,
|
136 |
+
'_general_sections_order_fourth_section' => 4,
|
137 |
+
'_general_sections_order_fifth_section' => 5,
|
138 |
+
'_general_sections_order_sixth_section' => 6,
|
139 |
+
'_general_sections_order_seventh_section' => 7,
|
140 |
+
'_general_sections_order_eighth_section' => 8,
|
141 |
+
);
|
142 |
+
|
143 |
+
// Set prefix
|
144 |
+
$prefix = 'illdy';
|
145 |
+
|
146 |
+
foreach ( $illdy_customizer_defaults as $customizer_key => $customizer_value ) {
|
147 |
+
if ( !$force ) {
|
148 |
+
$current_value = get_theme_mod( $prefix.$customizer_key );
|
149 |
+
if ( $current_value == '' ) {
|
150 |
+
set_theme_mod( $prefix.$customizer_key, $customizer_value );
|
151 |
+
}
|
152 |
+
}else{
|
153 |
+
set_theme_mod( $prefix.$customizer_key, $customizer_value );
|
154 |
+
}
|
155 |
+
}
|
156 |
+
}
|
157 |
+
}
|
158 |
+
|
159 |
+
// Hooks
|
160 |
+
|
161 |
+
add_action( 'admin_enqueue_scripts', 'illdy_companion_admin_scripts' );
|
162 |
+
|
163 |
+
function illdy_companion_admin_scripts(){
|
164 |
+
|
165 |
+
wp_enqueue_style( 'illdy-companion-admin-css', plugins_url( '/css/admin.css' , __FILE__ ) );
|
166 |
+
wp_enqueue_script( 'illdy-companion-admin-js', plugins_url( '/js/admin.js' , __FILE__ ), array('jquery') );
|
167 |
+
|
168 |
+
wp_localize_script( 'illdy-companion-admin-js', 'illdyCompanion', array(
|
169 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
170 |
+
) );
|
171 |
+
|
172 |
+
}
|
173 |
+
|
174 |
+
add_action( 'illdy_welcome', 'illdy_companion_demo_tab' );
|
175 |
+
|
176 |
+
function illdy_companion_demo_tab (){
|
177 |
+
include 'illdy-demo-content.php';
|
178 |
+
}
|
179 |
+
|
180 |
+
add_action( 'wp_ajax_illdy_companion_import_content', 'illdy_companion_import_content' );
|
181 |
+
|
182 |
+
function illdy_companion_import_content() {
|
183 |
+
|
184 |
+
if ( isset($_POST['import']) ) {
|
185 |
+
|
186 |
+
if ( $_POST['import'] == 'import-all' ) {
|
187 |
+
|
188 |
+
$frontpage_title = __( 'Front Page', 'illdy-companion' );
|
189 |
+
$blog_title = __( 'Blog', 'illdy-companion' );
|
190 |
+
|
191 |
+
$frontpage_id = wp_insert_post( array( 'post_title' => $frontpage_title, 'post_status' => 'publish', 'post_type' => 'page' ) );
|
192 |
+
$blog_id = wp_insert_post( array( 'post_title' => $blog_title, 'post_status' => 'publish', 'post_type' => 'page' ) );
|
193 |
+
|
194 |
+
update_option( 'show_on_front', 'page' );
|
195 |
+
update_option( 'page_on_front', $frontpage_id );
|
196 |
+
update_option( 'page_for_posts', $blog_id );
|
197 |
+
|
198 |
+
illdy_companion_add_default_widgets();
|
199 |
+
illdy_companion_add_default_customizer();
|
200 |
+
|
201 |
+
|
202 |
+
}elseif ( $_POST['import'] == 'import-customizer' ) {
|
203 |
+
illdy_companion_add_default_customizer();
|
204 |
+
}elseif ( $_POST['import'] == 'import-widgets' ) {
|
205 |
+
illdy_companion_add_default_widgets();
|
206 |
+
}
|
207 |
+
|
208 |
+
$illdy_show_required_actions = get_option('illdy_show_required_actions');
|
209 |
+
$illdy_show_required_actions['illdy-req-import-content'] = true;
|
210 |
+
update_option( 'illdy_show_required_actions',$illdy_show_required_actions );
|
211 |
+
|
212 |
+
echo 'succes';
|
213 |
+
}else{
|
214 |
+
echo 'error';
|
215 |
+
}
|
216 |
+
|
217 |
+
exit();
|
218 |
+
|
219 |
+
}
|
220 |
+
|
221 |
+
|
222 |
+
// Check if customizer textareas exists
|
223 |
+
function illdy_companion_customize_register( $wp_customize ) {
|
224 |
+
|
225 |
+
// Set prefix
|
226 |
+
$prefix = 'illdy';
|
227 |
+
|
228 |
+
if ( !$wp_customize->get_setting($prefix .'_services_general_entry') ) {
|
229 |
+
|
230 |
+
$wp_customize->add_setting( $prefix .'_services_general_entry',
|
231 |
+
array(
|
232 |
+
'sanitize_callback' => 'illdy_sanitize_html',
|
233 |
+
'default' => __( 'In order to help you grow your business, our carefully selected experts can advise you in in the following areas:', 'illdy-companion' ),
|
234 |
+
'transport' => 'postMessage'
|
235 |
+
)
|
236 |
+
);
|
237 |
+
$wp_customize->add_control(
|
238 |
+
$prefix .'_services_general_entry',
|
239 |
+
array(
|
240 |
+
'label' => __( 'Entry', 'illdy-companion' ),
|
241 |
+
'description' => __( 'Add the content for this section.', 'illdy-companion'),
|
242 |
+
'section' => $prefix . '_services_general',
|
243 |
+
'priority' => 3,
|
244 |
+
'type' => 'textarea'
|
245 |
+
)
|
246 |
+
);
|
247 |
+
|
248 |
+
}
|
249 |
+
|
250 |
+
if ( !$wp_customize->get_setting($prefix .'_team_general_entry') ) {
|
251 |
+
|
252 |
+
$wp_customize->add_setting( $prefix .'_team_general_entry',
|
253 |
+
array(
|
254 |
+
'sanitize_callback' => 'illdy_sanitize_html',
|
255 |
+
'default' => __( 'Meet the people that are going to take your business to the next level.', 'illdy-companion' ),
|
256 |
+
'transport' => 'postMessage'
|
257 |
+
)
|
258 |
+
);
|
259 |
+
$wp_customize->add_control(
|
260 |
+
$prefix .'_team_general_entry',
|
261 |
+
array(
|
262 |
+
'label' => __( 'Entry', 'illdy-companion' ),
|
263 |
+
'description' => __( 'Add the content for this section.', 'illdy-companion'),
|
264 |
+
'section' => $prefix . '_team_general',
|
265 |
+
'priority' => 3,
|
266 |
+
'type' => 'textarea'
|
267 |
+
)
|
268 |
+
);
|
269 |
+
|
270 |
+
}
|
271 |
+
|
272 |
+
|
273 |
+
if ( !$wp_customize->get_setting($prefix .'_about_general_entry') ) {
|
274 |
+
|
275 |
+
$wp_customize->add_setting( $prefix .'_about_general_entry',
|
276 |
+
array(
|
277 |
+
'sanitize_callback' => 'illdy_sanitize_html',
|
278 |
+
'default' => __( 'It is an amazng one-page theme with great features that offers an incredible experience. It is easy to install, make changes, adapt for your business. A modern design with clean lines and styling for a wide variety of content, exactly how a business design should be. You can add as many images as you want to the main header area and turn them into slider.', 'illdy-companion' ),
|
279 |
+
'transport' => 'postMessage'
|
280 |
+
)
|
281 |
+
);
|
282 |
+
$wp_customize->add_control(
|
283 |
+
$prefix .'_about_general_entry',
|
284 |
+
array(
|
285 |
+
'label' => __( 'Entry', 'illdy-companion' ),
|
286 |
+
'description' => __( 'Add the content for this section.', 'illdy-companion'),
|
287 |
+
'section' => $prefix . '_about_general',
|
288 |
+
'priority' => 3,
|
289 |
+
'type' => 'textarea'
|
290 |
+
)
|
291 |
+
);
|
292 |
+
|
293 |
+
}
|
294 |
+
|
295 |
+
|
296 |
+
if ( !$wp_customize->get_setting($prefix .'_about_general_entry') ) {
|
297 |
+
|
298 |
+
$wp_customize->add_setting( $prefix .'_contact_us_general_entry',
|
299 |
+
array(
|
300 |
+
'sanitize_callback' => 'illdy_sanitize_html',
|
301 |
+
'default' => __( 'And we will get in touch as son as possible.', 'illdy-companion' ),
|
302 |
+
'transport' => 'postMessage'
|
303 |
+
)
|
304 |
+
);
|
305 |
+
$wp_customize->add_control(
|
306 |
+
$prefix .'_contact_us_general_entry',
|
307 |
+
array(
|
308 |
+
'label' => __( 'Entry', 'illdy-companion' ),
|
309 |
+
'description' => __( 'Add the content for this section.', 'illdy-companion'),
|
310 |
+
'section' => $prefix . '_contact_us_general',
|
311 |
+
'priority' => 3,
|
312 |
+
'type' => 'textarea'
|
313 |
+
)
|
314 |
+
);
|
315 |
+
|
316 |
+
}
|
317 |
+
|
318 |
+
if ( !$wp_customize->get_setting($prefix .'_jumbotron_general_entry') ) {
|
319 |
+
|
320 |
+
$wp_customize->add_setting( $prefix .'_jumbotron_general_entry',
|
321 |
+
array(
|
322 |
+
'sanitize_callback' => 'illdy_sanitize_html',
|
323 |
+
'default' => __( 'lldy is a great one-page theme, perfect for developers and designers but also for someone who just wants a new website for his business. Try it now!', 'illdy-companion' ),
|
324 |
+
'transport' => 'postMessage'
|
325 |
+
)
|
326 |
+
);
|
327 |
+
$wp_customize->add_control(
|
328 |
+
$prefix .'_jumbotron_general_entry',
|
329 |
+
array(
|
330 |
+
'label' => __( 'Entry', 'illdy-companion' ),
|
331 |
+
'description' => __( 'The content added in this field will show below title.', 'illdy-companion'),
|
332 |
+
'section' => $prefix . '_jumbotron_general',
|
333 |
+
'priority' => 5,
|
334 |
+
'type' => 'textarea'
|
335 |
+
)
|
336 |
+
);
|
337 |
+
|
338 |
+
}
|
339 |
+
|
340 |
+
|
341 |
+
if ( !$wp_customize->get_setting($prefix .'_latest_news_general_entry') ) {
|
342 |
+
|
343 |
+
$wp_customize->add_setting( $prefix .'_latest_news_general_entry',
|
344 |
+
array(
|
345 |
+
'sanitize_callback' => 'illdy_sanitize_html',
|
346 |
+
'default' => __( 'If you are interested in the latest articles in the industry, take a sneak peek at our blog. You have nothing to loose!', 'illdy-companion' ),
|
347 |
+
'transport' => 'postMessage'
|
348 |
+
)
|
349 |
+
);
|
350 |
+
$wp_customize->add_control(
|
351 |
+
$prefix .'_latest_news_general_entry',
|
352 |
+
array(
|
353 |
+
'label' => __( 'Entry', 'illdy-companion' ),
|
354 |
+
'description' => __( 'Add the content for this section.', 'illdy-companion'),
|
355 |
+
'section' => $prefix . '_latest_news_general',
|
356 |
+
'priority' => 3,
|
357 |
+
'type' => 'textarea'
|
358 |
+
)
|
359 |
+
);
|
360 |
+
|
361 |
+
}
|
362 |
+
|
363 |
+
if ( !$wp_customize->get_setting($prefix .'_projects_general_entry') ) {
|
364 |
+
|
365 |
+
$wp_customize->add_setting( $prefix .'_projects_general_entry',
|
366 |
+
array(
|
367 |
+
'sanitize_callback' => 'illdy_sanitize_html',
|
368 |
+
'default' => __( 'You\'ll love our work. Check it out!', 'illdy-companion' ),
|
369 |
+
'transport' => 'postMessage'
|
370 |
+
)
|
371 |
+
);
|
372 |
+
$wp_customize->add_control(
|
373 |
+
$prefix .'_projects_general_entry',
|
374 |
+
array(
|
375 |
+
'label' => __( 'Entry', 'illdy-companion' ),
|
376 |
+
'description' => __( 'Add the content for this section.', 'illdy-companion'),
|
377 |
+
'section' => $prefix . '_projects_general',
|
378 |
+
'priority' => 3,
|
379 |
+
'type' => 'textarea'
|
380 |
+
)
|
381 |
+
);
|
382 |
+
|
383 |
+
}
|
384 |
+
|
385 |
+
}
|
386 |
+
add_action( 'customize_register', 'illdy_companion_customize_register');
|
illdy-demo-content.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="demo_content" class="illdy-tab-pane">
|
2 |
+
<div class="import-full-content">
|
3 |
+
<h1><?php _e( 'Import Demo Content', 'illdy-companion' ) ?></h1>
|
4 |
+
<p><?php _e( 'Here you can make your website to look like our demo', 'illdy-companion' ) ?></p>
|
5 |
+
<p>
|
6 |
+
<a href="#" class="button button-primary" data-action="import-all"><?php _e( 'I want my site to look like your demo', 'illdy-companion' ) ?></a>
|
7 |
+
<span class="spinner"></span>
|
8 |
+
</p>
|
9 |
+
<div class="updated-message"><p><?php _e( 'Content Imported', 'illdy-companion' ) ?></p></div>
|
10 |
+
</div>
|
11 |
+
<br>
|
12 |
+
<hr>
|
13 |
+
<br>
|
14 |
+
<div class="illdy-tab-pane-half illdy-tab-pane-first-half">
|
15 |
+
<h2><?php _e( 'Import only Customizer Settings', 'illdy-companion' ) ?></h2>
|
16 |
+
<p><?php _e( 'I want only to import customizer settings', 'illdy-companion' ) ?></p>
|
17 |
+
<p>
|
18 |
+
<a href="#" class="button button-secondary" data-action="import-customizer"><?php _e( 'Import Customizer Settings', 'illdy-companion' ) ?></a>
|
19 |
+
<span class="spinner"></span>
|
20 |
+
</p>
|
21 |
+
<div class="updated-message"><p><?php _e( 'Content Imported', 'illdy-companion' ) ?></p></div>
|
22 |
+
|
23 |
+
</div>
|
24 |
+
<div class="illdy-tab-pane-half">
|
25 |
+
<h2><?php _e( 'Import only Widgets', 'illdy-companion' ) ?></h2>
|
26 |
+
<p><?php _e( 'I want only to import demo widgets', 'illdy-companion' ) ?></p>
|
27 |
+
<p>
|
28 |
+
<a href="#" class="button button-secondary" data-action="import-widgets"><?php _e( 'Import Widgets', 'illdy-companion' ) ?></a>
|
29 |
+
<span class="spinner"></span>
|
30 |
+
</p>
|
31 |
+
<div class="updated-message"><p><?php _e( 'Content Imported', 'illdy-companion' ) ?></p></div>
|
32 |
+
|
33 |
+
</div>
|
34 |
+
</div>
|
js/admin.js
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function(){
|
2 |
+
jQuery('#demo_content .button').click(function(evt){
|
3 |
+
evt.preventDefault();
|
4 |
+
var currentButton = jQuery(this);
|
5 |
+
jQuery(this).addClass('disabled');
|
6 |
+
jQuery(this).next('.spinner').addClass('is-active');
|
7 |
+
|
8 |
+
var ajaxData = { action: 'illdy_companion_import_content', import: jQuery(this).data('action') };
|
9 |
+
|
10 |
+
jQuery.ajax({
|
11 |
+
type : "POST",
|
12 |
+
data : ajaxData,
|
13 |
+
url : illdyCompanion.ajaxurl,
|
14 |
+
success : function(data){
|
15 |
+
console.log(data);
|
16 |
+
if ( data == 'succes' ) {
|
17 |
+
currentButton.removeClass('disabled');
|
18 |
+
currentButton.next('.spinner').removeClass('is-active');
|
19 |
+
currentButton.parent().parent().find('.updated-message').show();
|
20 |
+
}
|
21 |
+
},
|
22 |
+
|
23 |
+
});
|
24 |
+
|
25 |
+
});
|
26 |
+
});
|
readme.txt
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Plugin Name ===
|
2 |
+
Contributors: colorlibplugins, silkalns
|
3 |
+
Tags: woocommerce, widgets, plugin, demo, companion, home page, one page, parallax, social, portfolio, projects
|
4 |
+
Requires at least: 3.8
|
5 |
+
Tested up to: 4.6
|
6 |
+
Stable tag: 1.0.3
|
7 |
+
License: GPLv3 or later
|
8 |
+
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
+
|
10 |
+
Illdy Companion is a companion plugin for Illdy WordPress theme by Colorlib.com.
|
11 |
+
== Description ==
|
12 |
+
|
13 |
+
Illdy Companion is a companion for Illdy One Page WordPress theme by Colorlib.com. This plugin won't do anything for other free or premium WordPress themes and you need to download and install <a href="https://colorlib.com/wp/themes/illdy/" target="_blank" rel="friend">Illdy</a>. If you are having problems with Illdy theme or its companion plugin the fastest way to receive help is via our theme <a href="http://colorlib.com/wp/forums" target="_blank" rel="friend">support forum</a>.
|
14 |
+
|
15 |
+
This plugin will add necessary WordPress widgets and allow to import demo content which will help you to with website setup.
|
16 |
+
|
17 |
+
While Illdy is a great one page WordPress theme it might not be for everyone therefore you might want to check other free <a href="https://colorlib.com/wp/themes/" target="_blank" rel="friend">WordPress themes</a> that are created by Colorlib.
|
18 |
+
|
19 |
+
|
20 |
+
= Plugin Options =
|
21 |
+
|
22 |
+
* Creates required WordPress widgets to be used in theme
|
23 |
+
* Creates demo(dummy) content for widgets to make them easier to use and understand how they work
|
24 |
+
* Provides and option to import demo(dummy) content.
|
25 |
+
|
26 |
+
= About Colorlib =
|
27 |
+
|
28 |
+
Colorlib is the best and by far the most popular source for free and premium WordPress themes. Our themes has been downloaded over 1,5 million times and are used by developers, webmasters and regular users all over the world. We believe in open source and that's why we have made our themes free to use for private and commercial use.
|
29 |
+
|
30 |
+
= Further Reading =
|
31 |
+
|
32 |
+
If you are new to WordPress but are dedicated to <a href="https://colorlib.com/wp/how-to-make-a-website/" target="_blank" rel="friend">make a website</a> on your own Colorlib is the right place to start. Usually the trickiest part is to choose the right hosting because all hosting providers are not equal. We have outlined the <a href="https://colorlib.com/wp/wordpress-hosting/" target="_blank" rel="friend">best WordPress hosting</a> providers and we hope you'll find them useful. We can also help with WordPress related <a href="https://colorlib.com/wp/fix-error-establishing-database-connection-wordpress/" target="_blank" rel="friend">errors</a> and problems.
|
33 |
+
|
34 |
+
|
35 |
+
== Installation ==
|
36 |
+
|
37 |
+
This section describes how to install the plugin and get it working.
|
38 |
+
|
39 |
+
1. Upload the whole contents of the folder `illdy-companion` to the `/wp-content/plugins/` directory
|
40 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress dashboard
|
41 |
+
3. Enjoy using it :)
|
42 |
+
|
43 |
+
|
44 |
+
== Screenshots ==
|
45 |
+
|
46 |
+
1. Screenshot of the Illdy companion plugin's demo content import option which you can find under Appearance - About Illdy in your WordPress dashboard.
|
47 |
+
|
48 |
+
== Frequently Asked Questions ==
|
49 |
+
|
50 |
+
= What themes this plugin supports? =
|
51 |
+
|
52 |
+
Currently it works only with Illdy theme.
|
53 |
+
|
54 |
+
= Am I obligated to use it? =
|
55 |
+
|
56 |
+
You can still use Illdy theme without this plugin but you won't be able to import demo content and use theme spefif widgets that you see on front page of theme demo.
|
57 |
+
|
58 |
+
== Changelog ==
|
59 |
+
|
60 |
+
= 1.0.2 =
|
61 |
+
* Updated description to reflect release of Illdy theme on WordPress.org
|
62 |
+
|
63 |
+
= 1.0.1 =
|
64 |
+
* Small tweaks and bug fixes
|
65 |
+
|
66 |
+
= 1.0.0 =
|
67 |
+
* Initial release
|
widgets/class-widget-counter.php
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Illdy_Widget_Counter extends WP_Widget {
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Register widget with WordPress.
|
6 |
+
*/
|
7 |
+
function __construct() {
|
8 |
+
parent::__construct( 'illdy_counter', __( '[Illdy] - Counter', 'illdy' ), array( 'description' => __( 'Add this widget in "Front page - Counter Sidebar".', 'illdy' ), ) );
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Front-end display of widget.
|
13 |
+
*
|
14 |
+
* @see WP_Widget::widget()
|
15 |
+
*
|
16 |
+
* @param array $args Widget arguments.
|
17 |
+
* @param array $instance Saved values from database.
|
18 |
+
*/
|
19 |
+
public function widget( $args, $instance ) {
|
20 |
+
echo $args['before_widget'];
|
21 |
+
|
22 |
+
$title = ( !empty( $instance['title'] ) ? esc_html( $instance['title'] ) : '' );
|
23 |
+
$data_from = ( !empty( $instance['data_from'] ) ? absint( $instance['data_from'] ) : '' );
|
24 |
+
$data_to = ( !empty( $instance['data_to'] ) ? absint( $instance['data_to'] ) : '' );
|
25 |
+
$data_speed = ( !empty( $instance['data_speed'] ) ? absint( $instance['data_speed'] ) : '' );
|
26 |
+
$data_refresh_interval = ( !empty( $instance['data_refresh_interval'] ) ? absint( $instance['data_refresh_interval'] ) : '' );
|
27 |
+
|
28 |
+
$output = '';
|
29 |
+
|
30 |
+
$output .= '<span class="counter-number" data-from="'. $data_from .'" data-to="'. $data_to .'" data-speed="'. $data_speed .'" data-refresh-interval="'. $data_refresh_interval .'"></span>';
|
31 |
+
$output .= '<span class="counter-description">'. $title .'</span>';
|
32 |
+
|
33 |
+
echo $output;
|
34 |
+
|
35 |
+
echo $args['after_widget'];
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Back-end widget form.
|
40 |
+
*
|
41 |
+
* @see WP_Widget::form()
|
42 |
+
*
|
43 |
+
* @param array $instance Previously saved values from database.
|
44 |
+
*/
|
45 |
+
public function form( $instance ) {
|
46 |
+
$title = ! empty( $instance['title'] ) ? esc_html( $instance['title'] ) : __( '[Illdy] - Recent Posts', 'illdy' );
|
47 |
+
$data_from = ! empty( $instance['data_from'] ) ? absint( $instance['data_from'] ) : __( '1', 'illdy' );
|
48 |
+
$data_to = ! empty( $instance['data_to'] ) ? absint( $instance['data_to'] ) : __( '260', 'illdy' );
|
49 |
+
$data_speed = ! empty( $instance['data_speed'] ) ? absint( $instance['data_speed'] ) : __( '2000', 'illdy' );
|
50 |
+
$data_refresh_interval = ! empty( $instance['data_refresh_interval'] ) ? absint( $instance['data_refresh_interval'] ) : __( '100', 'illdy' );
|
51 |
+
?>
|
52 |
+
<p>
|
53 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'illdy' ); ?></label>
|
54 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>">
|
55 |
+
</p>
|
56 |
+
|
57 |
+
<p>
|
58 |
+
<label for="<?php echo $this->get_field_id( 'data_from' ); ?>"><?php _e( 'Data from:', 'illdy' ); ?></label>
|
59 |
+
<span class="widefat" style="font-style: italic; display: block;"><?php _e( 'The number the element should start at.', 'illdy' ); ?></span>
|
60 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'data_from' ); ?>" name="<?php echo $this->get_field_name( 'data_from' ); ?>" type="number" value="<?php echo esc_attr( $data_from ); ?>">
|
61 |
+
</p>
|
62 |
+
|
63 |
+
<p>
|
64 |
+
<label for="<?php echo $this->get_field_id( 'data_to' ); ?>"><?php _e( 'Data to:', 'illdy' ); ?></label>
|
65 |
+
<span class="widefat" style="font-style: italic; display: block;"><?php _e( 'The number the element should end at.', 'illdy' ); ?></span>
|
66 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'data_to' ); ?>" name="<?php echo $this->get_field_name( 'data_to' ); ?>" type="number" value="<?php echo esc_attr( $data_to ); ?>">
|
67 |
+
</p>
|
68 |
+
|
69 |
+
<p>
|
70 |
+
<label for="<?php echo $this->get_field_id( 'data_speed' ); ?>"><?php _e( 'Data speed:', 'illdy' ); ?></label>
|
71 |
+
<span class="widefat" style="font-style: italic; display: block;"><?php _e( 'How long it should take to count between the target numbers.', 'illdy' ); ?></span>
|
72 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'data_speed' ); ?>" name="<?php echo $this->get_field_name( 'data_speed' ); ?>" type="number" value="<?php echo esc_attr( $data_speed ); ?>">
|
73 |
+
</p>
|
74 |
+
|
75 |
+
<p>
|
76 |
+
<label for="<?php echo $this->get_field_id( 'data_refresh_interval' ); ?>"><?php _e( 'Data refresh interval:', 'illdy' ); ?></label>
|
77 |
+
<span class="widefat" style="font-style: italic; display: block;"><?php _e( 'How often the element should be updated.', 'illdy' ); ?></span>
|
78 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'data_refresh_interval' ); ?>" name="<?php echo $this->get_field_name( 'data_refresh_interval' ); ?>" type="number" value="<?php echo esc_attr( $data_refresh_interval ); ?>">
|
79 |
+
</p>
|
80 |
+
<?php
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Sanitize widget form values as they are saved.
|
85 |
+
*
|
86 |
+
* @see WP_Widget::update()
|
87 |
+
*
|
88 |
+
* @param array $new_instance Values just sent to be saved.
|
89 |
+
* @param array $old_instance Previously saved values from database.
|
90 |
+
*
|
91 |
+
* @return array Updated safe values to be saved.
|
92 |
+
*/
|
93 |
+
public function update( $new_instance, $old_instance ) {
|
94 |
+
$instance = array();
|
95 |
+
$instance['title'] = ( !empty( $new_instance['title'] ) ) ? esc_html( $new_instance['title'] ) : '';
|
96 |
+
$instance['data_from'] = ( !empty( $new_instance['data_from'] ) ) ? absint( $new_instance['data_from'] ) : '';
|
97 |
+
$instance['data_to'] = ( !empty( $new_instance['data_to'] ) ) ? absint( $new_instance['data_to'] ) : '';
|
98 |
+
$instance['data_speed'] = ( !empty( $new_instance['data_speed'] ) ) ? absint( $new_instance['data_speed'] ) : '';
|
99 |
+
$instance['data_refresh_interval'] = ( !empty( $new_instance['data_refresh_interval'] ) ) ? absint( $new_instance['data_refresh_interval'] ) : '';
|
100 |
+
|
101 |
+
return $instance;
|
102 |
+
}
|
103 |
+
|
104 |
+
}
|
105 |
+
|
106 |
+
function illdy_register_widget_counter () {
|
107 |
+
register_widget( 'Illdy_Widget_Counter' );
|
108 |
+
}
|
109 |
+
add_action( 'widgets_init', 'illdy_register_widget_counter' );
|
widgets/class-widget-person.php
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Illdy_Widget_Person extends WP_Widget {
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Register widget with WordPress.
|
6 |
+
*/
|
7 |
+
function __construct() {
|
8 |
+
parent::__construct( 'illdy_person', __( '[Illdy] - Person', 'illdy' ), array( 'description' => __( 'Add this widget in "Front page - Team Sidebar".', 'illdy' ), ) );
|
9 |
+
|
10 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
11 |
+
add_action( 'admin_footer-widgets.php', array( $this, 'print_scripts' ), 9999 );
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Enqueue Scripts
|
16 |
+
*/
|
17 |
+
public function enqueue_scripts() {
|
18 |
+
wp_enqueue_style( 'wp-color-picker' );
|
19 |
+
wp_enqueue_script( 'wp-color-picker' );
|
20 |
+
wp_enqueue_script( 'underscore' );
|
21 |
+
wp_enqueue_media();
|
22 |
+
wp_enqueue_script( 'illdy-widget-upload-image', get_template_directory_uri() . '/layout/js/widget-upload-image/widget-upload-image.min.js', false, '1.0', true);
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Print scripts.
|
27 |
+
*
|
28 |
+
* @since 1.0
|
29 |
+
*/
|
30 |
+
public function print_scripts() {
|
31 |
+
?>
|
32 |
+
<script>
|
33 |
+
( function( $ ){
|
34 |
+
function initColorPicker( widget ) {
|
35 |
+
widget.find( '.color-picker' ).wpColorPicker( {
|
36 |
+
change: _.throttle( function() { // For Customizer
|
37 |
+
$(this).trigger( 'change' );
|
38 |
+
}, 3000 )
|
39 |
+
});
|
40 |
+
}
|
41 |
+
|
42 |
+
function onFormUpdate( event, widget ) {
|
43 |
+
initColorPicker( widget );
|
44 |
+
}
|
45 |
+
|
46 |
+
$( document ).on( 'widget-added widget-updated', onFormUpdate );
|
47 |
+
|
48 |
+
$( document ).ready( function() {
|
49 |
+
$( '#widgets-right .widget:has(.color-picker)' ).each( function () {
|
50 |
+
initColorPicker( $( this ) );
|
51 |
+
} );
|
52 |
+
} );
|
53 |
+
}( jQuery ) );
|
54 |
+
</script>
|
55 |
+
<?php
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Front-end display of widget.
|
60 |
+
*
|
61 |
+
* @see WP_Widget::widget()
|
62 |
+
*
|
63 |
+
* @param array $args Widget arguments.
|
64 |
+
* @param array $instance Saved values from database.
|
65 |
+
*/
|
66 |
+
public function widget( $args, $instance ) {
|
67 |
+
echo $args['before_widget'];
|
68 |
+
|
69 |
+
$title = ( !empty( $instance['title'] ) ? esc_html( $instance['title'] ) : '' );
|
70 |
+
$image = !empty( $instance['image'] ) ? esc_url( $instance['image'] ) : '';
|
71 |
+
$position = ( !empty( $instance['position'] ) ? esc_html( $instance['position'] ) : '' );
|
72 |
+
$entry = ( !empty( $instance['entry'] ) ? esc_html( $instance['entry'] ) : '' );
|
73 |
+
$facebook_url = !empty( $instance['facebook_url'] ) ? esc_url( $instance['facebook_url'] ) : '';
|
74 |
+
$twitter_url = !empty( $instance['twitter_url'] ) ? esc_url( $instance['twitter_url'] ) : '';
|
75 |
+
$linkedin_url = !empty( $instance['linkedin_url'] ) ? esc_url( $instance['linkedin_url'] ) : '';
|
76 |
+
$color = ( !empty( $instance['color'] ) ? esc_attr( $instance['color'] ) : '#000000' );
|
77 |
+
|
78 |
+
$image_id = illdy_get_image_id_from_image_url( $image );
|
79 |
+
$get_attachment_image_src = wp_get_attachment_image_src( $image_id, 'illdy-front-page-person' );
|
80 |
+
|
81 |
+
$output = '';
|
82 |
+
|
83 |
+
$output .= '<div class="person clearfix" data-person-color="'. $color .'">';
|
84 |
+
$output .= '<div class="person-image">';
|
85 |
+
$output .= ( $image_id ? '<img src="'. $get_attachment_image_src[0] .'" alt="'. $title .'" title="'. $title .'" />' : ( $image ? '<img src="'. get_template_directory_uri() . $image .'" alt="'. $title .'" title="'. $title .'" />' : '' ) );
|
86 |
+
$output .= '</div><!--/.person-image-->';
|
87 |
+
$output .= '<div class="person-content">';
|
88 |
+
$output .= '<h4>'. $title .'</h4>';
|
89 |
+
$output .= '<h5>'. $position .'</h5>';
|
90 |
+
$output .= '<p>'. $entry .'</p>';
|
91 |
+
$output .= '<ul class="person-content-social clearfix">';
|
92 |
+
$output .= ( $facebook_url ) ? '<li><a href="'. $facebook_url .'" title="'. __( 'Facebook', 'illdy' ) .'" target="_blank" rel="nofollow"><i class="fa fa-facebook"></i></a></li>' : '';
|
93 |
+
$output .= ( $twitter_url ) ? '<li><a href="'. $twitter_url .'" title="'. __( 'Twitter', 'illdy' ) .'"><i class="fa fa-twitter" target="_blank" rel="nofollow"></i></a></li>' : '';
|
94 |
+
$output .= ( $linkedin_url ) ? '<li><a href="'. $linkedin_url .'" title="'. __( 'LinkedIn', 'illdy' ) .'"><i class="fa fa-linkedin" target="_blank" rel="nofollow"></i></a></li>' : '';
|
95 |
+
$output .= '</ul><!--/.person-content-social.clearfix-->';
|
96 |
+
$output .= '</div><!--/.person-content-->';
|
97 |
+
$output .= '</div><!--/.person.clearfix-->';
|
98 |
+
|
99 |
+
echo $output;
|
100 |
+
|
101 |
+
echo $args['after_widget'];
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Back-end widget form.
|
106 |
+
*
|
107 |
+
* @see WP_Widget::form()
|
108 |
+
*
|
109 |
+
* @param array $instance Previously saved values from database.
|
110 |
+
*/
|
111 |
+
public function form( $instance ) {
|
112 |
+
$title = ! empty( $instance['title'] ) ? sanitize_text_field( $instance['title'] ) : __( '[Illdy] - Person', 'illdy' );
|
113 |
+
$image = !empty( $instance['image'] ) ? esc_url( $instance['image'] ) : esc_url( get_template_directory_uri() . '/layout/images/front-page/front-page-project-1.jpg' );
|
114 |
+
$position = ! empty( $instance['position'] ) ? sanitize_text_field( $instance['position'] ) : '';
|
115 |
+
$entry = ! empty( $instance['entry'] ) ? sanitize_text_field( $instance['entry'] ) : '';
|
116 |
+
$facebook_url = !empty( $instance['facebook_url'] ) ? esc_url( $instance['facebook_url'] ) : '';
|
117 |
+
$twitter_url = !empty( $instance['twitter_url'] ) ? esc_url( $instance['twitter_url'] ) : '';
|
118 |
+
$linkedin_url = !empty( $instance['linkedin_url'] ) ? esc_url( $instance['linkedin_url'] ) : '';
|
119 |
+
$color = !empty( $instance['color'] ) ? esc_attr( $instance['color'] ) : '';
|
120 |
+
?>
|
121 |
+
|
122 |
+
<p>
|
123 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'illdy' ); ?></label>
|
124 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>">
|
125 |
+
</p>
|
126 |
+
|
127 |
+
<p>
|
128 |
+
<label for="<?php echo $this->get_field_name( 'image' ); ?>"><?php _e( 'Image:', 'illdy' ); ?></label>
|
129 |
+
<input type="text" class="widefat custom_media_url_<?php echo $this->get_field_id( 'image' ); ?>" name="<?php echo $this->get_field_name( 'image' ); ?>" id="<?php echo $this->get_field_id( 'image' ); ?>" value="<?php if( !empty( $instance['image'] ) ): echo $instance['image']; else: get_template_directory_uri() . '/layout/images/front-page/front-page-project-1.jpg'; endif; ?>" style="margin-top:5px;">
|
130 |
+
<input type="button" class="button button-primary custom_media_button" id="custom_media_button_service" data-fieldid="<?php echo $this->get_field_id( 'image' ); ?>" name="<?php echo $this->get_field_name( 'image' ); ?>" value="<?php _e( 'Upload Image','illdy' ); ?>" style="margin-top: 5px;">
|
131 |
+
</p>
|
132 |
+
|
133 |
+
<p>
|
134 |
+
<label for="<?php echo $this->get_field_id( 'position' ); ?>"><?php _e( 'Position:', 'illdy' ); ?></label>
|
135 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'position' ); ?>" name="<?php echo $this->get_field_name( 'position' ); ?>" type="text" value="<?php echo esc_attr( $position ); ?>">
|
136 |
+
</p>
|
137 |
+
|
138 |
+
<p>
|
139 |
+
<label for="<?php echo $this->get_field_id( 'entry' ); ?>"><?php _e( 'Entry:', 'illdy' ); ?></label>
|
140 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'entry' ); ?>" name="<?php echo $this->get_field_name( 'entry' ); ?>" type="text" value="<?php echo esc_attr( $entry ); ?>">
|
141 |
+
</p>
|
142 |
+
|
143 |
+
<p>
|
144 |
+
<label for="<?php echo $this->get_field_id( 'facebook_url' ); ?>"><?php _e( 'Facebook URL:', 'illdy' ); ?></label>
|
145 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'facebook_url' ); ?>" name="<?php echo $this->get_field_name( 'facebook_url' ); ?>" type="text" value="<?php echo esc_attr( $facebook_url ); ?>">
|
146 |
+
</p>
|
147 |
+
|
148 |
+
<p>
|
149 |
+
<label for="<?php echo $this->get_field_id( 'twitter_url' ); ?>"><?php _e( 'Twitter URL:', 'illdy' ); ?></label>
|
150 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'twitter_url' ); ?>" name="<?php echo $this->get_field_name( 'twitter_url' ); ?>" type="text" value="<?php echo esc_attr( $twitter_url ); ?>">
|
151 |
+
</p>
|
152 |
+
|
153 |
+
<p>
|
154 |
+
<label for="<?php echo $this->get_field_id( 'linkedin_url' ); ?>"><?php _e( 'LinkedIn URL:', 'illdy' ); ?></label>
|
155 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'linkedin_url' ); ?>" name="<?php echo $this->get_field_name( 'linkedin_url' ); ?>" type="text" value="<?php echo esc_attr( $linkedin_url ); ?>">
|
156 |
+
</p>
|
157 |
+
|
158 |
+
<p>
|
159 |
+
<label for="<?php echo $this->get_field_id( 'color' ); ?>"><?php _e( 'Color:', 'illdy' ); ?></label><br>
|
160 |
+
<input type="text" name="<?php echo $this->get_field_name( 'color' ); ?>" class="color-picker" id="<?php echo $this->get_field_id( 'color' ); ?>" value="<?php echo $color; ?>" data-default-color="#000000" />
|
161 |
+
</p>
|
162 |
+
<?php
|
163 |
+
}
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Sanitize widget form values as they are saved.
|
167 |
+
*
|
168 |
+
* @see WP_Widget::update()
|
169 |
+
*
|
170 |
+
* @param array $new_instance Values just sent to be saved.
|
171 |
+
* @param array $old_instance Previously saved values from database.
|
172 |
+
*
|
173 |
+
* @return array Updated safe values to be saved.
|
174 |
+
*/
|
175 |
+
public function update( $new_instance, $old_instance ) {
|
176 |
+
$instance = array();
|
177 |
+
$instance['title'] = ( !empty( $new_instance['title'] ) ) ? esc_html( $new_instance['title'] ) : '';
|
178 |
+
$instance['image'] = !empty( $new_instance['image'] ) ? esc_url( $new_instance['image'] ) : '';
|
179 |
+
$instance['position'] = ( !empty( $new_instance['position'] ) ) ? esc_html( $new_instance['position'] ) : '';
|
180 |
+
$instance['entry'] = ( !empty( $new_instance['entry'] ) ) ? esc_html( $new_instance['entry'] ) : '';
|
181 |
+
$instance['facebook_url'] = ( !empty( $new_instance['facebook_url'] ) ? esc_url( $new_instance['facebook_url'] ) : '' );
|
182 |
+
$instance['twitter_url'] = ( !empty( $new_instance['twitter_url'] ) ? esc_url( $new_instance['twitter_url'] ) : '' );
|
183 |
+
$instance['linkedin_url'] = ( !empty( $new_instance['linkedin_url'] ) ? esc_url( $new_instance['linkedin_url'] ) : '' );
|
184 |
+
$instance['color'] = ( !empty( $new_instance['color'] ) ? esc_html( $new_instance['color'] ) : '' );
|
185 |
+
|
186 |
+
return $instance;
|
187 |
+
}
|
188 |
+
|
189 |
+
}
|
190 |
+
|
191 |
+
function illdy_register_widget_person () {
|
192 |
+
register_widget( 'Illdy_Widget_Person' );
|
193 |
+
}
|
194 |
+
add_action( 'widgets_init', 'illdy_register_widget_person' );
|
widgets/class-widget-project.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Illdy_Widget_Project extends WP_Widget {
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Register widget with WordPress.
|
6 |
+
*/
|
7 |
+
function __construct() {
|
8 |
+
parent::__construct( 'illdy_project', __( '[Illdy] - Project', 'illdy' ), array( 'description' => __( 'Add this widget in "Front page - Projects Sidebar".', 'illdy' ), ) );
|
9 |
+
|
10 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Enqueue Scripts
|
15 |
+
*/
|
16 |
+
public function enqueue_scripts() {
|
17 |
+
wp_enqueue_media();
|
18 |
+
wp_enqueue_script( 'illdy-widget-upload-image', get_template_directory_uri() . '/layout/js/widget-upload-image/widget-upload-image.js', false, '1.0', true);
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Front-end display of widget.
|
23 |
+
*
|
24 |
+
* @see WP_Widget::widget()
|
25 |
+
*
|
26 |
+
* @param array $args Widget arguments.
|
27 |
+
* @param array $instance Saved values from database.
|
28 |
+
*/
|
29 |
+
public function widget( $args, $instance ) {
|
30 |
+
echo $args['before_widget'];
|
31 |
+
|
32 |
+
$title = ( !empty( $instance['title'] ) ? esc_html( $instance['title'] ) : '' );
|
33 |
+
$image = !empty( $instance['image'] ) ? esc_url( $instance['image'] ) : '';
|
34 |
+
$url = !empty( $instance['url'] ) ? sanitize_text_field( $instance['url'] ) : esc_url( '#' );
|
35 |
+
|
36 |
+
$image_id = illdy_get_image_id_from_image_url( $image );
|
37 |
+
$get_attachment_image_src = wp_get_attachment_image_src( $image_id, 'illdy-front-page-projects' );
|
38 |
+
|
39 |
+
$output = '<a href="'. $url .'" title="'. $title .'" class="project" style="background-image: url('. ( $image_id ? esc_url( $get_attachment_image_src[0] ) : get_template_directory_uri() . $image ) .');"><span class="project-overlay"></span></a>';
|
40 |
+
|
41 |
+
echo $output;
|
42 |
+
|
43 |
+
echo $args['after_widget'];
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Back-end widget form.
|
48 |
+
*
|
49 |
+
* @see WP_Widget::form()
|
50 |
+
*
|
51 |
+
* @param array $instance Previously saved values from database.
|
52 |
+
*/
|
53 |
+
public function form( $instance ) {
|
54 |
+
$title = !empty( $instance['title'] ) ? sanitize_text_field( $instance['title'] ) : __( '[Illdy] - Project', 'illdy' );
|
55 |
+
$image = !empty( $instance['image'] ) ? esc_url( $instance['image'] ) : '';
|
56 |
+
$url = !empty( $instance['url'] ) ? sanitize_text_field( $instance['url'] ) : esc_url( '#' );
|
57 |
+
?>
|
58 |
+
<p>
|
59 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'illdy' ); ?></label>
|
60 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>">
|
61 |
+
</p>
|
62 |
+
|
63 |
+
<p>
|
64 |
+
<label for="<?php echo $this->get_field_name( 'image' ); ?>"><?php _e( 'Image:', 'illdy' ); ?></label>
|
65 |
+
<input type="text" class="widefat custom_media_url_<?php echo $this->get_field_id( 'image' ); ?>" name="<?php echo $this->get_field_name( 'image' ); ?>" id="<?php echo $this->get_field_id( 'image' ); ?>" value="<?php if( !empty( $instance['image'] ) ): echo $instance['image']; else: get_template_directory_uri() . '/layout/images/front-page/front-page-project-1.jpg'; endif; ?>" style="margin-top:5px;">
|
66 |
+
<input type="button" class="button button-primary custom_media_button" id="custom_media_button_service" data-fieldid="<?php echo $this->get_field_id( 'image' ); ?>" name="<?php echo $this->get_field_name( 'image' ); ?>" value="<?php _e( 'Upload Image','illdy' ); ?>" style="margin-top: 5px;">
|
67 |
+
</p>
|
68 |
+
|
69 |
+
<p>
|
70 |
+
<label for="<?php echo $this->get_field_id( 'url' ); ?>"><?php _e( 'URL:', 'illdy' ); ?></label>
|
71 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'url' ); ?>" name="<?php echo $this->get_field_name( 'url' ); ?>" type="text" value="<?php echo esc_attr( $url ); ?>">
|
72 |
+
</p>
|
73 |
+
<?php
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Sanitize widget form values as they are saved.
|
78 |
+
*
|
79 |
+
* @see WP_Widget::update()
|
80 |
+
*
|
81 |
+
* @param array $new_instance Values just sent to be saved.
|
82 |
+
* @param array $old_instance Previously saved values from database.
|
83 |
+
*
|
84 |
+
* @return array Updated safe values to be saved.
|
85 |
+
*/
|
86 |
+
public function update( $new_instance, $old_instance ) {
|
87 |
+
$instance = array();
|
88 |
+
$instance['title'] = ( !empty( $new_instance['title'] ) ) ? esc_html( $new_instance['title'] ) : '';
|
89 |
+
$instance['image'] = !empty( $new_instance['image'] ) ? esc_url( $new_instance['image'] ) : '';
|
90 |
+
$instance['url'] = ( !empty( $new_instance['url'] ) ? esc_url( $new_instance['url'] ) : '' );
|
91 |
+
|
92 |
+
return $instance;
|
93 |
+
}
|
94 |
+
|
95 |
+
}
|
96 |
+
|
97 |
+
function illdy_register_widget_project () {
|
98 |
+
register_widget( 'Illdy_Widget_Project' );
|
99 |
+
}
|
100 |
+
add_action( 'widgets_init', 'illdy_register_widget_project' );
|
widgets/class-widget-recent-posts.php
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Illdy_Widget_Recent_Posts extends WP_Widget {
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Register widget with WordPress.
|
6 |
+
*/
|
7 |
+
function __construct() {
|
8 |
+
parent::__construct( 'illdy_recent_posts', __( '[Illdy] - Recent Posts', 'illdy' ), array( 'description' => __( 'Thiw widget will display the latest posts with thumbnail image on the left side.', 'illdy' ), ) );
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Front-end display of widget.
|
13 |
+
*
|
14 |
+
* @see WP_Widget::widget()
|
15 |
+
*
|
16 |
+
* @param array $args Widget arguments.
|
17 |
+
* @param array $instance Saved values from database.
|
18 |
+
*/
|
19 |
+
public function widget( $args, $instance ) {
|
20 |
+
echo $args['before_widget'];
|
21 |
+
|
22 |
+
$display_title = !empty( $instance['display_title'] ) ? $instance['display_title'] : '';
|
23 |
+
$numberofposts = !empty( $instance['numberofposts'] ) ? absint( $instance['numberofposts'] ) : '';
|
24 |
+
|
25 |
+
if( $display_title == 'on' ) {
|
26 |
+
if ( !empty( $instance['title'] ) ) {
|
27 |
+
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
$post_query_args = array (
|
32 |
+
'post_type' => array( 'post' ),
|
33 |
+
'pagination' => false,
|
34 |
+
'posts_per_page' => $numberofposts,
|
35 |
+
'ignore_sticky_posts' => true,
|
36 |
+
'cache_results' => true,
|
37 |
+
'update_post_meta_cache' => true,
|
38 |
+
'update_post_term_cache' => true,
|
39 |
+
);
|
40 |
+
|
41 |
+
$post_query = new WP_Query( $post_query_args );
|
42 |
+
|
43 |
+
if( $post_query->have_posts() ) {
|
44 |
+
while( $post_query->have_posts() ) {
|
45 |
+
$post_query->the_post();
|
46 |
+
|
47 |
+
global $post;
|
48 |
+
|
49 |
+
$output = '';
|
50 |
+
|
51 |
+
$output .= '<div class="widget-recent-post clearfix">';
|
52 |
+
$output .= ( has_post_thumbnail( $post->ID ) ? '<div class="recent-post-image">' : '' );
|
53 |
+
$output .= ( has_post_thumbnail( $post->ID ) ? get_the_post_thumbnail( $post->ID, 'illdy-widget-recent-posts' ) : '' );
|
54 |
+
$output .= ( has_post_thumbnail( $post->ID ) ? '</div><!--/.recent-post-image-->' : '' );
|
55 |
+
$output .= '<a href="'. esc_url( get_the_permalink() ) .'" title="'. esc_attr( get_the_title() ) .'" class="recent-post-title">'. esc_html( get_the_title() ) .'</a>';
|
56 |
+
$output .= '<a href="'. esc_url( get_the_permalink() ) .'" title="'. __( 'More...', 'illdy' ) .'" class="recent-post-button">'. __( 'More...', 'illdy' ) .'</a>';
|
57 |
+
$output .= '</div><!--/.widget-recent-post.clearfix-->';
|
58 |
+
|
59 |
+
echo $output;
|
60 |
+
|
61 |
+
}
|
62 |
+
} else {
|
63 |
+
echo __( 'No posts found.', 'illdy' );
|
64 |
+
}
|
65 |
+
|
66 |
+
wp_reset_postdata();
|
67 |
+
|
68 |
+
echo $args['after_widget'];
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Back-end widget form.
|
73 |
+
*
|
74 |
+
* @see WP_Widget::form()
|
75 |
+
*
|
76 |
+
* @param array $instance Previously saved values from database.
|
77 |
+
*/
|
78 |
+
public function form( $instance ) {
|
79 |
+
$display_title = !empty( $instance['display_title'] ) ? $instance['display_title'] : '';
|
80 |
+
$title = ! empty( $instance['title'] ) ? sanitize_text_field( $instance['title'] ) : __( '[Illdy] - Recent Posts', 'illdy' );
|
81 |
+
$numberofposts = !empty( $instance['numberofposts'] ) ? absint( $instance['numberofposts'] ) : __( '4', 'illdy' );
|
82 |
+
?>
|
83 |
+
|
84 |
+
<p>
|
85 |
+
<input class="checkbox" type="checkbox" <?php if( $display_title == 'on' ): echo 'checked="checked"'; endif; ?> id="<?php echo $this->get_field_id( 'display_title' ); ?>" name="<?php echo $this->get_field_name( 'display_title' ); ?>" />
|
86 |
+
<label for="<?php echo $this->get_field_id( 'display_title' ); ?>"><?php _e( 'Display title?', 'illdy' ); ?></label>
|
87 |
+
</p>
|
88 |
+
|
89 |
+
<p>
|
90 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'illdy' ); ?></label>
|
91 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>">
|
92 |
+
</p>
|
93 |
+
|
94 |
+
<p>
|
95 |
+
<label for="<?php echo $this->get_field_id( 'numberofposts' ); ?>"><?php _e( 'Number of posts:', 'illdy' ); ?></label>
|
96 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'numberofposts' ); ?>" name="<?php echo $this->get_field_name( 'numberofposts' ); ?>" type="number" value="<?php echo esc_attr( $numberofposts ); ?>">
|
97 |
+
</p>
|
98 |
+
<?php
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Sanitize widget form values as they are saved.
|
103 |
+
*
|
104 |
+
* @see WP_Widget::update()
|
105 |
+
*
|
106 |
+
* @param array $new_instance Values just sent to be saved.
|
107 |
+
* @param array $old_instance Previously saved values from database.
|
108 |
+
*
|
109 |
+
* @return array Updated safe values to be saved.
|
110 |
+
*/
|
111 |
+
public function update( $new_instance, $old_instance ) {
|
112 |
+
$instance = array();
|
113 |
+
$instance['display_title'] = $new_instance['display_title'];
|
114 |
+
$instance['title'] = ( !empty( $new_instance['title'] ) ) ? esc_html( $new_instance['title'] ) : '';
|
115 |
+
$instance['numberofposts'] = ( !empty( $new_instance['numberofposts'] ) ? absint( $new_instance['numberofposts'] ) : '' );
|
116 |
+
|
117 |
+
return $instance;
|
118 |
+
}
|
119 |
+
|
120 |
+
}
|
121 |
+
|
122 |
+
function illdy_register_widget_recent_posts () {
|
123 |
+
register_widget( 'Illdy_Widget_Recent_Posts' );
|
124 |
+
}
|
125 |
+
add_action( 'widgets_init', 'illdy_register_widget_recent_posts' );
|
widgets/class-widget-service.php
ADDED
@@ -0,0 +1,819 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Illdy_Widget_Service extends WP_Widget {
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Register widget with WordPress.
|
6 |
+
*/
|
7 |
+
function __construct() {
|
8 |
+
parent::__construct( 'illdy_service', __( '[Illdy] - Service', 'illdy' ), array( 'description' => __( 'Add this widget in "Front page - Services Sidebar".', 'illdy' ), ) );
|
9 |
+
|
10 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
11 |
+
add_action( 'admin_footer-widgets.php', array( $this, 'print_scripts' ), 9999 );
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Enqueue scripts.
|
16 |
+
*
|
17 |
+
* @since 1.0
|
18 |
+
*
|
19 |
+
* @param string $hook_suffix
|
20 |
+
*/
|
21 |
+
public function enqueue_scripts( $hook_suffix ) {
|
22 |
+
if ( 'widgets.php' !== $hook_suffix ) {
|
23 |
+
return;
|
24 |
+
}
|
25 |
+
|
26 |
+
wp_enqueue_style( 'wp-color-picker' );
|
27 |
+
wp_enqueue_script( 'wp-color-picker' );
|
28 |
+
wp_enqueue_script( 'underscore' );
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Print scripts.
|
33 |
+
*
|
34 |
+
* @since 1.0
|
35 |
+
*/
|
36 |
+
public function print_scripts() {
|
37 |
+
?>
|
38 |
+
<script>
|
39 |
+
( function( $ ){
|
40 |
+
function initColorPicker( widget ) {
|
41 |
+
widget.find( '.color-picker' ).wpColorPicker( {
|
42 |
+
change: _.throttle( function() { // For Customizer
|
43 |
+
$(this).trigger( 'change' );
|
44 |
+
}, 3000 )
|
45 |
+
});
|
46 |
+
}
|
47 |
+
|
48 |
+
function onFormUpdate( event, widget ) {
|
49 |
+
initColorPicker( widget );
|
50 |
+
}
|
51 |
+
|
52 |
+
$( document ).on( 'widget-added widget-updated', onFormUpdate );
|
53 |
+
|
54 |
+
$( document ).ready( function() {
|
55 |
+
$( '#widgets-right .widget:has(.color-picker)' ).each( function () {
|
56 |
+
initColorPicker( $( this ) );
|
57 |
+
} );
|
58 |
+
} );
|
59 |
+
}( jQuery ) );
|
60 |
+
</script>
|
61 |
+
<?php
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Front-end display of widget.
|
66 |
+
*
|
67 |
+
* @see WP_Widget::widget()
|
68 |
+
*
|
69 |
+
* @param array $args Widget arguments.
|
70 |
+
* @param array $instance Saved values from database.
|
71 |
+
*/
|
72 |
+
public function widget( $args, $instance ) {
|
73 |
+
echo $args['before_widget'];
|
74 |
+
|
75 |
+
$allowed_html = array(
|
76 |
+
'a' => array(
|
77 |
+
'href' => array(),
|
78 |
+
'title' => array()
|
79 |
+
),
|
80 |
+
'br' => array(),
|
81 |
+
'em' => array(),
|
82 |
+
'img' => array(
|
83 |
+
'alt' => array(),
|
84 |
+
'src' => array(),
|
85 |
+
'srcset' => array(),
|
86 |
+
'title' => array()
|
87 |
+
),
|
88 |
+
'strong' => array(),
|
89 |
+
);
|
90 |
+
|
91 |
+
$title = ( !empty( $instance['title'] ) ? esc_html( $instance['title'] ) : '' );
|
92 |
+
$icon = ( !empty( $instance['icon'] ) ? esc_attr( $instance['icon'] ) : '' );
|
93 |
+
$entry = ( !empty( $instance['entry'] ) ? wp_kses( $instance['entry'], $allowed_html ) : '' );
|
94 |
+
$color = ( !empty( $instance['color'] ) ? esc_attr( $instance['color'] ) : '#000000' );
|
95 |
+
|
96 |
+
$output = '';
|
97 |
+
|
98 |
+
$output .= '<div class="service" data-service-color="'. $color .'">';
|
99 |
+
$output .= '<div class="service-icon">';
|
100 |
+
$output .= '<i class="fa '. $icon .'"></i>';
|
101 |
+
$output .= '</div><!--/.service-icon-->';
|
102 |
+
$output .= '<div class="service-title">';
|
103 |
+
$output .= $title;
|
104 |
+
$output .= '</div><!--/.service-title-->';
|
105 |
+
$output .= '<div class="service-entry">';
|
106 |
+
$output .= $entry;
|
107 |
+
$output .= '</div><!--/.service-entry-->';
|
108 |
+
$output .= '</div><!--/.service-->';
|
109 |
+
|
110 |
+
echo $output;
|
111 |
+
|
112 |
+
echo $args['after_widget'];
|
113 |
+
}
|
114 |
+
|
115 |
+
private function get_fontawesome_icons() {
|
116 |
+
$icons = array(
|
117 |
+
'fa-adjust' => 'fa-adjust',
|
118 |
+
'fa-adn' => 'fa-adn',
|
119 |
+
'fa-align-center' => 'fa-align-center',
|
120 |
+
'fa-align-justify' => 'fa-align-justify',
|
121 |
+
'fa-align-left' => 'fa-align-left',
|
122 |
+
'fa-align-right' => 'fa-align-right',
|
123 |
+
'fa-ambulance' => 'fa-ambulance',
|
124 |
+
'fa-anchor' => 'fa-anchor',
|
125 |
+
'fa-android' => 'fa-android',
|
126 |
+
'fa-angellist' => 'fa-angellist',
|
127 |
+
'fa-angle-double-down' => 'fa-angle-double-down',
|
128 |
+
'fa-angle-double-left' => 'fa-angle-double-left',
|
129 |
+
'fa-angle-double-right' => 'fa-angle-double-right',
|
130 |
+
'fa-angle-double-up' => 'fa-angle-double-up',
|
131 |
+
'fa-angle-down' => 'fa-angle-down',
|
132 |
+
'fa-angle-left' => 'fa-angle-left',
|
133 |
+
'fa-angle-right' => 'fa-angle-right',
|
134 |
+
'fa-angle-up' => 'fa-angle-up',
|
135 |
+
'fa-apple' => 'fa-apple',
|
136 |
+
'fa-archive' => 'fa-archive',
|
137 |
+
'fa-area-chart' => 'fa-area-chart',
|
138 |
+
'fa-arrow-circle-down' => 'fa-arrow-circle-down',
|
139 |
+
'fa-arrow-circle-left' => 'fa-arrow-circle-left',
|
140 |
+
'fa-arrow-circle-o-down' => 'fa-arrow-circle-o-down',
|
141 |
+
'fa-arrow-circle-o-left' => 'fa-arrow-circle-o-left',
|
142 |
+
'fa-arrow-circle-o-right' => 'fa-arrow-circle-o-right',
|
143 |
+
'fa-arrow-circle-o-up' => 'fa-arrow-circle-o-up',
|
144 |
+
'fa-arrow-circle-right' => 'fa-arrow-circle-right',
|
145 |
+
'fa-arrow-circle-up' => 'fa-arrow-circle-up',
|
146 |
+
'fa-arrow-down' => 'fa-arrow-down',
|
147 |
+
'fa-arrow-left' => 'fa-arrow-left',
|
148 |
+
'fa-arrow-right' => 'fa-arrow-right',
|
149 |
+
'fa-arrow-up' => 'fa-arrow-up',
|
150 |
+
'fa-arrows' => 'fa-arrows',
|
151 |
+
'fa-arrows-alt' => 'fa-arrows-alt',
|
152 |
+
'fa-arrows-h' => 'fa-arrows-h',
|
153 |
+
'fa-arrows-v' => 'fa-arrows-v',
|
154 |
+
'fa-asterisk' => 'fa-asterisk',
|
155 |
+
'fa-at' => 'fa-at',
|
156 |
+
'fa-automobile' => 'fa-automobile',
|
157 |
+
'fa-backward' => 'fa-backward',
|
158 |
+
'fa-ban' => 'fa-ban',
|
159 |
+
'fa-bank' => 'fa-bank',
|
160 |
+
'fa-bar-chart' => 'fa-bar-chart',
|
161 |
+
'fa-bar-chart-o' => 'fa-bar-chart-o',
|
162 |
+
'fa-barcode' => 'fa-barcode',
|
163 |
+
'fa-bars' => 'fa-bars',
|
164 |
+
'fa-bed' => 'fa-bed',
|
165 |
+
'fa-beer' => 'fa-beer',
|
166 |
+
'fa-behance' => 'fa-behance',
|
167 |
+
'fa-behance-square' => 'fa-behance-square',
|
168 |
+
'fa-bell' => 'fa-bell',
|
169 |
+
'fa-bell-o' => 'fa-bell-o',
|
170 |
+
'fa-bell-slash' => 'fa-bell-slash',
|
171 |
+
'fa-bell-slash-o' => 'fa-bell-slash-o',
|
172 |
+
'fa-bicycle' => 'fa-bicycle',
|
173 |
+
'fa-binoculars' => 'fa-binoculars',
|
174 |
+
'fa-birthday-cake' => 'fa-birthday-cake',
|
175 |
+
'fa-bitbucket' => 'fa-bitbucket',
|
176 |
+
'fa-bitbucket-square' => 'fa-bitbucket-square',
|
177 |
+
'fa-bitcoin' => 'fa-bitcoin',
|
178 |
+
'fa-bold' => 'fa-bold',
|
179 |
+
'fa-bolt' => 'fa-bolt',
|
180 |
+
'fa-bomb' => 'fa-bomb',
|
181 |
+
'fa-book' => 'fa-book',
|
182 |
+
'fa-bookmark' => 'fa-bookmark',
|
183 |
+
'fa-bookmark-o' => 'fa-bookmark-o',
|
184 |
+
'fa-briefcase' => 'fa-briefcase',
|
185 |
+
'fa-btc' => 'fa-btc',
|
186 |
+
'fa-bug' => 'fa-bug',
|
187 |
+
'fa-building' => 'fa-building',
|
188 |
+
'fa-building-o' => 'fa-building-o',
|
189 |
+
'fa-bullhorn' => 'fa-bullhorn',
|
190 |
+
'fa-bullseye' => 'fa-bullseye',
|
191 |
+
'fa-bus' => 'fa-bus',
|
192 |
+
'fa-buysellads' => 'fa-buysellads',
|
193 |
+
'fa-cab' => 'fa-cab',
|
194 |
+
'fa-calculator' => 'fa-calculator',
|
195 |
+
'fa-calendar' => 'fa-calendar',
|
196 |
+
'fa-calendar-o' => 'fa-calendar-o',
|
197 |
+
'fa-camera' => 'fa-camera',
|
198 |
+
'fa-camera-retro' => 'fa-camera-retro',
|
199 |
+
'fa-car' => 'fa-car',
|
200 |
+
'fa-caret-down' => 'fa-caret-down',
|
201 |
+
'fa-caret-left' => 'fa-caret-left',
|
202 |
+
'fa-caret-right' => 'fa-caret-right',
|
203 |
+
'fa-caret-square-o-down' => 'fa-caret-square-o-down',
|
204 |
+
'fa-caret-square-o-left' => 'fa-caret-square-o-left',
|
205 |
+
'fa-caret-square-o-right' => 'fa-caret-square-o-right',
|
206 |
+
'fa-caret-square-o-up' => 'fa-caret-square-o-up',
|
207 |
+
'fa-caret-up' => 'fa-caret-up',
|
208 |
+
'fa-cart-arrow-down' => 'fa-cart-arrow-down',
|
209 |
+
'fa-cart-plus' => 'fa-cart-plus',
|
210 |
+
'fa-cc' => 'fa-cc',
|
211 |
+
'fa-cc-amex' => 'fa-cc-amex',
|
212 |
+
'fa-cc-discover' => 'fa-cc-discover',
|
213 |
+
'fa-cc-mastercard' => 'fa-cc-mastercard',
|
214 |
+
'fa-cc-paypal' => 'fa-cc-paypal',
|
215 |
+
'fa-cc-stripe' => 'fa-cc-stripe',
|
216 |
+
'fa-cc-visa' => 'fa-cc-visa',
|
217 |
+
'fa-certificate' => 'fa-certificate',
|
218 |
+
'fa-chain' => 'fa-chain',
|
219 |
+
'fa-chain-broken' => 'fa-chain-broken',
|
220 |
+
'fa-check' => 'fa-check',
|
221 |
+
'fa-check-circle' => 'fa-check-circle',
|
222 |
+
'fa-check-circle-o' => 'fa-check-circle-o',
|
223 |
+
'fa-check-square' => 'fa-check-square',
|
224 |
+
'fa-check-square-o' => 'fa-check-square-o',
|
225 |
+
'fa-chevron-circle-down' => 'fa-chevron-circle-down',
|
226 |
+
'fa-chevron-circle-left' => 'fa-chevron-circle-left',
|
227 |
+
'fa-chevron-circle-right' => 'fa-chevron-circle-right',
|
228 |
+
'fa-chevron-circle-up' => 'fa-chevron-circle-up',
|
229 |
+
'fa-chevron-down' => 'fa-chevron-down',
|
230 |
+
'fa-chevron-left' => 'fa-chevron-left',
|
231 |
+
'fa-chevron-right' => 'fa-chevron-right',
|
232 |
+
'fa-chevron-up' => 'fa-chevron-up',
|
233 |
+
'fa-child' => 'fa-child',
|
234 |
+
'fa-circle' => 'fa-circle',
|
235 |
+
'fa-circle-o' => 'fa-circle-o',
|
236 |
+
'fa-circle-o-notch' => 'fa-circle-o-notch',
|
237 |
+
'fa-circle-thin' => 'fa-circle-thin',
|
238 |
+
'fa-clipboard' => 'fa-clipboard',
|
239 |
+
'fa-clock-o' => 'fa-clock-o',
|
240 |
+
'fa-close' => 'fa-close',
|
241 |
+
'fa-cloud' => 'fa-cloud',
|
242 |
+
'fa-cloud-download' => 'fa-cloud-download',
|
243 |
+
'fa-cloud-upload' => 'fa-cloud-upload',
|
244 |
+
'fa-cny' => 'fa-cny',
|
245 |
+
'fa-code' => 'fa-code',
|
246 |
+
'fa-code-fork' => 'fa-code-fork',
|
247 |
+
'fa-codepen' => 'fa-codepen',
|
248 |
+
'fa-coffee' => 'fa-coffee',
|
249 |
+
'fa-cog' => 'fa-cog',
|
250 |
+
'fa-cogs' => 'fa-cogs',
|
251 |
+
'fa-columns' => 'fa-columns',
|
252 |
+
'fa-comment' => 'fa-comment',
|
253 |
+
'fa-comment-o' => 'fa-comment-o',
|
254 |
+
'fa-comments' => 'fa-comments',
|
255 |
+
'fa-comments-o' => 'fa-comments-o',
|
256 |
+
'fa-compass' => 'fa-compass',
|
257 |
+
'fa-compress' => 'fa-compress',
|
258 |
+
'fa-connectdevelop' => 'fa-connectdevelop',
|
259 |
+
'fa-copy' => 'fa-copy',
|
260 |
+
'fa-copyright' => 'fa-copyright',
|
261 |
+
'fa-credit-card' => 'fa-credit-card',
|
262 |
+
'fa-crop' => 'fa-crop',
|
263 |
+
'fa-crosshairs' => 'fa-crosshairs',
|
264 |
+
'fa-css3' => 'fa-css3',
|
265 |
+
'fa-cube' => 'fa-cube',
|
266 |
+
'fa-cubes' => 'fa-cubes',
|
267 |
+
'fa-cut' => 'fa-cut',
|
268 |
+
'fa-cutlery' => 'fa-cutlery',
|
269 |
+
'fa-dashboard' => 'fa-dashboard',
|
270 |
+
'fa-dashcube' => 'fa-dashcube',
|
271 |
+
'fa-database' => 'fa-database',
|
272 |
+
'fa-dedent' => 'fa-dedent',
|
273 |
+
'fa-delicious' => 'fa-delicious',
|
274 |
+
'fa-desktop' => 'fa-desktop',
|
275 |
+
'fa-deviantart' => 'fa-deviantart',
|
276 |
+
'fa-diamond' => 'fa-diamond',
|
277 |
+
'fa-digg' => 'fa-digg',
|
278 |
+
'fa-dollar' => 'fa-dollar',
|
279 |
+
'fa-dot-circle-o' => 'fa-dot-circle-o',
|
280 |
+
'fa-download' => 'fa-download',
|
281 |
+
'fa-dribbble' => 'fa-dribbble',
|
282 |
+
'fa-dropbox' => 'fa-dropbox',
|
283 |
+
'fa-drupal' => 'fa-drupal',
|
284 |
+
'fa-edit' => 'fa-edit',
|
285 |
+
'fa-eject' => 'fa-eject',
|
286 |
+
'fa-ellipsis-h' => 'fa-ellipsis-h',
|
287 |
+
'fa-ellipsis-v' => 'fa-ellipsis-v',
|
288 |
+
'fa-empire' => 'fa-empire',
|
289 |
+
'fa-envelope' => 'fa-envelope',
|
290 |
+
'fa-envelope-o' => 'fa-envelope-o',
|
291 |
+
'fa-envelope-square' => 'fa-envelope-square',
|
292 |
+
'fa-eraser' => 'fa-eraser',
|
293 |
+
'fa-eur' => 'fa-eur',
|
294 |
+
'fa-euro' => 'fa-euro',
|
295 |
+
'fa-exchange' => 'fa-exchange',
|
296 |
+
'fa-exclamation' => 'fa-exclamation',
|
297 |
+
'fa-exclamation-circle' => 'fa-exclamation-circle',
|
298 |
+
'fa-exclamation-triangle' => 'fa-exclamation-triangle',
|
299 |
+
'fa-expand' => 'fa-expand',
|
300 |
+
'fa-external-link' => 'fa-external-link',
|
301 |
+
'fa-external-link-square' => 'fa-external-link-square',
|
302 |
+
'fa-eye' => 'fa-eye',
|
303 |
+
'fa-eye-slash' => 'fa-eye-slash',
|
304 |
+
'fa-eyedropper' => 'fa-eyedropper',
|
305 |
+
'fa-facebook' => 'fa-facebook',
|
306 |
+
'fa-facebook-f' => 'fa-facebook-f',
|
307 |
+
'fa-facebook-official' => 'fa-facebook-official',
|
308 |
+
'fa-facebook-square' => 'fa-facebook-square',
|
309 |
+
'fa-fast-backward' => 'fa-fast-backward',
|
310 |
+
'fa-fast-forward' => 'fa-fast-forward',
|
311 |
+
'fa-fax' => 'fa-fax',
|
312 |
+
'fa-female' => 'fa-female',
|
313 |
+
'fa-fighter-jet' => 'fa-fighter-jet',
|
314 |
+
'fa-file' => 'fa-file',
|
315 |
+
'fa-file-archive-o' => 'fa-file-archive-o',
|
316 |
+
'fa-file-audio-o' => 'fa-file-audio-o',
|
317 |
+
'fa-file-code-o' => 'fa-file-code-o',
|
318 |
+
'fa-file-excel-o' => 'fa-file-excel-o',
|
319 |
+
'fa-file-image-o' => 'fa-file-image-o',
|
320 |
+
'fa-file-movie-o' => 'fa-file-movie-o',
|
321 |
+
'fa-file-o' => 'fa-file-o',
|
322 |
+
'fa-file-pdf-o' => 'fa-file-pdf-o',
|
323 |
+
'fa-file-photo-o' => 'fa-file-photo-o',
|
324 |
+
'fa-file-picture-o' => 'fa-file-picture-o',
|
325 |
+
'fa-file-powerpoint-o' => 'fa-file-powerpoint-o',
|
326 |
+
'fa-file-sound-o' => 'fa-file-sound-o',
|
327 |
+
'fa-file-text' => 'fa-file-text',
|
328 |
+
'fa-file-text-o' => 'fa-file-text-o',
|
329 |
+
'fa-file-video-o' => 'fa-file-video-o',
|
330 |
+
'fa-file-word-o' => 'fa-file-word-o',
|
331 |
+
'fa-file-zip-o' => 'fa-file-zip-o',
|
332 |
+
'fa-files-o' => 'fa-files-o',
|
333 |
+
'fa-film' => 'fa-film',
|
334 |
+
'fa-filter' => 'fa-filter',
|
335 |
+
'fa-fire' => 'fa-fire',
|
336 |
+
'fa-fire-extinguisher' => 'fa-fire-extinguisher',
|
337 |
+
'fa-flag' => 'fa-flag',
|
338 |
+
'fa-flag-checkered' => 'fa-flag-checkered',
|
339 |
+
'fa-flag-o' => 'fa-flag-o',
|
340 |
+
'fa-flash' => 'fa-flash',
|
341 |
+
'fa-flask' => 'fa-flask',
|
342 |
+
'fa-flickr' => 'fa-flickr',
|
343 |
+
'fa-floppy-o' => 'fa-floppy-o',
|
344 |
+
'fa-folder' => 'fa-folder',
|
345 |
+
'fa-folder-o' => 'fa-folder-o',
|
346 |
+
'fa-folder-open' => 'fa-folder-open',
|
347 |
+
'fa-folder-open-o' => 'fa-folder-open-o',
|
348 |
+
'fa-font' => 'fa-font',
|
349 |
+
'fa-forumbee' => 'fa-forumbee',
|
350 |
+
'fa-forward' => 'fa-forward',
|
351 |
+
'fa-foursquare' => 'fa-foursquare',
|
352 |
+
'fa-frown-o' => 'fa-frown-o',
|
353 |
+
'fa-futbol-o' => 'fa-futbol-o',
|
354 |
+
'fa-gamepad' => 'fa-gamepad',
|
355 |
+
'fa-gavel' => 'fa-gavel',
|
356 |
+
'fa-gbp' => 'fa-gbp',
|
357 |
+
'fa-ge' => 'fa-ge',
|
358 |
+
'fa-gear' => 'fa-gear',
|
359 |
+
'fa-gears' => 'fa-gears',
|
360 |
+
'fa-genderless' => 'fa-genderless',
|
361 |
+
'fa-gift' => 'fa-gift',
|
362 |
+
'fa-git' => 'fa-git',
|
363 |
+
'fa-git-square' => 'fa-git-square',
|
364 |
+
'fa-github' => 'fa-github',
|
365 |
+
'fa-github-alt' => 'fa-github-alt',
|
366 |
+
'fa-github-square' => 'fa-github-square',
|
367 |
+
'fa-gittip' => 'fa-gittip',
|
368 |
+
'fa-glass' => 'fa-glass',
|
369 |
+
'fa-globe' => 'fa-globe',
|
370 |
+
'fa-google' => 'fa-google',
|
371 |
+
'fa-google-plus' => 'fa-google-plus',
|
372 |
+
'fa-google-plus-square' => 'fa-google-plus-square',
|
373 |
+
'fa-google-wallet' => 'fa-google-wallet',
|
374 |
+
'fa-graduation-cap' => 'fa-graduation-cap',
|
375 |
+
'fa-gratipay' => 'fa-gratipay',
|
376 |
+
'fa-group' => 'fa-group',
|
377 |
+
'fa-h-square' => 'fa-h-square',
|
378 |
+
'fa-hacker-news' => 'fa-hacker-news',
|
379 |
+
'fa-hand-o-down' => 'fa-hand-o-down',
|
380 |
+
'fa-hand-o-left' => 'fa-hand-o-left',
|
381 |
+
'fa-hand-o-right' => 'fa-hand-o-right',
|
382 |
+
'fa-hand-o-up' => 'fa-hand-o-up',
|
383 |
+
'fa-hdd-o' => 'fa-hdd-o',
|
384 |
+
'fa-header' => 'fa-header',
|
385 |
+
'fa-headphones' => 'fa-headphones',
|
386 |
+
'fa-heart' => 'fa-heart',
|
387 |
+
'fa-heart-o' => 'fa-heart-o',
|
388 |
+
'fa-heartbeat' => 'fa-heartbeat',
|
389 |
+
'fa-history' => 'fa-history',
|
390 |
+
'fa-home' => 'fa-home',
|
391 |
+
'fa-hospital-o' => 'fa-hospital-o',
|
392 |
+
'fa-hotel' => 'fa-hotel',
|
393 |
+
'fa-html5' => 'fa-html5',
|
394 |
+
'fa-ils' => 'fa-ils',
|
395 |
+
'fa-image' => 'fa-image',
|
396 |
+
'fa-inbox' => 'fa-inbox',
|
397 |
+
'fa-indent' => 'fa-indent',
|
398 |
+
'fa-info' => 'fa-info',
|
399 |
+
'fa-info-circle' => 'fa-info-circle',
|
400 |
+
'fa-inr' => 'fa-inr',
|
401 |
+
'fa-instagram' => 'fa-instagram',
|
402 |
+
'fa-institution' => 'fa-institution',
|
403 |
+
'fa-ioxhost' => 'fa-ioxhost',
|
404 |
+
'fa-italic' => 'fa-italic',
|
405 |
+
'fa-joomla' => 'fa-joomla',
|
406 |
+
'fa-jpy' => 'fa-jpy',
|
407 |
+
'fa-jsfiddle' => 'fa-jsfiddle',
|
408 |
+
'fa-key' => 'fa-key',
|
409 |
+
'fa-keyboard-o' => 'fa-keyboard-o',
|
410 |
+
'fa-krw' => 'fa-krw',
|
411 |
+
'fa-language' => 'fa-language',
|
412 |
+
'fa-laptop' => 'fa-laptop',
|
413 |
+
'fa-lastfm' => 'fa-lastfm',
|
414 |
+
'fa-lastfm-square' => 'fa-lastfm-square',
|
415 |
+
'fa-leaf' => 'fa-leaf',
|
416 |
+
'fa-leanpub' => 'fa-leanpub',
|
417 |
+
'fa-legal' => 'fa-legal',
|
418 |
+
'fa-lemon-o' => 'fa-lemon-o',
|
419 |
+
'fa-level-down' => 'fa-level-down',
|
420 |
+
'fa-level-up' => 'fa-level-up',
|
421 |
+
'fa-life-bouy' => 'fa-life-bouy',
|
422 |
+
'fa-life-buoy' => 'fa-life-buoy',
|
423 |
+
'fa-life-ring' => 'fa-life-ring',
|
424 |
+
'fa-life-saver' => 'fa-life-saver',
|
425 |
+
'fa-lightbulb-o' => 'fa-lightbulb-o',
|
426 |
+
'fa-line-chart' => 'fa-line-chart',
|
427 |
+
'fa-link' => 'fa-link',
|
428 |
+
'fa-linkedin' => 'fa-linkedin',
|
429 |
+
'fa-linkedin-square' => 'fa-linkedin-square',
|
430 |
+
'fa-linux' => 'fa-linux',
|
431 |
+
'fa-list' => 'fa-list',
|
432 |
+
'fa-list-alt' => 'fa-list-alt',
|
433 |
+
'fa-list-ol' => 'fa-list-ol',
|
434 |
+
'fa-list-ul' => 'fa-list-ul',
|
435 |
+
'fa-location-arrow' => 'fa-location-arrow',
|
436 |
+
'fa-lock' => 'fa-lock',
|
437 |
+
'fa-long-arrow-down' => 'fa-long-arrow-down',
|
438 |
+
'fa-long-arrow-left' => 'fa-long-arrow-left',
|
439 |
+
'fa-long-arrow-right' => 'fa-long-arrow-right',
|
440 |
+
'fa-long-arrow-up' => 'fa-long-arrow-up',
|
441 |
+
'fa-magic' => 'fa-magic',
|
442 |
+
'fa-magnet' => 'fa-magnet',
|
443 |
+
'fa-mail-forward' => 'fa-mail-forward',
|
444 |
+
'fa-mail-reply' => 'fa-mail-reply',
|
445 |
+
'fa-mail-reply-all' => 'fa-mail-reply-all',
|
446 |
+
'fa-male' => 'fa-male',
|
447 |
+
'fa-map-marker' => 'fa-map-marker',
|
448 |
+
'fa-mars' => 'fa-mars',
|
449 |
+
'fa-mars-double' => 'fa-mars-double',
|
450 |
+
'fa-mars-stroke' => 'fa-mars-stroke',
|
451 |
+
'fa-mars-stroke-h' => 'fa-mars-stroke-h',
|
452 |
+
'fa-mars-stroke-v' => 'fa-mars-stroke-v',
|
453 |
+
'fa-maxcdn' => 'fa-maxcdn',
|
454 |
+
'fa-meanpath' => 'fa-meanpath',
|
455 |
+
'fa-medium' => 'fa-medium',
|
456 |
+
'fa-medkit' => 'fa-medkit',
|
457 |
+
'fa-meh-o' => 'fa-meh-o',
|
458 |
+
'fa-mercury' => 'fa-mercury',
|
459 |
+
'fa-microphone' => 'fa-microphone',
|
460 |
+
'fa-microphone-slash' => 'fa-microphone-slash',
|
461 |
+
'fa-minus' => 'fa-minus',
|
462 |
+
'fa-minus-circle' => 'fa-minus-circle',
|
463 |
+
'fa-minus-square' => 'fa-minus-square',
|
464 |
+
'fa-minus-square-o' => 'fa-minus-square-o',
|
465 |
+
'fa-mobile' => 'fa-mobile',
|
466 |
+
'fa-mobile-phone' => 'fa-mobile-phone',
|
467 |
+
'fa-money' => 'fa-money',
|
468 |
+
'fa-moon-o' => 'fa-moon-o',
|
469 |
+
'fa-mortar-board' => 'fa-mortar-board',
|
470 |
+
'fa-motorcycle' => 'fa-motorcycle',
|
471 |
+
'fa-music' => 'fa-music',
|
472 |
+
'fa-navicon' => 'fa-navicon',
|
473 |
+
'fa-neuter' => 'fa-neuter',
|
474 |
+
'fa-newspaper-o' => 'fa-newspaper-o',
|
475 |
+
'fa-openid' => 'fa-openid',
|
476 |
+
'fa-outdent' => 'fa-outdent',
|
477 |
+
'fa-pagelines' => 'fa-pagelines',
|
478 |
+
'fa-paint-brush' => 'fa-paint-brush',
|
479 |
+
'fa-paper-plane' => 'fa-paper-plane',
|
480 |
+
'fa-paper-plane-o' => 'fa-paper-plane-o',
|
481 |
+
'fa-paperclip' => 'fa-paperclip',
|
482 |
+
'fa-paragraph' => 'fa-paragraph',
|
483 |
+
'fa-paste' => 'fa-paste',
|
484 |
+
'fa-pause' => 'fa-pause',
|
485 |
+
'fa-paw' => 'fa-paw',
|
486 |
+
'fa-paypal' => 'fa-paypal',
|
487 |
+
'fa-pencil' => 'fa-pencil',
|
488 |
+
'fa-pencil-square' => 'fa-pencil-square',
|
489 |
+
'fa-pencil-square-o' => 'fa-pencil-square-o',
|
490 |
+
'fa-phone' => 'fa-phone',
|
491 |
+
'fa-phone-square' => 'fa-phone-square',
|
492 |
+
'fa-photo' => 'fa-photo',
|
493 |
+
'fa-picture-o' => 'fa-picture-o',
|
494 |
+
'fa-pie-chart' => 'fa-pie-chart',
|
495 |
+
'fa-pied-piper' => 'fa-pied-piper',
|
496 |
+
'fa-pied-piper-alt' => 'fa-pied-piper-alt',
|
497 |
+
'fa-pinterest' => 'fa-pinterest',
|
498 |
+
'fa-pinterest-p' => 'fa-pinterest-p',
|
499 |
+
'fa-pinterest-square' => 'fa-pinterest-square',
|
500 |
+
'fa-plane' => 'fa-plane',
|
501 |
+
'fa-play' => 'fa-play',
|
502 |
+
'fa-play-circle' => 'fa-play-circle',
|
503 |
+
'fa-play-circle-o' => 'fa-play-circle-o',
|
504 |
+
'fa-plug' => 'fa-plug',
|
505 |
+
'fa-plus' => 'fa-plus',
|
506 |
+
'fa-plus-circle' => 'fa-plus-circle',
|
507 |
+
'fa-plus-square' => 'fa-plus-square',
|
508 |
+
'fa-plus-square-o' => 'fa-plus-square-o',
|
509 |
+
'fa-power-off' => 'fa-power-off',
|
510 |
+
'fa-print' => 'fa-print',
|
511 |
+
'fa-puzzle-piece' => 'fa-puzzle-piece',
|
512 |
+
'fa-qq' => 'fa-qq',
|
513 |
+
'fa-qrcode' => 'fa-qrcode',
|
514 |
+
'fa-question' => 'fa-question',
|
515 |
+
'fa-question-circle' => 'fa-question-circle',
|
516 |
+
'fa-quote-left' => 'fa-quote-left',
|
517 |
+
'fa-quote-right' => 'fa-quote-right',
|
518 |
+
'fa-ra' => 'fa-ra',
|
519 |
+
'fa-random' => 'fa-random',
|
520 |
+
'fa-rebel' => 'fa-rebel',
|
521 |
+
'fa-recycle' => 'fa-recycle',
|
522 |
+
'fa-reddit' => 'fa-reddit',
|
523 |
+
'fa-reddit-square' => 'fa-reddit-square',
|
524 |
+
'fa-refresh' => 'fa-refresh',
|
525 |
+
'fa-remove' => 'fa-remove',
|
526 |
+
'fa-renren' => 'fa-renren',
|
527 |
+
'fa-reorder' => 'fa-reorder',
|
528 |
+
'fa-repeat' => 'fa-repeat',
|
529 |
+
'fa-reply' => 'fa-reply',
|
530 |
+
'fa-reply-all' => 'fa-reply-all',
|
531 |
+
'fa-retweet' => 'fa-retweet',
|
532 |
+
'fa-rmb' => 'fa-rmb',
|
533 |
+
'fa-road' => 'fa-road',
|
534 |
+
'fa-rocket' => 'fa-rocket',
|
535 |
+
'fa-rotate-left' => 'fa-rotate-left',
|
536 |
+
'fa-rotate-right' => 'fa-rotate-right',
|
537 |
+
'fa-rouble' => 'fa-rouble',
|
538 |
+
'fa-rss' => 'fa-rss',
|
539 |
+
'fa-rss-square' => 'fa-rss-square',
|
540 |
+
'fa-rub' => 'fa-rub',
|
541 |
+
'fa-ruble' => 'fa-ruble',
|
542 |
+
'fa-rupee' => 'fa-rupee',
|
543 |
+
'fa-save' => 'fa-save',
|
544 |
+
'fa-scissors' => 'fa-scissors',
|
545 |
+
'fa-search' => 'fa-search',
|
546 |
+
'fa-search-minus' => 'fa-search-minus',
|
547 |
+
'fa-search-plus' => 'fa-search-plus',
|
548 |
+
'fa-sellsy' => 'fa-sellsy',
|
549 |
+
'fa-send' => 'fa-send',
|
550 |
+
'fa-send-o' => 'fa-send-o',
|
551 |
+
'fa-server' => 'fa-server',
|
552 |
+
'fa-share' => 'fa-share',
|
553 |
+
'fa-share-alt' => 'fa-share-alt',
|
554 |
+
'fa-share-alt-square' => 'fa-share-alt-square',
|
555 |
+
'fa-share-square' => 'fa-share-square',
|
556 |
+
'fa-share-square-o' => 'fa-share-square-o',
|
557 |
+
'fa-shekel' => 'fa-shekel',
|
558 |
+
'fa-sheqel' => 'fa-sheqel',
|
559 |
+
'fa-shield' => 'fa-shield',
|
560 |
+
'fa-ship' => 'fa-ship',
|
561 |
+
'fa-shirtsinbulk' => 'fa-shirtsinbulk',
|
562 |
+
'fa-shopping-cart' => 'fa-shopping-cart',
|
563 |
+
'fa-sign-in' => 'fa-sign-in',
|
564 |
+
'fa-sign-out' => 'fa-sign-out',
|
565 |
+
'fa-signal' => 'fa-signal',
|
566 |
+
'fa-simplybuilt' => 'fa-simplybuilt',
|
567 |
+
'fa-sitemap' => 'fa-sitemap',
|
568 |
+
'fa-skyatlas' => 'fa-skyatlas',
|
569 |
+
'fa-skype' => 'fa-skype',
|
570 |
+
'fa-slack' => 'fa-slack',
|
571 |
+
'fa-sliders' => 'fa-sliders',
|
572 |
+
'fa-slideshare' => 'fa-slideshare',
|
573 |
+
'fa-smile-o' => 'fa-smile-o',
|
574 |
+
'fa-soccer-ball-o' => 'fa-soccer-ball-o',
|
575 |
+
'fa-sort' => 'fa-sort',
|
576 |
+
'fa-sort-alpha-asc' => 'fa-sort-alpha-asc',
|
577 |
+
'fa-sort-alpha-desc' => 'fa-sort-alpha-desc',
|
578 |
+
'fa-sort-amount-asc' => 'fa-sort-amount-asc',
|
579 |
+
'fa-sort-amount-desc' => 'fa-sort-amount-desc',
|
580 |
+
'fa-sort-asc' => 'fa-sort-asc',
|
581 |
+
'fa-sort-desc' => 'fa-sort-desc',
|
582 |
+
'fa-sort-down' => 'fa-sort-down',
|
583 |
+
'fa-sort-numeric-asc' => 'fa-sort-numeric-asc',
|
584 |
+
'fa-sort-numeric-desc' => 'fa-sort-numeric-desc',
|
585 |
+
'fa-sort-up' => 'fa-sort-up',
|
586 |
+
'fa-soundcloud' => 'fa-soundcloud',
|
587 |
+
'fa-space-shuttle' => 'fa-space-shuttle',
|
588 |
+
'fa-spinner' => 'fa-spinner',
|
589 |
+
'fa-spoon' => 'fa-spoon',
|
590 |
+
'fa-spotify' => 'fa-spotify',
|
591 |
+
'fa-square' => 'fa-square',
|
592 |
+
'fa-square-o' => 'fa-square-o',
|
593 |
+
'fa-stack-exchange' => 'fa-stack-exchange',
|
594 |
+
'fa-stack-overflow' => 'fa-stack-overflow',
|
595 |
+
'fa-star' => 'fa-star',
|
596 |
+
'fa-star-half' => 'fa-star-half',
|
597 |
+
'fa-star-half-empty' => 'fa-star-half-empty',
|
598 |
+
'fa-star-half-full' => 'fa-star-half-full',
|
599 |
+
'fa-star-half-o' => 'fa-star-half-o',
|
600 |
+
'fa-star-o' => 'fa-star-o',
|
601 |
+
'fa-steam' => 'fa-steam',
|
602 |
+
'fa-steam-square' => 'fa-steam-square',
|
603 |
+
'fa-step-backward' => 'fa-step-backward',
|
604 |
+
'fa-step-forward' => 'fa-step-forward',
|
605 |
+
'fa-stethoscope' => 'fa-stethoscope',
|
606 |
+
'fa-stop' => 'fa-stop',
|
607 |
+
'fa-street-view' => 'fa-street-view',
|
608 |
+
'fa-strikethrough' => 'fa-strikethrough',
|
609 |
+
'fa-stumbleupon' => 'fa-stumbleupon',
|
610 |
+
'fa-stumbleupon-circle' => 'fa-stumbleupon-circle',
|
611 |
+
'fa-subscript' => 'fa-subscript',
|
612 |
+
'fa-subway' => 'fa-subway',
|
613 |
+
'fa-suitcase' => 'fa-suitcase',
|
614 |
+
'fa-sun-o' => 'fa-sun-o',
|
615 |
+
'fa-superscript' => 'fa-superscript',
|
616 |
+
'fa-support' => 'fa-support',
|
617 |
+
'fa-table' => 'fa-table',
|
618 |
+
'fa-tablet' => 'fa-tablet',
|
619 |
+
'fa-tachometer' => 'fa-tachometer',
|
620 |
+
'fa-tag' => 'fa-tag',
|
621 |
+
'fa-tags' => 'fa-tags',
|
622 |
+
'fa-tasks' => 'fa-tasks',
|
623 |
+
'fa-taxi' => 'fa-taxi',
|
624 |
+
'fa-tencent-weibo' => 'fa-tencent-weibo',
|
625 |
+
'fa-terminal' => 'fa-terminal',
|
626 |
+
'fa-text-height' => 'fa-text-height',
|
627 |
+
'fa-text-width' => 'fa-text-width',
|
628 |
+
'fa-th' => 'fa-th',
|
629 |
+
'fa-th-large' => 'fa-th-large',
|
630 |
+
'fa-th-list' => 'fa-th-list',
|
631 |
+
'fa-thumb-tack' => 'fa-thumb-tack',
|
632 |
+
'fa-thumbs-down' => 'fa-thumbs-down',
|
633 |
+
'fa-thumbs-o-down' => 'fa-thumbs-o-down',
|
634 |
+
'fa-thumbs-o-up' => 'fa-thumbs-o-up',
|
635 |
+
'fa-thumbs-up' => 'fa-thumbs-up',
|
636 |
+
'fa-ticket' => 'fa-ticket',
|
637 |
+
'fa-times' => 'fa-times',
|
638 |
+
'fa-times-circle' => 'fa-times-circle',
|
639 |
+
'fa-times-circle-o' => 'fa-times-circle-o',
|
640 |
+
'fa-tint' => 'fa-tint',
|
641 |
+
'fa-toggle-down' => 'fa-toggle-down',
|
642 |
+
'fa-toggle-left' => 'fa-toggle-left',
|
643 |
+
'fa-toggle-off' => 'fa-toggle-off',
|
644 |
+
'fa-toggle-on' => 'fa-toggle-on',
|
645 |
+
'fa-toggle-right' => 'fa-toggle-right',
|
646 |
+
'fa-toggle-up' => 'fa-toggle-up',
|
647 |
+
'fa-train' => 'fa-train',
|
648 |
+
'fa-transgender' => 'fa-transgender',
|
649 |
+
'fa-transgender-alt' => 'fa-transgender-alt',
|
650 |
+
'fa-trash' => 'fa-trash',
|
651 |
+
'fa-trash-o' => 'fa-trash-o',
|
652 |
+
'fa-tree' => 'fa-tree',
|
653 |
+
'fa-trello' => 'fa-trello',
|
654 |
+
'fa-trophy' => 'fa-trophy',
|
655 |
+
'fa-truck' => 'fa-truck',
|
656 |
+
'fa-try' => 'fa-try',
|
657 |
+
'fa-tty' => 'fa-tty',
|
658 |
+
'fa-tumblr' => 'fa-tumblr',
|
659 |
+
'fa-tumblr-square' => 'fa-tumblr-square',
|
660 |
+
'fa-turkish-lira' => 'fa-turkish-lira',
|
661 |
+
'fa-twitch' => 'fa-twitch',
|
662 |
+
'fa-twitter' => 'fa-twitter',
|
663 |
+
'fa-twitter-square' => 'fa-twitter-square',
|
664 |
+
'fa-umbrella' => 'fa-umbrella',
|
665 |
+
'fa-underline' => 'fa-underline',
|
666 |
+
'fa-undo' => 'fa-undo',
|
667 |
+
'fa-university' => 'fa-university',
|
668 |
+
'fa-unlink' => 'fa-unlink',
|
669 |
+
'fa-unlock' => 'fa-unlock',
|
670 |
+
'fa-unlock-alt' => 'fa-unlock-alt',
|
671 |
+
'fa-unsorted' => 'fa-unsorted',
|
672 |
+
'fa-upload' => 'fa-upload',
|
673 |
+
'fa-usd' => 'fa-usd',
|
674 |
+
'fa-user' => 'fa-user',
|
675 |
+
'fa-user-md' => 'fa-user-md',
|
676 |
+
'fa-user-plus' => 'fa-user-plus',
|
677 |
+
'fa-user-secret' => 'fa-user-secret',
|
678 |
+
'fa-user-times' => 'fa-user-times',
|
679 |
+
'fa-users' => 'fa-users',
|
680 |
+
'fa-venus' => 'fa-venus',
|
681 |
+
'fa-venus-double' => 'fa-venus-double',
|
682 |
+
'fa-venus-mars' => 'fa-venus-mars',
|
683 |
+
'fa-viacoin' => 'fa-viacoin',
|
684 |
+
'fa-video-camera' => 'fa-video-camera',
|
685 |
+
'fa-vimeo-square' => 'fa-vimeo-square',
|
686 |
+
'fa-vine' => 'fa-vine',
|
687 |
+
'fa-vk' => 'fa-vk',
|
688 |
+
'fa-volume-down' => 'fa-volume-down',
|
689 |
+
'fa-volume-off' => 'fa-volume-off',
|
690 |
+
'fa-volume-up' => 'fa-volume-up',
|
691 |
+
'fa-warning' => 'fa-warning',
|
692 |
+
'fa-wechat' => 'fa-wechat',
|
693 |
+
'fa-weibo' => 'fa-weibo',
|
694 |
+
'fa-weixin' => 'fa-weixin',
|
695 |
+
'fa-whatsapp' => 'fa-whatsapp',
|
696 |
+
'fa-wheelchair' => 'fa-wheelchair',
|
697 |
+
'fa-wifi' => 'fa-wifi',
|
698 |
+
'fa-windows' => 'fa-windows',
|
699 |
+
'fa-won' => 'fa-won',
|
700 |
+
'fa-wordpress' => 'fa-wordpress',
|
701 |
+
'fa-wrench' => 'fa-wrench',
|
702 |
+
'fa-xing' => 'fa-xing',
|
703 |
+
'fa-xing-square' => 'fa-xing-square',
|
704 |
+
'fa-yahoo' => 'fa-yahoo',
|
705 |
+
'fa-yelp' => 'fa-yelp',
|
706 |
+
'fa-yen' => 'fa-yen',
|
707 |
+
'fa-youtube' => 'fa-youtube',
|
708 |
+
'fa-youtube-play' => 'fa-youtube-play',
|
709 |
+
'fa-youtube-square' => 'fa-youtube-square'
|
710 |
+
);
|
711 |
+
|
712 |
+
foreach( $icons as $icon ) {
|
713 |
+
$all_icons[$icon] = $icon;
|
714 |
+
}
|
715 |
+
|
716 |
+
return $all_icons;
|
717 |
+
}
|
718 |
+
|
719 |
+
/**
|
720 |
+
* Back-end widget form.
|
721 |
+
*
|
722 |
+
* @see WP_Widget::form()
|
723 |
+
*
|
724 |
+
* @param array $instance Previously saved values from database.
|
725 |
+
*/
|
726 |
+
public function form( $instance ) {
|
727 |
+
$allowed_html = array(
|
728 |
+
'a' => array(
|
729 |
+
'href' => array(),
|
730 |
+
'title' => array()
|
731 |
+
),
|
732 |
+
'br' => array(),
|
733 |
+
'em' => array(),
|
734 |
+
'img' => array(
|
735 |
+
'alt' => array(),
|
736 |
+
'src' => array(),
|
737 |
+
'srcset' => array(),
|
738 |
+
'title' => array()
|
739 |
+
),
|
740 |
+
'strong' => array(),
|
741 |
+
);
|
742 |
+
$title = ! empty( $instance['title'] ) ? sanitize_text_field( $instance['title'] ) : __( '[Illdy] - Skill', 'illdy' );
|
743 |
+
$icon = !empty( $instance['icon'] ) ? sanitize_text_field( $instance['icon'] ) : '';
|
744 |
+
$entry = !empty( $instance['entry'] ) ? wp_kses( $instance['entry'], $allowed_html ) : '';
|
745 |
+
$color = !empty( $instance['color'] ) ? esc_attr( $instance['color'] ) : '';
|
746 |
+
|
747 |
+
$get_fontawesome_icons = $this->get_fontawesome_icons();
|
748 |
+
?>
|
749 |
+
|
750 |
+
<p>
|
751 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'illdy' ); ?></label>
|
752 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>">
|
753 |
+
</p>
|
754 |
+
|
755 |
+
<p>
|
756 |
+
<label for="<?php echo $this->get_field_id( 'icon' ); ?>"><?php _e( 'Icon:', 'illdy' ); ?></label>
|
757 |
+
<select class="widefat" id="<?php echo $this->get_field_id( 'icon' ); ?>" name="<?php echo $this->get_field_name( 'icon' ); ?>">
|
758 |
+
<option value="all-font-awesome-icons"><?php _e( 'All Font Awesome Icons', 'illdy' ); ?></option>
|
759 |
+
<?php foreach( $get_fontawesome_icons as $key => $get_fontawesome_icon ): ?>
|
760 |
+
<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $icon, $key ); ?>><?php echo esc_html( $get_fontawesome_icon ); ?></option>
|
761 |
+
<?php endforeach; ?>
|
762 |
+
</select>
|
763 |
+
</p>
|
764 |
+
|
765 |
+
<p>
|
766 |
+
<label for="<?php echo $this->get_field_id( 'entry' ); ?>"><?php _e( 'Entry:', 'illdy' ); ?></label>
|
767 |
+
<textarea class="widefat" rows="16" cols="20" id="<?php echo $this->get_field_id( 'entry' ); ?>" name="<?php echo $this->get_field_name( 'entry' ); ?>"><?php echo esc_textarea( $entry ); ?></textarea></p>
|
768 |
+
</p>
|
769 |
+
|
770 |
+
<p>
|
771 |
+
<label for="<?php echo $this->get_field_id( 'color' ); ?>"><?php _e( 'Color:', 'illdy' ); ?></label><br>
|
772 |
+
<input type="text" name="<?php echo $this->get_field_name( 'color' ); ?>" class="color-picker" id="<?php echo $this->get_field_id( 'color' ); ?>" value="<?php echo $color; ?>" data-default-color="#000000" />
|
773 |
+
</p>
|
774 |
+
<?php
|
775 |
+
}
|
776 |
+
|
777 |
+
/**
|
778 |
+
* Sanitize widget form values as they are saved.
|
779 |
+
*
|
780 |
+
* @see WP_Widget::update()
|
781 |
+
*
|
782 |
+
* @param array $new_instance Values just sent to be saved.
|
783 |
+
* @param array $old_instance Previously saved values from database.
|
784 |
+
*
|
785 |
+
* @return array Updated safe values to be saved.
|
786 |
+
*/
|
787 |
+
public function update( $new_instance, $old_instance ) {
|
788 |
+
|
789 |
+
$allowed_html = array(
|
790 |
+
'a' => array(
|
791 |
+
'href' => array(),
|
792 |
+
'title' => array()
|
793 |
+
),
|
794 |
+
'br' => array(),
|
795 |
+
'em' => array(),
|
796 |
+
'img' => array(
|
797 |
+
'alt' => array(),
|
798 |
+
'src' => array(),
|
799 |
+
'srcset' => array(),
|
800 |
+
'title' => array()
|
801 |
+
),
|
802 |
+
'strong' => array(),
|
803 |
+
);
|
804 |
+
|
805 |
+
$instance = array();
|
806 |
+
$instance['title'] = ( !empty( $new_instance['title'] ) ) ? esc_html( $new_instance['title'] ) : '';
|
807 |
+
$instance['icon'] = ( !empty( $new_instance['icon'] ) ? sanitize_text_field( $new_instance['icon'] ) : '' );
|
808 |
+
$instance['entry'] = ( !empty( $new_instance['entry'] ) ? wp_kses( $new_instance['entry'], $allowed_html ) : '' );
|
809 |
+
$instance['color'] = ( !empty( $new_instance['color'] ) ? esc_html( $new_instance['color'] ) : '' );
|
810 |
+
|
811 |
+
return $instance;
|
812 |
+
}
|
813 |
+
|
814 |
+
}
|
815 |
+
|
816 |
+
add_action( 'widgets_init', 'illdy_register_widget_service' );
|
817 |
+
function illdy_register_widget_service () {
|
818 |
+
register_widget( 'Illdy_Widget_Service' );
|
819 |
+
}
|
widgets/class-widget-skill.php
ADDED
@@ -0,0 +1,768 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Illdy_Widget_Skill extends WP_Widget {
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Register widget with WordPress.
|
6 |
+
*/
|
7 |
+
function __construct() {
|
8 |
+
parent::__construct( 'illdy_skill', __( '[Illdy] - Skill', 'illdy' ), array( 'description' => __( 'Add this widget in "Front page - About Sidebar".', 'illdy' ), ) );
|
9 |
+
|
10 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
11 |
+
add_action( 'admin_footer-widgets.php', array( $this, 'print_scripts' ), 9999 );
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Enqueue scripts.
|
16 |
+
*
|
17 |
+
* @since 1.0
|
18 |
+
*
|
19 |
+
* @param string $hook_suffix
|
20 |
+
*/
|
21 |
+
public function enqueue_scripts( $hook_suffix ) {
|
22 |
+
if ( 'widgets.php' !== $hook_suffix ) {
|
23 |
+
return;
|
24 |
+
}
|
25 |
+
|
26 |
+
wp_enqueue_style( 'wp-color-picker' );
|
27 |
+
wp_enqueue_script( 'wp-color-picker' );
|
28 |
+
wp_enqueue_script( 'underscore' );
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Print scripts.
|
33 |
+
*
|
34 |
+
* @since 1.0
|
35 |
+
*/
|
36 |
+
public function print_scripts() {
|
37 |
+
?>
|
38 |
+
<script>
|
39 |
+
( function( $ ){
|
40 |
+
function initColorPicker( widget ) {
|
41 |
+
widget.find( '.color-picker' ).wpColorPicker( {
|
42 |
+
change: _.throttle( function() { // For Customizer
|
43 |
+
$(this).trigger( 'change' );
|
44 |
+
}, 3000 )
|
45 |
+
});
|
46 |
+
}
|
47 |
+
|
48 |
+
function onFormUpdate( event, widget ) {
|
49 |
+
initColorPicker( widget );
|
50 |
+
}
|
51 |
+
|
52 |
+
$( document ).on( 'widget-added widget-updated', onFormUpdate );
|
53 |
+
|
54 |
+
$( document ).ready( function() {
|
55 |
+
$( '#widgets-right .widget:has(.color-picker)' ).each( function () {
|
56 |
+
initColorPicker( $( this ) );
|
57 |
+
} );
|
58 |
+
} );
|
59 |
+
}( jQuery ) );
|
60 |
+
</script>
|
61 |
+
<?php
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Front-end display of widget.
|
66 |
+
*
|
67 |
+
* @see WP_Widget::widget()
|
68 |
+
*
|
69 |
+
* @param array $args Widget arguments.
|
70 |
+
* @param array $instance Saved values from database.
|
71 |
+
*/
|
72 |
+
public function widget( $args, $instance ) {
|
73 |
+
echo $args['before_widget'];
|
74 |
+
|
75 |
+
$title = ( !empty( $instance['title'] ) ? esc_html( $instance['title'] ) : '' );
|
76 |
+
$percentage = ( !empty( $instance['percentage'] ) ? absint( $instance['percentage'] ) : '' );
|
77 |
+
$icon = ( !empty( $instance['icon'] ) ? esc_attr( $instance['icon'] ) : '' );
|
78 |
+
$color = ( !empty( $instance['color'] ) ? esc_attr( $instance['color'] ) : '#000000' );
|
79 |
+
|
80 |
+
$output = '';
|
81 |
+
|
82 |
+
$output .= '<div class="skill" data-skill-progress-bar-width="'. $percentage .'" data-skill-color="'. $color .'">';
|
83 |
+
$output .= '<div class="skill-top clearfix">';
|
84 |
+
$output .= '<div class="skill-progress-bar"></div>';
|
85 |
+
$output .= '</div><!--/.skill-top.clearfix-->';
|
86 |
+
$output .= '<div class="skill-bottom">';
|
87 |
+
$output .= '<i class="fa '. $icon .'"></i><span>'. $title .'</span>';
|
88 |
+
$output .= '</div><!--/.skill-bottom-->';
|
89 |
+
$output .= '</div><!--/.skill-->';
|
90 |
+
|
91 |
+
echo $output;
|
92 |
+
|
93 |
+
echo $args['after_widget'];
|
94 |
+
}
|
95 |
+
|
96 |
+
private function get_fontawesome_icons() {
|
97 |
+
$icons = array(
|
98 |
+
'fa-adjust' => 'fa-adjust',
|
99 |
+
'fa-adn' => 'fa-adn',
|
100 |
+
'fa-align-center' => 'fa-align-center',
|
101 |
+
'fa-align-justify' => 'fa-align-justify',
|
102 |
+
'fa-align-left' => 'fa-align-left',
|
103 |
+
'fa-align-right' => 'fa-align-right',
|
104 |
+
'fa-ambulance' => 'fa-ambulance',
|
105 |
+
'fa-anchor' => 'fa-anchor',
|
106 |
+
'fa-android' => 'fa-android',
|
107 |
+
'fa-angellist' => 'fa-angellist',
|
108 |
+
'fa-angle-double-down' => 'fa-angle-double-down',
|
109 |
+
'fa-angle-double-left' => 'fa-angle-double-left',
|
110 |
+
'fa-angle-double-right' => 'fa-angle-double-right',
|
111 |
+
'fa-angle-double-up' => 'fa-angle-double-up',
|
112 |
+
'fa-angle-down' => 'fa-angle-down',
|
113 |
+
'fa-angle-left' => 'fa-angle-left',
|
114 |
+
'fa-angle-right' => 'fa-angle-right',
|
115 |
+
'fa-angle-up' => 'fa-angle-up',
|
116 |
+
'fa-apple' => 'fa-apple',
|
117 |
+
'fa-archive' => 'fa-archive',
|
118 |
+
'fa-area-chart' => 'fa-area-chart',
|
119 |
+
'fa-arrow-circle-down' => 'fa-arrow-circle-down',
|
120 |
+
'fa-arrow-circle-left' => 'fa-arrow-circle-left',
|
121 |
+
'fa-arrow-circle-o-down' => 'fa-arrow-circle-o-down',
|
122 |
+
'fa-arrow-circle-o-left' => 'fa-arrow-circle-o-left',
|
123 |
+
'fa-arrow-circle-o-right' => 'fa-arrow-circle-o-right',
|
124 |
+
'fa-arrow-circle-o-up' => 'fa-arrow-circle-o-up',
|
125 |
+
'fa-arrow-circle-right' => 'fa-arrow-circle-right',
|
126 |
+
'fa-arrow-circle-up' => 'fa-arrow-circle-up',
|
127 |
+
'fa-arrow-down' => 'fa-arrow-down',
|
128 |
+
'fa-arrow-left' => 'fa-arrow-left',
|
129 |
+
'fa-arrow-right' => 'fa-arrow-right',
|
130 |
+
'fa-arrow-up' => 'fa-arrow-up',
|
131 |
+
'fa-arrows' => 'fa-arrows',
|
132 |
+
'fa-arrows-alt' => 'fa-arrows-alt',
|
133 |
+
'fa-arrows-h' => 'fa-arrows-h',
|
134 |
+
'fa-arrows-v' => 'fa-arrows-v',
|
135 |
+
'fa-asterisk' => 'fa-asterisk',
|
136 |
+
'fa-at' => 'fa-at',
|
137 |
+
'fa-automobile' => 'fa-automobile',
|
138 |
+
'fa-backward' => 'fa-backward',
|
139 |
+
'fa-ban' => 'fa-ban',
|
140 |
+
'fa-bank' => 'fa-bank',
|
141 |
+
'fa-bar-chart' => 'fa-bar-chart',
|
142 |
+
'fa-bar-chart-o' => 'fa-bar-chart-o',
|
143 |
+
'fa-barcode' => 'fa-barcode',
|
144 |
+
'fa-bars' => 'fa-bars',
|
145 |
+
'fa-bed' => 'fa-bed',
|
146 |
+
'fa-beer' => 'fa-beer',
|
147 |
+
'fa-behance' => 'fa-behance',
|
148 |
+
'fa-behance-square' => 'fa-behance-square',
|
149 |
+
'fa-bell' => 'fa-bell',
|
150 |
+
'fa-bell-o' => 'fa-bell-o',
|
151 |
+
'fa-bell-slash' => 'fa-bell-slash',
|
152 |
+
'fa-bell-slash-o' => 'fa-bell-slash-o',
|
153 |
+
'fa-bicycle' => 'fa-bicycle',
|
154 |
+
'fa-binoculars' => 'fa-binoculars',
|
155 |
+
'fa-birthday-cake' => 'fa-birthday-cake',
|
156 |
+
'fa-bitbucket' => 'fa-bitbucket',
|
157 |
+
'fa-bitbucket-square' => 'fa-bitbucket-square',
|
158 |
+
'fa-bitcoin' => 'fa-bitcoin',
|
159 |
+
'fa-bold' => 'fa-bold',
|
160 |
+
'fa-bolt' => 'fa-bolt',
|
161 |
+
'fa-bomb' => 'fa-bomb',
|
162 |
+
'fa-book' => 'fa-book',
|
163 |
+
'fa-bookmark' => 'fa-bookmark',
|
164 |
+
'fa-bookmark-o' => 'fa-bookmark-o',
|
165 |
+
'fa-briefcase' => 'fa-briefcase',
|
166 |
+
'fa-btc' => 'fa-btc',
|
167 |
+
'fa-bug' => 'fa-bug',
|
168 |
+
'fa-building' => 'fa-building',
|
169 |
+
'fa-building-o' => 'fa-building-o',
|
170 |
+
'fa-bullhorn' => 'fa-bullhorn',
|
171 |
+
'fa-bullseye' => 'fa-bullseye',
|
172 |
+
'fa-bus' => 'fa-bus',
|
173 |
+
'fa-buysellads' => 'fa-buysellads',
|
174 |
+
'fa-cab' => 'fa-cab',
|
175 |
+
'fa-calculator' => 'fa-calculator',
|
176 |
+
'fa-calendar' => 'fa-calendar',
|
177 |
+
'fa-calendar-o' => 'fa-calendar-o',
|
178 |
+
'fa-camera' => 'fa-camera',
|
179 |
+
'fa-camera-retro' => 'fa-camera-retro',
|
180 |
+
'fa-car' => 'fa-car',
|
181 |
+
'fa-caret-down' => 'fa-caret-down',
|
182 |
+
'fa-caret-left' => 'fa-caret-left',
|
183 |
+
'fa-caret-right' => 'fa-caret-right',
|
184 |
+
'fa-caret-square-o-down' => 'fa-caret-square-o-down',
|
185 |
+
'fa-caret-square-o-left' => 'fa-caret-square-o-left',
|
186 |
+
'fa-caret-square-o-right' => 'fa-caret-square-o-right',
|
187 |
+
'fa-caret-square-o-up' => 'fa-caret-square-o-up',
|
188 |
+
'fa-caret-up' => 'fa-caret-up',
|
189 |
+
'fa-cart-arrow-down' => 'fa-cart-arrow-down',
|
190 |
+
'fa-cart-plus' => 'fa-cart-plus',
|
191 |
+
'fa-cc' => 'fa-cc',
|
192 |
+
'fa-cc-amex' => 'fa-cc-amex',
|
193 |
+
'fa-cc-discover' => 'fa-cc-discover',
|
194 |
+
'fa-cc-mastercard' => 'fa-cc-mastercard',
|
195 |
+
'fa-cc-paypal' => 'fa-cc-paypal',
|
196 |
+
'fa-cc-stripe' => 'fa-cc-stripe',
|
197 |
+
'fa-cc-visa' => 'fa-cc-visa',
|
198 |
+
'fa-certificate' => 'fa-certificate',
|
199 |
+
'fa-chain' => 'fa-chain',
|
200 |
+
'fa-chain-broken' => 'fa-chain-broken',
|
201 |
+
'fa-check' => 'fa-check',
|
202 |
+
'fa-check-circle' => 'fa-check-circle',
|
203 |
+
'fa-check-circle-o' => 'fa-check-circle-o',
|
204 |
+
'fa-check-square' => 'fa-check-square',
|
205 |
+
'fa-check-square-o' => 'fa-check-square-o',
|
206 |
+
'fa-chevron-circle-down' => 'fa-chevron-circle-down',
|
207 |
+
'fa-chevron-circle-left' => 'fa-chevron-circle-left',
|
208 |
+
'fa-chevron-circle-right' => 'fa-chevron-circle-right',
|
209 |
+
'fa-chevron-circle-up' => 'fa-chevron-circle-up',
|
210 |
+
'fa-chevron-down' => 'fa-chevron-down',
|
211 |
+
'fa-chevron-left' => 'fa-chevron-left',
|
212 |
+
'fa-chevron-right' => 'fa-chevron-right',
|
213 |
+
'fa-chevron-up' => 'fa-chevron-up',
|
214 |
+
'fa-child' => 'fa-child',
|
215 |
+
'fa-circle' => 'fa-circle',
|
216 |
+
'fa-circle-o' => 'fa-circle-o',
|
217 |
+
'fa-circle-o-notch' => 'fa-circle-o-notch',
|
218 |
+
'fa-circle-thin' => 'fa-circle-thin',
|
219 |
+
'fa-clipboard' => 'fa-clipboard',
|
220 |
+
'fa-clock-o' => 'fa-clock-o',
|
221 |
+
'fa-close' => 'fa-close',
|
222 |
+
'fa-cloud' => 'fa-cloud',
|
223 |
+
'fa-cloud-download' => 'fa-cloud-download',
|
224 |
+
'fa-cloud-upload' => 'fa-cloud-upload',
|
225 |
+
'fa-cny' => 'fa-cny',
|
226 |
+
'fa-code' => 'fa-code',
|
227 |
+
'fa-code-fork' => 'fa-code-fork',
|
228 |
+
'fa-codepen' => 'fa-codepen',
|
229 |
+
'fa-coffee' => 'fa-coffee',
|
230 |
+
'fa-cog' => 'fa-cog',
|
231 |
+
'fa-cogs' => 'fa-cogs',
|
232 |
+
'fa-columns' => 'fa-columns',
|
233 |
+
'fa-comment' => 'fa-comment',
|
234 |
+
'fa-comment-o' => 'fa-comment-o',
|
235 |
+
'fa-comments' => 'fa-comments',
|
236 |
+
'fa-comments-o' => 'fa-comments-o',
|
237 |
+
'fa-compass' => 'fa-compass',
|
238 |
+
'fa-compress' => 'fa-compress',
|
239 |
+
'fa-connectdevelop' => 'fa-connectdevelop',
|
240 |
+
'fa-copy' => 'fa-copy',
|
241 |
+
'fa-copyright' => 'fa-copyright',
|
242 |
+
'fa-credit-card' => 'fa-credit-card',
|
243 |
+
'fa-crop' => 'fa-crop',
|
244 |
+
'fa-crosshairs' => 'fa-crosshairs',
|
245 |
+
'fa-css3' => 'fa-css3',
|
246 |
+
'fa-cube' => 'fa-cube',
|
247 |
+
'fa-cubes' => 'fa-cubes',
|
248 |
+
'fa-cut' => 'fa-cut',
|
249 |
+
'fa-cutlery' => 'fa-cutlery',
|
250 |
+
'fa-dashboard' => 'fa-dashboard',
|
251 |
+
'fa-dashcube' => 'fa-dashcube',
|
252 |
+
'fa-database' => 'fa-database',
|
253 |
+
'fa-dedent' => 'fa-dedent',
|
254 |
+
'fa-delicious' => 'fa-delicious',
|
255 |
+
'fa-desktop' => 'fa-desktop',
|
256 |
+
'fa-deviantart' => 'fa-deviantart',
|
257 |
+
'fa-diamond' => 'fa-diamond',
|
258 |
+
'fa-digg' => 'fa-digg',
|
259 |
+
'fa-dollar' => 'fa-dollar',
|
260 |
+
'fa-dot-circle-o' => 'fa-dot-circle-o',
|
261 |
+
'fa-download' => 'fa-download',
|
262 |
+
'fa-dribbble' => 'fa-dribbble',
|
263 |
+
'fa-dropbox' => 'fa-dropbox',
|
264 |
+
'fa-drupal' => 'fa-drupal',
|
265 |
+
'fa-edit' => 'fa-edit',
|
266 |
+
'fa-eject' => 'fa-eject',
|
267 |
+
'fa-ellipsis-h' => 'fa-ellipsis-h',
|
268 |
+
'fa-ellipsis-v' => 'fa-ellipsis-v',
|
269 |
+
'fa-empire' => 'fa-empire',
|
270 |
+
'fa-envelope' => 'fa-envelope',
|
271 |
+
'fa-envelope-o' => 'fa-envelope-o',
|
272 |
+
'fa-envelope-square' => 'fa-envelope-square',
|
273 |
+
'fa-eraser' => 'fa-eraser',
|
274 |
+
'fa-eur' => 'fa-eur',
|
275 |
+
'fa-euro' => 'fa-euro',
|
276 |
+
'fa-exchange' => 'fa-exchange',
|
277 |
+
'fa-exclamation' => 'fa-exclamation',
|
278 |
+
'fa-exclamation-circle' => 'fa-exclamation-circle',
|
279 |
+
'fa-exclamation-triangle' => 'fa-exclamation-triangle',
|
280 |
+
'fa-expand' => 'fa-expand',
|
281 |
+
'fa-external-link' => 'fa-external-link',
|
282 |
+
'fa-external-link-square' => 'fa-external-link-square',
|
283 |
+
'fa-eye' => 'fa-eye',
|
284 |
+
'fa-eye-slash' => 'fa-eye-slash',
|
285 |
+
'fa-eyedropper' => 'fa-eyedropper',
|
286 |
+
'fa-facebook' => 'fa-facebook',
|
287 |
+
'fa-facebook-f' => 'fa-facebook-f',
|
288 |
+
'fa-facebook-official' => 'fa-facebook-official',
|
289 |
+
'fa-facebook-square' => 'fa-facebook-square',
|
290 |
+
'fa-fast-backward' => 'fa-fast-backward',
|
291 |
+
'fa-fast-forward' => 'fa-fast-forward',
|
292 |
+
'fa-fax' => 'fa-fax',
|
293 |
+
'fa-female' => 'fa-female',
|
294 |
+
'fa-fighter-jet' => 'fa-fighter-jet',
|
295 |
+
'fa-file' => 'fa-file',
|
296 |
+
'fa-file-archive-o' => 'fa-file-archive-o',
|
297 |
+
'fa-file-audio-o' => 'fa-file-audio-o',
|
298 |
+
'fa-file-code-o' => 'fa-file-code-o',
|
299 |
+
'fa-file-excel-o' => 'fa-file-excel-o',
|
300 |
+
'fa-file-image-o' => 'fa-file-image-o',
|
301 |
+
'fa-file-movie-o' => 'fa-file-movie-o',
|
302 |
+
'fa-file-o' => 'fa-file-o',
|
303 |
+
'fa-file-pdf-o' => 'fa-file-pdf-o',
|
304 |
+
'fa-file-photo-o' => 'fa-file-photo-o',
|
305 |
+
'fa-file-picture-o' => 'fa-file-picture-o',
|
306 |
+
'fa-file-powerpoint-o' => 'fa-file-powerpoint-o',
|
307 |
+
'fa-file-sound-o' => 'fa-file-sound-o',
|
308 |
+
'fa-file-text' => 'fa-file-text',
|
309 |
+
'fa-file-text-o' => 'fa-file-text-o',
|
310 |
+
'fa-file-video-o' => 'fa-file-video-o',
|
311 |
+
'fa-file-word-o' => 'fa-file-word-o',
|
312 |
+
'fa-file-zip-o' => 'fa-file-zip-o',
|
313 |
+
'fa-files-o' => 'fa-files-o',
|
314 |
+
'fa-film' => 'fa-film',
|
315 |
+
'fa-filter' => 'fa-filter',
|
316 |
+
'fa-fire' => 'fa-fire',
|
317 |
+
'fa-fire-extinguisher' => 'fa-fire-extinguisher',
|
318 |
+
'fa-flag' => 'fa-flag',
|
319 |
+
'fa-flag-checkered' => 'fa-flag-checkered',
|
320 |
+
'fa-flag-o' => 'fa-flag-o',
|
321 |
+
'fa-flash' => 'fa-flash',
|
322 |
+
'fa-flask' => 'fa-flask',
|
323 |
+
'fa-flickr' => 'fa-flickr',
|
324 |
+
'fa-floppy-o' => 'fa-floppy-o',
|
325 |
+
'fa-folder' => 'fa-folder',
|
326 |
+
'fa-folder-o' => 'fa-folder-o',
|
327 |
+
'fa-folder-open' => 'fa-folder-open',
|
328 |
+
'fa-folder-open-o' => 'fa-folder-open-o',
|
329 |
+
'fa-font' => 'fa-font',
|
330 |
+
'fa-forumbee' => 'fa-forumbee',
|
331 |
+
'fa-forward' => 'fa-forward',
|
332 |
+
'fa-foursquare' => 'fa-foursquare',
|
333 |
+
'fa-frown-o' => 'fa-frown-o',
|
334 |
+
'fa-futbol-o' => 'fa-futbol-o',
|
335 |
+
'fa-gamepad' => 'fa-gamepad',
|
336 |
+
'fa-gavel' => 'fa-gavel',
|
337 |
+
'fa-gbp' => 'fa-gbp',
|
338 |
+
'fa-ge' => 'fa-ge',
|
339 |
+
'fa-gear' => 'fa-gear',
|
340 |
+
'fa-gears' => 'fa-gears',
|
341 |
+
'fa-genderless' => 'fa-genderless',
|
342 |
+
'fa-gift' => 'fa-gift',
|
343 |
+
'fa-git' => 'fa-git',
|
344 |
+
'fa-git-square' => 'fa-git-square',
|
345 |
+
'fa-github' => 'fa-github',
|
346 |
+
'fa-github-alt' => 'fa-github-alt',
|
347 |
+
'fa-github-square' => 'fa-github-square',
|
348 |
+
'fa-gittip' => 'fa-gittip',
|
349 |
+
'fa-glass' => 'fa-glass',
|
350 |
+
'fa-globe' => 'fa-globe',
|
351 |
+
'fa-google' => 'fa-google',
|
352 |
+
'fa-google-plus' => 'fa-google-plus',
|
353 |
+
'fa-google-plus-square' => 'fa-google-plus-square',
|
354 |
+
'fa-google-wallet' => 'fa-google-wallet',
|
355 |
+
'fa-graduation-cap' => 'fa-graduation-cap',
|
356 |
+
'fa-gratipay' => 'fa-gratipay',
|
357 |
+
'fa-group' => 'fa-group',
|
358 |
+
'fa-h-square' => 'fa-h-square',
|
359 |
+
'fa-hacker-news' => 'fa-hacker-news',
|
360 |
+
'fa-hand-o-down' => 'fa-hand-o-down',
|
361 |
+
'fa-hand-o-left' => 'fa-hand-o-left',
|
362 |
+
'fa-hand-o-right' => 'fa-hand-o-right',
|
363 |
+
'fa-hand-o-up' => 'fa-hand-o-up',
|
364 |
+
'fa-hdd-o' => 'fa-hdd-o',
|
365 |
+
'fa-header' => 'fa-header',
|
366 |
+
'fa-headphones' => 'fa-headphones',
|
367 |
+
'fa-heart' => 'fa-heart',
|
368 |
+
'fa-heart-o' => 'fa-heart-o',
|
369 |
+
'fa-heartbeat' => 'fa-heartbeat',
|
370 |
+
'fa-history' => 'fa-history',
|
371 |
+
'fa-home' => 'fa-home',
|
372 |
+
'fa-hospital-o' => 'fa-hospital-o',
|
373 |
+
'fa-hotel' => 'fa-hotel',
|
374 |
+
'fa-html5' => 'fa-html5',
|
375 |
+
'fa-ils' => 'fa-ils',
|
376 |
+
'fa-image' => 'fa-image',
|
377 |
+
'fa-inbox' => 'fa-inbox',
|
378 |
+
'fa-indent' => 'fa-indent',
|
379 |
+
'fa-info' => 'fa-info',
|
380 |
+
'fa-info-circle' => 'fa-info-circle',
|
381 |
+
'fa-inr' => 'fa-inr',
|
382 |
+
'fa-instagram' => 'fa-instagram',
|
383 |
+
'fa-institution' => 'fa-institution',
|
384 |
+
'fa-ioxhost' => 'fa-ioxhost',
|
385 |
+
'fa-italic' => 'fa-italic',
|
386 |
+
'fa-joomla' => 'fa-joomla',
|
387 |
+
'fa-jpy' => 'fa-jpy',
|
388 |
+
'fa-jsfiddle' => 'fa-jsfiddle',
|
389 |
+
'fa-key' => 'fa-key',
|
390 |
+
'fa-keyboard-o' => 'fa-keyboard-o',
|
391 |
+
'fa-krw' => 'fa-krw',
|
392 |
+
'fa-language' => 'fa-language',
|
393 |
+
'fa-laptop' => 'fa-laptop',
|
394 |
+
'fa-lastfm' => 'fa-lastfm',
|
395 |
+
'fa-lastfm-square' => 'fa-lastfm-square',
|
396 |
+
'fa-leaf' => 'fa-leaf',
|
397 |
+
'fa-leanpub' => 'fa-leanpub',
|
398 |
+
'fa-legal' => 'fa-legal',
|
399 |
+
'fa-lemon-o' => 'fa-lemon-o',
|
400 |
+
'fa-level-down' => 'fa-level-down',
|
401 |
+
'fa-level-up' => 'fa-level-up',
|
402 |
+
'fa-life-bouy' => 'fa-life-bouy',
|
403 |
+
'fa-life-buoy' => 'fa-life-buoy',
|
404 |
+
'fa-life-ring' => 'fa-life-ring',
|
405 |
+
'fa-life-saver' => 'fa-life-saver',
|
406 |
+
'fa-lightbulb-o' => 'fa-lightbulb-o',
|
407 |
+
'fa-line-chart' => 'fa-line-chart',
|
408 |
+
'fa-link' => 'fa-link',
|
409 |
+
'fa-linkedin' => 'fa-linkedin',
|
410 |
+
'fa-linkedin-square' => 'fa-linkedin-square',
|
411 |
+
'fa-linux' => 'fa-linux',
|
412 |
+
'fa-list' => 'fa-list',
|
413 |
+
'fa-list-alt' => 'fa-list-alt',
|
414 |
+
'fa-list-ol' => 'fa-list-ol',
|
415 |
+
'fa-list-ul' => 'fa-list-ul',
|
416 |
+
'fa-location-arrow' => 'fa-location-arrow',
|
417 |
+
'fa-lock' => 'fa-lock',
|
418 |
+
'fa-long-arrow-down' => 'fa-long-arrow-down',
|
419 |
+
'fa-long-arrow-left' => 'fa-long-arrow-left',
|
420 |
+
'fa-long-arrow-right' => 'fa-long-arrow-right',
|
421 |
+
'fa-long-arrow-up' => 'fa-long-arrow-up',
|
422 |
+
'fa-magic' => 'fa-magic',
|
423 |
+
'fa-magnet' => 'fa-magnet',
|
424 |
+
'fa-mail-forward' => 'fa-mail-forward',
|
425 |
+
'fa-mail-reply' => 'fa-mail-reply',
|
426 |
+
'fa-mail-reply-all' => 'fa-mail-reply-all',
|
427 |
+
'fa-male' => 'fa-male',
|
428 |
+
'fa-map-marker' => 'fa-map-marker',
|
429 |
+
'fa-mars' => 'fa-mars',
|
430 |
+
'fa-mars-double' => 'fa-mars-double',
|
431 |
+
'fa-mars-stroke' => 'fa-mars-stroke',
|
432 |
+
'fa-mars-stroke-h' => 'fa-mars-stroke-h',
|
433 |
+
'fa-mars-stroke-v' => 'fa-mars-stroke-v',
|
434 |
+
'fa-maxcdn' => 'fa-maxcdn',
|
435 |
+
'fa-meanpath' => 'fa-meanpath',
|
436 |
+
'fa-medium' => 'fa-medium',
|
437 |
+
'fa-medkit' => 'fa-medkit',
|
438 |
+
'fa-meh-o' => 'fa-meh-o',
|
439 |
+
'fa-mercury' => 'fa-mercury',
|
440 |
+
'fa-microphone' => 'fa-microphone',
|
441 |
+
'fa-microphone-slash' => 'fa-microphone-slash',
|
442 |
+
'fa-minus' => 'fa-minus',
|
443 |
+
'fa-minus-circle' => 'fa-minus-circle',
|
444 |
+
'fa-minus-square' => 'fa-minus-square',
|
445 |
+
'fa-minus-square-o' => 'fa-minus-square-o',
|
446 |
+
'fa-mobile' => 'fa-mobile',
|
447 |
+
'fa-mobile-phone' => 'fa-mobile-phone',
|
448 |
+
'fa-money' => 'fa-money',
|
449 |
+
'fa-moon-o' => 'fa-moon-o',
|
450 |
+
'fa-mortar-board' => 'fa-mortar-board',
|
451 |
+
'fa-motorcycle' => 'fa-motorcycle',
|
452 |
+
'fa-music' => 'fa-music',
|
453 |
+
'fa-navicon' => 'fa-navicon',
|
454 |
+
'fa-neuter' => 'fa-neuter',
|
455 |
+
'fa-newspaper-o' => 'fa-newspaper-o',
|
456 |
+
'fa-openid' => 'fa-openid',
|
457 |
+
'fa-outdent' => 'fa-outdent',
|
458 |
+
'fa-pagelines' => 'fa-pagelines',
|
459 |
+
'fa-paint-brush' => 'fa-paint-brush',
|
460 |
+
'fa-paper-plane' => 'fa-paper-plane',
|
461 |
+
'fa-paper-plane-o' => 'fa-paper-plane-o',
|
462 |
+
'fa-paperclip' => 'fa-paperclip',
|
463 |
+
'fa-paragraph' => 'fa-paragraph',
|
464 |
+
'fa-paste' => 'fa-paste',
|
465 |
+
'fa-pause' => 'fa-pause',
|
466 |
+
'fa-paw' => 'fa-paw',
|
467 |
+
'fa-paypal' => 'fa-paypal',
|
468 |
+
'fa-pencil' => 'fa-pencil',
|
469 |
+
'fa-pencil-square' => 'fa-pencil-square',
|
470 |
+
'fa-pencil-square-o' => 'fa-pencil-square-o',
|
471 |
+
'fa-phone' => 'fa-phone',
|
472 |
+
'fa-phone-square' => 'fa-phone-square',
|
473 |
+
'fa-photo' => 'fa-photo',
|
474 |
+
'fa-picture-o' => 'fa-picture-o',
|
475 |
+
'fa-pie-chart' => 'fa-pie-chart',
|
476 |
+
'fa-pied-piper' => 'fa-pied-piper',
|
477 |
+
'fa-pied-piper-alt' => 'fa-pied-piper-alt',
|
478 |
+
'fa-pinterest' => 'fa-pinterest',
|
479 |
+
'fa-pinterest-p' => 'fa-pinterest-p',
|
480 |
+
'fa-pinterest-square' => 'fa-pinterest-square',
|
481 |
+
'fa-plane' => 'fa-plane',
|
482 |
+
'fa-play' => 'fa-play',
|
483 |
+
'fa-play-circle' => 'fa-play-circle',
|
484 |
+
'fa-play-circle-o' => 'fa-play-circle-o',
|
485 |
+
'fa-plug' => 'fa-plug',
|
486 |
+
'fa-plus' => 'fa-plus',
|
487 |
+
'fa-plus-circle' => 'fa-plus-circle',
|
488 |
+
'fa-plus-square' => 'fa-plus-square',
|
489 |
+
'fa-plus-square-o' => 'fa-plus-square-o',
|
490 |
+
'fa-power-off' => 'fa-power-off',
|
491 |
+
'fa-print' => 'fa-print',
|
492 |
+
'fa-puzzle-piece' => 'fa-puzzle-piece',
|
493 |
+
'fa-qq' => 'fa-qq',
|
494 |
+
'fa-qrcode' => 'fa-qrcode',
|
495 |
+
'fa-question' => 'fa-question',
|
496 |
+
'fa-question-circle' => 'fa-question-circle',
|
497 |
+
'fa-quote-left' => 'fa-quote-left',
|
498 |
+
'fa-quote-right' => 'fa-quote-right',
|
499 |
+
'fa-ra' => 'fa-ra',
|
500 |
+
'fa-random' => 'fa-random',
|
501 |
+
'fa-rebel' => 'fa-rebel',
|
502 |
+
'fa-recycle' => 'fa-recycle',
|
503 |
+
'fa-reddit' => 'fa-reddit',
|
504 |
+
'fa-reddit-square' => 'fa-reddit-square',
|
505 |
+
'fa-refresh' => 'fa-refresh',
|
506 |
+
'fa-remove' => 'fa-remove',
|
507 |
+
'fa-renren' => 'fa-renren',
|
508 |
+
'fa-reorder' => 'fa-reorder',
|
509 |
+
'fa-repeat' => 'fa-repeat',
|
510 |
+
'fa-reply' => 'fa-reply',
|
511 |
+
'fa-reply-all' => 'fa-reply-all',
|
512 |
+
'fa-retweet' => 'fa-retweet',
|
513 |
+
'fa-rmb' => 'fa-rmb',
|
514 |
+
'fa-road' => 'fa-road',
|
515 |
+
'fa-rocket' => 'fa-rocket',
|
516 |
+
'fa-rotate-left' => 'fa-rotate-left',
|
517 |
+
'fa-rotate-right' => 'fa-rotate-right',
|
518 |
+
'fa-rouble' => 'fa-rouble',
|
519 |
+
'fa-rss' => 'fa-rss',
|
520 |
+
'fa-rss-square' => 'fa-rss-square',
|
521 |
+
'fa-rub' => 'fa-rub',
|
522 |
+
'fa-ruble' => 'fa-ruble',
|
523 |
+
'fa-rupee' => 'fa-rupee',
|
524 |
+
'fa-save' => 'fa-save',
|
525 |
+
'fa-scissors' => 'fa-scissors',
|
526 |
+
'fa-search' => 'fa-search',
|
527 |
+
'fa-search-minus' => 'fa-search-minus',
|
528 |
+
'fa-search-plus' => 'fa-search-plus',
|
529 |
+
'fa-sellsy' => 'fa-sellsy',
|
530 |
+
'fa-send' => 'fa-send',
|
531 |
+
'fa-send-o' => 'fa-send-o',
|
532 |
+
'fa-server' => 'fa-server',
|
533 |
+
'fa-share' => 'fa-share',
|
534 |
+
'fa-share-alt' => 'fa-share-alt',
|
535 |
+
'fa-share-alt-square' => 'fa-share-alt-square',
|
536 |
+
'fa-share-square' => 'fa-share-square',
|
537 |
+
'fa-share-square-o' => 'fa-share-square-o',
|
538 |
+
'fa-shekel' => 'fa-shekel',
|
539 |
+
'fa-sheqel' => 'fa-sheqel',
|
540 |
+
'fa-shield' => 'fa-shield',
|
541 |
+
'fa-ship' => 'fa-ship',
|
542 |
+
'fa-shirtsinbulk' => 'fa-shirtsinbulk',
|
543 |
+
'fa-shopping-cart' => 'fa-shopping-cart',
|
544 |
+
'fa-sign-in' => 'fa-sign-in',
|
545 |
+
'fa-sign-out' => 'fa-sign-out',
|
546 |
+
'fa-signal' => 'fa-signal',
|
547 |
+
'fa-simplybuilt' => 'fa-simplybuilt',
|
548 |
+
'fa-sitemap' => 'fa-sitemap',
|
549 |
+
'fa-skyatlas' => 'fa-skyatlas',
|
550 |
+
'fa-skype' => 'fa-skype',
|
551 |
+
'fa-slack' => 'fa-slack',
|
552 |
+
'fa-sliders' => 'fa-sliders',
|
553 |
+
'fa-slideshare' => 'fa-slideshare',
|
554 |
+
'fa-smile-o' => 'fa-smile-o',
|
555 |
+
'fa-soccer-ball-o' => 'fa-soccer-ball-o',
|
556 |
+
'fa-sort' => 'fa-sort',
|
557 |
+
'fa-sort-alpha-asc' => 'fa-sort-alpha-asc',
|
558 |
+
'fa-sort-alpha-desc' => 'fa-sort-alpha-desc',
|
559 |
+
'fa-sort-amount-asc' => 'fa-sort-amount-asc',
|
560 |
+
'fa-sort-amount-desc' => 'fa-sort-amount-desc',
|
561 |
+
'fa-sort-asc' => 'fa-sort-asc',
|
562 |
+
'fa-sort-desc' => 'fa-sort-desc',
|
563 |
+
'fa-sort-down' => 'fa-sort-down',
|
564 |
+
'fa-sort-numeric-asc' => 'fa-sort-numeric-asc',
|
565 |
+
'fa-sort-numeric-desc' => 'fa-sort-numeric-desc',
|
566 |
+
'fa-sort-up' => 'fa-sort-up',
|
567 |
+
'fa-soundcloud' => 'fa-soundcloud',
|
568 |
+
'fa-space-shuttle' => 'fa-space-shuttle',
|
569 |
+
'fa-spinner' => 'fa-spinner',
|
570 |
+
'fa-spoon' => 'fa-spoon',
|
571 |
+
'fa-spotify' => 'fa-spotify',
|
572 |
+
'fa-square' => 'fa-square',
|
573 |
+
'fa-square-o' => 'fa-square-o',
|
574 |
+
'fa-stack-exchange' => 'fa-stack-exchange',
|
575 |
+
'fa-stack-overflow' => 'fa-stack-overflow',
|
576 |
+
'fa-star' => 'fa-star',
|
577 |
+
'fa-star-half' => 'fa-star-half',
|
578 |
+
'fa-star-half-empty' => 'fa-star-half-empty',
|
579 |
+
'fa-star-half-full' => 'fa-star-half-full',
|
580 |
+
'fa-star-half-o' => 'fa-star-half-o',
|
581 |
+
'fa-star-o' => 'fa-star-o',
|
582 |
+
'fa-steam' => 'fa-steam',
|
583 |
+
'fa-steam-square' => 'fa-steam-square',
|
584 |
+
'fa-step-backward' => 'fa-step-backward',
|
585 |
+
'fa-step-forward' => 'fa-step-forward',
|
586 |
+
'fa-stethoscope' => 'fa-stethoscope',
|
587 |
+
'fa-stop' => 'fa-stop',
|
588 |
+
'fa-street-view' => 'fa-street-view',
|
589 |
+
'fa-strikethrough' => 'fa-strikethrough',
|
590 |
+
'fa-stumbleupon' => 'fa-stumbleupon',
|
591 |
+
'fa-stumbleupon-circle' => 'fa-stumbleupon-circle',
|
592 |
+
'fa-subscript' => 'fa-subscript',
|
593 |
+
'fa-subway' => 'fa-subway',
|
594 |
+
'fa-suitcase' => 'fa-suitcase',
|
595 |
+
'fa-sun-o' => 'fa-sun-o',
|
596 |
+
'fa-superscript' => 'fa-superscript',
|
597 |
+
'fa-support' => 'fa-support',
|
598 |
+
'fa-table' => 'fa-table',
|
599 |
+
'fa-tablet' => 'fa-tablet',
|
600 |
+
'fa-tachometer' => 'fa-tachometer',
|
601 |
+
'fa-tag' => 'fa-tag',
|
602 |
+
'fa-tags' => 'fa-tags',
|
603 |
+
'fa-tasks' => 'fa-tasks',
|
604 |
+
'fa-taxi' => 'fa-taxi',
|
605 |
+
'fa-tencent-weibo' => 'fa-tencent-weibo',
|
606 |
+
'fa-terminal' => 'fa-terminal',
|
607 |
+
'fa-text-height' => 'fa-text-height',
|
608 |
+
'fa-text-width' => 'fa-text-width',
|
609 |
+
'fa-th' => 'fa-th',
|
610 |
+
'fa-th-large' => 'fa-th-large',
|
611 |
+
'fa-th-list' => 'fa-th-list',
|
612 |
+
'fa-thumb-tack' => 'fa-thumb-tack',
|
613 |
+
'fa-thumbs-down' => 'fa-thumbs-down',
|
614 |
+
'fa-thumbs-o-down' => 'fa-thumbs-o-down',
|
615 |
+
'fa-thumbs-o-up' => 'fa-thumbs-o-up',
|
616 |
+
'fa-thumbs-up' => 'fa-thumbs-up',
|
617 |
+
'fa-ticket' => 'fa-ticket',
|
618 |
+
'fa-times' => 'fa-times',
|
619 |
+
'fa-times-circle' => 'fa-times-circle',
|
620 |
+
'fa-times-circle-o' => 'fa-times-circle-o',
|
621 |
+
'fa-tint' => 'fa-tint',
|
622 |
+
'fa-toggle-down' => 'fa-toggle-down',
|
623 |
+
'fa-toggle-left' => 'fa-toggle-left',
|
624 |
+
'fa-toggle-off' => 'fa-toggle-off',
|
625 |
+
'fa-toggle-on' => 'fa-toggle-on',
|
626 |
+
'fa-toggle-right' => 'fa-toggle-right',
|
627 |
+
'fa-toggle-up' => 'fa-toggle-up',
|
628 |
+
'fa-train' => 'fa-train',
|
629 |
+
'fa-transgender' => 'fa-transgender',
|
630 |
+
'fa-transgender-alt' => 'fa-transgender-alt',
|
631 |
+
'fa-trash' => 'fa-trash',
|
632 |
+
'fa-trash-o' => 'fa-trash-o',
|
633 |
+
'fa-tree' => 'fa-tree',
|
634 |
+
'fa-trello' => 'fa-trello',
|
635 |
+
'fa-trophy' => 'fa-trophy',
|
636 |
+
'fa-truck' => 'fa-truck',
|
637 |
+
'fa-try' => 'fa-try',
|
638 |
+
'fa-tty' => 'fa-tty',
|
639 |
+
'fa-tumblr' => 'fa-tumblr',
|
640 |
+
'fa-tumblr-square' => 'fa-tumblr-square',
|
641 |
+
'fa-turkish-lira' => 'fa-turkish-lira',
|
642 |
+
'fa-twitch' => 'fa-twitch',
|
643 |
+
'fa-twitter' => 'fa-twitter',
|
644 |
+
'fa-twitter-square' => 'fa-twitter-square',
|
645 |
+
'fa-umbrella' => 'fa-umbrella',
|
646 |
+
'fa-underline' => 'fa-underline',
|
647 |
+
'fa-undo' => 'fa-undo',
|
648 |
+
'fa-university' => 'fa-university',
|
649 |
+
'fa-unlink' => 'fa-unlink',
|
650 |
+
'fa-unlock' => 'fa-unlock',
|
651 |
+
'fa-unlock-alt' => 'fa-unlock-alt',
|
652 |
+
'fa-unsorted' => 'fa-unsorted',
|
653 |
+
'fa-upload' => 'fa-upload',
|
654 |
+
'fa-usd' => 'fa-usd',
|
655 |
+
'fa-user' => 'fa-user',
|
656 |
+
'fa-user-md' => 'fa-user-md',
|
657 |
+
'fa-user-plus' => 'fa-user-plus',
|
658 |
+
'fa-user-secret' => 'fa-user-secret',
|
659 |
+
'fa-user-times' => 'fa-user-times',
|
660 |
+
'fa-users' => 'fa-users',
|
661 |
+
'fa-venus' => 'fa-venus',
|
662 |
+
'fa-venus-double' => 'fa-venus-double',
|
663 |
+
'fa-venus-mars' => 'fa-venus-mars',
|
664 |
+
'fa-viacoin' => 'fa-viacoin',
|
665 |
+
'fa-video-camera' => 'fa-video-camera',
|
666 |
+
'fa-vimeo-square' => 'fa-vimeo-square',
|
667 |
+
'fa-vine' => 'fa-vine',
|
668 |
+
'fa-vk' => 'fa-vk',
|
669 |
+
'fa-volume-down' => 'fa-volume-down',
|
670 |
+
'fa-volume-off' => 'fa-volume-off',
|
671 |
+
'fa-volume-up' => 'fa-volume-up',
|
672 |
+
'fa-warning' => 'fa-warning',
|
673 |
+
'fa-wechat' => 'fa-wechat',
|
674 |
+
'fa-weibo' => 'fa-weibo',
|
675 |
+
'fa-weixin' => 'fa-weixin',
|
676 |
+
'fa-whatsapp' => 'fa-whatsapp',
|
677 |
+
'fa-wheelchair' => 'fa-wheelchair',
|
678 |
+
'fa-wifi' => 'fa-wifi',
|
679 |
+
'fa-windows' => 'fa-windows',
|
680 |
+
'fa-won' => 'fa-won',
|
681 |
+
'fa-wordpress' => 'fa-wordpress',
|
682 |
+
'fa-wrench' => 'fa-wrench',
|
683 |
+
'fa-xing' => 'fa-xing',
|
684 |
+
'fa-xing-square' => 'fa-xing-square',
|
685 |
+
'fa-yahoo' => 'fa-yahoo',
|
686 |
+
'fa-yelp' => 'fa-yelp',
|
687 |
+
'fa-yen' => 'fa-yen',
|
688 |
+
'fa-youtube' => 'fa-youtube',
|
689 |
+
'fa-youtube-play' => 'fa-youtube-play',
|
690 |
+
'fa-youtube-square' => 'fa-youtube-square'
|
691 |
+
);
|
692 |
+
|
693 |
+
foreach( $icons as $icon ) {
|
694 |
+
$all_icons[$icon] = $icon;
|
695 |
+
}
|
696 |
+
|
697 |
+
return $all_icons;
|
698 |
+
}
|
699 |
+
|
700 |
+
/**
|
701 |
+
* Back-end widget form.
|
702 |
+
*
|
703 |
+
* @see WP_Widget::form()
|
704 |
+
*
|
705 |
+
* @param array $instance Previously saved values from database.
|
706 |
+
*/
|
707 |
+
public function form( $instance ) {
|
708 |
+
$title = ! empty( $instance['title'] ) ? sanitize_text_field( $instance['title'] ) : __( '[Illdy] - Skill', 'illdy' );
|
709 |
+
$percentage = !empty( $instance['percentage'] ) ? absint( $instance['percentage'] ) : '';
|
710 |
+
$icon = !empty( $instance['icon'] ) ? esc_html( $instance['icon'] ) : '';
|
711 |
+
$color = !empty( $instance['color'] ) ? esc_attr( $instance['color'] ) : '';
|
712 |
+
|
713 |
+
$get_fontawesome_icons = $this->get_fontawesome_icons();
|
714 |
+
?>
|
715 |
+
|
716 |
+
<p>
|
717 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'illdy' ); ?></label>
|
718 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>">
|
719 |
+
</p>
|
720 |
+
|
721 |
+
<p>
|
722 |
+
<label for="<?php echo $this->get_field_id( 'percentage' ); ?>"><?php _e( 'Percentage:', 'illdy' ); ?></label>
|
723 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'percentage' ); ?>" name="<?php echo $this->get_field_name( 'percentage' ); ?>" type="number" value="<?php echo esc_attr( $percentage ); ?>">
|
724 |
+
</p>
|
725 |
+
|
726 |
+
<p>
|
727 |
+
<label for="<?php echo $this->get_field_id( 'icon' ); ?>"><?php _e( 'Icon:', 'illdy' ); ?></label>
|
728 |
+
<select class="widefat" id="<?php echo $this->get_field_id( 'icon' ); ?>" name="<?php echo $this->get_field_name( 'icon' ); ?>">
|
729 |
+
<option value="all-font-awesome-icons"><?php _e( 'All Font Awesome Icons', 'illdy' ); ?></option>
|
730 |
+
<?php foreach( $get_fontawesome_icons as $key => $get_fontawesome_icon ): ?>
|
731 |
+
<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $icon, $key ); ?>><?php echo esc_html( $get_fontawesome_icon ); ?></option>
|
732 |
+
<?php endforeach; ?>
|
733 |
+
</select>
|
734 |
+
</p>
|
735 |
+
|
736 |
+
<p>
|
737 |
+
<label for="<?php echo $this->get_field_id( 'color' ); ?>"><?php _e( 'Color:', 'illdy' ); ?></label><br>
|
738 |
+
<input type="text" name="<?php echo $this->get_field_name( 'color' ); ?>" class="color-picker" id="<?php echo $this->get_field_id( 'color' ); ?>" value="<?php echo $color; ?>" data-default-color="#000000" />
|
739 |
+
</p>
|
740 |
+
<?php
|
741 |
+
}
|
742 |
+
|
743 |
+
/**
|
744 |
+
* Sanitize widget form values as they are saved.
|
745 |
+
*
|
746 |
+
* @see WP_Widget::update()
|
747 |
+
*
|
748 |
+
* @param array $new_instance Values just sent to be saved.
|
749 |
+
* @param array $old_instance Previously saved values from database.
|
750 |
+
*
|
751 |
+
* @return array Updated safe values to be saved.
|
752 |
+
*/
|
753 |
+
public function update( $new_instance, $old_instance ) {
|
754 |
+
$instance = array();
|
755 |
+
$instance['title'] = ( !empty( $new_instance['title'] ) ) ? esc_html( $new_instance['title'] ) : '';
|
756 |
+
$instance['percentage'] = ( !empty( $new_instance['percentage'] ) ? absint( $new_instance['percentage'] ) : '' );
|
757 |
+
$instance['icon'] = ( !empty( $new_instance['icon'] ) ? esc_html( $new_instance['icon'] ) : '' );
|
758 |
+
$instance['color'] = ( !empty( $new_instance['color'] ) ? esc_html( $new_instance['color'] ) : '' );
|
759 |
+
|
760 |
+
return $instance;
|
761 |
+
}
|
762 |
+
|
763 |
+
}
|
764 |
+
|
765 |
+
add_action( 'widgets_init', 'illdy_register_widget_skill' );
|
766 |
+
function illdy_register_widget_skill () {
|
767 |
+
register_widget( 'Illdy_Widget_Skill' );
|
768 |
+
}
|