Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Adding the Themify icons
- */
- add_action( 'wpb_wmca_add_custom_icons', 'wpb_wmca_add_themify_icons' );
- add_action( 'wpb_wmca_icon_set', 'wpb_wmca_add_themify_icons_list' );
- add_action( 'wpb_wmca_icon_set_init', 'wpb_wmca_themify_icon_set_init' );
- /**
- * Load Themify icons
- */
- function wpb_wmca_add_themify_icons(){
- wp_enqueue_style( 'wpb_wmca_themify_icons', plugins_url('admin/assets/css/themify-icons.css', __FILE__), '', '1.0' );
- }
- /**
- * Themify icons List
- */
- function wpb_wmca_add_themify_icons_list(){
- $icons = [];
- $themify_icons = file(WPB_WAMC_PATH . 'admin/assets/css/themify-icons.css');
- if( !empty($themify_icons) ){
- foreach($themify_icons as $themify_icon) {
- if(stripos($themify_icon, ".ti-") === 0) {
- $l = explode(":", $themify_icon);
- $icons[str_replace(".", "", $l[0])] = str_replace(".", "", $l[0]);
- }
- }
- }
- if( !empty($icons) ){
- ?>
- <div class="ti-set icon-set">
- <?php
- if( function_exists('wpb_wmca_icons_search_box') ){
- wpb_wmca_icons_search_box();
- }
- ?>
- <ul class="wpb_wmca_icons_list">
- <?php
- foreach ($icons as $icon ) {
- printf('<li data-class="%s" class="%s"></li>', esc_attr( $icon ), esc_attr( $icon ));
- }
- ?>
- </ul>
- </div>
- <?php
- }
- }
- /**
- * Themify icons Init
- */
- function wpb_wmca_themify_icon_set_init(){
- echo "'ti' : 'Themify Icons',";
- }
Add Comment
Please, Sign In to add comment