Version Description
- 2018-09-12
Download this release
Release Info
| Developer | codeinwp |
| Plugin | |
| Version | 2.5.8 |
| Comparing to | |
| See all releases | |
Code changes from version 2.5.7 to 2.5.8
- CHANGELOG.md +6 -0
- core/app/class-orbit-fox-admin.php +4 -1
- core/assets/css/orbit-fox-admin.css +1 -1
- core/includes/class-orbit-fox.php +1 -1
- obfx_modules/beaver-widgets/modules/post-grid/includes/loop-settings.php +72 -36
- obfx_modules/beaver-widgets/modules/post-grid/post-grid.php +2 -1
- obfx_modules/beaver-widgets/modules/pricing-table/pricing-table.php +4 -2
- obfx_modules/beaver-widgets/modules/services/services.php +4 -2
- obfx_modules/image-cdn/inc/class-orbit-fox-connector.php +1 -1
- obfx_modules/image-cdn/inc/class-orbit-fox-image-replacer.php +123 -57
- obfx_modules/image-cdn/init.php +15 -14
- obfx_modules/safe-updates/init.php +2 -1
- readme.md +7 -0
- readme.txt +7 -0
- themeisle-companion.php +5 -3
- themeisle-hash.json +1 -1
- vendor/autoload.php +1 -1
- vendor/codeinwp/templates-directory/class-page-templates-directory.php +8 -1
- vendor/codeinwp/templates-directory/composer.json +1 -1
- vendor/composer/autoload_real.php +5 -5
- vendor/composer/installed.json +4 -4
CHANGELOG.md
CHANGED
|
@@ -1,4 +1,10 @@
|
|
| 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
### v2.5.7 - 2018-08-13
|
| 3 |
**Changes:**
|
| 4 |
* -fixed fatal error with Elementor extra widgets
|
| 1 |
|
| 2 |
+
### v2.5.8 - 2018-09-12
|
| 3 |
+
**Changes:**
|
| 4 |
+
* Extend image optimization module for 50% of users.
|
| 5 |
+
* Enable safe updates for all users.
|
| 6 |
+
* Adds image optimization integration with Optimole.
|
| 7 |
+
|
| 8 |
### v2.5.7 - 2018-08-13
|
| 9 |
**Changes:**
|
| 10 |
* -fixed fatal error with Elementor extra widgets
|
core/app/class-orbit-fox-admin.php
CHANGED
|
@@ -119,7 +119,10 @@ class Orbit_Fox_Admin {
|
|
| 119 |
*/
|
| 120 |
public function menu_pages() {
|
| 121 |
add_menu_page(
|
| 122 |
-
__( 'Orbit Fox', 'themeisle-companion' ),
|
|
|
|
|
|
|
|
|
|
| 123 |
array(
|
| 124 |
$this,
|
| 125 |
'page_modules_render',
|
| 119 |
*/
|
| 120 |
public function menu_pages() {
|
| 121 |
add_menu_page(
|
| 122 |
+
__( 'Orbit Fox', 'themeisle-companion' ),
|
| 123 |
+
__( 'Orbit Fox', 'themeisle-companion' ),
|
| 124 |
+
'manage_options',
|
| 125 |
+
'obfx_companion',
|
| 126 |
array(
|
| 127 |
$this,
|
| 128 |
'page_modules_render',
|
core/assets/css/orbit-fox-admin.css
CHANGED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
* Extends Spectre.css Library
|
| 9 |
*/
|
| 10 |
/*
|
| 11 |
-
Version: 2.5.
|
| 12 |
*/
|
| 13 |
|
| 14 |
/* Document
|
| 8 |
* Extends Spectre.css Library
|
| 9 |
*/
|
| 10 |
/*
|
| 11 |
+
Version: 2.5.8
|
| 12 |
*/
|
| 13 |
|
| 14 |
/* Document
|
core/includes/class-orbit-fox.php
CHANGED
|
@@ -69,7 +69,7 @@ class Orbit_Fox {
|
|
| 69 |
|
| 70 |
$this->plugin_name = 'orbit-fox';
|
| 71 |
|
| 72 |
-
$this->version = '2.5.
|
| 73 |
|
| 74 |
$this->load_dependencies();
|
| 75 |
$this->set_locale();
|
| 69 |
|
| 70 |
$this->plugin_name = 'orbit-fox';
|
| 71 |
|
| 72 |
+
$this->version = '2.5.8';
|
| 73 |
|
| 74 |
$this->load_dependencies();
|
| 75 |
$this->set_locale();
|
obfx_modules/beaver-widgets/modules/post-grid/includes/loop-settings.php
CHANGED
|
@@ -27,27 +27,32 @@ do_action( 'fl_builder_loop_settings_before_form', $settings ); // e.g Add custo
|
|
| 27 |
|
| 28 |
// Post type
|
| 29 |
FLBuilder::render_settings_field(
|
| 30 |
-
'post_type',
|
|
|
|
| 31 |
'type' => 'post-type',
|
| 32 |
'label' => esc_html__( 'Post Type', 'themeisle-companion' ),
|
| 33 |
-
),
|
|
|
|
| 34 |
);
|
| 35 |
|
| 36 |
// Order
|
| 37 |
FLBuilder::render_settings_field(
|
| 38 |
-
'order',
|
|
|
|
| 39 |
'type' => 'select',
|
| 40 |
'label' => esc_html__( 'Order', 'themeisle-companion' ),
|
| 41 |
'options' => array(
|
| 42 |
'DESC' => esc_html__( 'Descending', 'themeisle-companion' ),
|
| 43 |
'ASC' => esc_html__( 'Ascending', 'themeisle-companion' ),
|
| 44 |
),
|
| 45 |
-
),
|
|
|
|
| 46 |
);
|
| 47 |
|
| 48 |
// Order by
|
| 49 |
FLBuilder::render_settings_field(
|
| 50 |
-
'order_by',
|
|
|
|
| 51 |
'type' => 'select',
|
| 52 |
'label' => esc_html__( 'Order By', 'themeisle-companion' ),
|
| 53 |
'options' => array(
|
|
@@ -70,48 +75,57 @@ do_action( 'fl_builder_loop_settings_before_form', $settings ); // e.g Add custo
|
|
| 70 |
'fields' => array( 'order_by_meta_key' ),
|
| 71 |
),
|
| 72 |
),
|
| 73 |
-
),
|
|
|
|
| 74 |
);
|
| 75 |
|
| 76 |
// Meta Key
|
| 77 |
FLBuilder::render_settings_field(
|
| 78 |
-
'order_by_meta_key',
|
|
|
|
| 79 |
'type' => 'text',
|
| 80 |
'label' => esc_html__( 'Meta Key', 'themeisle-companion' ),
|
| 81 |
-
),
|
|
|
|
| 82 |
);
|
| 83 |
|
| 84 |
// Offset
|
| 85 |
FLBuilder::render_settings_field(
|
| 86 |
-
'offset',
|
|
|
|
| 87 |
'type' => 'text',
|
| 88 |
'label' => _x( 'Offset', 'How many posts to skip.', 'themeisle-companion' ),
|
| 89 |
'default' => '0',
|
| 90 |
'size' => '4',
|
| 91 |
'help' => esc_html__( 'Skip this many posts that match the specified criteria.', 'themeisle-companion' ),
|
| 92 |
-
),
|
|
|
|
| 93 |
);
|
| 94 |
|
| 95 |
// Posts per page
|
| 96 |
FLBuilder::render_settings_field(
|
| 97 |
-
'posts_per_page',
|
|
|
|
| 98 |
'type' => 'obfx_number',
|
| 99 |
'label' => esc_html__( 'Posts per page', 'themeisle-companion' ),
|
| 100 |
'default' => $default_posts_per_page,
|
| 101 |
'min' => '-1',
|
| 102 |
'help' => esc_html__( '-1 means all posts', 'themeisle-companion' ),
|
| 103 |
-
),
|
|
|
|
| 104 |
);
|
| 105 |
|
| 106 |
// Columns
|
| 107 |
FLBuilder::render_settings_field(
|
| 108 |
-
'columns',
|
|
|
|
| 109 |
'type' => 'obfx_number',
|
| 110 |
'label' => esc_html__( 'Number of columns', 'themeisle-companion' ),
|
| 111 |
'default' => '3',
|
| 112 |
'min' => '1',
|
| 113 |
'max' => '5',
|
| 114 |
-
),
|
|
|
|
| 115 |
);
|
| 116 |
?>
|
| 117 |
</table>
|
|
@@ -129,14 +143,16 @@ do_action( 'fl_builder_loop_settings_before_form', $settings ); // e.g Add custo
|
|
| 129 |
|
| 130 |
// Posts
|
| 131 |
FLBuilder::render_settings_field(
|
| 132 |
-
'posts_' . $slug,
|
|
|
|
| 133 |
'type' => 'suggest',
|
| 134 |
'action' => 'fl_as_posts',
|
| 135 |
'data' => $slug,
|
| 136 |
'label' => $type->label,
|
| 137 |
'help' => sprintf( esc_html__( 'Enter a list of %1$s.', 'themeisle-companion' ), $type->label ),
|
| 138 |
'matching' => true,
|
| 139 |
-
),
|
|
|
|
| 140 |
);
|
| 141 |
|
| 142 |
// Taxonomies
|
|
@@ -145,14 +161,16 @@ do_action( 'fl_builder_loop_settings_before_form', $settings ); // e.g Add custo
|
|
| 145 |
foreach ( $taxonomies as $tax_slug => $tax ) {
|
| 146 |
|
| 147 |
FLBuilder::render_settings_field(
|
| 148 |
-
'tax_' . $slug . '_' . $tax_slug,
|
|
|
|
| 149 |
'type' => 'suggest',
|
| 150 |
'action' => 'fl_as_terms',
|
| 151 |
'data' => $tax_slug,
|
| 152 |
'label' => $tax->label,
|
| 153 |
'help' => sprintf( esc_html__( 'Enter a list of %1$s.', 'themeisle-companion' ), $tax->label ),
|
| 154 |
'matching' => true,
|
| 155 |
-
),
|
|
|
|
| 156 |
);
|
| 157 |
}
|
| 158 |
|
|
@@ -164,13 +182,15 @@ do_action( 'fl_builder_loop_settings_before_form', $settings ); // e.g Add custo
|
|
| 164 |
|
| 165 |
// Author
|
| 166 |
FLBuilder::render_settings_field(
|
| 167 |
-
'users',
|
|
|
|
| 168 |
'type' => 'suggest',
|
| 169 |
'action' => 'fl_as_users',
|
| 170 |
'label' => esc_html__( 'Authors', 'themeisle-companion' ),
|
| 171 |
'help' => esc_html__( 'Enter a list of authors usernames.', 'themeisle-companion' ),
|
| 172 |
'matching' => true,
|
| 173 |
-
),
|
|
|
|
| 174 |
);
|
| 175 |
|
| 176 |
?>
|
|
@@ -183,7 +203,8 @@ do_action( 'fl_builder_loop_settings_before_form', $settings ); // e.g Add custo
|
|
| 183 |
<?php
|
| 184 |
// Vertical align
|
| 185 |
FLBuilder::render_settings_field(
|
| 186 |
-
'card_vertical_align',
|
|
|
|
| 187 |
'type' => 'select',
|
| 188 |
'label' => esc_html__( 'Vertical align', 'themeisle-companion' ),
|
| 189 |
'default' => 'grid',
|
|
@@ -192,12 +213,14 @@ do_action( 'fl_builder_loop_settings_before_form', $settings ); // e.g Add custo
|
|
| 192 |
'middle' => esc_html__( 'Middle', 'themeisle-companion' ),
|
| 193 |
'bottom' => esc_html__( 'Bottom', 'themeisle-companion' ),
|
| 194 |
),
|
| 195 |
-
),
|
|
|
|
| 196 |
);
|
| 197 |
|
| 198 |
// Display type
|
| 199 |
FLBuilder::render_settings_field(
|
| 200 |
-
'display_type',
|
|
|
|
| 201 |
'type' => 'select',
|
| 202 |
'label' => esc_html__( 'Display type', 'themeisle-companion' ),
|
| 203 |
'default' => 'grid',
|
|
@@ -205,40 +228,48 @@ do_action( 'fl_builder_loop_settings_before_form', $settings ); // e.g Add custo
|
|
| 205 |
'grid' => esc_html__( 'Grid', 'themeisle-companion' ),
|
| 206 |
'list' => esc_html__( 'List', 'themeisle-companion' ),
|
| 207 |
),
|
| 208 |
-
),
|
|
|
|
| 209 |
);
|
| 210 |
|
| 211 |
// Card layout
|
| 212 |
FLBuilder::render_settings_field(
|
| 213 |
-
'card_layout',
|
|
|
|
| 214 |
'type' => 'obfx_toggle',
|
| 215 |
'label' => esc_html__( 'Card layout', 'themeisle-companion' ),
|
| 216 |
-
),
|
|
|
|
| 217 |
);
|
| 218 |
|
| 219 |
// Padding top
|
| 220 |
FLBuilder::render_settings_field(
|
| 221 |
-
'card_margin_top',
|
|
|
|
| 222 |
'type' => 'obfx_number',
|
| 223 |
'label' => esc_html__( 'Margin top', 'themeisle-companion' ),
|
| 224 |
'default' => '0',
|
| 225 |
'min' => '0',
|
| 226 |
-
),
|
|
|
|
| 227 |
);
|
| 228 |
|
| 229 |
// Padding bottom
|
| 230 |
FLBuilder::render_settings_field(
|
| 231 |
-
'card_margin_bottom',
|
|
|
|
| 232 |
'type' => 'obfx_number',
|
| 233 |
'label' => esc_html__( 'Margin bottom', 'themeisle-companion' ),
|
| 234 |
'default' => '30',
|
| 235 |
'min' => '0',
|
| 236 |
-
),
|
|
|
|
| 237 |
);
|
| 238 |
|
| 239 |
// Background color
|
| 240 |
FLBuilder::render_settings_field(
|
| 241 |
-
'post_bg_color',
|
|
|
|
| 242 |
'type' => 'color',
|
| 243 |
'label' => __( 'Background color', 'themeisle-companion' ),
|
| 244 |
'show_reset' => true,
|
|
@@ -249,12 +280,14 @@ do_action( 'fl_builder_loop_settings_before_form', $settings ); // e.g Add custo
|
|
| 249 |
'property' => 'background-color',
|
| 250 |
),
|
| 251 |
|
| 252 |
-
),
|
|
|
|
| 253 |
);
|
| 254 |
|
| 255 |
// Link color
|
| 256 |
FLBuilder::render_settings_field(
|
| 257 |
-
'post_link_color',
|
|
|
|
| 258 |
'type' => 'color',
|
| 259 |
'label' => __( 'Link color', 'themeisle-companion' ),
|
| 260 |
'show_reset' => true,
|
|
@@ -263,12 +296,14 @@ do_action( 'fl_builder_loop_settings_before_form', $settings ); // e.g Add custo
|
|
| 263 |
'selector' => '.obfx-post-grid a, .obfx-post-grid-pagination a',
|
| 264 |
'property' => 'color',
|
| 265 |
),
|
| 266 |
-
),
|
|
|
|
| 267 |
);
|
| 268 |
|
| 269 |
// Link color
|
| 270 |
FLBuilder::render_settings_field(
|
| 271 |
-
'post_text_color',
|
|
|
|
| 272 |
'type' => 'color',
|
| 273 |
'label' => __( 'Text color', 'themeisle-companion' ),
|
| 274 |
'show_reset' => true,
|
|
@@ -277,7 +312,8 @@ do_action( 'fl_builder_loop_settings_before_form', $settings ); // e.g Add custo
|
|
| 277 |
'selector' => '.obfx-post-grid, .obfx-post-grid-pagination',
|
| 278 |
'property' => 'color',
|
| 279 |
),
|
| 280 |
-
),
|
|
|
|
| 281 |
);
|
| 282 |
?>
|
| 283 |
</table>
|
| 27 |
|
| 28 |
// Post type
|
| 29 |
FLBuilder::render_settings_field(
|
| 30 |
+
'post_type',
|
| 31 |
+
array(
|
| 32 |
'type' => 'post-type',
|
| 33 |
'label' => esc_html__( 'Post Type', 'themeisle-companion' ),
|
| 34 |
+
),
|
| 35 |
+
$settings
|
| 36 |
);
|
| 37 |
|
| 38 |
// Order
|
| 39 |
FLBuilder::render_settings_field(
|
| 40 |
+
'order',
|
| 41 |
+
array(
|
| 42 |
'type' => 'select',
|
| 43 |
'label' => esc_html__( 'Order', 'themeisle-companion' ),
|
| 44 |
'options' => array(
|
| 45 |
'DESC' => esc_html__( 'Descending', 'themeisle-companion' ),
|
| 46 |
'ASC' => esc_html__( 'Ascending', 'themeisle-companion' ),
|
| 47 |
),
|
| 48 |
+
),
|
| 49 |
+
$settings
|
| 50 |
);
|
| 51 |
|
| 52 |
// Order by
|
| 53 |
FLBuilder::render_settings_field(
|
| 54 |
+
'order_by',
|
| 55 |
+
array(
|
| 56 |
'type' => 'select',
|
| 57 |
'label' => esc_html__( 'Order By', 'themeisle-companion' ),
|
| 58 |
'options' => array(
|
| 75 |
'fields' => array( 'order_by_meta_key' ),
|
| 76 |
),
|
| 77 |
),
|
| 78 |
+
),
|
| 79 |
+
$settings
|
| 80 |
);
|
| 81 |
|
| 82 |
// Meta Key
|
| 83 |
FLBuilder::render_settings_field(
|
| 84 |
+
'order_by_meta_key',
|
| 85 |
+
array(
|
| 86 |
'type' => 'text',
|
| 87 |
'label' => esc_html__( 'Meta Key', 'themeisle-companion' ),
|
| 88 |
+
),
|
| 89 |
+
$settings
|
| 90 |
);
|
| 91 |
|
| 92 |
// Offset
|
| 93 |
FLBuilder::render_settings_field(
|
| 94 |
+
'offset',
|
| 95 |
+
array(
|
| 96 |
'type' => 'text',
|
| 97 |
'label' => _x( 'Offset', 'How many posts to skip.', 'themeisle-companion' ),
|
| 98 |
'default' => '0',
|
| 99 |
'size' => '4',
|
| 100 |
'help' => esc_html__( 'Skip this many posts that match the specified criteria.', 'themeisle-companion' ),
|
| 101 |
+
),
|
| 102 |
+
$settings
|
| 103 |
);
|
| 104 |
|
| 105 |
// Posts per page
|
| 106 |
FLBuilder::render_settings_field(
|
| 107 |
+
'posts_per_page',
|
| 108 |
+
array(
|
| 109 |
'type' => 'obfx_number',
|
| 110 |
'label' => esc_html__( 'Posts per page', 'themeisle-companion' ),
|
| 111 |
'default' => $default_posts_per_page,
|
| 112 |
'min' => '-1',
|
| 113 |
'help' => esc_html__( '-1 means all posts', 'themeisle-companion' ),
|
| 114 |
+
),
|
| 115 |
+
$settings
|
| 116 |
);
|
| 117 |
|
| 118 |
// Columns
|
| 119 |
FLBuilder::render_settings_field(
|
| 120 |
+
'columns',
|
| 121 |
+
array(
|
| 122 |
'type' => 'obfx_number',
|
| 123 |
'label' => esc_html__( 'Number of columns', 'themeisle-companion' ),
|
| 124 |
'default' => '3',
|
| 125 |
'min' => '1',
|
| 126 |
'max' => '5',
|
| 127 |
+
),
|
| 128 |
+
$settings
|
| 129 |
);
|
| 130 |
?>
|
| 131 |
</table>
|
| 143 |
|
| 144 |
// Posts
|
| 145 |
FLBuilder::render_settings_field(
|
| 146 |
+
'posts_' . $slug,
|
| 147 |
+
array(
|
| 148 |
'type' => 'suggest',
|
| 149 |
'action' => 'fl_as_posts',
|
| 150 |
'data' => $slug,
|
| 151 |
'label' => $type->label,
|
| 152 |
'help' => sprintf( esc_html__( 'Enter a list of %1$s.', 'themeisle-companion' ), $type->label ),
|
| 153 |
'matching' => true,
|
| 154 |
+
),
|
| 155 |
+
$settings
|
| 156 |
);
|
| 157 |
|
| 158 |
// Taxonomies
|
| 161 |
foreach ( $taxonomies as $tax_slug => $tax ) {
|
| 162 |
|
| 163 |
FLBuilder::render_settings_field(
|
| 164 |
+
'tax_' . $slug . '_' . $tax_slug,
|
| 165 |
+
array(
|
| 166 |
'type' => 'suggest',
|
| 167 |
'action' => 'fl_as_terms',
|
| 168 |
'data' => $tax_slug,
|
| 169 |
'label' => $tax->label,
|
| 170 |
'help' => sprintf( esc_html__( 'Enter a list of %1$s.', 'themeisle-companion' ), $tax->label ),
|
| 171 |
'matching' => true,
|
| 172 |
+
),
|
| 173 |
+
$settings
|
| 174 |
);
|
| 175 |
}
|
| 176 |
|
| 182 |
|
| 183 |
// Author
|
| 184 |
FLBuilder::render_settings_field(
|
| 185 |
+
'users',
|
| 186 |
+
array(
|
| 187 |
'type' => 'suggest',
|
| 188 |
'action' => 'fl_as_users',
|
| 189 |
'label' => esc_html__( 'Authors', 'themeisle-companion' ),
|
| 190 |
'help' => esc_html__( 'Enter a list of authors usernames.', 'themeisle-companion' ),
|
| 191 |
'matching' => true,
|
| 192 |
+
),
|
| 193 |
+
$settings
|
| 194 |
);
|
| 195 |
|
| 196 |
?>
|
| 203 |
<?php
|
| 204 |
// Vertical align
|
| 205 |
FLBuilder::render_settings_field(
|
| 206 |
+
'card_vertical_align',
|
| 207 |
+
array(
|
| 208 |
'type' => 'select',
|
| 209 |
'label' => esc_html__( 'Vertical align', 'themeisle-companion' ),
|
| 210 |
'default' => 'grid',
|
| 213 |
'middle' => esc_html__( 'Middle', 'themeisle-companion' ),
|
| 214 |
'bottom' => esc_html__( 'Bottom', 'themeisle-companion' ),
|
| 215 |
),
|
| 216 |
+
),
|
| 217 |
+
$settings
|
| 218 |
);
|
| 219 |
|
| 220 |
// Display type
|
| 221 |
FLBuilder::render_settings_field(
|
| 222 |
+
'display_type',
|
| 223 |
+
array(
|
| 224 |
'type' => 'select',
|
| 225 |
'label' => esc_html__( 'Display type', 'themeisle-companion' ),
|
| 226 |
'default' => 'grid',
|
| 228 |
'grid' => esc_html__( 'Grid', 'themeisle-companion' ),
|
| 229 |
'list' => esc_html__( 'List', 'themeisle-companion' ),
|
| 230 |
),
|
| 231 |
+
),
|
| 232 |
+
$settings
|
| 233 |
);
|
| 234 |
|
| 235 |
// Card layout
|
| 236 |
FLBuilder::render_settings_field(
|
| 237 |
+
'card_layout',
|
| 238 |
+
array(
|
| 239 |
'type' => 'obfx_toggle',
|
| 240 |
'label' => esc_html__( 'Card layout', 'themeisle-companion' ),
|
| 241 |
+
),
|
| 242 |
+
$settings
|
| 243 |
);
|
| 244 |
|
| 245 |
// Padding top
|
| 246 |
FLBuilder::render_settings_field(
|
| 247 |
+
'card_margin_top',
|
| 248 |
+
array(
|
| 249 |
'type' => 'obfx_number',
|
| 250 |
'label' => esc_html__( 'Margin top', 'themeisle-companion' ),
|
| 251 |
'default' => '0',
|
| 252 |
'min' => '0',
|
| 253 |
+
),
|
| 254 |
+
$settings
|
| 255 |
);
|
| 256 |
|
| 257 |
// Padding bottom
|
| 258 |
FLBuilder::render_settings_field(
|
| 259 |
+
'card_margin_bottom',
|
| 260 |
+
array(
|
| 261 |
'type' => 'obfx_number',
|
| 262 |
'label' => esc_html__( 'Margin bottom', 'themeisle-companion' ),
|
| 263 |
'default' => '30',
|
| 264 |
'min' => '0',
|
| 265 |
+
),
|
| 266 |
+
$settings
|
| 267 |
);
|
| 268 |
|
| 269 |
// Background color
|
| 270 |
FLBuilder::render_settings_field(
|
| 271 |
+
'post_bg_color',
|
| 272 |
+
array(
|
| 273 |
'type' => 'color',
|
| 274 |
'label' => __( 'Background color', 'themeisle-companion' ),
|
| 275 |
'show_reset' => true,
|
| 280 |
'property' => 'background-color',
|
| 281 |
),
|
| 282 |
|
| 283 |
+
),
|
| 284 |
+
$settings
|
| 285 |
);
|
| 286 |
|
| 287 |
// Link color
|
| 288 |
FLBuilder::render_settings_field(
|
| 289 |
+
'post_link_color',
|
| 290 |
+
array(
|
| 291 |
'type' => 'color',
|
| 292 |
'label' => __( 'Link color', 'themeisle-companion' ),
|
| 293 |
'show_reset' => true,
|
| 296 |
'selector' => '.obfx-post-grid a, .obfx-post-grid-pagination a',
|
| 297 |
'property' => 'color',
|
| 298 |
),
|
| 299 |
+
),
|
| 300 |
+
$settings
|
| 301 |
);
|
| 302 |
|
| 303 |
// Link color
|
| 304 |
FLBuilder::render_settings_field(
|
| 305 |
+
'post_text_color',
|
| 306 |
+
array(
|
| 307 |
'type' => 'color',
|
| 308 |
'label' => __( 'Text color', 'themeisle-companion' ),
|
| 309 |
'show_reset' => true,
|
| 312 |
'selector' => '.obfx-post-grid, .obfx-post-grid-pagination',
|
| 313 |
'property' => 'color',
|
| 314 |
),
|
| 315 |
+
),
|
| 316 |
+
$settings
|
| 317 |
);
|
| 318 |
?>
|
| 319 |
</table>
|
obfx_modules/beaver-widgets/modules/post-grid/post-grid.php
CHANGED
|
@@ -46,7 +46,8 @@ if ( ! empty( $image_sizes ) ) {
|
|
| 46 |
}
|
| 47 |
}
|
| 48 |
FLBuilder::register_module(
|
| 49 |
-
'PostGridModule',
|
|
|
|
| 50 |
'loop_settings' => array(
|
| 51 |
'title' => esc_html__( 'Loop Settings', 'themeisle-companion' ),
|
| 52 |
'file' => BEAVER_WIDGETS_PATH . 'modules/post-grid/includes/loop-settings.php',
|
| 46 |
}
|
| 47 |
}
|
| 48 |
FLBuilder::register_module(
|
| 49 |
+
'PostGridModule',
|
| 50 |
+
array(
|
| 51 |
'loop_settings' => array(
|
| 52 |
'title' => esc_html__( 'Loop Settings', 'themeisle-companion' ),
|
| 53 |
'file' => BEAVER_WIDGETS_PATH . 'modules/post-grid/includes/loop-settings.php',
|
obfx_modules/beaver-widgets/modules/pricing-table/pricing-table.php
CHANGED
|
@@ -44,7 +44,8 @@ class PricingTableModule extends FLBuilderModule {
|
|
| 44 |
* Register the module and its form settings.
|
| 45 |
*/
|
| 46 |
FLBuilder::register_module(
|
| 47 |
-
'PricingTableModule',
|
|
|
|
| 48 |
'content' => array(
|
| 49 |
'title' => esc_html__( 'Content', 'themeisle-companion' ), // Tab title
|
| 50 |
'sections' => array(
|
|
@@ -556,7 +557,8 @@ FLBuilder::register_module(
|
|
| 556 |
|
| 557 |
|
| 558 |
FLBuilder::register_settings_form(
|
| 559 |
-
'feature_field',
|
|
|
|
| 560 |
'title' => __( 'Feature', 'themeisle-companion' ),
|
| 561 |
'tabs' => array(
|
| 562 |
'general' => array(
|
| 44 |
* Register the module and its form settings.
|
| 45 |
*/
|
| 46 |
FLBuilder::register_module(
|
| 47 |
+
'PricingTableModule',
|
| 48 |
+
array(
|
| 49 |
'content' => array(
|
| 50 |
'title' => esc_html__( 'Content', 'themeisle-companion' ), // Tab title
|
| 51 |
'sections' => array(
|
| 557 |
|
| 558 |
|
| 559 |
FLBuilder::register_settings_form(
|
| 560 |
+
'feature_field',
|
| 561 |
+
array(
|
| 562 |
'title' => __( 'Feature', 'themeisle-companion' ),
|
| 563 |
'tabs' => array(
|
| 564 |
'general' => array(
|
obfx_modules/beaver-widgets/modules/services/services.php
CHANGED
|
@@ -42,7 +42,8 @@ class ServicesModule extends FLBuilderModule {
|
|
| 42 |
* Register the module and its form settings.
|
| 43 |
*/
|
| 44 |
FLBuilder::register_module(
|
| 45 |
-
'ServicesModule',
|
|
|
|
| 46 |
'content' => array(
|
| 47 |
'title' => esc_html__( 'Content', 'themeisle-companion' ), // Tab title
|
| 48 |
'sections' => array(
|
|
@@ -214,7 +215,8 @@ FLBuilder::register_module(
|
|
| 214 |
);
|
| 215 |
|
| 216 |
FLBuilder::register_settings_form(
|
| 217 |
-
'service_content',
|
|
|
|
| 218 |
'title' => __( 'Service', 'themeisle-companion' ),
|
| 219 |
'tabs' => array(
|
| 220 |
'general' => array(
|
| 42 |
* Register the module and its form settings.
|
| 43 |
*/
|
| 44 |
FLBuilder::register_module(
|
| 45 |
+
'ServicesModule',
|
| 46 |
+
array(
|
| 47 |
'content' => array(
|
| 48 |
'title' => esc_html__( 'Content', 'themeisle-companion' ), // Tab title
|
| 49 |
'sections' => array(
|
| 215 |
);
|
| 216 |
|
| 217 |
FLBuilder::register_settings_form(
|
| 218 |
+
'service_content',
|
| 219 |
+
array(
|
| 220 |
'title' => __( 'Service', 'themeisle-companion' ),
|
| 221 |
'tabs' => array(
|
| 222 |
'general' => array(
|
obfx_modules/image-cdn/inc/class-orbit-fox-connector.php
CHANGED
|
@@ -151,7 +151,7 @@ class Connector {
|
|
| 151 |
|
| 152 |
$("#obfx_connect_api_key").val(response.data.api_key);
|
| 153 |
$("#obfx-img-display-name").text(response.data.display_name);
|
| 154 |
-
$("#obfx-img-cdn-url").text(response.data.image_cdn.key + '.i.
|
| 155 |
$("#obfx-img-traffic-usage").text((parseInt(response.data.image_cdn.usage) / 1000).toFixed(3) + 'GB');
|
| 156 |
$(".obfx-img-traffic-quota").text((parseInt(response.data.image_cdn.quota) / 1000).toFixed(0) + 'GB');
|
| 157 |
elements.addClass('obfx-img-logged-in');
|
| 151 |
|
| 152 |
$("#obfx_connect_api_key").val(response.data.api_key);
|
| 153 |
$("#obfx-img-display-name").text(response.data.display_name);
|
| 154 |
+
$("#obfx-img-cdn-url").text(response.data.image_cdn.key + '.i.optimole.com');
|
| 155 |
$("#obfx-img-traffic-usage").text((parseInt(response.data.image_cdn.usage) / 1000).toFixed(3) + 'GB');
|
| 156 |
$(".obfx-img-traffic-quota").text((parseInt(response.data.image_cdn.quota) / 1000).toFixed(0) + 'GB');
|
| 157 |
elements.addClass('obfx-img-logged-in');
|
obfx_modules/image-cdn/inc/class-orbit-fox-image-replacer.php
CHANGED
|
@@ -16,15 +16,22 @@ class Image_CDN_Replacer {
|
|
| 16 |
*/
|
| 17 |
protected static $instance = null;
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
/**
|
| 20 |
* A list of allowd extensions.
|
| 21 |
*
|
| 22 |
* @var array
|
| 23 |
*/
|
| 24 |
protected static $extensions = array(
|
| 25 |
-
'jpg',
|
| 26 |
-
'
|
| 27 |
-
'
|
| 28 |
);
|
| 29 |
|
| 30 |
/**
|
|
@@ -34,7 +41,6 @@ class Image_CDN_Replacer {
|
|
| 34 |
*/
|
| 35 |
protected static $image_sizes;
|
| 36 |
|
| 37 |
-
// @TODO provide a filter for this
|
| 38 |
/**
|
| 39 |
* Te cdn url, it will be build on the run.
|
| 40 |
*
|
|
@@ -43,25 +49,25 @@ class Image_CDN_Replacer {
|
|
| 43 |
protected $cdn_url = null;
|
| 44 |
|
| 45 |
/**
|
| 46 |
-
* A
|
| 47 |
*
|
| 48 |
* @var null
|
| 49 |
*/
|
| 50 |
-
protected $
|
| 51 |
|
| 52 |
/**
|
| 53 |
* Defines which is the maximum width accepted in the optimization process.
|
| 54 |
*
|
| 55 |
* @var int
|
| 56 |
*/
|
| 57 |
-
protected $max_width =
|
| 58 |
|
| 59 |
/**
|
| 60 |
* Defines which is the maximum width accepted in the optimization process.
|
| 61 |
*
|
| 62 |
* @var int
|
| 63 |
*/
|
| 64 |
-
protected $max_height =
|
| 65 |
|
| 66 |
/**
|
| 67 |
* Holds the real images sizes as an array.
|
|
@@ -100,10 +106,11 @@ class Image_CDN_Replacer {
|
|
| 100 |
function init() {
|
| 101 |
$this->set_properties();
|
| 102 |
|
| 103 |
-
add_filter( 'image_downsize', array( $this, 'filter_image_downsize' ),
|
| 104 |
-
add_filter( 'the_content', array( $this, 'filter_the_content' ),
|
| 105 |
-
add_filter( 'wp_calculate_image_srcset', array( $this, 'filter_srcset_attr' ),
|
| 106 |
add_filter( 'init', array( $this, 'filter_options_and_mods' ) );
|
|
|
|
| 107 |
}
|
| 108 |
|
| 109 |
/**
|
|
@@ -121,15 +128,74 @@ class Image_CDN_Replacer {
|
|
| 121 |
if ( empty( $this->connect_data['image_cdn'] ) ) {
|
| 122 |
return;
|
| 123 |
}
|
| 124 |
-
|
| 125 |
$this->cdn_url = sprintf(
|
| 126 |
-
'https://%s.%s
|
| 127 |
strtolower( $this->connect_data['image_cdn']['key'] ),
|
| 128 |
-
'i.
|
| 129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
);
|
| 131 |
}
|
| 132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
/**
|
| 134 |
* This filter will replace all the images retrieved via "wp_get_image" type of functions.
|
| 135 |
*
|
|
@@ -154,8 +220,8 @@ class Image_CDN_Replacer {
|
|
| 154 |
|
| 155 |
// default size
|
| 156 |
$sizes = array(
|
| 157 |
-
'width' => $image_meta['width'],
|
| 158 |
-
'height' => $image_meta['height'],
|
| 159 |
);
|
| 160 |
|
| 161 |
// in case there is a custom image size $size will be an array.
|
|
@@ -264,7 +330,7 @@ class Image_CDN_Replacer {
|
|
| 264 |
if (
|
| 265 |
doing_filter( 'the_content' )
|
| 266 |
&& isset( $GLOBALS['content_width'] )
|
| 267 |
-
&& apply_filters( '
|
| 268 |
) {
|
| 269 |
$content_width = (int) $GLOBALS['content_width'];
|
| 270 |
|
|
@@ -279,7 +345,7 @@ class Image_CDN_Replacer {
|
|
| 279 |
// we need to remember how much in percentage the width was resized and apply the same treatment to the height.
|
| 280 |
$percentWidth = ( 1 - $this->max_width / $width ) * 100;
|
| 281 |
$width = $this->max_width;
|
| 282 |
-
$height = round( $height * ( ( 100 - $percentWidth ) / 100 ),
|
| 283 |
}
|
| 284 |
|
| 285 |
// now for the height
|
|
@@ -287,7 +353,7 @@ class Image_CDN_Replacer {
|
|
| 287 |
$percentHeight = ( 1 - $this->max_height / $height ) * 100;
|
| 288 |
// if we reduce the height to max_height by $x percentage than we'll also reduce the width for the same amount.
|
| 289 |
$height = $this->max_height;
|
| 290 |
-
$width = round( $width * ( ( 100 - $percentHeight ) / 100 ),
|
| 291 |
}
|
| 292 |
|
| 293 |
return array(
|
|
@@ -306,15 +372,7 @@ class Image_CDN_Replacer {
|
|
| 306 |
*/
|
| 307 |
protected function get_imgcdn_url( $url, $args = array( 'width' => 'auto', 'height' => 'auto' ) ) {
|
| 308 |
|
| 309 |
-
$
|
| 310 |
-
'jpg|jpeg|jpe' => 'image/jpeg',
|
| 311 |
-
'png' => 'image/png',
|
| 312 |
-
'webp' => 'image/webp',
|
| 313 |
-
);
|
| 314 |
-
|
| 315 |
-
$type = wp_check_filetype( $url, $mimes );
|
| 316 |
-
|
| 317 |
-
if ( ! isset( $type['ext'] ) || empty( $type['ext'] ) ) {
|
| 318 |
return $url;
|
| 319 |
}
|
| 320 |
// not used yet.
|
|
@@ -330,15 +388,17 @@ class Image_CDN_Replacer {
|
|
| 330 |
$args['height'] = round( $args['height'], 0 );
|
| 331 |
}
|
| 332 |
$payload = array(
|
| 333 |
-
'path'
|
| 334 |
-
'scheme'
|
| 335 |
-
'width'
|
| 336 |
-
'height'
|
| 337 |
-
'
|
| 338 |
-
'secret' => $this->connect_data['image_cdn']['secret'],
|
| 339 |
);
|
|
|
|
| 340 |
|
| 341 |
-
$
|
|
|
|
|
|
|
| 342 |
|
| 343 |
$new_url = sprintf(
|
| 344 |
'%s/%s/%s/%s/%s/%s/%s',
|
|
@@ -346,7 +406,7 @@ class Image_CDN_Replacer {
|
|
| 346 |
$hash,
|
| 347 |
(string) $args['width'],
|
| 348 |
(string) $args['height'],
|
| 349 |
-
$compress_level,
|
| 350 |
$scheme,
|
| 351 |
$path
|
| 352 |
);
|
|
@@ -368,12 +428,10 @@ class Image_CDN_Replacer {
|
|
| 368 |
}
|
| 369 |
|
| 370 |
/**
|
| 371 |
-
* Identify images in post content
|
| 372 |
*
|
| 373 |
* @param string $content The post content which will be filtered.
|
| 374 |
*
|
| 375 |
-
* @uses self::validate_image_url, apply_filters, jetpack_photon_url, esc_url
|
| 376 |
-
* @filter the_content<
|
| 377 |
* @return string
|
| 378 |
*/
|
| 379 |
public function filter_the_content( $content ) {
|
|
@@ -384,17 +442,16 @@ class Image_CDN_Replacer {
|
|
| 384 |
}
|
| 385 |
|
| 386 |
$image_sizes = self::image_sizes();
|
| 387 |
-
|
| 388 |
foreach ( $images[0] as $index => $tag ) {
|
| 389 |
$width = $height = false;
|
| 390 |
$new_tag = $tag;
|
| 391 |
$src = $images['img_url'][ $index ];
|
| 392 |
|
| 393 |
-
if ( apply_filters( '
|
| 394 |
continue;
|
| 395 |
}
|
| 396 |
|
| 397 |
-
if ( false !== strpos( $src, 'i.
|
| 398 |
continue; // we already have this
|
| 399 |
}
|
| 400 |
|
|
@@ -425,11 +482,14 @@ class Image_CDN_Replacer {
|
|
| 425 |
}
|
| 426 |
|
| 427 |
$new_sizes = $this->validate_image_sizes( $width, $height );
|
| 428 |
-
|
|
|
|
| 429 |
|
| 430 |
// replace the url in hrefs or links
|
| 431 |
if ( ! empty( $images['link_url'][ $index ] ) ) {
|
| 432 |
-
|
|
|
|
|
|
|
| 433 |
}
|
| 434 |
|
| 435 |
// replace the new sizes
|
|
@@ -485,7 +545,8 @@ class Image_CDN_Replacer {
|
|
| 485 |
if ( ! is_array( $sources ) ) {
|
| 486 |
return $sources;
|
| 487 |
}
|
| 488 |
-
|
|
|
|
| 489 |
foreach ( $sources as $i => $source ) {
|
| 490 |
|
| 491 |
list( $width, $height ) = self::parse_dimensions_from_filename( $source['url'] );
|
|
@@ -500,12 +561,18 @@ class Image_CDN_Replacer {
|
|
| 500 |
|
| 501 |
$new_sizes = $this->validate_image_sizes( $width, $height );
|
| 502 |
$new_url = $this->get_imgcdn_url( $source['url'], $new_sizes );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 503 |
|
| 504 |
-
$
|
| 505 |
-
|
| 506 |
-
$sources[ $i ]['value'] = $new_sizes['width'];
|
| 507 |
} else {
|
| 508 |
-
$
|
| 509 |
}
|
| 510 |
}
|
| 511 |
|
|
@@ -521,8 +588,8 @@ class Image_CDN_Replacer {
|
|
| 521 |
*/
|
| 522 |
public static function parse_dimensions_from_filename( $src ) {
|
| 523 |
$width_height_string = array();
|
| 524 |
-
|
| 525 |
-
if ( preg_match( '#-(\d+)x(\d+)\.(?:' . implode( '|',
|
| 526 |
$width = (int) $width_height_string[1];
|
| 527 |
$height = (int) $width_height_string[2];
|
| 528 |
|
|
@@ -539,13 +606,14 @@ class Image_CDN_Replacer {
|
|
| 539 |
*/
|
| 540 |
public function filter_options_and_mods() {
|
| 541 |
/**
|
| 542 |
-
* `
|
| 543 |
* holds an url and needs an optimization.
|
| 544 |
*/
|
| 545 |
$theme_slug = get_option( 'stylesheet' );
|
| 546 |
|
| 547 |
$options_list = apply_filters(
|
| 548 |
-
'
|
|
|
|
| 549 |
"theme_mods_$theme_slug",
|
| 550 |
)
|
| 551 |
);
|
|
@@ -564,13 +632,12 @@ class Image_CDN_Replacer {
|
|
| 564 |
*
|
| 565 |
* @param string $url The url which should be replaced.
|
| 566 |
*
|
| 567 |
-
* @return
|
| 568 |
*/
|
| 569 |
public function replace_option_url( $url ) {
|
| 570 |
if ( empty( $url ) ) {
|
| 571 |
return $url;
|
| 572 |
}
|
| 573 |
-
|
| 574 |
// $url might be an array or an json encoded array with urls.
|
| 575 |
if ( is_array( $url ) || filter_var( $url, FILTER_VALIDATE_URL ) === false ) {
|
| 576 |
$array = $url;
|
|
@@ -637,5 +704,4 @@ class Image_CDN_Replacer {
|
|
| 637 |
// Unserializing instances of the class is forbidden.
|
| 638 |
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'themeisle-companion' ), '1.0.0' );
|
| 639 |
}
|
| 640 |
-
|
| 641 |
}
|
| 16 |
*/
|
| 17 |
protected static $instance = null;
|
| 18 |
|
| 19 |
+
|
| 20 |
+
/**
|
| 21 |
+
* A data holder.
|
| 22 |
+
*
|
| 23 |
+
* @var null
|
| 24 |
+
*/
|
| 25 |
+
protected $connect_data = null;
|
| 26 |
/**
|
| 27 |
* A list of allowd extensions.
|
| 28 |
*
|
| 29 |
* @var array
|
| 30 |
*/
|
| 31 |
protected static $extensions = array(
|
| 32 |
+
'jpg|jpeg|jpe' => 'image/jpeg',
|
| 33 |
+
'png' => 'image/png',
|
| 34 |
+
'webp' => 'image/webp',
|
| 35 |
);
|
| 36 |
|
| 37 |
/**
|
| 41 |
*/
|
| 42 |
protected static $image_sizes;
|
| 43 |
|
|
|
|
| 44 |
/**
|
| 45 |
* Te cdn url, it will be build on the run.
|
| 46 |
*
|
| 49 |
protected $cdn_url = null;
|
| 50 |
|
| 51 |
/**
|
| 52 |
+
* A secret key to encode payload.
|
| 53 |
*
|
| 54 |
* @var null
|
| 55 |
*/
|
| 56 |
+
protected $cdn_secret = null;
|
| 57 |
|
| 58 |
/**
|
| 59 |
* Defines which is the maximum width accepted in the optimization process.
|
| 60 |
*
|
| 61 |
* @var int
|
| 62 |
*/
|
| 63 |
+
protected $max_width = 3000;
|
| 64 |
|
| 65 |
/**
|
| 66 |
* Defines which is the maximum width accepted in the optimization process.
|
| 67 |
*
|
| 68 |
* @var int
|
| 69 |
*/
|
| 70 |
+
protected $max_height = 3000;
|
| 71 |
|
| 72 |
/**
|
| 73 |
* Holds the real images sizes as an array.
|
| 106 |
function init() {
|
| 107 |
$this->set_properties();
|
| 108 |
|
| 109 |
+
add_filter( 'image_downsize', array( $this, 'filter_image_downsize' ), PHP_INT_MAX, 3 );
|
| 110 |
+
add_filter( 'the_content', array( $this, 'filter_the_content' ), PHP_INT_MAX );
|
| 111 |
+
add_filter( 'wp_calculate_image_srcset', array( $this, 'filter_srcset_attr' ), PHP_INT_MAX, 5 );
|
| 112 |
add_filter( 'init', array( $this, 'filter_options_and_mods' ) );
|
| 113 |
+
add_action( 'init', array( $this, 'init_html_replacer' ), PHP_INT_MAX );
|
| 114 |
}
|
| 115 |
|
| 116 |
/**
|
| 128 |
if ( empty( $this->connect_data['image_cdn'] ) ) {
|
| 129 |
return;
|
| 130 |
}
|
| 131 |
+
$this->cdn_secret = $this->connect_data['image_cdn']['secret'];
|
| 132 |
$this->cdn_url = sprintf(
|
| 133 |
+
'https://%s.%s',
|
| 134 |
strtolower( $this->connect_data['image_cdn']['key'] ),
|
| 135 |
+
'i.optimole.com'
|
| 136 |
+
);
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
/**
|
| 140 |
+
* Init html replacer handler.
|
| 141 |
+
*/
|
| 142 |
+
public function init_html_replacer() {
|
| 143 |
+
if ( is_admin() ) {
|
| 144 |
+
return;
|
| 145 |
+
}
|
| 146 |
+
ob_start(
|
| 147 |
+
array( &$this, 'filter_raw_content' )
|
| 148 |
);
|
| 149 |
}
|
| 150 |
|
| 151 |
+
/**
|
| 152 |
+
* Filter raw content for urls.
|
| 153 |
+
*
|
| 154 |
+
* @param string $html HTML to filter.
|
| 155 |
+
*
|
| 156 |
+
* @return mixed Filtered content.
|
| 157 |
+
*/
|
| 158 |
+
public function filter_raw_content( $html ) {
|
| 159 |
+
$urls = wp_extract_urls( $html );
|
| 160 |
+
$cdn_url = $this->cdn_url;
|
| 161 |
+
$site_url = get_site_url();
|
| 162 |
+
$urls = array_filter(
|
| 163 |
+
$urls,
|
| 164 |
+
function ( $url ) use ( $cdn_url, $site_url ) {
|
| 165 |
+
if ( strpos( $url, $cdn_url ) !== false ) {
|
| 166 |
+
return false;
|
| 167 |
+
}
|
| 168 |
+
if ( strpos( $url, $site_url ) === false ) {
|
| 169 |
+
return false;
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
return $this->check_mimetype( $url );
|
| 173 |
+
}
|
| 174 |
+
);
|
| 175 |
+
$new_urls = array_map( array( $this, 'get_imgcdn_url' ), $urls );
|
| 176 |
+
|
| 177 |
+
return str_replace( $urls, $new_urls, $html );
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
/**
|
| 181 |
+
* Check url mimetype.
|
| 182 |
+
*
|
| 183 |
+
* @param string $url Url to check.
|
| 184 |
+
*
|
| 185 |
+
* @return bool Is a valid image url or not.
|
| 186 |
+
*/
|
| 187 |
+
private function check_mimetype( $url ) {
|
| 188 |
+
|
| 189 |
+
$mimes = self::$extensions;
|
| 190 |
+
$type = wp_check_filetype( $url, $mimes );
|
| 191 |
+
|
| 192 |
+
if ( ! isset( $type['ext'] ) || empty( $type['ext'] ) ) {
|
| 193 |
+
return false;
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
return true;
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
/**
|
| 200 |
* This filter will replace all the images retrieved via "wp_get_image" type of functions.
|
| 201 |
*
|
| 220 |
|
| 221 |
// default size
|
| 222 |
$sizes = array(
|
| 223 |
+
'width' => isset( $image_meta['width'] ) ? $image_meta['width'] : 'auto',
|
| 224 |
+
'height' => isset( $image_meta['height'] ) ? $image_meta['height'] : 'auto',
|
| 225 |
);
|
| 226 |
|
| 227 |
// in case there is a custom image size $size will be an array.
|
| 330 |
if (
|
| 331 |
doing_filter( 'the_content' )
|
| 332 |
&& isset( $GLOBALS['content_width'] )
|
| 333 |
+
&& apply_filters( 'optml_imgcdn_allow_resize_images_from_content_width', true )
|
| 334 |
) {
|
| 335 |
$content_width = (int) $GLOBALS['content_width'];
|
| 336 |
|
| 345 |
// we need to remember how much in percentage the width was resized and apply the same treatment to the height.
|
| 346 |
$percentWidth = ( 1 - $this->max_width / $width ) * 100;
|
| 347 |
$width = $this->max_width;
|
| 348 |
+
$height = round( $height * ( ( 100 - $percentWidth ) / 100 ), 0 );
|
| 349 |
}
|
| 350 |
|
| 351 |
// now for the height
|
| 353 |
$percentHeight = ( 1 - $this->max_height / $height ) * 100;
|
| 354 |
// if we reduce the height to max_height by $x percentage than we'll also reduce the width for the same amount.
|
| 355 |
$height = $this->max_height;
|
| 356 |
+
$width = round( $width * ( ( 100 - $percentHeight ) / 100 ), 0 );
|
| 357 |
}
|
| 358 |
|
| 359 |
return array(
|
| 372 |
*/
|
| 373 |
protected function get_imgcdn_url( $url, $args = array( 'width' => 'auto', 'height' => 'auto' ) ) {
|
| 374 |
|
| 375 |
+
if ( ! $this->check_mimetype( $url ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 376 |
return $url;
|
| 377 |
}
|
| 378 |
// not used yet.
|
| 388 |
$args['height'] = round( $args['height'], 0 );
|
| 389 |
}
|
| 390 |
$payload = array(
|
| 391 |
+
'path' => $this->urlception_encode( $path ),
|
| 392 |
+
'scheme' => $scheme,
|
| 393 |
+
'width' => (string) $args['width'],
|
| 394 |
+
'height' => (string) $args['height'],
|
| 395 |
+
'quality' => (string) $compress_level,
|
|
|
|
| 396 |
);
|
| 397 |
+
ksort( $payload );
|
| 398 |
|
| 399 |
+
$values = array_values( $payload );
|
| 400 |
+
$payload = implode( '', $values );
|
| 401 |
+
$hash = hash_hmac( 'md5', $payload, $this->cdn_secret );
|
| 402 |
|
| 403 |
$new_url = sprintf(
|
| 404 |
'%s/%s/%s/%s/%s/%s/%s',
|
| 406 |
$hash,
|
| 407 |
(string) $args['width'],
|
| 408 |
(string) $args['height'],
|
| 409 |
+
(string) $compress_level,
|
| 410 |
$scheme,
|
| 411 |
$path
|
| 412 |
);
|
| 428 |
}
|
| 429 |
|
| 430 |
/**
|
| 431 |
+
* Identify images in post content.
|
| 432 |
*
|
| 433 |
* @param string $content The post content which will be filtered.
|
| 434 |
*
|
|
|
|
|
|
|
| 435 |
* @return string
|
| 436 |
*/
|
| 437 |
public function filter_the_content( $content ) {
|
| 442 |
}
|
| 443 |
|
| 444 |
$image_sizes = self::image_sizes();
|
|
|
|
| 445 |
foreach ( $images[0] as $index => $tag ) {
|
| 446 |
$width = $height = false;
|
| 447 |
$new_tag = $tag;
|
| 448 |
$src = $images['img_url'][ $index ];
|
| 449 |
|
| 450 |
+
if ( apply_filters( 'optml_imgcdn_disable_optimization_for_link', false, $src ) ) {
|
| 451 |
continue;
|
| 452 |
}
|
| 453 |
|
| 454 |
+
if ( false !== strpos( $src, 'i.optimole.com' ) ) {
|
| 455 |
continue; // we already have this
|
| 456 |
}
|
| 457 |
|
| 482 |
}
|
| 483 |
|
| 484 |
$new_sizes = $this->validate_image_sizes( $width, $height );
|
| 485 |
+
|
| 486 |
+
$new_url = $this->get_imgcdn_url( $src, $new_sizes );
|
| 487 |
|
| 488 |
// replace the url in hrefs or links
|
| 489 |
if ( ! empty( $images['link_url'][ $index ] ) ) {
|
| 490 |
+
if ( $this->check_mimetype( $images['link_url'][ $index ] ) ) {
|
| 491 |
+
$new_tag = preg_replace( '#(href=["|\'])' . $images['link_url'][ $index ] . '(["|\'])#i', '\1' . $new_url . '\2', $tag, 1 );
|
| 492 |
+
}
|
| 493 |
}
|
| 494 |
|
| 495 |
// replace the new sizes
|
| 545 |
if ( ! is_array( $sources ) ) {
|
| 546 |
return $sources;
|
| 547 |
}
|
| 548 |
+
$used = array();
|
| 549 |
+
$new_sources = array();
|
| 550 |
foreach ( $sources as $i => $source ) {
|
| 551 |
|
| 552 |
list( $width, $height ) = self::parse_dimensions_from_filename( $source['url'] );
|
| 561 |
|
| 562 |
$new_sizes = $this->validate_image_sizes( $width, $height );
|
| 563 |
$new_url = $this->get_imgcdn_url( $source['url'], $new_sizes );
|
| 564 |
+
if ( isset( $used[ md5( $new_url ) ] ) ) {
|
| 565 |
+
continue;
|
| 566 |
+
}
|
| 567 |
+
|
| 568 |
+
$used[ md5( $new_url ) ] = true;
|
| 569 |
+
$new_sources[ $i ] = $sources[ $i ];
|
| 570 |
+
$new_sources[ $i ]['url'] = $new_url;
|
| 571 |
|
| 572 |
+
if ( $new_sources[ $i ]['descriptor'] ) {
|
| 573 |
+
$new_sources[ $i ]['value'] = $new_sizes['width'];
|
|
|
|
| 574 |
} else {
|
| 575 |
+
$new_sources[ $i ]['value'] = $new_sizes['height'];
|
| 576 |
}
|
| 577 |
}
|
| 578 |
|
| 588 |
*/
|
| 589 |
public static function parse_dimensions_from_filename( $src ) {
|
| 590 |
$width_height_string = array();
|
| 591 |
+
$extensions = array_keys( self::$extensions );
|
| 592 |
+
if ( preg_match( '#-(\d+)x(\d+)\.(?:' . implode( '|', $extensions ) . '){1}$#i', $src, $width_height_string ) ) {
|
| 593 |
$width = (int) $width_height_string[1];
|
| 594 |
$height = (int) $width_height_string[2];
|
| 595 |
|
| 606 |
*/
|
| 607 |
public function filter_options_and_mods() {
|
| 608 |
/**
|
| 609 |
+
* `optml_imgcdn_options_with_url` is a filter that allows themes or plugins to select which option
|
| 610 |
* holds an url and needs an optimization.
|
| 611 |
*/
|
| 612 |
$theme_slug = get_option( 'stylesheet' );
|
| 613 |
|
| 614 |
$options_list = apply_filters(
|
| 615 |
+
'optml_imgcdn_options_with_url',
|
| 616 |
+
array(
|
| 617 |
"theme_mods_$theme_slug",
|
| 618 |
)
|
| 619 |
);
|
| 632 |
*
|
| 633 |
* @param string $url The url which should be replaced.
|
| 634 |
*
|
| 635 |
+
* @return string Replaced url.
|
| 636 |
*/
|
| 637 |
public function replace_option_url( $url ) {
|
| 638 |
if ( empty( $url ) ) {
|
| 639 |
return $url;
|
| 640 |
}
|
|
|
|
| 641 |
// $url might be an array or an json encoded array with urls.
|
| 642 |
if ( is_array( $url ) || filter_var( $url, FILTER_VALIDATE_URL ) === false ) {
|
| 643 |
$array = $url;
|
| 704 |
// Unserializing instances of the class is forbidden.
|
| 705 |
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'themeisle-companion' ), '1.0.0' );
|
| 706 |
}
|
|
|
|
| 707 |
}
|
obfx_modules/image-cdn/init.php
CHANGED
|
@@ -40,8 +40,8 @@ class Image_CDN_OBFX_Module extends Orbit_Fox_Module_Abstract {
|
|
| 40 |
}
|
| 41 |
$this->beta = true;
|
| 42 |
$this->no_save = true;
|
| 43 |
-
$this->name = __( 'Image Optimization & CDN Module', 'themeisle-companion' );
|
| 44 |
-
$this->description = __( 'Let us take care of
|
| 45 |
}
|
| 46 |
|
| 47 |
/**
|
|
@@ -52,7 +52,7 @@ class Image_CDN_OBFX_Module extends Orbit_Fox_Module_Abstract {
|
|
| 52 |
* @return bool
|
| 53 |
*/
|
| 54 |
public function enable_module() {
|
| 55 |
-
return ( $this->beta ) ? $this->is_lucky_user(
|
| 56 |
}
|
| 57 |
|
| 58 |
/**
|
|
@@ -96,16 +96,6 @@ class Image_CDN_OBFX_Module extends Orbit_Fox_Module_Abstract {
|
|
| 96 |
|
| 97 |
return class_exists( '\OrbitFox\Connector' ) ? get_option( \OrbitFox\Connector::API_DATA_KEY, '' ) : '';
|
| 98 |
}
|
| 99 |
-
/**
|
| 100 |
-
* Return api data.
|
| 101 |
-
*
|
| 102 |
-
* @return mixed|string APi data.
|
| 103 |
-
*/
|
| 104 |
-
private function clear_api_data() {
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
return update_option( \OrbitFox\Connector::API_DATA_KEY, '' );
|
| 108 |
-
}
|
| 109 |
|
| 110 |
/**
|
| 111 |
* Render data from dashboard of orbitfox.com.
|
|
@@ -145,7 +135,7 @@ class Image_CDN_OBFX_Module extends Orbit_Fox_Module_Abstract {
|
|
| 145 |
return '';
|
| 146 |
}
|
| 147 |
|
| 148 |
-
return sprintf( '%s.i.
|
| 149 |
|
| 150 |
}
|
| 151 |
|
|
@@ -301,6 +291,17 @@ class Image_CDN_OBFX_Module extends Orbit_Fox_Module_Abstract {
|
|
| 301 |
|
| 302 |
}
|
| 303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 304 |
/**
|
| 305 |
* Check if the image replacement is enabled.
|
| 306 |
*
|
| 40 |
}
|
| 41 |
$this->beta = true;
|
| 42 |
$this->no_save = true;
|
| 43 |
+
$this->name = __( 'Image Optimization & CDN Module ', 'themeisle-companion' );
|
| 44 |
+
$this->description = __( 'Let us take care of your images sizes. With this feature we\'ll compress and resize every image on your website. <i>This service is powered by Optimole</i><br/> <strong>* Requires account on orbitfox.com</strong>', 'themeisle-companion' );
|
| 45 |
}
|
| 46 |
|
| 47 |
/**
|
| 52 |
* @return bool
|
| 53 |
*/
|
| 54 |
public function enable_module() {
|
| 55 |
+
return ( $this->beta ) ? $this->is_lucky_user( 50 ) : true;
|
| 56 |
}
|
| 57 |
|
| 58 |
/**
|
| 96 |
|
| 97 |
return class_exists( '\OrbitFox\Connector' ) ? get_option( \OrbitFox\Connector::API_DATA_KEY, '' ) : '';
|
| 98 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
|
| 100 |
/**
|
| 101 |
* Render data from dashboard of orbitfox.com.
|
| 135 |
return '';
|
| 136 |
}
|
| 137 |
|
| 138 |
+
return sprintf( '%s.i.optimole.com', strtolower( $obfx_user_data['image_cdn']['key'] ) );
|
| 139 |
|
| 140 |
}
|
| 141 |
|
| 291 |
|
| 292 |
}
|
| 293 |
|
| 294 |
+
/**
|
| 295 |
+
* Return api data.
|
| 296 |
+
*
|
| 297 |
+
* @return mixed|string APi data.
|
| 298 |
+
*/
|
| 299 |
+
private function clear_api_data() {
|
| 300 |
+
|
| 301 |
+
|
| 302 |
+
return update_option( \OrbitFox\Connector::API_DATA_KEY, '' );
|
| 303 |
+
}
|
| 304 |
+
|
| 305 |
/**
|
| 306 |
* Check if the image replacement is enabled.
|
| 307 |
*
|
obfx_modules/safe-updates/init.php
CHANGED
|
@@ -29,7 +29,7 @@ class Safe_Updates_OBFX_Module extends Orbit_Fox_Module_Abstract {
|
|
| 29 |
*/
|
| 30 |
public function __construct() {
|
| 31 |
parent::__construct();
|
| 32 |
-
$this->beta =
|
| 33 |
$this->no_save = true;
|
| 34 |
$this->name = __( 'Safe Updates', 'themeisle-companion' );
|
| 35 |
$this->description = __( 'OrbitFox will give you visual feedback on how your current theme updates will affect your site. For the moment this is available only for wordpress.org themes.', 'themeisle-companion' );
|
|
@@ -43,6 +43,7 @@ class Safe_Updates_OBFX_Module extends Orbit_Fox_Module_Abstract {
|
|
| 43 |
* @return bool
|
| 44 |
*/
|
| 45 |
public function enable_module() {
|
|
|
|
| 46 |
return ( $this->beta ) ? $this->is_lucky_user() : true;
|
| 47 |
}
|
| 48 |
|
| 29 |
*/
|
| 30 |
public function __construct() {
|
| 31 |
parent::__construct();
|
| 32 |
+
$this->beta = false;
|
| 33 |
$this->no_save = true;
|
| 34 |
$this->name = __( 'Safe Updates', 'themeisle-companion' );
|
| 35 |
$this->description = __( 'OrbitFox will give you visual feedback on how your current theme updates will affect your site. For the moment this is available only for wordpress.org themes.', 'themeisle-companion' );
|
| 43 |
* @return bool
|
| 44 |
*/
|
| 45 |
public function enable_module() {
|
| 46 |
+
|
| 47 |
return ( $this->beta ) ? $this->is_lucky_user() : true;
|
| 48 |
}
|
| 49 |
|
readme.md
CHANGED
|
@@ -103,6 +103,13 @@ Activating the Orbit Fox plugin is just like any other plugin. If you've uploade
|
|
| 103 |
5. Social Sharing Module
|
| 104 |
|
| 105 |
## Changelog ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
### 2.5.7 - 2018-08-13 ###
|
| 107 |
|
| 108 |
* -fixed fatal error with Elementor extra widgets
|
| 103 |
5. Social Sharing Module
|
| 104 |
|
| 105 |
## Changelog ##
|
| 106 |
+
### 2.5.8 - 2018-09-12 ###
|
| 107 |
+
|
| 108 |
+
* Extend image optimization module for 50% of users.
|
| 109 |
+
* Enable safe updates for all users.
|
| 110 |
+
* Adds image optimization integration with Optimole.
|
| 111 |
+
|
| 112 |
+
|
| 113 |
### 2.5.7 - 2018-08-13 ###
|
| 114 |
|
| 115 |
* -fixed fatal error with Elementor extra widgets
|
readme.txt
CHANGED
|
@@ -103,6 +103,13 @@ Activating the Orbit Fox plugin is just like any other plugin. If you've uploade
|
|
| 103 |
5. Social Sharing Module
|
| 104 |
|
| 105 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
= 2.5.7 - 2018-08-13 =
|
| 107 |
|
| 108 |
* -fixed fatal error with Elementor extra widgets
|
| 103 |
5. Social Sharing Module
|
| 104 |
|
| 105 |
== Changelog ==
|
| 106 |
+
= 2.5.8 - 2018-09-12 =
|
| 107 |
+
|
| 108 |
+
* Extend image optimization module for 50% of users.
|
| 109 |
+
* Enable safe updates for all users.
|
| 110 |
+
* Adds image optimization integration with Optimole.
|
| 111 |
+
|
| 112 |
+
|
| 113 |
= 2.5.7 - 2018-08-13 =
|
| 114 |
|
| 115 |
* -fixed fatal error with Elementor extra widgets
|
themeisle-companion.php
CHANGED
|
@@ -15,7 +15,7 @@
|
|
| 15 |
* Plugin Name: Orbit Fox Companion
|
| 16 |
* Plugin URI: https://orbitfox.com/
|
| 17 |
* Description: This swiss-knife plugin comes with a quality template library, menu/sharing icons modules, and newly added Elementor/BeaverBuilder page builder widgets on each release.
|
| 18 |
-
* Version: 2.5.
|
| 19 |
* Author: Themeisle
|
| 20 |
* Author URI: https://orbitfox.com/
|
| 21 |
* License: GPL-2.0+
|
|
@@ -71,7 +71,8 @@ function run_orbit_fox() {
|
|
| 71 |
require_once $vendor_file;
|
| 72 |
}
|
| 73 |
add_filter(
|
| 74 |
-
'themeisle_sdk_products',
|
|
|
|
| 75 |
$products[] = __FILE__;
|
| 76 |
|
| 77 |
return $products;
|
|
@@ -79,7 +80,8 @@ function run_orbit_fox() {
|
|
| 79 |
);
|
| 80 |
|
| 81 |
add_filter(
|
| 82 |
-
'themeisle_companion_friendly_name',
|
|
|
|
| 83 |
return 'Orbit Fox';
|
| 84 |
}
|
| 85 |
);
|
| 15 |
* Plugin Name: Orbit Fox Companion
|
| 16 |
* Plugin URI: https://orbitfox.com/
|
| 17 |
* Description: This swiss-knife plugin comes with a quality template library, menu/sharing icons modules, and newly added Elementor/BeaverBuilder page builder widgets on each release.
|
| 18 |
+
* Version: 2.5.8
|
| 19 |
* Author: Themeisle
|
| 20 |
* Author URI: https://orbitfox.com/
|
| 21 |
* License: GPL-2.0+
|
| 71 |
require_once $vendor_file;
|
| 72 |
}
|
| 73 |
add_filter(
|
| 74 |
+
'themeisle_sdk_products',
|
| 75 |
+
function ( $products ) {
|
| 76 |
$products[] = __FILE__;
|
| 77 |
|
| 78 |
return $products;
|
| 80 |
);
|
| 81 |
|
| 82 |
add_filter(
|
| 83 |
+
'themeisle_companion_friendly_name',
|
| 84 |
+
function( $name ) {
|
| 85 |
return 'Orbit Fox';
|
| 86 |
}
|
| 87 |
);
|
themeisle-hash.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"class-autoloader.php":"57e533b653d235e76cb9953720e4f5e9","index.php":"39ab8276fb0e4bd3fcab3270822c5977","themeisle-companion.php":"
|
| 1 |
+
{"class-autoloader.php":"57e533b653d235e76cb9953720e4f5e9","index.php":"39ab8276fb0e4bd3fcab3270822c5977","themeisle-companion.php":"4265fcd5c0f102fdc80ad3b4ca405574","uninstall.php":"7abf753a29e0eb3a844c8a0ba9493b7c"}
|
vendor/autoload.php
CHANGED
|
@@ -4,4 +4,4 @@
|
|
| 4 |
|
| 5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
| 6 |
|
| 7 |
-
return
|
| 4 |
|
| 5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
| 6 |
|
| 7 |
+
return ComposerAutoloaderInit874bfa5516b43214bcbbf7c9c47900dd::getLoader();
|
vendor/codeinwp/templates-directory/class-page-templates-directory.php
CHANGED
|
@@ -14,7 +14,7 @@ if ( ! class_exists( '\ThemeIsle\PageTemplatesDirectory' ) ) {
|
|
| 14 |
* The version of this library
|
| 15 |
* @var string
|
| 16 |
*/
|
| 17 |
-
public static $version = '1.0.
|
| 18 |
|
| 19 |
/**
|
| 20 |
* Holds the module slug.
|
|
@@ -256,6 +256,13 @@ if ( ! class_exists( '\ThemeIsle\PageTemplatesDirectory' ) ) {
|
|
| 256 |
'screenshot' => esc_url( $this->get_source_url() . 'zerif-elementor/screenshot.jpg' ),
|
| 257 |
'import_file' => esc_url( $this->get_source_url() . 'zerif-elementor/template.json' ),
|
| 258 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 259 |
);
|
| 260 |
|
| 261 |
foreach ( $templates_list as $template => $properties ) {
|
| 14 |
* The version of this library
|
| 15 |
* @var string
|
| 16 |
*/
|
| 17 |
+
public static $version = '1.0.6';
|
| 18 |
|
| 19 |
/**
|
| 20 |
* Holds the module slug.
|
| 256 |
'screenshot' => esc_url( $this->get_source_url() . 'zerif-elementor/screenshot.jpg' ),
|
| 257 |
'import_file' => esc_url( $this->get_source_url() . 'zerif-elementor/template.json' ),
|
| 258 |
),
|
| 259 |
+
'notify' => array(
|
| 260 |
+
'title' => __( 'Notify - Landing Page', 'themeisle-companion' ),
|
| 261 |
+
'description' => __( 'A beautiful landing page to showcase your new application. It has a features section to present your app, a subscribe section where you can also add a video showcasing your new app and a testimonials section so you can present the feedback from your beta testers.', 'themeisle-companion' ),
|
| 262 |
+
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/notify-elementor/',
|
| 263 |
+
'screenshot' => esc_url( $this->get_source_url() . 'zerif-elementor/screenshot.jpg' ),
|
| 264 |
+
'import_file' => esc_url( $this->get_source_url() . 'zerif-elementor/template.json' ),
|
| 265 |
+
)
|
| 266 |
);
|
| 267 |
|
| 268 |
foreach ( $templates_list as $template => $properties ) {
|
vendor/codeinwp/templates-directory/composer.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
"name": "codeinwp/templates-directory",
|
| 3 |
"description": "A WordPress library to manage page templates.",
|
| 4 |
"type": "library",
|
| 5 |
-
"version": "1.0.
|
| 6 |
"license": "GPL-2.0-or-later",
|
| 7 |
"homepage": "https://github.com/Codeinwp/templates-directory",
|
| 8 |
"authors": [
|
| 2 |
"name": "codeinwp/templates-directory",
|
| 3 |
"description": "A WordPress library to manage page templates.",
|
| 4 |
"type": "library",
|
| 5 |
+
"version": "1.0.6",
|
| 6 |
"license": "GPL-2.0-or-later",
|
| 7 |
"homepage": "https://github.com/Codeinwp/templates-directory",
|
| 8 |
"authors": [
|
vendor/composer/autoload_real.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
|
| 3 |
// autoload_real.php @generated by Composer
|
| 4 |
|
| 5 |
-
class
|
| 6 |
{
|
| 7 |
private static $loader;
|
| 8 |
|
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInite2ebe98296207e7c5425999ef1a181be
|
|
| 19 |
return self::$loader;
|
| 20 |
}
|
| 21 |
|
| 22 |
-
spl_autoload_register(array('
|
| 23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
| 24 |
-
spl_autoload_unregister(array('
|
| 25 |
|
| 26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
| 27 |
foreach ($map as $namespace => $path) {
|
|
@@ -42,14 +42,14 @@ class ComposerAutoloaderInite2ebe98296207e7c5425999ef1a181be
|
|
| 42 |
|
| 43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
| 44 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
| 45 |
-
|
| 46 |
}
|
| 47 |
|
| 48 |
return $loader;
|
| 49 |
}
|
| 50 |
}
|
| 51 |
|
| 52 |
-
function
|
| 53 |
{
|
| 54 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
| 55 |
require $file;
|
| 2 |
|
| 3 |
// autoload_real.php @generated by Composer
|
| 4 |
|
| 5 |
+
class ComposerAutoloaderInit874bfa5516b43214bcbbf7c9c47900dd
|
| 6 |
{
|
| 7 |
private static $loader;
|
| 8 |
|
| 19 |
return self::$loader;
|
| 20 |
}
|
| 21 |
|
| 22 |
+
spl_autoload_register(array('ComposerAutoloaderInit874bfa5516b43214bcbbf7c9c47900dd', 'loadClassLoader'), true, true);
|
| 23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
| 24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit874bfa5516b43214bcbbf7c9c47900dd', 'loadClassLoader'));
|
| 25 |
|
| 26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
| 27 |
foreach ($map as $namespace => $path) {
|
| 42 |
|
| 43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
| 44 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
| 45 |
+
composerRequire874bfa5516b43214bcbbf7c9c47900dd($fileIdentifier, $file);
|
| 46 |
}
|
| 47 |
|
| 48 |
return $loader;
|
| 49 |
}
|
| 50 |
}
|
| 51 |
|
| 52 |
+
function composerRequire874bfa5516b43214bcbbf7c9c47900dd($fileIdentifier, $file)
|
| 53 |
{
|
| 54 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
| 55 |
require $file;
|
vendor/composer/installed.json
CHANGED
|
@@ -119,18 +119,18 @@
|
|
| 119 |
"source": {
|
| 120 |
"type": "git",
|
| 121 |
"url": "https://github.com/Codeinwp/templates-directory.git",
|
| 122 |
-
"reference": "
|
| 123 |
},
|
| 124 |
"dist": {
|
| 125 |
"type": "zip",
|
| 126 |
-
"url": "https://api.github.com/repos/Codeinwp/templates-directory/zipball/
|
| 127 |
-
"reference": "
|
| 128 |
"shasum": ""
|
| 129 |
},
|
| 130 |
"require": {
|
| 131 |
"codeinwp/full-width-page-templates": "master"
|
| 132 |
},
|
| 133 |
-
"time": "2018-
|
| 134 |
"type": "library",
|
| 135 |
"installation-source": "dist",
|
| 136 |
"autoload": {
|
| 119 |
"source": {
|
| 120 |
"type": "git",
|
| 121 |
"url": "https://github.com/Codeinwp/templates-directory.git",
|
| 122 |
+
"reference": "07c51340f9abb30af565e63303a21ea11e86ee2f"
|
| 123 |
},
|
| 124 |
"dist": {
|
| 125 |
"type": "zip",
|
| 126 |
+
"url": "https://api.github.com/repos/Codeinwp/templates-directory/zipball/07c51340f9abb30af565e63303a21ea11e86ee2f",
|
| 127 |
+
"reference": "07c51340f9abb30af565e63303a21ea11e86ee2f",
|
| 128 |
"shasum": ""
|
| 129 |
},
|
| 130 |
"require": {
|
| 131 |
"codeinwp/full-width-page-templates": "master"
|
| 132 |
},
|
| 133 |
+
"time": "2018-08-16 10:37:58",
|
| 134 |
"type": "library",
|
| 135 |
"installation-source": "dist",
|
| 136 |
"autoload": {
|
