├── .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 |
Illdy Companion plugin you have to also install the %1$sIlldy Theme%2$s', 'illdy-companion' ), '', '' ); ?>
56 |57 |
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 = ''; 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 |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 |134 | 135 | 136 |
137 | 138 |139 | 140 | 141 |
142 | 143 |144 | 145 | 151 |
152 | 153 |
154 |
155 |
156 |
135 | 136 | 137 |
138 | 139 |140 | 141 | 148 |
149 | 150 |151 | 152 | 153 |
154 | 155 |
156 |
157 |
158 |
' . esc_html( $instance['position'] ) . '
'; 100 | $output .= '' . wp_kses_post( $instance['entry'] ) . '
'; 101 | $output .= ''; 107 | $output .= '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 |
124 | 125 | 126 | 127 |
128 | 129 |
130 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
145 | 146 | 147 | 148 |
149 | 150 |151 | 152 | 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 |
185 | 186 |' . __( 'Import Demo Content', 'illdy-companion' ) . ''; 25 | $html .= '' . __( 'Advanced', 'illdy-companion' ) . '
'; 26 | $html .= ''; 35 | } 36 | 37 | $actions[] = array( 38 | 'id' => 'illdy-req-ac-import-demo-content', 39 | 'title' => esc_html__( 'Import Demo Content', 'illdy-companion' ), 40 | 'description' => esc_html__( 'Clicking the button below will add content, widgets and set static front page to your WordPress installation. Click advanced to customize the import process.', 'illdy-companion' ), 41 | 'help' => $html, 42 | 'check' => $this->check_content_import(), 43 | ); 44 | 45 | return $actions; 46 | } 47 | 48 | /** 49 | * Generate HTML for a checkbox 50 | * 51 | * @param $id 52 | * @param $label 53 | * 54 | * @return string 55 | */ 56 | private function generate_checkbox( $id, $label ) { 57 | $string = ''; 58 | return sprintf( $string, $id, $label ); 59 | } 60 | 61 | public function check_content_import() { 62 | $illdy_content = get_option( 'illdy_show_required_actions' ); 63 | if ( $illdy_content ) { 64 | return true; 65 | } 66 | 67 | return false; 68 | } 69 | 70 | public static function process_sample_content( $args = array() ) { 71 | 72 | $imported = true; 73 | 74 | if ( is_array( $args ) ) { 75 | foreach ( $args as $arg ) { 76 | $response = self::$arg(); 77 | if ( $imported && is_array( $response ) ) { 78 | $imported = false; 79 | } 80 | } 81 | } 82 | if ( $imported ) { 83 | $illdy_show_required_actions = get_option( 'illdy_show_required_actions' ); 84 | $illdy_show_required_actions['illdy-req-import-content'] = true; 85 | update_option( 'illdy_show_required_actions', $illdy_show_required_actions ); 86 | return 'ok'; 87 | } else { 88 | return 'nok'; 89 | } 90 | 91 | } 92 | 93 | public static function set_static_frontpage() { 94 | $frontpage_title = __( 'Front Page', 'illdy-companion' ); 95 | $blog_title = __( 'Blog', 'illdy-companion' ); 96 | 97 | $frontpage_id = wp_insert_post( 98 | array( 99 | 'post_title' => $frontpage_title, 100 | 'post_status' => 'publish', 101 | 'post_type' => 'page', 102 | ) 103 | ); 104 | $blog_id = wp_insert_post( 105 | array( 106 | 'post_title' => $blog_title, 107 | 'post_status' => 'publish', 108 | 'post_type' => 'page', 109 | ) 110 | ); 111 | 112 | update_option( 'show_on_front', 'page' ); 113 | update_option( 'page_on_front', $frontpage_id ); 114 | update_option( 'page_for_posts', $blog_id ); 115 | 116 | return 'ok'; 117 | } 118 | 119 | public static function import_customizer() { 120 | 121 | $illdy_customizer_defaults = array( 122 | '_services_general' => 1, 123 | '_services_general_title' => __( 'Services', 'illdy-companion' ), 124 | '_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' ), 125 | '_preloader_enable' => 1, 126 | '_preloader_background_color' => '#ffffff', 127 | '_preloader_primary_color' => '#f1d204', 128 | '_preloader_secondly_color' => '#ffffff', 129 | '_text_logo' => __( 'Illdy', 'illdy-companion' ), 130 | '_contact_bar_facebook_url' => '#', 131 | '_contact_bar_twitter_url' => '#', 132 | '_contact_bar_linkedin_url' => '#', 133 | '_email' => __( 'contact@site.com', 'illdy-companion' ), 134 | '_phone' => __( '(555) 555-5555', 'illdy-companion' ), 135 | '_address1' => __( 'Street 221B Baker Street, ', 'illdy-companion' ), 136 | '_address2' => __( 'London, UK', 'illdy-companion' ), 137 | '_general_footer_display_copyright' => 1, 138 | '_footer_copyright' => __( '© Copyright 2016. All Rights Reserved.', 'illdy-companion' ), 139 | '_img_footer_logo' => esc_url_raw( get_template_directory_uri() . '/layout/images/footer-logo.png' ), 140 | '_enable_post_posted_on_blog_posts' => 1, 141 | '_enable_post_category_blog_posts' => 1, 142 | '_enable_post_tags_blog_posts' => 1, 143 | '_enable_post_comments_blog_posts' => 1, 144 | '_enable_social_sharing_blog_posts' => 1, 145 | '_enable_author_box_blog_posts' => 1, 146 | '_team_general_show' => 1, 147 | '_team_general_title' => __( 'Team', 'illdy-companion' ), 148 | '_team_general_entry' => __( 'Meet the people that are going to take your business to the next level.', 'illdy-companion' ), 149 | '_testimonials_general_show' => 1, 150 | '_testimonials_general_title' => __( 'Testimonials', 'illdy-companion' ), 151 | '_testimonials_number_of_posts' => 4, 152 | '_about_general_show' => 1, 153 | '_about_general_title' => __( 'About', 'illdy-companion' ), 154 | '_about_general_entry' => __( 'It is an amazing 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' ), 155 | '_contact_us_general_show' => 1, 156 | '_contact_us_general_title' => __( 'Contact us', 'illdy-companion' ), 157 | '_contact_us_general_entry' => __( 'And we will get in touch as soon as possible.', 'illdy-companion' ), 158 | '_contact_us_general_address_title' => __( 'Address', 'illdy-companion' ), 159 | '_contact_us_general_customer_support_title' => __( 'Customer Support', 'illdy-companion' ), 160 | '_counter_general_show' => 1, 161 | '_counter_background_type' => 'image', 162 | '_counter_background_image' => esc_url( get_template_directory_uri() . '/layout/images/front-page/front-page-counter.jpg' ), 163 | '_counter_background_color' => '#000000', 164 | '_jumbotron_general_image' => esc_url_raw( get_template_directory_uri() . '/layout/images/front-page/front-page-header.jpg' ), 165 | '_jumbotron_general_first_row_from_title' => __( 'Clean', 'illdy-companion' ), 166 | '_jumbotron_general_second_row_from_title' => __( 'Slick', 'illdy-companion' ), 167 | '_jumbotron_general_third_row_from_title' => __( 'Pixel Perfect', 'illdy-companion' ), 168 | '_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' ), 169 | '_jumbotron_general_first_button_title' => __( 'Learn more', 'illdy-companion' ), 170 | 'illdy_jumbotron_general_first_button_url' => '#', 171 | '_jumbotron_general_second_button_title' => __( 'Download', 'illdy-companion' ), 172 | 'illdy_jumbotron_general_second_button_url' => '#', 173 | '_latest_news_general_show' => 1, 174 | '_latest_news_general_title' => __( 'Latest News', 'illdy-companion' ), 175 | '_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' ), 176 | '_latest_news_button_text' => __( 'See blog', 'illdy-companion' ), 177 | '_latest_news_number_of_posts' => 3, 178 | '_projects_general_show' => 1, 179 | '_projects_general_title' => __( 'Projects', 'illdy-companion' ), 180 | '_projects_general_entry' => __( 'You\'ll love our work. Check it out!', 'illdy-companion' ), 181 | '_general_sections_order_first_section' => 1, 182 | '_general_sections_order_second_section' => 2, 183 | '_general_sections_order_third_section' => 3, 184 | '_general_sections_order_fourth_section' => 4, 185 | '_general_sections_order_fifth_section' => 5, 186 | '_general_sections_order_sixth_section' => 6, 187 | '_general_sections_order_seventh_section' => 7, 188 | '_general_sections_order_eighth_section' => 8, 189 | ); 190 | 191 | // Set prefix 192 | $prefix = 'illdy'; 193 | 194 | foreach ( $illdy_customizer_defaults as $customizer_key => $customizer_value ) { 195 | if ( ! $force ) { 196 | $current_value = get_theme_mod( $prefix . $customizer_key ); 197 | if ( '' == $current_value ) { 198 | set_theme_mod( $prefix . $customizer_key, $customizer_value ); 199 | } 200 | } else { 201 | set_theme_mod( $prefix . $customizer_key, $customizer_value ); 202 | } 203 | } 204 | 205 | return 'ok'; 206 | 207 | } 208 | 209 | public static function import_widgets() { 210 | 211 | $json = '{"footer-sidebar-1":{"text-5":{"title":"PRODUCTS","text":"