├── .jshintignore ├── .gitignore ├── assets ├── fonts │ ├── font-awesome │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ └── glyphicons │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 ├── css │ ├── admin.css │ ├── jquery.fonticonpicker.grey.min.css │ ├── jquery.fonticonpicker.css │ ├── epsilon.css │ └── font-awesome.min.css └── js │ ├── widget-text-editor.js │ ├── widget-upload-image.js │ ├── admin.js │ ├── epsilon.js │ └── iconpicker.min.js ├── .jscsrc ├── .jshintrc ├── .standard.json ├── package.json ├── phpcs.ruleset.xml ├── illdy-companion.php ├── .travis.yml ├── Gruntfile.js ├── readme.txt ├── widgets ├── class-illdy-widget-testimonial.php ├── class-illdy-widget-recent-posts.php ├── class-illdy-widget-counter.php ├── class-illdy-widget-project.php ├── class-illdy-widget-skill.php ├── class-illdy-widget-service.php ├── class-illdy-widget-person.php └── class-illdy-widget-parallax.php ├── inc ├── epsilon-dashboard │ └── class-epsilon-dashboard.php ├── class-illdy-companion-import-data.php └── class-illdy-companion-helper.php └── illdy-main.php /.jshintignore: -------------------------------------------------------------------------------- 1 | assets/js/*.min.js -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .sass-cache/* 2 | psd/* 3 | node_modules/* 4 | .idea/* 5 | illdy-companion.zip 6 | package-lock.json -------------------------------------------------------------------------------- /assets/fonts/font-awesome/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/illdy-companion/master/assets/fonts/font-awesome/FontAwesome.otf -------------------------------------------------------------------------------- /assets/fonts/font-awesome/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/illdy-companion/master/assets/fonts/font-awesome/fontawesome-webfont.eot -------------------------------------------------------------------------------- /assets/fonts/font-awesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/illdy-companion/master/assets/fonts/font-awesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /assets/fonts/font-awesome/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/illdy-companion/master/assets/fonts/font-awesome/fontawesome-webfont.woff -------------------------------------------------------------------------------- /assets/fonts/font-awesome/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/illdy-companion/master/assets/fonts/font-awesome/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /.jscsrc: -------------------------------------------------------------------------------- 1 | { 2 | "preset": "wordpress", 3 | "fileExtensions": [ ".js" ], 4 | "excludeFiles": [ 5 | "assets/js/*.min.js" 6 | ], 7 | "maxErrors": Infinity 8 | } 9 | -------------------------------------------------------------------------------- /assets/fonts/glyphicons/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/illdy-companion/master/assets/fonts/glyphicons/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /assets/fonts/glyphicons/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/illdy-companion/master/assets/fonts/glyphicons/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /assets/fonts/glyphicons/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/illdy-companion/master/assets/fonts/glyphicons/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /assets/fonts/glyphicons/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/illdy-companion/master/assets/fonts/glyphicons/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /assets/css/admin.css: -------------------------------------------------------------------------------- 1 | #demo_content { 2 | text-align: left; 3 | } 4 | #demo_content .spinner, 5 | .frontpage-spinner { 6 | float: none; 7 | } 8 | .updated-message, 9 | #demo_content .spinner { 10 | display: none; 11 | } 12 | #demo_content .spinner.is-active { 13 | display: inline-block; 14 | } 15 | .illdy-media-control img { 16 | width: 100%; 17 | } -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "boss": true, 3 | "curly": true, 4 | "eqeqeq": true, 5 | "eqnull": true, 6 | "es3": true, 7 | "expr": true, 8 | "immed": true, 9 | "noarg": true, 10 | "nonbsp": true, 11 | "onevar": true, 12 | "quotmark": "single", 13 | "trailing": true, 14 | "undef": true, 15 | "unused": false, 16 | "browser": true, 17 | "globals": { 18 | "jQuery": false, 19 | "wp": false, 20 | "welcomeScreen" : false, 21 | "ajaxurl" : false, 22 | "console" : false, 23 | "tinymce" : false 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.standard.json: -------------------------------------------------------------------------------- 1 | {"illdy-companion.php":[],"illdy-main.php":[],"inc/class-illdy-companion-helper.php":[],"inc/class-illdy-companion-import-data.php":[],"inc/epsilon-dashboard/class-epsilon-dashboard.php":[],"widgets/class-illdy-widget-counter.php":[],"widgets/class-illdy-widget-parallax.php":[],"widgets/class-illdy-widget-person.php":[],"widgets/class-illdy-widget-project.php":[],"widgets/class-illdy-widget-recent-posts.php":[],"widgets/class-illdy-widget-service.php":[],"widgets/class-illdy-widget-skill.php":[],"widgets/class-illdy-widget-testimonial.php":[]} -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "illdy-companion", 3 | "main": "Gruntfile.js", 4 | "version": "2.1.1", 5 | "homepage": "https://www.colorlib.com", 6 | "author": "Colorlib", 7 | "license": "GPL v3", 8 | "repository": "https://github.com/puikinsh/illdy-companion.git", 9 | "devDependencies": { 10 | "grunt": "^1.0.3", 11 | "grunt-checktextdomain": "^1.0.0", 12 | "grunt-cli": "~1.3.2", 13 | "grunt-contrib-clean": "^2.0.0", 14 | "grunt-contrib-compress": "^1.4.3", 15 | "grunt-contrib-copy": "^1.0.0", 16 | "load-grunt-tasks": "^4.0.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /phpcs.ruleset.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | A custom set of code standard rules to check for WordPress themes and plugins. 8 | 9 | 10 | 11 | 12 | */node_modules/* 13 | */woocommerce/* 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /assets/js/widget-text-editor.js: -------------------------------------------------------------------------------- 1 | // jscs:ignore validateLineBreaks 2 | var illdyCompanion = {}; 3 | illdyCompanion.textEditor = { 4 | init: function( selector ) { 5 | var context = jQuery( selector ), 6 | editorId = jQuery( context.find( 'textarea' ) ).attr( 'id' ); 7 | 8 | if ( tinymce.get( editorId ) ) { 9 | wp.editor.remove( editorId ); 10 | } 11 | 12 | wp.editor.initialize( editorId, { 13 | tinymce: { 14 | wpautop: true, 15 | setup: function( editor ) { 16 | editor.on( 'change', function() { 17 | editor.save(); 18 | jQuery( editor.getElement() ).trigger( 'change' ); 19 | } ); 20 | } 21 | }, 22 | quicktags: true 23 | } ); 24 | } 25 | }; 26 | 27 | jQuery( document ).ready( function( $ ) { 28 | $( '#widgets-right .illdy-editor-container' ).each(function() { 29 | illdyCompanion.textEditor.init( $( this ) ); 30 | }); 31 | 32 | }); 33 | 34 | jQuery( document ).on( 'widget-updated widget-added', function( e, widget ) { 35 | var context = jQuery( widget ).find( '.illdy-editor-container' ); 36 | illdyCompanion.textEditor.init( context ); 37 | }); 38 | -------------------------------------------------------------------------------- /assets/js/widget-upload-image.js: -------------------------------------------------------------------------------- 1 | // jscs:ignore validateLineBreaks 2 | jQuery( document ).ready( function( $ ) { 3 | function mediaUpload( buttonClass ) { 4 | var _customMedia = true, 5 | _origSendAttachment = wp.media.editor.send.attachment; 6 | 7 | $( 'body' ).on( 'click', buttonClass, function() { 8 | var buttonID = '#' + $( this ).attr( 'id' ); 9 | var button = $( buttonID ); 10 | var id = button.attr( 'id' ).replace( '_button', '' ); 11 | var fieldID = $( this ).attr( 'data-fieldid' ); 12 | _customMedia = true; 13 | wp.media.editor.send.attachment = function( props, attachment ) { 14 | if ( _customMedia ) { 15 | $( '.custom_media_id' ).val( attachment.id ); 16 | $( '.custom_media_url_' + fieldID ).val( attachment.url ); 17 | $( '.custom_media_url_' + fieldID ).trigger( 'change' ); 18 | } else { 19 | return _origSendAttachment.apply( buttonID, [props, attachment] ); 20 | } 21 | }; 22 | 23 | wp.media.editor.open( button ); 24 | 25 | return false; 26 | }); 27 | } 28 | mediaUpload( '.button.custom_media_button.button-primary' ); 29 | }); 30 | -------------------------------------------------------------------------------- /assets/css/jquery.fonticonpicker.grey.min.css: -------------------------------------------------------------------------------- 1 | /* Grey Theme file for fontIconPicker {@link https://github.com/micc83/fontIconPicker} */ 2 | .fip-grey.icons-selector{font-size:16px}.fip-grey.icons-selector .selector{border:1px solid #EDEDED;background-color:#fff}.fip-grey.icons-selector .selector-button{background-color:#F4F4F4;border-left:1px solid #E1E1E1}.fip-grey.icons-selector .selector-button:hover{background-color:#f1f1f1}.fip-grey.icons-selector .selector-button:hover i{color:#999}.fip-grey.icons-selector .selector-button i{color:#aaa;text-shadow:0 1px 0 #FFF}.fip-grey.icons-selector .selected-icon i{color:#404040}.fip-grey.icons-selector .selector-popup{-moz-box-shadow:0 1px 1px rgba(0,0,0,.04);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #E5E5E5}.fip-grey.icons-selector .selector-category select,.fip-grey.icons-selector .selector-search input[type=text]{border:1px solid #EDEDED;color:#404040;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;outline:0}.fip-grey.icons-selector input::-webkit-input-placeholder{color:#ddd}.fip-grey.icons-selector input:-moz-placeholder{color:#ddd}.fip-grey.icons-selector input::-moz-placeholder{color:#ddd}.fip-grey.icons-selector input:-ms-input-placeholder{color:#ddd!important}.fip-grey.icons-selector .selector-search i{color:#eee}.fip-grey.icons-selector .fip-icons-container{background-color:#fff;border:1px solid #EDEDED}.fip-grey.icons-selector .fip-icons-container .loading{color:#eee}.fip-grey.icons-selector .fip-box{border:1px solid #EFEFEF}.fip-grey.icons-selector .fip-box:hover{background-color:#f6f6f6}.fip-grey.icons-selector .selector-footer,.fip-grey.icons-selector .selector-footer i{color:#ddd}.fip-grey.icons-selector .selector-arrows i:hover{color:#777}.fip-grey.icons-selector span.current-icon,.fip-grey.icons-selector span.current-icon:hover{background-color:#2EA2CC;color:#fff;border:1px solid #298CBA}.fip-grey.icons-selector .icons-picker-error i:before{color:#eee} 3 | -------------------------------------------------------------------------------- /illdy-companion.php: -------------------------------------------------------------------------------- 1 | esc_html__( 'From our blog', 'illdy-companion' ), 35 | 'feed_url' => array( 'https://colorlib.com/wp/feed/' ), 36 | ); 37 | return Epsilon_Dashboard::instance( $epsilon_dashboard_args ); 38 | } 39 | 40 | illdy_companion_dashboard_widget(); 41 | 42 | $current_theme = wp_get_theme(); 43 | $current_parent = $current_theme->parent(); 44 | 45 | if ( 'Illdy' == $current_theme->get( 'Name' ) || ( $current_parent && 'Illdy' == $current_parent->get( 'Name' ) ) ) { 46 | 47 | require_once plugin_dir_path( __FILE__ ) . 'illdy-main.php'; 48 | 49 | } else { 50 | 51 | add_action( 'admin_notices', 'illdy_companion_admin_notice', 99 ); 52 | function illdy_companion_admin_notice() { 53 | ?> 54 |
55 |

Illdy Companion plugin you have to also install the %1$sIlldy Theme%2$s', 'illdy-companion' ), '', '' ); ?>

56 |
57 | Demo content was imported successfully! '); 47 | 48 | window.setTimeout(function () { 49 | container.slideUp(300, function () { 50 | container.remove(); 51 | }); 52 | }, 3000); 53 | } 54 | }, 55 | /** 56 | * Throw errors 57 | * 58 | * @param jqXHR 59 | * @param textStatus 60 | * @param errorThrown 61 | */ 62 | error: function (jqXHR, textStatus, errorThrown) { 63 | console.log(jqXHR + ' :: ' + textStatus + ' :: ' + errorThrown); 64 | }, 65 | }); 66 | }); 67 | }, 68 | }; 69 | 70 | jQuery( document ).ready(function() { 71 | 72 | illdyCompanionImporter.showHiddenContent(); 73 | illdyCompanionImporter.importDemoContent(); 74 | 75 | }); 76 | -------------------------------------------------------------------------------- /assets/js/epsilon.js: -------------------------------------------------------------------------------- 1 | // jscs:ignore validateLineBreaks 2 | jQuery(function( $ ) { 3 | var mediaControl = { 4 | 5 | // Initializes a new media manager or returns an existing frame. 6 | // @see wp.media.featuredImage.frame() 7 | selector: null, 8 | size: null, 9 | container: null, 10 | frame: function() { 11 | if ( this._frame ) { 12 | return this._frame; 13 | } 14 | 15 | this._frame = wp.media({ 16 | title: 'Media', 17 | button: { 18 | text: 'Update' 19 | }, 20 | multiple: false 21 | }); 22 | 23 | this._frame.on( 'open', this.updateFrame ).state( 'library' ).on( 'select', this.select ); 24 | 25 | return this._frame; 26 | }, 27 | 28 | select: function() { 29 | 30 | // Do something when the "update" button is clicked after a selection is made. 31 | var id = $( '.attachments' ).find( '.selected' ).attr( 'data-id' ); 32 | var selector = $( '.illdy-media-control' ).find( mediaControl.selector ); 33 | var data = { 34 | action: 'illdy_get_attachment_media', 35 | attachment_id: id 36 | }; 37 | 38 | if ( ! selector.length ) { 39 | return false; 40 | } 41 | 42 | jQuery.post( ajaxurl, data, function( response ) { 43 | var ext = response.substr( ( response.lastIndexOf( '.' ) + 1 ) ); 44 | if ( 'mp4' === ext ) { 45 | $( mediaControl.container ).find( '.video-path' ).text( response ); 46 | } else { 47 | $( mediaControl.container ).find( 'img' ).attr( 'src', response ); 48 | } 49 | 50 | selector.val( response ); 51 | selector.trigger( 'change' ); 52 | }); 53 | }, 54 | 55 | init: function() { 56 | var context = $( '#wpbody, .wp-customizer' ); 57 | context.on( 'click', '.illdy-media-control > .upload-button', function( e ) { 58 | var container = $( this ).parent(), 59 | sibling = container.find( '.image-id' ), 60 | id = sibling.attr( 'id' ); 61 | e.preventDefault(); 62 | mediaControl.size = $( '[data-delegate="' + id + '"]' ).val(); 63 | mediaControl.container = container; 64 | mediaControl.selector = '#' + id; 65 | mediaControl.frame().open(); 66 | }); 67 | 68 | context.on( 'click', '.illdy-media-control > .remove-button', function( e ) { 69 | var container = $( this ).parent(), 70 | sibling = container.find( '.image-id' ), 71 | img = container.find( 'img' ), 72 | span = container.find( '.video-path' ); 73 | e.preventDefault(); 74 | img.attr( 'src', '' ); 75 | span.text( '' ); 76 | sibling.val( '' ).trigger( 'change' ); 77 | }); 78 | } 79 | }; 80 | 81 | mediaControl.init(); 82 | }); 83 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function( grunt ) { 4 | // load all tasks 5 | require( 'load-grunt-tasks' )( grunt, { scope: 'devDependencies' } ); 6 | 7 | grunt.config.init( { 8 | pkg: grunt.file.readJSON( 'package.json' ), 9 | checktextdomain: { 10 | standard: { 11 | options: { 12 | text_domain: [ 'illdy-companion' ], //Specify allowed 13 | // domain(s) 14 | create_report_file: 'true', 15 | keywords: [ //List keyword specifications 16 | '__:1,2d', 17 | '_e:1,2d', 18 | '_x:1,2c,3d', 19 | 'esc_html__:1,2d', 20 | 'esc_html_e:1,2d', 21 | 'esc_html_x:1,2c,3d', 22 | 'esc_attr__:1,2d', 23 | 'esc_attr_e:1,2d', 24 | 'esc_attr_x:1,2c,3d', 25 | '_ex:1,2c,3d', 26 | '_n:1,2,4d', 27 | '_nx:1,2,4c,5d', 28 | '_n_noop:1,2,3d', 29 | '_nx_noop:1,2,3c,4d' 30 | ] 31 | }, 32 | files: [ 33 | { 34 | src: [ 35 | '**/*.php', 36 | '!**/node_modules/**' 37 | ], //all php 38 | expand: true 39 | } ] 40 | } 41 | }, 42 | clean: { 43 | init: { 44 | src: ['build/'] 45 | }, 46 | }, 47 | copy: { 48 | build: { 49 | expand: true, 50 | src: [ 51 | '**', 52 | '!node_modules/**', 53 | '!vendor/**', 54 | '!build/**', 55 | '!readme.md', 56 | '!README.md', 57 | '!phpcs.ruleset.xml', 58 | '!Gruntfile.js', 59 | '!package.json', 60 | '!composer.json', 61 | '!composer.lock', 62 | '!set_tags.sh', 63 | '!illdy-companion.zip', 64 | '!package-lock.json', 65 | '!nbproject/**' ], 66 | dest: 'build/' 67 | } 68 | }, 69 | 70 | compress: { 71 | build: { 72 | options: { 73 | pretty: true, // Pretty print file sizes when logging. 74 | archive: '<%= pkg.name %>.zip' 75 | }, 76 | expand: true, 77 | cwd: 'build/', 78 | src: ['**/*'], 79 | dest: '<%= pkg.name %>/' 80 | } 81 | }, 82 | 83 | } ); 84 | 85 | // Check Missing Text Domain Strings 86 | grunt.registerTask( 'textdomain', [ 87 | 'checktextdomain' 88 | ] ); 89 | 90 | // Build task 91 | grunt.registerTask( 'build-archive', [ 92 | 'clean:init', 93 | 'copy', 94 | 'compress:build', 95 | 'clean:init' 96 | ]); 97 | 98 | }; 99 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 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: 5.6 6 | Stable tag: 2.1.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 Illdy. If you are having problems with Illdy theme or its companion plugin the fastest way to receive help is via our theme support forum. 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 WordPress themes 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 an 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 make a website 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 best WordPress hosting providers and we hope you'll find them useful. We can also help with WordPress related errors 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 specific widgets that you see on front page of theme demo. 57 | 58 | == Changelog == 59 | 60 | = 2.1.2 = 61 | * Compatibility with jQuery 3.0 62 | 63 | = 2.1.2 = 64 | * Strange output of illdy even on our demo( https://github.com/ColorlibHQ/illdy/issues/284 ) 65 | 66 | = 2.1.0 = 67 | * updated grunt package.json 68 | * Fixed #256 (videos in project section, they need an image backup) 69 | * Updated FancyBox to latest version 70 | * Added Colorlib Login Customizer as recommended plugin 71 | * Fixes #267 (add option to hide footer widget area || footer copyright message area) 72 | 73 | = 2.0.3 = 74 | * Add TinyMCE instead of Textarea in Illdy Widgets ( https://github.com/puikinsh/illdy/issues/222 ) 75 | * Parallax jumping on mobile ( https://github.com/puikinsh/illdy/issues/225 ) 76 | 77 | = 1.0.6 = 78 | * Portfolio URLs were not saving; bug fixed 79 | 80 | = 1.0.5 = 81 | * Improvements to support new Illdy theme version 82 | 83 | = 1.0.4 = 84 | * Code clean-up 85 | * Wrapped all functions in a function_exists check just for sanity check 86 | * All require_once functions are now using the plugin_dir_path function as a prefix. Absolute paths are preferred instead of relative ones. 87 | 88 | = 1.0.2 = 89 | * Updated description to reflect release of Illdy theme on WordPress.org 90 | 91 | = 1.0.1 = 92 | * Small tweaks and bug fixes 93 | 94 | = 1.0.0 = 95 | * Initial release 96 | -------------------------------------------------------------------------------- /widgets/class-illdy-widget-testimonial.php: -------------------------------------------------------------------------------- 1 | __( 'Add this widget in "Front page - Testimonial Sidebar".', 'illdy-companion' ), 12 | ) 13 | ); 14 | 15 | add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 16 | } 17 | 18 | /** 19 | * Enqueue Scripts 20 | */ 21 | public function enqueue_scripts() { 22 | wp_enqueue_media(); 23 | wp_enqueue_script( 'illdy-widget-upload-image', ILLDY_COMPANION_ASSETS_DIR . 'js/widget-upload-image.js', false, '1.0', true ); 24 | } 25 | 26 | /** 27 | * Front-end display of widget. 28 | * 29 | * @see WP_Widget::widget() 30 | * 31 | * @param array $args Widget arguments. 32 | * @param array $instance Saved values from database. 33 | */ 34 | public function widget( $args, $instance ) { 35 | echo $args['before_widget']; 36 | 37 | $lightbox = get_theme_mod( 'illdy_projects_lightbox', false ); 38 | 39 | $defaults = array( 40 | 'name' => '', 41 | 'image' => '', 42 | 'testimonial' => '', 43 | ); 44 | $instance = wp_parse_args( $instance, $defaults ); 45 | 46 | $image_id = illdy_get_image_id_from_image_url( $instance['image'] ); 47 | $get_attachment_image_src = wp_get_attachment_image_src( $image_id, 'illdy-front-page-projects' ); 48 | 49 | ?> 50 | 51 | 62 | 63 | 64 | '', 79 | 'image' => get_template_directory_uri() . '/layout/images/front-page/front-page-project-1.jpg', 80 | 'testimonial' => '', 81 | ); 82 | $instance = wp_parse_args( $instance, $defaults ); 83 | 84 | ?> 85 |

86 | 87 | 88 |

89 | 90 |

91 | 92 | 93 | 94 |

95 | 96 |

97 | 98 | 101 |

102 | __( 'Thiw widget will display the latest posts with thumbnail image on the left side.', 'illdy-companion' ), 12 | ) 13 | ); 14 | } 15 | 16 | /** 17 | * Front-end display of widget. 18 | * 19 | * @see WP_Widget::widget() 20 | * 21 | * @param array $args Widget arguments. 22 | * @param array $instance Saved values from database. 23 | */ 24 | public function widget( $args, $instance ) { 25 | echo $args['before_widget']; 26 | 27 | $defaults = array( 28 | 'title' => '', 29 | 'display_title' => '', 30 | 'numberofposts' => 4, 31 | ); 32 | $instance = wp_parse_args( $instance, $defaults ); 33 | 34 | if ( $instance['display_title'] ) { 35 | echo $args['before_title'] . esc_html( $instance['title'] ) . $args['after_title']; 36 | } 37 | 38 | $post_query_args = array( 39 | 'post_type' => 'post', 40 | 'pagination' => false, 41 | 'posts_per_page' => absint( $instance['numberofposts'] ), 42 | 'ignore_sticky_posts' => true, 43 | 'cache_results' => true, 44 | 'update_post_meta_cache' => true, 45 | 'update_post_term_cache' => true, 46 | ); 47 | 48 | $post_query = new WP_Query( $post_query_args ); 49 | 50 | if ( $post_query->have_posts() ) { 51 | while ( $post_query->have_posts() ) { 52 | $post_query->the_post(); 53 | 54 | global $post; 55 | 56 | $output = '
'; 57 | $output .= ( has_post_thumbnail( $post->ID ) ? '
' : '' ); 58 | $output .= ( has_post_thumbnail( $post->ID ) ? get_the_post_thumbnail( $post->ID, 'illdy-widget-recent-posts' ) : '' ); 59 | $output .= ( has_post_thumbnail( $post->ID ) ? '
' : '' ); 60 | $output .= '' . esc_html( get_the_title() ) . ''; 61 | $output .= '' . __( 'More...', 'illdy-companion' ) . ''; 62 | $output .= '
'; 63 | 64 | echo $output; 65 | 66 | } 67 | } else { 68 | echo __( 'No posts found.', 'illdy-companion' ); 69 | } 70 | 71 | wp_reset_postdata(); 72 | 73 | echo $args['after_widget']; 74 | } 75 | 76 | /** 77 | * Back-end widget form. 78 | * 79 | * @see WP_Widget::form() 80 | * 81 | * @param array $instance Previously saved values from database. 82 | */ 83 | public function form( $instance ) { 84 | 85 | $defaults = array( 86 | 'title' => __( '[Illdy] - Recent Posts', 'illdy-companion' ), 87 | 'display_title' => '', 88 | 'numberofposts' => 4, 89 | ); 90 | $instance = wp_parse_args( $instance, $defaults ); 91 | 92 | ?> 93 | 94 |
95 | 96 |
97 | > 98 | 99 |
100 |
101 | 102 |

103 | 104 | 105 |

106 | 107 |

108 | 109 | 110 |

111 | __( 'Add this widget in "Front page - Counter Sidebar".', 'illdy-companion' ), 12 | ) 13 | ); 14 | } 15 | 16 | /** 17 | * Front-end display of widget. 18 | * 19 | * @see WP_Widget::widget() 20 | * 21 | * @param array $args Widget arguments. 22 | * @param array $instance Saved values from database. 23 | */ 24 | public function widget( $args, $instance ) { 25 | echo $args['before_widget']; 26 | 27 | $defaults = array( 28 | 'title' => '', 29 | 'data_from' => '', 30 | 'data_to' => '', 31 | 'data_speed' => '', 32 | 'data_refresh_interval' => '', 33 | ); 34 | $instance = wp_parse_args( $instance, $defaults ); 35 | 36 | $output = ''; 37 | $output .= '' . esc_html( $instance['title'] ) . ''; 38 | 39 | echo $output; 40 | 41 | echo $args['after_widget']; 42 | } 43 | 44 | /** 45 | * Back-end widget form. 46 | * 47 | * @see WP_Widget::form() 48 | * 49 | * @param array $instance Previously saved values from database. 50 | */ 51 | public function form( $instance ) { 52 | 53 | $defaults = array( 54 | 'title' => __( 'Projects', 'illdy-companion' ), 55 | 'data_from' => 1, 56 | 'data_to' => 260, 57 | 'data_speed' => 2000, 58 | 'data_refresh_interval' => 100, 59 | ); 60 | $instance = wp_parse_args( $instance, $defaults ); 61 | 62 | ?> 63 |

64 | 65 | 66 |

67 | 68 |

69 | 70 | 71 | 72 |

73 | 74 |

75 | 76 | 77 | 78 |

79 | 80 |

81 | 82 | 83 | 84 |

85 | 86 |

87 | 88 | 89 | 90 |

91 | __( 'Add this widget in "Front page - Projects Sidebar".', 'illdy-companion' ), 12 | ) 13 | ); 14 | 15 | add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 16 | } 17 | 18 | /** 19 | * Enqueue Scripts 20 | */ 21 | public function enqueue_scripts() { 22 | wp_enqueue_media(); 23 | wp_enqueue_script( 'illdy-widget-upload-image', ILLDY_COMPANION_ASSETS_DIR . 'js/widget-upload-image.js', false, '1.0', true ); 24 | } 25 | 26 | /** 27 | * Front-end display of widget. 28 | * 29 | * @see WP_Widget::widget() 30 | * 31 | * @param array $args Widget arguments. 32 | * @param array $instance Saved values from database. 33 | */ 34 | public function widget( $args, $instance ) { 35 | echo $args['before_widget']; 36 | 37 | $url = ''; 38 | $video_url = ''; 39 | $lightbox = get_theme_mod( 'illdy_projects_lightbox', false ); 40 | 41 | $defaults = array( 42 | 'title' => '', 43 | 'url' => '', 44 | 'image' => '', 45 | 'video' => '', 46 | ); 47 | 48 | $instance = wp_parse_args( $instance, $defaults ); 49 | 50 | $image_id = illdy_get_image_id_from_image_url( $instance['image'] ); 51 | $get_attachment_image_src = wp_get_attachment_image_src( $image_id, 'illdy-front-page-projects' ); 52 | 53 | $class = 'project'; 54 | 55 | if ( '' == $instance['url'] && ! $lightbox ) { 56 | $class .= ' no-url'; 57 | } 58 | 59 | if ( $lightbox ) { 60 | if ( $image_id && empty( $instance['video'] ) ) { 61 | $url = wp_get_attachment_image_src( $image_id, 'full' ); 62 | $url = $url[0]; 63 | } elseif ( ! empty( $instance['video'] ) ) { 64 | $url = $instance['video']; 65 | } else { 66 | $url = $instance['image']; 67 | } 68 | } else { 69 | $url = $instance['url']; 70 | } 71 | 72 | $output = ''; 73 | 74 | echo $output; 75 | 76 | echo $args['after_widget']; 77 | } 78 | 79 | /** 80 | * Back-end widget form. 81 | * 82 | * @see WP_Widget::form() 83 | * 84 | * @param array $instance Previously saved values from database. 85 | */ 86 | public function form( $instance ) { 87 | 88 | $defaults = array( 89 | 'title' => __( '[Illdy] - Project', 'illdy-companion' ), 90 | 'url' => '', 91 | 'video' => '', 92 | 'image' => get_template_directory_uri() . '/layout/images/front-page/front-page-project-1.jpg', 93 | ); 94 | $instance = wp_parse_args( $instance, $defaults ); 95 | 96 | ?> 97 |

98 | 99 | 100 |

101 | 102 |

103 | 104 | 105 | 106 |

107 | 108 |

109 | 110 | 111 |

112 | 113 | 114 |

115 | 116 | 117 |

118 | setup_vars( $args ); 61 | self::$instance->load_hooks(); 62 | } 63 | } 64 | 65 | return self::$instance; 66 | } 67 | 68 | /** 69 | * Load hooks to show the widget 70 | */ 71 | public function load_hooks() { 72 | add_action( 'wp_dashboard_setup', array( &$this, 'add_widget' ) ); 73 | add_action( 'wp_network_dashboard_setup', array( &$this, 'add_widget' ) ); 74 | } 75 | 76 | /** 77 | * Setup class variables 78 | */ 79 | public function setup_vars( $args ) { 80 | if ( ! isset( $args['widget_title'] ) ) { 81 | $args['widget_title'] = apply_filters( 'epsilon_dashboard_widget_name', esc_html__( 'WordPress Guides/Tutorials', 'illdy-companion' ) ); 82 | } 83 | $this->dashboard_name = $args['widget_title']; 84 | $this->feeds = (array) $args['feed_url']; 85 | $abs = untrailingslashit( ( dirname( __FILE__ ) ) ); 86 | $parts = str_replace( untrailingslashit( ABSPATH ), '', $abs ); 87 | $parts = explode( DIRECTORY_SEPARATOR, $parts ); 88 | $parts = array_filter( $parts ); 89 | $this->script_url = site_url() . '/' . implode( '/', $parts ); 90 | } 91 | 92 | /** 93 | * Add widget to the dashboard 94 | * 95 | * @return string|void 96 | */ 97 | function add_widget() { 98 | global $wp_meta_boxes; 99 | if ( isset( $wp_meta_boxes['dashboard']['normal']['core']['epsilon_dashboard'] ) ) { 100 | return; 101 | } 102 | // Load SimplePie Instance 103 | $feed = fetch_feed( $this->feeds ); 104 | // TODO report error when is an error loading the feed 105 | if ( is_wp_error( $feed ) ) { 106 | return ''; 107 | } 108 | $feed->enable_cache( true ); 109 | $feed->enable_order_by_date( true ); 110 | $feed->set_cache_class( 'WP_Feed_Cache' ); 111 | $feed->set_file_class( 'WP_SimplePie_File' ); 112 | $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 7200, $this->feeds ) ); 113 | do_action_ref_array( 'wp_feed_options', array( $feed, $this->feeds ) ); 114 | $feed->strip_comments( true ); 115 | $feed->strip_htmltags( 116 | array( 117 | 'base', 118 | 'blink', 119 | 'body', 120 | 'doctype', 121 | 'embed', 122 | 'font', 123 | 'form', 124 | 'frame', 125 | 'frameset', 126 | 'html', 127 | 'iframe', 128 | 'input', 129 | 'marquee', 130 | 'meta', 131 | 'noscript', 132 | 'object', 133 | 'param', 134 | 'script', 135 | 'style', 136 | ) 137 | ); 138 | $feed->init(); 139 | $feed->handle_content_type(); 140 | $items = $feed->get_items( 0, 5 ); 141 | $this->items = array(); 142 | foreach ( (array) $items as $item ) { 143 | $this->items[] = array( 144 | 'title' => $item->get_title(), 145 | 'date' => $item->get_date( 'U' ), 146 | 'link' => $item->get_permalink(), 147 | ); 148 | } 149 | if ( ! empty( $this->items ) ) { 150 | wp_add_dashboard_widget( 'epsilon_dashboard', $this->dashboard_name, array( &$this, 'render_dashboard_widget' ) ); 151 | } 152 | } 153 | 154 | /** 155 | * Render widget content 156 | */ 157 | function render_dashboard_widget() { 158 | ?> 159 | 198 | 220 | 221 | __( 'Add this widget in "Front page - About Sidebar".', 'illdy-companion' ), 12 | ) 13 | ); 14 | 15 | add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 16 | add_action( 'admin_footer-widgets.php', array( $this, 'print_scripts' ), 9999 ); 17 | } 18 | 19 | /** 20 | * Enqueue scripts. 21 | * 22 | * @since 1.0 23 | * 24 | * @param string $hook_suffix 25 | */ 26 | public function enqueue_scripts( $hook_suffix ) { 27 | if ( 'widgets.php' !== $hook_suffix ) { 28 | return; 29 | } 30 | 31 | wp_enqueue_style( 'wp-color-picker' ); 32 | wp_enqueue_script( 'wp-color-picker' ); 33 | wp_enqueue_script( 'underscore' ); 34 | } 35 | 36 | /** 37 | * Print scripts. 38 | * 39 | * @since 1.0 40 | */ 41 | public function print_scripts() { 42 | ?> 43 | 75 | '', 91 | 'percentage' => '', 92 | 'icon' => '', 93 | 'color' => '', 94 | ); 95 | $instance = wp_parse_args( $instance, $defaults ); 96 | 97 | $output = ''; 98 | 99 | $output .= '
'; 100 | $output .= '
'; 101 | $output .= '
'; 102 | $output .= '
'; 103 | $output .= '
'; 104 | $output .= '' . esc_html( $instance['title'] ) . ''; 105 | $output .= '
'; 106 | $output .= '
'; 107 | 108 | echo $output; 109 | 110 | echo $args['after_widget']; 111 | } 112 | 113 | /** 114 | * Back-end widget form. 115 | * 116 | * @see WP_Widget::form() 117 | * 118 | * @param array $instance Previously saved values from database. 119 | */ 120 | public function form( $instance ) { 121 | 122 | $defaults = array( 123 | 'title' => '', 124 | 'percentage' => '', 125 | 'icon' => '', 126 | 'color' => '', 127 | ); 128 | $instance = wp_parse_args( $instance, $defaults ); 129 | 130 | $get_fontawesome_icons = Illdy_Companion_Helper::fontawesome_icons(); 131 | ?> 132 | 133 |

134 | 135 | 136 |

137 | 138 |

139 | 140 | 141 |

142 | 143 |

144 | 145 | 151 |

152 | 153 |

154 |
155 | 156 |

157 | __( 'Add this widget in "Front page - Services Sidebar".', 'illdy-companion' ), 12 | ) 13 | ); 14 | 15 | add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 16 | add_action( 'admin_footer-widgets.php', array( $this, 'print_scripts' ), 9999 ); 17 | } 18 | 19 | /** 20 | * Enqueue scripts. 21 | * 22 | * @since 1.0 23 | * 24 | * @param string $hook_suffix 25 | */ 26 | public function enqueue_scripts( $hook_suffix ) { 27 | if ( 'widgets.php' !== $hook_suffix ) { 28 | return; 29 | } 30 | 31 | wp_enqueue_style( 'wp-color-picker' ); 32 | wp_enqueue_script( 'wp-color-picker' ); 33 | wp_enqueue_script( 'underscore' ); 34 | } 35 | 36 | /** 37 | * Print scripts. 38 | * 39 | * @since 1.0 40 | */ 41 | public function print_scripts() { 42 | ?> 43 | 75 | '', 91 | 'icon' => '', 92 | 'entry' => '', 93 | 'color' => '#0385d0', 94 | ); 95 | $instance = wp_parse_args( $instance, $defaults ); 96 | 97 | $output = '
'; 98 | $output .= '
'; 99 | $output .= ''; 100 | $output .= '
'; 101 | $output .= '
'; 102 | $output .= wp_kses_post( $instance['title'] ); 103 | $output .= '
'; 104 | $output .= '
'; 105 | $output .= wp_kses_post( $instance['entry'] ); 106 | $output .= '
'; 107 | $output .= '
'; 108 | 109 | echo $output; 110 | 111 | echo $args['after_widget']; 112 | } 113 | 114 | /** 115 | * Back-end widget form. 116 | * 117 | * @see WP_Widget::form() 118 | * 119 | * @param array $instance Previously saved values from database. 120 | */ 121 | public function form( $instance ) { 122 | 123 | $defaults = array( 124 | 'title' => __( '[Illdy] - Skill', 'illdy-companion' ), 125 | 'icon' => '', 126 | 'entry' => '', 127 | 'color' => '', 128 | ); 129 | $instance = wp_parse_args( $instance, $defaults ); 130 | 131 | $get_fontawesome_icons = Illdy_Companion_Helper::fontawesome_icons(); 132 | ?> 133 | 134 |

135 | 136 | 137 |

138 | 139 |

140 | 141 | 148 |

149 | 150 |

151 | 152 | 153 |

154 | 155 |

156 |
157 | 158 |

159 | .mte-tooltip { 308 | display: block; 309 | } 310 | 311 | .mte-color-scheme-palette span { 312 | height: 20px; 313 | width: 25px; 314 | float: left; 315 | } 316 | 317 | .mte-color-scheme-palette { 318 | cursor: pointer; 319 | padding: 2px; 320 | display: inline-block; 321 | border: 1px solid transparent; 322 | } 323 | 324 | .mte-color-scheme-palette:hover, 325 | .mte-color-scheme-palette:focus, 326 | .mte-color-option.selected > .mte-color-scheme-palette { 327 | border: 1px solid #55AAD3; 328 | } 329 | 330 | .mte-color-scheme-name { 331 | display: inline-block; 332 | float: left; 333 | margin-right: 15px; 334 | min-width: 75px; 335 | } 336 | 337 | .mte-typography-font-size, .mte-typography-line-height { 338 | width: 45%; 339 | float: left; 340 | overflow: hidden; 341 | position: relative; 342 | } 343 | 344 | .mte-typography-font-size .arrow-up, .mte-typography-line-height .arrow-up, 345 | .mte-typography-font-size .arrow-down, .mte-typography-line-height .arrow-down { 346 | position: absolute; 347 | bottom: 17px; 348 | right: 0; 349 | height: 17px; 350 | width: 20px; 351 | border-right: 1px solid #ddd; 352 | background: #FFF; 353 | color: #808080; 354 | } 355 | 356 | .mte-typography-font-size .dashicons, .mte-typography-line-height .dashicons { 357 | width: 20px; 358 | height: 17px; 359 | font-size: 18px; 360 | color: #808080; 361 | } 362 | 363 | .mte-typography-font-size .arrow-down, .mte-typography-line-height .arrow-down { 364 | top: initial; 365 | bottom: 1px; 366 | } 367 | 368 | .mte-number-field a:focus, .mte-number-field a:active, .mte-number-field a:hover { 369 | outline: none; 370 | box-shadow: none; 371 | -webkit-box-shadow: none; 372 | } 373 | 374 | .mte-number-field a:focus > .dashicons, .mte-number-field a:active > .dashicons, .mte-number-field a:hover > .dashicons { 375 | color: #000; 376 | } 377 | 378 | .mte-number-field .unit { 379 | position: absolute; 380 | bottom: 9px; 381 | left: 25px; 382 | } 383 | 384 | .mte-number-field .unit.go-right { 385 | left: 35px; 386 | } 387 | 388 | textarea.mte-typography-input { 389 | display: block; 390 | width: 100%; 391 | } 392 | 393 | .customize-control .mte-typography-font-size input, .customize-control .mte-typography-line-height input { 394 | width: 118%; 395 | height: 36px; 396 | } 397 | 398 | .customize-control .mte-typography-font-size input:focus, .customize-control .mte-typography-line-height input:focus { 399 | box-shadow: none; 400 | -webkit-box-shadow: none; 401 | border-color: #ddd; 402 | } 403 | 404 | .mte-typography-font-size { 405 | margin-right: 10%; 406 | } 407 | 408 | .mte-typography-container > div { 409 | margin-bottom: 15px; 410 | } 411 | 412 | .mte-typography-container > div > label { 413 | margin-bottom: 5px; 414 | display: inline-block; 415 | } -------------------------------------------------------------------------------- /widgets/class-illdy-widget-person.php: -------------------------------------------------------------------------------- 1 | __( 'Add this widget in "Front page - Team Sidebar".', 'illdy-companion' ), 12 | ) 13 | ); 14 | 15 | add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 16 | add_action( 'admin_footer-widgets.php', array( $this, 'print_scripts' ), 9999 ); 17 | } 18 | 19 | /** 20 | * Enqueue Scripts 21 | */ 22 | public function enqueue_scripts() { 23 | wp_enqueue_style( 'wp-color-picker' ); 24 | wp_enqueue_script( 'wp-color-picker' ); 25 | wp_enqueue_script( 'underscore' ); 26 | wp_enqueue_media(); 27 | wp_enqueue_script( 'illdy-widget-upload-image', ILLDY_COMPANION_ASSETS_DIR . 'js/widget-upload-image.js', false, '1.0', true ); 28 | } 29 | 30 | /** 31 | * Print scripts. 32 | * 33 | * @since 1.0 34 | */ 35 | public function print_scripts() { 36 | ?> 37 | 61 | '', 77 | 'image' => '', 78 | 'position' => '', 79 | 'entry' => '', 80 | 'facebook_url' => '', 81 | 'twitter_url' => '', 82 | 'linkedin_url' => '', 83 | 'github_url' => '', 84 | 'color' => '#000000', 85 | ); 86 | $instance = wp_parse_args( $instance, $defaults ); 87 | 88 | $image_id = illdy_get_image_id_from_image_url( $instance['image'] ); 89 | $get_attachment_image_src = wp_get_attachment_image_src( $image_id, 'illdy-front-page-person' ); 90 | 91 | $output = ''; 92 | 93 | $output .= '
'; 94 | $output .= '
'; 95 | $output .= ( $image_id ? '' . esc_attr( $instance['title'] ) . '' : ( $instance['image'] ? '' . esc_attr( $instance['title'] ) . '' : '' ) ); 96 | $output .= '
'; 97 | $output .= '
'; 98 | $output .= '
' . esc_html( $instance['title'] ) . '
'; 99 | $output .= '

' . esc_html( $instance['position'] ) . '

'; 100 | $output .= '

' . wp_kses_post( $instance['entry'] ) . '

'; 101 | $output .= ''; 107 | $output .= '
'; 108 | $output .= '
'; 109 | 110 | echo $output; 111 | 112 | echo $args['after_widget']; 113 | } 114 | 115 | /** 116 | * Back-end widget form. 117 | * 118 | * @see WP_Widget::form() 119 | * 120 | * @param array $instance Previously saved values from database. 121 | */ 122 | public function form( $instance ) { 123 | 124 | $defaults = array( 125 | 'title' => __( '[Illdy] - Person', 'illdy-companion' ), 126 | 'image' => get_template_directory_uri() . '/layout/images/front-page/front-page-project-1.jpg', 127 | 'position' => '', 128 | 'entry' => '', 129 | 'facebook_url' => '', 130 | 'twitter_url' => '', 131 | 'linkedin_url' => '', 132 | 'github_url' => '', 133 | 'color' => '#000000', 134 | ); 135 | $instance = wp_parse_args( $instance, $defaults ); 136 | 137 | ?> 138 | 139 |

140 | 141 | 142 |

143 | 144 |

145 | 146 | 147 | 148 |

149 | 150 |

151 | 152 | 153 |

154 | 155 |

156 | 157 | 158 |

159 | 160 |

161 | 162 | 163 |

164 | 165 |

166 | 167 | 168 |

169 | 170 |

171 | 172 | 173 |

174 | 175 |

176 | 177 | 178 |

179 | 180 |

181 |
182 | 183 |

184 | ",{"class":"icons-selector",style:"position: relative",html:'
"}),this.iconContainer=this.iconPicker.find(".fip-icons-container"),this.searchIcon=this.iconPicker.find(".selector-search i"),this.iconsSearched=[],this.isSearch=!1,this.totalPage=1,this.currentPage=1,this.currentIcon=!1,this.iconsCount=0,this.open=!1,this.searchValues=[],this.availableCategoriesSearch=[],this.triggerEvent=null,this.backupSource=[],this.backupSearch=[],this.isCategorized=!1,this.selectCategory=this.iconPicker.find(".icon-category-select"),this.selectedCategory=!1,this.availableCategories=[],this.unCategorizedKey=null,this.init()}var b={theme:"fip-grey",source:!1,emptyIcon:!0,emptyIconValue:"",iconsPerPage:20,hasSearch:!0,searchSource:!1,useAttribute:!1,attributeName:"data-icon",convertToHex:!0,allCategoryText:"From all categories",unCategorizedText:"Uncategorized"};c.prototype={init:function(){this.iconPicker.addClass(this.settings.theme),this.iconPicker.css({left:-9999}).appendTo("body");var b=this.iconPicker.outerHeight(),c=this.iconPicker.outerWidth();if(this.iconPicker.css({left:""}),this.element.before(this.iconPicker),this.element.css({visibility:"hidden",top:0,position:"relative",zIndex:"-1",left:"-"+c+"px",display:"inline-block",height:b+"px",width:c+"px",padding:"0",margin:"0 -"+c+"px 0 0",border:"0 none",verticalAlign:"top"}),!this.element.is("select")){var d=function(){for(var a=3,b=document.createElement("div"),c=b.all||[];b.innerHTML="",c[0];);return a>4?a:!a}(),e=document.createElement("div");this.triggerEvent=9!==d&&"oninput"in e?["input","keyup"]:["keyup"]}!this.settings.source&&this.element.is("select")?(this.settings.source=[],this.settings.searchSource=[],this.element.find("optgroup").length?(this.isCategorized=!0,this.element.find("optgroup").each(a.proxy(function(b,c){var d=this.availableCategories.length,e=a("