Version Description
- Improved translations
- Fixed notice in term listing page when image field URL is not valid
Download this release
Release Info
Developer | zaantar |
Plugin | Toolset Types – Custom Post Types, Custom Fields and Taxonomies |
Version | 2.2.14 |
Comparing to | |
See all releases |
Code changes from version 2.2.13 to 2.2.14
- application/autoload_classmap.php +211 -211
- application/controllers/api.php +20 -7
- application/controllers/api/handler/filter_get_field_group_ids_by_post_type.php +52 -0
- application/controllers/utils.php +5 -0
- application/models/api/helper.php +0 -25
- library/autoload.php +7 -0
- library/otgs/installer/changelog.txt +6 -0
- library/otgs/installer/includes/class-installer-dependencies.php +175 -167
- library/otgs/installer/includes/class-installer-upgrader-skins.php +38 -0
- library/otgs/installer/includes/class-translation-service-info.php +40 -0
- library/otgs/installer/includes/{installer-api.php → class-wp-installer-api.php} +0 -0
- library/otgs/installer/includes/class-wp-installer-channels.php +291 -0
- library/otgs/installer/includes/class-wp-installer.php +2769 -0
- library/otgs/installer/includes/functions-core.php +9 -0
- library/otgs/installer/includes/functions-templates.php +6 -0
- library/otgs/installer/includes/installer-upgrader-skins.php +0 -37
- library/otgs/installer/includes/installer.class.php +0 -2672
- library/otgs/installer/includes/translation-service-info.class.php +0 -40
- library/otgs/installer/installer.log +0 -1
- library/otgs/installer/installer.php +12 -16
- library/otgs/installer/loader.php +1 -1
- library/otgs/installer/res/css/admin.css +89 -1
- library/otgs/installer/res/js/admin.js +51 -11
- library/otgs/installer/res/js/channels.js +261 -0
- library/otgs/installer/templates/channel-selector.php +68 -0
- library/otgs/installer/templates/downloads-list.php +40 -16
- library/otgs/installer/templates/repository-listing.php +6 -3
- library/toolset/onthego-resources/changelog.txt +1 -1
- library/toolset/onthego-resources/loader.php +1 -1
- library/toolset/onthego-resources/onthego-styles/onthego-admin-styles.css +0 -1
- library/toolset/onthego-resources/onthegosystems-icons/.fontcustom-manifest.json +6 -18
- library/toolset/onthego-resources/onthegosystems-icons/css/_onthegosystems-icons.scss +6 -15
- library/toolset/onthego-resources/onthegosystems-icons/css/onthegosystems-icons.css +6 -12
- library/toolset/onthego-resources/onthegosystems-icons/fonts/onthegosystems-icons-preview.html +7 -52
- library/toolset/onthego-resources/onthegosystems-icons/fonts/onthegosystems-icons_66f9f492f35a2f7dd54f8e6f1fdc63d5.eot +0 -0
- library/toolset/onthego-resources/onthegosystems-icons/fonts/onthegosystems-icons_66f9f492f35a2f7dd54f8e6f1fdc63d5.ttf +0 -0
- library/toolset/onthego-resources/onthegosystems-icons/fonts/onthegosystems-icons_66f9f492f35a2f7dd54f8e6f1fdc63d5.woff +0 -0
- library/toolset/onthego-resources/onthegosystems-icons/fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.eot +0 -0
- library/toolset/onthego-resources/onthegosystems-icons/fonts/{onthegosystems-icons_66f9f492f35a2f7dd54f8e6f1fdc63d5.svg → onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.svg} +227 -237
- library/toolset/onthego-resources/onthegosystems-icons/fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.ttf +0 -0
- library/toolset/onthego-resources/onthegosystems-icons/fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.woff +0 -0
- library/toolset/onthego-resources/onthegosystems-icons/vectors/many-to-many.svg +0 -25
- library/toolset/onthego-resources/onthegosystems-icons/vectors/one-to-many.svg +0 -14
- library/toolset/onthego-resources/onthegosystems-icons/vectors/one-to-one.svg +0 -10
- library/toolset/toolset-common/autoload_classmap.php +6 -1
- library/toolset/toolset-common/bootstrap.php +13 -1
- library/toolset/toolset-common/changelog.md +3 -0
- library/toolset/toolset-common/inc/autoloaded/compatibility-loader/compatibility_handler_factory.php +22 -0
- library/toolset/toolset-common/inc/autoloaded/compatibility-loader/toolset.compatibility.loader.class.php +89 -0
- library/toolset/toolset-common/inc/autoloaded/compatibility-loader/toolset.compatibility.loader.interface.class.php +12 -0
- library/toolset/toolset-common/inc/autoloaded/compatibility-loader/toolset.layouts-theme.class.php +60 -0
- library/toolset/toolset-common/inc/autoloaded/compatibility-loader/toolset.layouts-themes-factory.class.php +59 -0
- library/toolset/toolset-common/inc/toolset.admin.bar.menu.class.php +7 -3
- library/toolset/toolset-common/inc/toolset.assets.manager.class.php +10 -0
- library/toolset/toolset-common/inc/toolset.css.component.class.php +26 -26
- library/toolset/toolset-common/inc/toolset.theme.integration.php +1366 -0
- library/toolset/toolset-common/languages/views-ar.mo +0 -0
- library/toolset/toolset-common/languages/views-de_DE.mo +0 -0
- library/toolset/toolset-common/languages/views-el.mo +0 -0
- library/toolset/toolset-common/languages/views-es_ES.mo +0 -0
- library/toolset/toolset-common/languages/views-fr_FR.mo +0 -0
- library/toolset/toolset-common/languages/views-he_IL.mo +0 -0
- library/toolset/toolset-common/languages/views-it_IT.mo +0 -0
- library/toolset/toolset-common/languages/views-ja.mo +0 -0
- library/toolset/toolset-common/languages/views-ko_KR.mo +0 -0
- library/toolset/toolset-common/languages/views-nl_NL.mo +0 -0
- library/toolset/toolset-common/languages/views-pl_PL.mo +0 -0
- library/toolset/toolset-common/languages/views-pt_BR.mo +0 -0
- library/toolset/toolset-common/languages/views-pt_PT.mo +0 -0
- library/toolset/toolset-common/languages/views-ru_RU.mo +0 -0
- library/toolset/toolset-common/languages/views-sv_SE.mo +0 -0
- library/toolset/toolset-common/languages/views-uk_UA.mo +0 -0
- library/toolset/toolset-common/languages/views-vi.mo +0 -0
- library/toolset/toolset-common/languages/views-zh_CN.mo +0 -0
- library/toolset/toolset-common/languages/views-zh_TW.mo +0 -0
- library/toolset/toolset-common/loader.php +1 -1
- library/toolset/toolset-common/phpcs.xml +0 -16
- library/toolset/toolset-common/phpunit.xml +0 -26
- library/toolset/toolset-common/res/css/toolset-common.css +97 -1
- library/toolset/toolset-common/res/js/toolset-bs-component-buttons.js +27 -43
- library/toolset/toolset-common/res/js/toolset-theme-integration.js +267 -0
- library/toolset/toolset-common/toolset-common-loader.php +2 -2
- library/toolset/toolset-common/toolset-forms/autoload_classmap.php +2 -1
- library/toolset/toolset-common/toolset-forms/classes/class.colorpicker.php +11 -3
- library/toolset/toolset-common/toolset-forms/classes/class.date.php +58 -34
- library/toolset/toolset-common/toolset-forms/classes/class.eforms.php +31 -1
- library/toolset/toolset-common/toolset-forms/classes/class.field_factory.php +5 -2
- library/toolset/toolset-common/toolset-forms/classes/class.file.php +7 -1
- library/toolset/toolset-common/toolset-forms/classes/class.form_factory.php +9 -1
- library/toolset/toolset-common/toolset-forms/classes/class.select.php +129 -106
- library/toolset/toolset-common/toolset-forms/classes/class.submit.php +27 -12
- library/toolset/toolset-common/toolset-forms/classes/class.taxonomy.php +233 -107
- library/toolset/toolset-common/toolset-forms/classes/class.taxonomyhierarchical.php +146 -85
- library/toolset/toolset-common/toolset-forms/css/wpt-toolset-frontend-legacy.css +18 -1
- library/toolset/toolset-common/toolset-forms/js/conditional.js +16 -52
- library/toolset/toolset-common/toolset-forms/js/date.js +2 -2
- library/toolset/toolset-common/toolset-forms/js/main.js +76 -41
- library/toolset/toolset-common/toolset-forms/js/validation.js +47 -23
- library/toolset/toolset-common/toolset-forms/lib/js/jquery-form-validation/jquery.validate.js +17 -9
- library/toolset/toolset-common/toolset-forms/templates/metaform-item.php +44 -45
- library/toolset/toolset-common/toolset-forms/templates/metaform.php +26 -19
- library/toolset/toolset-common/user-editors/editor/screen/basic/backend_layout_template.js +1 -1
- library/toolset/toolset-common/utility/dialogs/toolset.dialog-boxes.class.php +3 -2
- library/toolset/types/embedded/classes/fields.php +0 -1
- library/toolset/types/embedded/includes/fields/entry.php +0 -266
- library/toolset/types/embedded/locale/types-ar.mo +0 -0
- library/toolset/types/embedded/locale/types-de_DE.mo +0 -0
- library/toolset/types/embedded/locale/types-el.mo +0 -0
- library/toolset/types/embedded/locale/types-es_ES.mo +0 -0
- library/toolset/types/embedded/locale/types-fr_FR.mo +0 -0
- library/toolset/types/embedded/locale/types-he_IL.mo +0 -0
- library/toolset/types/embedded/locale/types-it_IT.mo +0 -0
- library/toolset/types/embedded/locale/types-ja.mo +0 -0
- library/toolset/types/embedded/locale/types-ko_KR.mo +0 -0
- library/toolset/types/embedded/locale/types-nl_NL.mo +0 -0
- library/toolset/types/embedded/locale/types-pl_PL.mo +0 -0
- library/toolset/types/embedded/locale/types-pt_BR.mo +0 -0
- library/toolset/types/embedded/locale/types-pt_PT.mo +0 -0
- library/toolset/types/embedded/locale/types-ru_RU.mo +0 -0
- library/toolset/types/embedded/locale/types-sv_SE.mo +0 -0
- library/toolset/types/embedded/locale/types-uk_UA.mo +0 -0
- library/toolset/types/embedded/locale/types-vi.mo +0 -0
- library/toolset/types/embedded/locale/types-zh_CN.mo +0 -0
- library/toolset/types/embedded/locale/types-zh_TW.mo +0 -0
- library/toolset/types/includes/classes/class.types.admin.edit.post.type.php +225 -225
- readme.txt +5 -1
- wpcf.php +3 -3
application/autoload_classmap.php
CHANGED
@@ -1,215 +1,215 @@
|
|
1 |
<?php
|
2 |
// Generated by ZF2's ./bin/classmap_generator.php
|
3 |
return array(
|
4 |
-
'Types_Field_Type_Definition_Checkbox'
|
5 |
-
'Types_Field_Type_Definition_Radio'
|
6 |
-
'Types_Field_Type_Definition_Numeric'
|
7 |
-
'Types_Field_Type_Definition_Checkboxes'
|
8 |
-
'Types_Field_Type_Definition_Singular'
|
9 |
-
'Types_Field_Type_Definition_Select'
|
10 |
-
'Types_Field_Type_Definition_Date'
|
11 |
-
'Types_Field_Type_Definition'
|
12 |
-
'Types_Field_Type_Definition_Factory'
|
13 |
-
'Types_Field_Group_User_Factory'
|
14 |
-
'Types_Field_Group_Post'
|
15 |
-
'Types_Field_Group_Factory'
|
16 |
-
'Types_Field_Group_User'
|
17 |
-
'Types_Field_Group_Post_Factory'
|
18 |
-
'Types_Field_Group_Term'
|
19 |
-
'Types_Field_Group_Term_Factory'
|
20 |
-
'Types_Field_Group'
|
21 |
-
'Types_Setting_Option_Interface'
|
22 |
-
'Types_Setting_Interface'
|
23 |
-
'Types_Setting_Boolean'
|
24 |
-
'Types_Setting_Option'
|
25 |
-
'Types_Setting_Preset_Information_Table'
|
26 |
-
'Types_Taxonomy'
|
27 |
-
'Types_Post_Type'
|
28 |
-
'Types_Helper_Create_Content_Template'
|
29 |
-
'Types_Helper_Create_Layout'
|
30 |
-
'Types_Helper_Create_View'
|
31 |
-
'Types_Helper_Create_Wordpress_Archive'
|
32 |
-
'Types_Helper_Create_Form'
|
33 |
-
'Types_Helper_Output_Interface'
|
34 |
-
'Types_Helper_Output_Meta_Box'
|
35 |
-
'Types_Helper_Url'
|
36 |
-
'Types_Helper_Twig'
|
37 |
-
'Types_Helper_Placeholder'
|
38 |
-
'Types_Helper_Condition'
|
39 |
-
'Types_Helper_Condition_Type_Post_Or_Page'
|
40 |
-
'Types_Helper_Condition_Type_No_Post_Or_Page'
|
41 |
-
'Types_Helper_Condition_Type_Fields_Assigned'
|
42 |
-
'Types_Helper_Condition_Template'
|
43 |
-
'Types_Helper_Condition_Layouts_Template_Missing'
|
44 |
-
'Types_Helper_Condition_Layouts_Active'
|
45 |
-
'Types_Helper_Condition_Layouts_Missing'
|
46 |
-
'Types_Helper_Condition_Layouts_Template_Exists'
|
47 |
-
'Types_Helper_Condition_Layouts_Archive_Exists'
|
48 |
-
'Types_Helper_Condition_Layouts_Compatible'
|
49 |
-
'Types_Helper_Condition_Layouts_Archive_Missing'
|
50 |
-
'Types_Helper_Condition_Single_Has_Fields'
|
51 |
-
'Types_Helper_Condition_Single_Missing'
|
52 |
-
'Types_Helper_Condition_Single_No_Fields'
|
53 |
-
'Types_Helper_Condition_Single_Exists'
|
54 |
-
'Types_Helper_Condition_Archive_Support'
|
55 |
-
'Types_Helper_Condition_Archive_Has_Fields'
|
56 |
-
'Types_Helper_Condition_Archive_No_Support'
|
57 |
-
'Types_Helper_Condition_Archive_Missing'
|
58 |
-
'Types_Helper_Condition_Archive_No_Fields'
|
59 |
-
'Types_Helper_Condition_Archive_Exists'
|
60 |
-
'Types_Helper_Condition_Screen'
|
61 |
-
'Types_Helper_Condition_Views_Template_Missing'
|
62 |
-
'Types_Helper_Condition_Views_Active'
|
63 |
-
'Types_Helper_Condition_Views_Missing'
|
64 |
-
'Types_Helper_Condition_Views_Views_Exist'
|
65 |
-
'Types_Helper_Condition_Views_Template_Exists'
|
66 |
-
'Types_Helper_Condition_Views_Archive_Exists'
|
67 |
-
'Types_Helper_Condition_Views_Views_Missing'
|
68 |
-
'Types_Helper_Condition_Views_Archive_Missing'
|
69 |
-
'Types_Helper_Condition_Cred_Active'
|
70 |
-
'Types_Helper_Condition_Cred_Missing'
|
71 |
-
'Types_Helper_Condition_Cred_Forms_Exist'
|
72 |
-
'Types_Helper_Condition_Cred_Forms_Missing'
|
73 |
-
'Types_Setting'
|
74 |
-
'
|
75 |
-
'
|
76 |
-
'
|
77 |
-
'
|
78 |
-
'
|
79 |
-
'
|
80 |
-
'
|
81 |
-
'
|
82 |
-
'
|
83 |
-
'
|
84 |
-
'
|
85 |
-
'
|
86 |
-
'
|
87 |
-
'
|
88 |
-
'
|
89 |
-
'
|
90 |
-
'
|
91 |
-
'
|
92 |
-
'
|
93 |
-
'
|
94 |
-
'
|
95 |
-
'
|
96 |
-
'
|
97 |
-
'
|
98 |
-
'
|
99 |
-
'
|
100 |
-
'
|
101 |
-
'
|
102 |
-
'
|
103 |
-
'
|
104 |
-
'
|
105 |
-
'
|
106 |
-
'
|
107 |
-
'Types_Api_Handler_Query_Groups'
|
108 |
-
'Types_Api_Handler_Import_From_Zip_File'
|
109 |
-
'Types_Information_Controller'
|
110 |
-
'Types_Admin'
|
111 |
-
'Types_Asset_Help_Tab_Loader'
|
112 |
-
'Types_Asset_Manager'
|
113 |
-
'Types_Main'
|
114 |
-
'Types_Upgrade'
|
115 |
-
'Types_Api'
|
116 |
-
'Types_Ajax_Handler_Interface'
|
117 |
-
'Types_Ajax_Handler_Settings_Action'
|
118 |
-
'Types_Ajax_Handler_Abstract'
|
119 |
-
'Types_Ajax_Handler_Field_Control_Action'
|
120 |
-
'Types_Ajax_Handler_Check_Slug_Conflicts'
|
121 |
-
'Types_Utils'
|
122 |
-
'Types_Twig_Autoloader'
|
123 |
-
'WPCF_Loader'
|
124 |
-
'WPCF_Usermeta_Repeater'
|
125 |
-
'WPCF_Field_Renderer_Abstract'
|
126 |
-
'WPCF_Field_Renderer_Preview_Checkbox'
|
127 |
-
'WPCF_Field_Renderer_Preview_Radio'
|
128 |
-
'WPCF_Field_Renderer_Preview_URL'
|
129 |
-
'WPCF_Field_Renderer_Preview_Image'
|
130 |
-
'WPCF_Field_Renderer_Preview_Textfield'
|
131 |
-
'WPCF_Field_Renderer_Preview_File'
|
132 |
-
'WPCF_Field_Renderer_Preview_Checkboxes'
|
133 |
-
'WPCF_Field_Renderer_Preview_Skype'
|
134 |
-
'WPCF_Field_Renderer_Preview_Base'
|
135 |
-
'WPCF_Field_Renderer_Preview_Colorpicker'
|
136 |
-
'WPCF_Field_Renderer_Preview_Address'
|
137 |
-
'WPCF_Field_Renderer_Preview_Date'
|
138 |
-
'WPCF_Field_Renderer_Factory'
|
139 |
-
'WPCF_Field_Renderer_Toolset_Forms'
|
140 |
-
'WPCF_Field_Accessor_Dummy'
|
141 |
-
'WPCF_Field_Accessor_Abstract'
|
142 |
-
'WPCF_Field_Accessor_Termmeta_Field'
|
143 |
-
'WPCF_Field_Accessor_Termmeta'
|
144 |
-
'WPCF_Field_Instance_Unsaved'
|
145 |
-
'WPCF_Field_DataMapper_Checkbox'
|
146 |
-
'WPCF_Field_DataMapper_Abstract'
|
147 |
-
'WPCF_Field_DataMapper_Checkboxes'
|
148 |
-
'WPCF_Field_DataMapper_Identity'
|
149 |
-
'WPCF_Field_Definition_Factory_Post'
|
150 |
-
'WPCF_Field_Hooks_API'
|
151 |
-
'WPCF_Field_Option_Radio'
|
152 |
-
'WPCF_Field_Definition_Term'
|
153 |
-
'WPCF_Field_Definition_Factory_Term'
|
154 |
-
'WPCF_Field_Definition_Generic'
|
155 |
-
'WPCF_Field_Definition_Abstract'
|
156 |
-
'WPCF_Field_Instance'
|
157 |
-
'WPCF_Field_Option_Select'
|
158 |
-
'WPCF_Field_Definition_Factory_User'
|
159 |
-
'WPCF_Field_Definition'
|
160 |
-
'WPCF_Field_Option_Checkboxes'
|
161 |
-
'WPCF_Field_Definition_Factory'
|
162 |
-
'WPCF_Field_Definition_User'
|
163 |
-
'WPCF_Field_Data_Saver'
|
164 |
-
'WPCF_Field_Instance_Term'
|
165 |
-
'WPCF_Field_Definition_Post'
|
166 |
-
'WPCF_Field_Instance_Abstract'
|
167 |
-
'WPCF_Path'
|
168 |
-
'WPCF_Repeater'
|
169 |
-
'WPCF_Termmeta_Repeater'
|
170 |
-
'WPCF_GUI_Term_Field_Editing'
|
171 |
-
'WPCF_Validation'
|
172 |
-
'WPCF_Import_Export'
|
173 |
-
'WPCF_WPViews'
|
174 |
-
'WPCF_Usermeta_Field'
|
175 |
-
'Enlimbo_Forms_Wpcf'
|
176 |
-
'WPCF_Fields'
|
177 |
-
'WPCF_Relationship'
|
178 |
-
'Wpcf_Cake_Validation'
|
179 |
-
'WPCF_Post_Types'
|
180 |
-
'WPCF_Evaluate'
|
181 |
-
'WPCF_Conditional'
|
182 |
-
'WPCF_Helper_Ajax'
|
183 |
-
'WPCF_Editor'
|
184 |
-
'WPCF_Field'
|
185 |
-
'WPCF_Termmeta_Field'
|
186 |
-
'WPCF_Relationship_Child_Form'
|
187 |
-
'WPCF_Types_Marketing_Messages'
|
188 |
-
'WPCF_Custom_Fields_List_Table'
|
189 |
-
'Types_Admin_Page'
|
190 |
-
'Types_Admin_Post_Types_List_Table'
|
191 |
-
'WPCF_Roles'
|
192 |
-
'Types_Admin_Usermeta_Control_Table'
|
193 |
-
'Types_Admin_Taxonomies'
|
194 |
-
'Types_Admin_Post_Type'
|
195 |
-
'WPCF_Types_Marketing'
|
196 |
-
'Types_Admin_Fields'
|
197 |
-
'Types_Admin_Taxonomies_List_Table'
|
198 |
-
'WPCF_Page_Listing_Abstract'
|
199 |
-
'WPCF_Page_Listing_Table'
|
200 |
-
'WPCF_Page_Listing_Termmeta_Table'
|
201 |
-
'WPCF_Page_Listing_Termmeta'
|
202 |
-
'WPCF_Page_Abstract'
|
203 |
-
'WPCF_Page_Edit_Termmeta_Form'
|
204 |
-
'WPCF_Page_Edit_Termmeta'
|
205 |
-
'Types_Admin_Edit_Fields'
|
206 |
-
'Types_Admin_Edit_Taxonomy'
|
207 |
-
'Types_Admin_Edit_Meta_Fields_Group'
|
208 |
-
'Types_Admin_Edit_Custom_Fields_Group'
|
209 |
-
'Types_Admin_Usermeta_Groups_List_Table'
|
210 |
-
'Types_Fields_Conditional'
|
211 |
-
'Types_Admin_Edit_Post_Type'
|
212 |
-
'Toolset_Filesystem_Exception'
|
213 |
-
'Toolset_Filesystem_Directory'
|
214 |
-
'Toolset_Filesystem_File'
|
215 |
);
|
1 |
<?php
|
2 |
// Generated by ZF2's ./bin/classmap_generator.php
|
3 |
return array(
|
4 |
+
'Types_Field_Type_Definition_Checkbox' => dirname( __FILE__ ) . '/models/field/type/definition/checkbox.php',
|
5 |
+
'Types_Field_Type_Definition_Radio' => dirname( __FILE__ ) . '/models/field/type/definition/radio.php',
|
6 |
+
'Types_Field_Type_Definition_Numeric' => dirname( __FILE__ ) . '/models/field/type/definition/numeric.php',
|
7 |
+
'Types_Field_Type_Definition_Checkboxes' => dirname( __FILE__ ) . '/models/field/type/definition/checkboxes.php',
|
8 |
+
'Types_Field_Type_Definition_Singular' => dirname( __FILE__ ) . '/models/field/type/definition/singular.php',
|
9 |
+
'Types_Field_Type_Definition_Select' => dirname( __FILE__ ) . '/models/field/type/definition/select.php',
|
10 |
+
'Types_Field_Type_Definition_Date' => dirname( __FILE__ ) . '/models/field/type/definition/date.php',
|
11 |
+
'Types_Field_Type_Definition' => dirname( __FILE__ ) . '/models/field/type/definition.php',
|
12 |
+
'Types_Field_Type_Definition_Factory' => dirname( __FILE__ ) . '/models/field/type/definition_factory.php',
|
13 |
+
'Types_Field_Group_User_Factory' => dirname( __FILE__ ) . '/models/field/group/user_factory.php',
|
14 |
+
'Types_Field_Group_Post' => dirname( __FILE__ ) . '/models/field/group/post.php',
|
15 |
+
'Types_Field_Group_Factory' => dirname( __FILE__ ) . '/models/field/group/factory.php',
|
16 |
+
'Types_Field_Group_User' => dirname( __FILE__ ) . '/models/field/group/user.php',
|
17 |
+
'Types_Field_Group_Post_Factory' => dirname( __FILE__ ) . '/models/field/group/post_factory.php',
|
18 |
+
'Types_Field_Group_Term' => dirname( __FILE__ ) . '/models/field/group/term.php',
|
19 |
+
'Types_Field_Group_Term_Factory' => dirname( __FILE__ ) . '/models/field/group/term_factory.php',
|
20 |
+
'Types_Field_Group' => dirname( __FILE__ ) . '/models/field/group.php',
|
21 |
+
'Types_Setting_Option_Interface' => dirname( __FILE__ ) . '/models/setting/option/interface.php',
|
22 |
+
'Types_Setting_Interface' => dirname( __FILE__ ) . '/models/setting/interface.php',
|
23 |
+
'Types_Setting_Boolean' => dirname( __FILE__ ) . '/models/setting/boolean.php',
|
24 |
+
'Types_Setting_Option' => dirname( __FILE__ ) . '/models/setting/option.php',
|
25 |
+
'Types_Setting_Preset_Information_Table' => dirname( __FILE__ ) . '/models/setting/preset/information_table.php',
|
26 |
+
'Types_Taxonomy' => dirname( __FILE__ ) . '/models/taxonomy.php',
|
27 |
+
'Types_Post_Type' => dirname( __FILE__ ) . '/models/post_type.php',
|
28 |
+
'Types_Helper_Create_Content_Template' => dirname( __FILE__ ) . '/models/helper/create/content_template.php',
|
29 |
+
'Types_Helper_Create_Layout' => dirname( __FILE__ ) . '/models/helper/create/layout.php',
|
30 |
+
'Types_Helper_Create_View' => dirname( __FILE__ ) . '/models/helper/create/view.php',
|
31 |
+
'Types_Helper_Create_Wordpress_Archive' => dirname( __FILE__ ) . '/models/helper/create/wordpress_archive.php',
|
32 |
+
'Types_Helper_Create_Form' => dirname( __FILE__ ) . '/models/helper/create/form.php',
|
33 |
+
'Types_Helper_Output_Interface' => dirname( __FILE__ ) . '/models/helper/output/interface.php',
|
34 |
+
'Types_Helper_Output_Meta_Box' => dirname( __FILE__ ) . '/models/helper/output/meta_box.php',
|
35 |
+
'Types_Helper_Url' => dirname( __FILE__ ) . '/models/helper/url.php',
|
36 |
+
'Types_Helper_Twig' => dirname( __FILE__ ) . '/models/helper/twig.php',
|
37 |
+
'Types_Helper_Placeholder' => dirname( __FILE__ ) . '/models/helper/placeholder.php',
|
38 |
+
'Types_Helper_Condition' => dirname( __FILE__ ) . '/models/helper/condition.php',
|
39 |
+
'Types_Helper_Condition_Type_Post_Or_Page' => dirname( __FILE__ ) . '/models/helper/condition/type/post_or_page.php',
|
40 |
+
'Types_Helper_Condition_Type_No_Post_Or_Page' => dirname( __FILE__ ) . '/models/helper/condition/type/no_post_or_page.php',
|
41 |
+
'Types_Helper_Condition_Type_Fields_Assigned' => dirname( __FILE__ ) . '/models/helper/condition/type/fields_assigned.php',
|
42 |
+
'Types_Helper_Condition_Template' => dirname( __FILE__ ) . '/models/helper/condition/template.php',
|
43 |
+
'Types_Helper_Condition_Layouts_Template_Missing' => dirname( __FILE__ ) . '/models/helper/condition/layouts/template_missing.php',
|
44 |
+
'Types_Helper_Condition_Layouts_Active' => dirname( __FILE__ ) . '/models/helper/condition/layouts/active.php',
|
45 |
+
'Types_Helper_Condition_Layouts_Missing' => dirname( __FILE__ ) . '/models/helper/condition/layouts/missing.php',
|
46 |
+
'Types_Helper_Condition_Layouts_Template_Exists' => dirname( __FILE__ ) . '/models/helper/condition/layouts/template_exists.php',
|
47 |
+
'Types_Helper_Condition_Layouts_Archive_Exists' => dirname( __FILE__ ) . '/models/helper/condition/layouts/archive_exists.php',
|
48 |
+
'Types_Helper_Condition_Layouts_Compatible' => dirname( __FILE__ ) . '/models/helper/condition/layouts/compatible.php',
|
49 |
+
'Types_Helper_Condition_Layouts_Archive_Missing' => dirname( __FILE__ ) . '/models/helper/condition/layouts/archive_missing.php',
|
50 |
+
'Types_Helper_Condition_Single_Has_Fields' => dirname( __FILE__ ) . '/models/helper/condition/single/has_fields.php',
|
51 |
+
'Types_Helper_Condition_Single_Missing' => dirname( __FILE__ ) . '/models/helper/condition/single/missing.php',
|
52 |
+
'Types_Helper_Condition_Single_No_Fields' => dirname( __FILE__ ) . '/models/helper/condition/single/no_fields.php',
|
53 |
+
'Types_Helper_Condition_Single_Exists' => dirname( __FILE__ ) . '/models/helper/condition/single/exists.php',
|
54 |
+
'Types_Helper_Condition_Archive_Support' => dirname( __FILE__ ) . '/models/helper/condition/archive/support.php',
|
55 |
+
'Types_Helper_Condition_Archive_Has_Fields' => dirname( __FILE__ ) . '/models/helper/condition/archive/has_fields.php',
|
56 |
+
'Types_Helper_Condition_Archive_No_Support' => dirname( __FILE__ ) . '/models/helper/condition/archive/no_support.php',
|
57 |
+
'Types_Helper_Condition_Archive_Missing' => dirname( __FILE__ ) . '/models/helper/condition/archive/missing.php',
|
58 |
+
'Types_Helper_Condition_Archive_No_Fields' => dirname( __FILE__ ) . '/models/helper/condition/archive/no_fields.php',
|
59 |
+
'Types_Helper_Condition_Archive_Exists' => dirname( __FILE__ ) . '/models/helper/condition/archive/exists.php',
|
60 |
+
'Types_Helper_Condition_Screen' => dirname( __FILE__ ) . '/models/helper/condition/screen.php',
|
61 |
+
'Types_Helper_Condition_Views_Template_Missing' => dirname( __FILE__ ) . '/models/helper/condition/views/template_missing.php',
|
62 |
+
'Types_Helper_Condition_Views_Active' => dirname( __FILE__ ) . '/models/helper/condition/views/active.php',
|
63 |
+
'Types_Helper_Condition_Views_Missing' => dirname( __FILE__ ) . '/models/helper/condition/views/missing.php',
|
64 |
+
'Types_Helper_Condition_Views_Views_Exist' => dirname( __FILE__ ) . '/models/helper/condition/views/views_exist.php',
|
65 |
+
'Types_Helper_Condition_Views_Template_Exists' => dirname( __FILE__ ) . '/models/helper/condition/views/template_exists.php',
|
66 |
+
'Types_Helper_Condition_Views_Archive_Exists' => dirname( __FILE__ ) . '/models/helper/condition/views/archive_exists.php',
|
67 |
+
'Types_Helper_Condition_Views_Views_Missing' => dirname( __FILE__ ) . '/models/helper/condition/views/views_missing.php',
|
68 |
+
'Types_Helper_Condition_Views_Archive_Missing' => dirname( __FILE__ ) . '/models/helper/condition/views/archive_missing.php',
|
69 |
+
'Types_Helper_Condition_Cred_Active' => dirname( __FILE__ ) . '/models/helper/condition/cred/active.php',
|
70 |
+
'Types_Helper_Condition_Cred_Missing' => dirname( __FILE__ ) . '/models/helper/condition/cred/missing.php',
|
71 |
+
'Types_Helper_Condition_Cred_Forms_Exist' => dirname( __FILE__ ) . '/models/helper/condition/cred/forms_exist.php',
|
72 |
+
'Types_Helper_Condition_Cred_Forms_Missing' => dirname( __FILE__ ) . '/models/helper/condition/cred/forms_missing.php',
|
73 |
+
'Types_Setting' => dirname( __FILE__ ) . '/models/setting.php',
|
74 |
+
'Types_Information_Container' => dirname( __FILE__ ) . '/models/information/container.php',
|
75 |
+
'Types_Information_Message_Post_Type' => dirname( __FILE__ ) . '/models/information/message/post_type.php',
|
76 |
+
'Types_Information_Message' => dirname( __FILE__ ) . '/models/information/message.php',
|
77 |
+
'Types_Information_Table' => dirname( __FILE__ ) . '/models/information/table.php',
|
78 |
+
'Types_Wpml_Field_Group_String' => dirname( __FILE__ ) . '/models/wpml/field/group/string.php',
|
79 |
+
'Types_Wpml_Field_Group_String_Name' => dirname( __FILE__ ) . '/models/wpml/field/group/string/name.php',
|
80 |
+
'Types_Wpml_Field_Group_String_Description' => dirname( __FILE__ ) . '/models/wpml/field/group/string/description.php',
|
81 |
+
'Types_Wpml_Interface' => dirname( __FILE__ ) . '/models/wpml/interface.php',
|
82 |
+
'Types_Wpml_Field_Group' => dirname( __FILE__ ) . '/models/wpml/field_group.php',
|
83 |
+
'Types_Field_Type_Converter' => dirname( __FILE__ ) . '/controllers/field/type_converter.php',
|
84 |
+
'Types_Field_Utils' => dirname( __FILE__ ) . '/controllers/field/utils.php',
|
85 |
+
'Types_Frontend' => dirname( __FILE__ ) . '/controllers/frontend.php',
|
86 |
+
'Types_Import_Export' => dirname( __FILE__ ) . '/controllers/import_export.php',
|
87 |
+
'Types_Admin_Menu' => dirname( __FILE__ ) . '/controllers/admin_menu.php',
|
88 |
+
'Types_Interop_Handler_Interface' => dirname( __FILE__ ) . '/controllers/interop/handler_interface.php',
|
89 |
+
'Types_Interop_Handler_Wpml' => dirname( __FILE__ ) . '/controllers/interop/handler/wpml.php',
|
90 |
+
'Types_Interop_Handler_Use_Any_Font' => dirname( __FILE__ ) . '/controllers/interop/handler/use_any_font.php',
|
91 |
+
'Types_Interop_Handler_Divi' => dirname( __FILE__ ) . '/controllers/interop/handler/divi.php',
|
92 |
+
'Types_Interop_Mediator' => dirname( __FILE__ ) . '/controllers/interop/mediator.php',
|
93 |
+
'Types_Assets' => dirname( __FILE__ ) . '/controllers/assets.php',
|
94 |
+
'Types_Ajax' => dirname( __FILE__ ) . '/controllers/ajax.php',
|
95 |
+
'Types_Embedded' => dirname( __FILE__ ) . '/controllers/embedded.php',
|
96 |
+
'Types_Page_Extension_Edit_Post_Type' => dirname( __FILE__ ) . '/controllers/page/extension/edit_post_type.php',
|
97 |
+
'Types_Page_Extension_Edit_Post_Fields' => dirname( __FILE__ ) . '/controllers/page/extension/edit_post_fields.php',
|
98 |
+
'Types_Page_Extension_Edit_Post' => dirname( __FILE__ ) . '/controllers/page/extension/edit_post.php',
|
99 |
+
'Types_Page_Extension_Settings' => dirname( __FILE__ ) . '/controllers/page/extension/settings.php',
|
100 |
+
'Types_Page_Abstract' => dirname( __FILE__ ) . '/controllers/page/abstract.php',
|
101 |
+
'Types_Page_Hidden_Helper' => dirname( __FILE__ ) . '/controllers/page/hidden/helper.php',
|
102 |
+
'Types_Page_Dashboard' => dirname( __FILE__ ) . '/controllers/page/dashboard.php',
|
103 |
+
'Types_Page_Field_Control' => dirname( __FILE__ ) . '/controllers/page/field_control.php',
|
104 |
+
'Types_Dialog_Box' => dirname( __FILE__ ) . '/controllers/dialog_box.php',
|
105 |
+
'Types_Api_Handler_Interface' => dirname( __FILE__ ) . '/controllers/api/handler/interface.php',
|
106 |
+
'Types_Api_Handler_Filter_Get_Field_Group_Ids_By_Post_Type' => dirname( __FILE__ ) . '/controllers/api/handler/filter_get_field_group_ids_by_post_type.php',
|
107 |
+
'Types_Api_Handler_Query_Groups' => dirname( __FILE__ ) . '/controllers/api/handler/query_groups.php',
|
108 |
+
'Types_Api_Handler_Import_From_Zip_File' => dirname( __FILE__ ) . '/controllers/api/handler/import_from_zip_file.php',
|
109 |
+
'Types_Information_Controller' => dirname( __FILE__ ) . '/controllers/information/controller.php',
|
110 |
+
'Types_Admin' => dirname( __FILE__ ) . '/controllers/admin.php',
|
111 |
+
'Types_Asset_Help_Tab_Loader' => dirname( __FILE__ ) . '/controllers/asset/help_tab_loader.php',
|
112 |
+
'Types_Asset_Manager' => dirname( __FILE__ ) . '/controllers/asset/manager.php',
|
113 |
+
'Types_Main' => dirname( __FILE__ ) . '/controllers/main.php',
|
114 |
+
'Types_Upgrade' => dirname( __FILE__ ) . '/controllers/upgrade.php',
|
115 |
+
'Types_Api' => dirname( __FILE__ ) . '/controllers/api.php',
|
116 |
+
'Types_Ajax_Handler_Interface' => dirname( __FILE__ ) . '/controllers/ajax/handler_interface.php',
|
117 |
+
'Types_Ajax_Handler_Settings_Action' => dirname( __FILE__ ) . '/controllers/ajax/handler/settings_action.php',
|
118 |
+
'Types_Ajax_Handler_Abstract' => dirname( __FILE__ ) . '/controllers/ajax/handler/abstract.php',
|
119 |
+
'Types_Ajax_Handler_Field_Control_Action' => dirname( __FILE__ ) . '/controllers/ajax/handler/field_control_action.php',
|
120 |
+
'Types_Ajax_Handler_Check_Slug_Conflicts' => dirname( __FILE__ ) . '/controllers/ajax/handler/check_slug_conflicts.php',
|
121 |
+
'Types_Utils' => dirname( __FILE__ ) . '/controllers/utils.php',
|
122 |
+
'Types_Twig_Autoloader' => dirname( __FILE__ ) . '/controllers/twig_autoloader.php',
|
123 |
+
'WPCF_Loader' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/loader.php',
|
124 |
+
'WPCF_Usermeta_Repeater' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/usermeta_repeater.php',
|
125 |
+
'WPCF_Field_Renderer_Abstract' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/renderer/abstract.php',
|
126 |
+
'WPCF_Field_Renderer_Preview_Checkbox' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/renderer/preview/checkbox.php',
|
127 |
+
'WPCF_Field_Renderer_Preview_Radio' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/renderer/preview/radio.php',
|
128 |
+
'WPCF_Field_Renderer_Preview_URL' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/renderer/preview/url.php',
|
129 |
+
'WPCF_Field_Renderer_Preview_Image' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/renderer/preview/image.php',
|
130 |
+
'WPCF_Field_Renderer_Preview_Textfield' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/renderer/preview/textfield.php',
|
131 |
+
'WPCF_Field_Renderer_Preview_File' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/renderer/preview/file.php',
|
132 |
+
'WPCF_Field_Renderer_Preview_Checkboxes' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/renderer/preview/checkboxes.php',
|
133 |
+
'WPCF_Field_Renderer_Preview_Skype' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/renderer/preview/skype.php',
|
134 |
+
'WPCF_Field_Renderer_Preview_Base' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/renderer/preview/base.php',
|
135 |
+
'WPCF_Field_Renderer_Preview_Colorpicker' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/renderer/preview/colorpicker.php',
|
136 |
+
'WPCF_Field_Renderer_Preview_Address' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/renderer/preview/address.php',
|
137 |
+
'WPCF_Field_Renderer_Preview_Date' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/renderer/preview/date.php',
|
138 |
+
'WPCF_Field_Renderer_Factory' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/renderer/factory.php',
|
139 |
+
'WPCF_Field_Renderer_Toolset_Forms' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/renderer/toolset_forms.php',
|
140 |
+
'WPCF_Field_Accessor_Dummy' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/accessor/dummy.php',
|
141 |
+
'WPCF_Field_Accessor_Abstract' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/accessor/abstract.php',
|
142 |
+
'WPCF_Field_Accessor_Termmeta_Field' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/accessor/termmeta_field.php',
|
143 |
+
'WPCF_Field_Accessor_Termmeta' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/accessor/termmeta.php',
|
144 |
+
'WPCF_Field_Instance_Unsaved' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/instance_unsaved.php',
|
145 |
+
'WPCF_Field_DataMapper_Checkbox' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/datamapper/checkbox.php',
|
146 |
+
'WPCF_Field_DataMapper_Abstract' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/datamapper/abstract.php',
|
147 |
+
'WPCF_Field_DataMapper_Checkboxes' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/datamapper/checkboxes.php',
|
148 |
+
'WPCF_Field_DataMapper_Identity' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/datamapper/identity.php',
|
149 |
+
'WPCF_Field_Definition_Factory_Post' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/definition_factory_post.php',
|
150 |
+
'WPCF_Field_Hooks_API' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/hooks_api.php',
|
151 |
+
'WPCF_Field_Option_Radio' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/option_radio.php',
|
152 |
+
'WPCF_Field_Definition_Term' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/definition_term.php',
|
153 |
+
'WPCF_Field_Definition_Factory_Term' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/definition_factory_term.php',
|
154 |
+
'WPCF_Field_Definition_Generic' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/definition_generic.php',
|
155 |
+
'WPCF_Field_Definition_Abstract' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/definition_abstract.php',
|
156 |
+
'WPCF_Field_Instance' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/instance.php',
|
157 |
+
'WPCF_Field_Option_Select' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/option_select.php',
|
158 |
+
'WPCF_Field_Definition_Factory_User' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/definition_factory_user.php',
|
159 |
+
'WPCF_Field_Definition' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/definition.php',
|
160 |
+
'WPCF_Field_Option_Checkboxes' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/option_checkboxes.php',
|
161 |
+
'WPCF_Field_Definition_Factory' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/definition_factory.php',
|
162 |
+
'WPCF_Field_Definition_User' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/definition_user.php',
|
163 |
+
'WPCF_Field_Data_Saver' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/data_saver.php',
|
164 |
+
'WPCF_Field_Instance_Term' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/instance_term.php',
|
165 |
+
'WPCF_Field_Definition_Post' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/definition_post.php',
|
166 |
+
'WPCF_Field_Instance_Abstract' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field/instance_abstract.php',
|
167 |
+
'WPCF_Path' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/path.php',
|
168 |
+
'WPCF_Repeater' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/repeater.php',
|
169 |
+
'WPCF_Termmeta_Repeater' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/repeater.php',
|
170 |
+
'WPCF_GUI_Term_Field_Editing' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/gui/term_field_editing.php',
|
171 |
+
'WPCF_Validation' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/validation.php',
|
172 |
+
'WPCF_Import_Export' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/class.wpcf-import-export.php',
|
173 |
+
'WPCF_WPViews' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/wpviews.php',
|
174 |
+
'WPCF_Usermeta_Field' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/usermeta_field.php',
|
175 |
+
'Enlimbo_Forms_Wpcf' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/forms.php',
|
176 |
+
'WPCF_Fields' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/fields.php',
|
177 |
+
'WPCF_Relationship' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/relationship.php',
|
178 |
+
'Wpcf_Cake_Validation' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/validation-cakephp.php',
|
179 |
+
'WPCF_Post_Types' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/class.wpcf-post-types.php',
|
180 |
+
'WPCF_Evaluate' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/evaluate.php',
|
181 |
+
'WPCF_Conditional' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/conditional.php',
|
182 |
+
'WPCF_Helper_Ajax' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/helper.ajax.php',
|
183 |
+
'WPCF_Editor' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/editor.php',
|
184 |
+
'WPCF_Field' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field.php',
|
185 |
+
'WPCF_Termmeta_Field' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/field.php',
|
186 |
+
'WPCF_Relationship_Child_Form' => dirname( __FILE__ ) . '/../library/toolset/types/embedded/classes/relationship/form-child.php',
|
187 |
+
'WPCF_Types_Marketing_Messages' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.wpcf.marketing.messages.php',
|
188 |
+
'WPCF_Custom_Fields_List_Table' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.wpcf.custom.fields.list.table.php',
|
189 |
+
'Types_Admin_Page' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.types.admin.page.php',
|
190 |
+
'Types_Admin_Post_Types_List_Table' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.types.admin.post.types.list.table.php',
|
191 |
+
'WPCF_Roles' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.wpcf.roles.php',
|
192 |
+
'Types_Admin_Usermeta_Control_Table' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.types.admin.usermeta.table.php',
|
193 |
+
'Types_Admin_Taxonomies' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.types.admin.taxonomies.php',
|
194 |
+
'Types_Admin_Post_Type' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.types.admin.post-type.php',
|
195 |
+
'WPCF_Types_Marketing' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.wpcf.marketing.php',
|
196 |
+
'Types_Admin_Fields' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.types.admin.fields.php',
|
197 |
+
'Types_Admin_Taxonomies_List_Table' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.types.admin.taxonomies.list.table.php',
|
198 |
+
'WPCF_Page_Listing_Abstract' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/page/listing/abstract.php',
|
199 |
+
'WPCF_Page_Listing_Table' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/page/listing/table.php',
|
200 |
+
'WPCF_Page_Listing_Termmeta_Table' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/page/listing/termmeta_table.php',
|
201 |
+
'WPCF_Page_Listing_Termmeta' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/page/listing/termmeta.php',
|
202 |
+
'WPCF_Page_Abstract' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/page/abstract.php',
|
203 |
+
'WPCF_Page_Edit_Termmeta_Form' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/page/edit/termmeta_form.php',
|
204 |
+
'WPCF_Page_Edit_Termmeta' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/page/edit/termmeta.php',
|
205 |
+
'Types_Admin_Edit_Fields' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.types.admin.edit.fields.php',
|
206 |
+
'Types_Admin_Edit_Taxonomy' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.types.admin.edit.taxonomy.php',
|
207 |
+
'Types_Admin_Edit_Meta_Fields_Group' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.types.admin.edit.meta.fields.group.php',
|
208 |
+
'Types_Admin_Edit_Custom_Fields_Group' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.types.admin.edit.custom.fields.group.php',
|
209 |
+
'Types_Admin_Usermeta_Groups_List_Table' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.types.admin.usermeta.groups.list.table.php',
|
210 |
+
'Types_Fields_Conditional' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.types.fields.conditional.php',
|
211 |
+
'Types_Admin_Edit_Post_Type' => dirname( __FILE__ ) . '/../library/toolset/types/includes/classes/class.types.admin.edit.post.type.php',
|
212 |
+
'Toolset_Filesystem_Exception' => dirname( __FILE__ ) . '/../library/toolset/filesystem/exception.php',
|
213 |
+
'Toolset_Filesystem_Directory' => dirname( __FILE__ ) . '/../library/toolset/filesystem/directory.php',
|
214 |
+
'Toolset_Filesystem_File' => dirname( __FILE__ ) . '/../library/toolset/filesystem/file.php',
|
215 |
);
|
application/controllers/api.php
CHANGED
@@ -97,7 +97,26 @@ final class Types_Api {
|
|
97 |
*
|
98 |
* @since 2.2
|
99 |
*/
|
100 |
-
'query_groups' => array( 'args' => 2 )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
);
|
103 |
|
@@ -117,12 +136,6 @@ final class Types_Api {
|
|
117 |
}
|
118 |
|
119 |
$this->callbacks_registered = true;
|
120 |
-
|
121 |
-
/**
|
122 |
-
* get all field group ids by post type
|
123 |
-
* @fixme document this, please!
|
124 |
-
*/
|
125 |
-
add_filter( 'types_filter_get_field_group_ids_by_post_type', array( 'Types_Api_Helper', 'get_field_group_ids_by_post_type' ), 10, 2 );
|
126 |
|
127 |
/**
|
128 |
* types_filter_query_field_definitions
|
97 |
*
|
98 |
* @since 2.2
|
99 |
*/
|
100 |
+
'query_groups' => array( 'args' => 2 ),
|
101 |
+
|
102 |
+
|
103 |
+
/**
|
104 |
+
* types_filter_get_field_group_ids_by_post_type
|
105 |
+
*
|
106 |
+
* Returns all ids of field groups assigned to the given post type.
|
107 |
+
*
|
108 |
+
* Note: This is used by CRED (auto complete form).
|
109 |
+
*
|
110 |
+
* @param mixed $ignored
|
111 |
+
* @param string $post_type_slug
|
112 |
+
*
|
113 |
+
* @return array Post field group IDs (may come as numeric strings).
|
114 |
+
*
|
115 |
+
* @throws InvalidArgumentException when presented with a non-string post type.
|
116 |
+
*
|
117 |
+
* @since 2.2.14
|
118 |
+
*/
|
119 |
+
'filter_get_field_group_ids_by_post_type' => array( 'args' => 2 )
|
120 |
|
121 |
);
|
122 |
|
136 |
}
|
137 |
|
138 |
$this->callbacks_registered = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
|
140 |
/**
|
141 |
* types_filter_query_field_definitions
|
application/controllers/api/handler/filter_get_field_group_ids_by_post_type.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Handler for the types_filter_get_field_group_ids_by_post_type filter API.
|
5 |
+
*
|
6 |
+
* @since 2.2.14
|
7 |
+
*/
|
8 |
+
class Types_Api_Handler_Filter_Get_Field_Group_Ids_By_Post_Type implements Types_Api_Handler_Interface {
|
9 |
+
|
10 |
+
|
11 |
+
private $wpdb;
|
12 |
+
|
13 |
+
|
14 |
+
public function __construct( wpdb $wpdb_di = null ) {
|
15 |
+
global $wpdb;
|
16 |
+
$this->wpdb = ( null === $wpdb_di ? $wpdb : $wpdb_di );
|
17 |
+
}
|
18 |
+
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @param array $arguments Original action/filter arguments.
|
22 |
+
*
|
23 |
+
* @return string[]
|
24 |
+
*/
|
25 |
+
public function process_call( $arguments ) {
|
26 |
+
|
27 |
+
$post_type = toolset_getarr( $arguments, 1 );
|
28 |
+
|
29 |
+
if( ! is_string( $post_type ) ) {
|
30 |
+
throw new InvalidArgumentException( 'Invalid argument for a post type.' );
|
31 |
+
}
|
32 |
+
|
33 |
+
$query = $this->wpdb->prepare(
|
34 |
+
"SELECT post_id FROM {$this->wpdb->postmeta}
|
35 |
+
WHERE
|
36 |
+
meta_key = '_wp_types_group_post_types'
|
37 |
+
AND (
|
38 |
+
meta_value LIKE %s
|
39 |
+
OR meta_value = 'all'
|
40 |
+
OR meta_value REGEXP '^[,]+$'
|
41 |
+
)
|
42 |
+
ORDER BY post_id ASC",
|
43 |
+
'%' . $post_type . '%'
|
44 |
+
);
|
45 |
+
|
46 |
+
$post_ids = $this->wpdb->get_col( $query );
|
47 |
+
|
48 |
+
return $post_ids;
|
49 |
+
|
50 |
+
}
|
51 |
+
|
52 |
+
}
|
application/controllers/utils.php
CHANGED
@@ -229,6 +229,11 @@ final class Types_Utils {
|
|
229 |
// Split the $url into two parts with the wp-content directory as the separator.
|
230 |
$parsed_url = explode( parse_url( WP_CONTENT_URL, PHP_URL_PATH ), $url );
|
231 |
|
|
|
|
|
|
|
|
|
|
|
232 |
// Get the host of the current site and the host of the $url, ignoring www.
|
233 |
$this_host = str_ireplace( 'www.', '', parse_url( home_url(), PHP_URL_HOST ) );
|
234 |
$file_host = str_ireplace( 'www.', '', parse_url( $url, PHP_URL_HOST ) );
|
229 |
// Split the $url into two parts with the wp-content directory as the separator.
|
230 |
$parsed_url = explode( parse_url( WP_CONTENT_URL, PHP_URL_PATH ), $url );
|
231 |
|
232 |
+
// Return null if image is not on domain (WP_CONTENT_URL)
|
233 |
+
if( count( $parsed_url ) === 1 ) {
|
234 |
+
return null;
|
235 |
+
}
|
236 |
+
|
237 |
// Get the host of the current site and the host of the $url, ignoring www.
|
238 |
$this_host = str_ireplace( 'www.', '', parse_url( home_url(), PHP_URL_HOST ) );
|
239 |
$file_host = str_ireplace( 'www.', '', parse_url( $url, PHP_URL_HOST ) );
|
application/models/api/helper.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
class Types_Api_Helper {
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Returns all ids of field groups assigned to the given post type.
|
8 |
-
* This is used by CRED (auto complete form)
|
9 |
-
*
|
10 |
-
* @todo write tests and refactor code.
|
11 |
-
* @param $post_type
|
12 |
-
*
|
13 |
-
* @return array
|
14 |
-
*/
|
15 |
-
public static function get_field_group_ids_by_post_type( $value, $post_type ) {
|
16 |
-
global $wpdb;
|
17 |
-
$sql = 'SELECT post_id FROM ' .$wpdb->postmeta . '
|
18 |
-
WHERE meta_key="_wp_types_group_post_types"
|
19 |
-
AND (meta_value LIKE "%'.$post_type.'%" OR meta_value="all" OR meta_value REGEXP "^[,]+$")
|
20 |
-
ORDER BY post_id ASC';
|
21 |
-
$post_ids = $wpdb->get_col( $sql );
|
22 |
-
|
23 |
-
return $post_ids;
|
24 |
-
}
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
library/autoload.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload.php @generated by Composer
|
4 |
+
|
5 |
+
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
+
|
7 |
+
return ComposerAutoloaderInit2ed57237f016a5dab734af042499b2a7::getLoader();
|
library/otgs/installer/changelog.txt
CHANGED
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
= 1.7.17 =
|
2 |
* Fixed some warnings and notices
|
3 |
|
1 |
+
= 1.8.1 =
|
2 |
+
* Fixed a bug potentially making the downloads list under the Commercial not display correctly
|
3 |
+
|
4 |
+
= 1.8 =
|
5 |
+
* Added support for update channels (beta, developement and production)
|
6 |
+
|
7 |
= 1.7.17 =
|
8 |
* Fixed some warnings and notices
|
9 |
|
library/otgs/installer/includes/class-installer-dependencies.php
CHANGED
@@ -1,280 +1,288 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class Installer_Dependencies{
|
4 |
|
5 |
-
|
6 |
-
|
7 |
|
8 |
|
9 |
-
|
10 |
|
11 |
-
|
12 |
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
-
|
16 |
-
if($pagenow == 'update.php'){
|
17 |
-
if(isset($_GET['action']) && $_GET['action'] == 'update-selected'){
|
18 |
-
add_action('admin_head', array($this, 'prevent_plugins_update_on_updates_screen')); //iframe/bulk
|
19 |
-
}else{
|
20 |
-
add_action('all_admin_notices', array($this, 'prevent_plugins_update_on_updates_screen')); //regular/singular
|
21 |
-
}
|
22 |
-
}
|
23 |
-
add_action('wp_ajax_update-plugin', array($this, 'prevent_plugins_update_on_updates_screen'), 0); // high priority, before WP
|
24 |
|
25 |
-
|
26 |
|
27 |
-
|
28 |
|
29 |
-
|
30 |
|
31 |
-
|
32 |
|
33 |
-
|
|
|
|
|
34 |
|
35 |
-
|
36 |
-
$longest_path['wpml'] = 109;
|
37 |
-
$longest_path['toolset'] = 99;
|
38 |
|
39 |
-
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
$installer_settings = WP_Installer()->settings;
|
44 |
|
45 |
if ( isset($installer_settings['repositories'][$repository_id]['data']) && is_array( $installer_settings['repositories'][$repository_id]['data']['downloads']['plugins'] ) ) {
|
46 |
$a_plugin = current( $installer_settings['repositories'][$repository_id]['data']['downloads']['plugins'] );
|
47 |
$url = WP_Installer()->append_site_key_to_download_url( $a_plugin['url'], 'xxxxxx', $repository_id );
|
48 |
$tmpfname = wp_tempnam( $url );
|
49 |
|
50 |
-
|
51 |
|
52 |
-
|
53 |
|
54 |
-
|
55 |
|
56 |
-
|
57 |
|
58 |
-
|
59 |
|
60 |
|
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 |
-
|
92 |
|
93 |
-
|
94 |
|
95 |
-
|
96 |
|
97 |
-
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
256 characters limitation of the current Windows environment.', 'installer');
|
102 |
-
|
103 |
|
104 |
-
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
|
111 |
-
|
112 |
|
113 |
-
|
114 |
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
|
119 |
-
|
120 |
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
|
133 |
-
|
134 |
|
135 |
-
|
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 |
-
|
185 |
-
|
186 |
|
187 |
-
|
188 |
|
189 |
-
|
190 |
|
191 |
-
|
192 |
|
193 |
-
|
194 |
|
195 |
-
|
196 |
|
197 |
-
|
198 |
|
199 |
-
|
200 |
|
201 |
-
|
202 |
|
203 |
-
|
204 |
|
205 |
-
|
206 |
|
207 |
-
|
208 |
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
|
213 |
-
|
214 |
|
215 |
-
|
216 |
|
217 |
-
|
218 |
|
219 |
-
|
220 |
|
221 |
-
|
222 |
|
223 |
|
224 |
-
|
225 |
|
226 |
-
|
227 |
|
228 |
-
|
229 |
|
230 |
-
|
231 |
|
232 |
-
|
233 |
|
234 |
|
235 |
-
|
236 |
|
237 |
-
|
238 |
|
239 |
-
|
240 |
|
241 |
-
|
242 |
|
243 |
-
|
244 |
-
|
245 |
|
246 |
-
|
247 |
|
248 |
-
|
249 |
-
|
250 |
|
251 |
-
|
252 |
-
|
253 |
|
254 |
-
|
255 |
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
|
263 |
-
|
264 |
|
265 |
-
|
266 |
|
267 |
-
|
268 |
|
269 |
-
|
270 |
-
|
271 |
|
272 |
-
|
273 |
|
274 |
-
|
275 |
-
|
276 |
|
277 |
-
|
278 |
|
279 |
|
280 |
}
|
1 |
<?php
|
2 |
|
3 |
+
class Installer_Dependencies {
|
4 |
|
5 |
+
private $uploading_allowed = null;
|
6 |
+
private $is_win_paths_exception = array();
|
7 |
|
8 |
|
9 |
+
function __construct() {
|
10 |
|
11 |
+
add_action( 'admin_init', array( $this, 'prevent_plugins_update_on_plugins_page' ), 100 );
|
12 |
|
13 |
|
14 |
+
global $pagenow;
|
15 |
+
if ( $pagenow == 'update.php' ) {
|
16 |
+
if ( isset( $_GET['action'] ) && $_GET['action'] == 'update-selected' ) {
|
17 |
+
add_action( 'admin_head', array(
|
18 |
+
$this,
|
19 |
+
'prevent_plugins_update_on_updates_screen'
|
20 |
+
) ); //iframe/bulk
|
21 |
+
} else {
|
22 |
+
add_action( 'all_admin_notices', array(
|
23 |
+
$this,
|
24 |
+
'prevent_plugins_update_on_updates_screen'
|
25 |
+
) ); //regular/singular
|
26 |
+
}
|
27 |
+
}
|
28 |
+
add_action( 'wp_ajax_update-plugin', array(
|
29 |
+
$this,
|
30 |
+
'prevent_plugins_update_on_updates_screen'
|
31 |
+
), 0 ); // high priority, before WP
|
32 |
|
33 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
+
public function is_win_paths_exception( $repository_id ) {
|
36 |
|
37 |
+
if ( ! isset( $this->is_win_paths_exception[ $repository_id ] ) ) {
|
38 |
|
39 |
+
$this->is_win_paths_exception[ $repository_id ] = false;
|
40 |
|
41 |
+
if ( strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN' ) {
|
42 |
|
43 |
+
$windows_max_path_length = 256;
|
44 |
+
$longest_path['wpml'] = 109;
|
45 |
+
$longest_path['toolset'] = 99;
|
46 |
|
47 |
+
$margin = 15;
|
|
|
|
|
48 |
|
49 |
+
$upgrade_path_length = strlen( WP_CONTENT_DIR . '/upgrade' );
|
50 |
|
51 |
+
$installer_settings = WP_Installer()->settings;
|
|
|
|
|
52 |
|
53 |
if ( isset($installer_settings['repositories'][$repository_id]['data']) && is_array( $installer_settings['repositories'][$repository_id]['data']['downloads']['plugins'] ) ) {
|
54 |
$a_plugin = current( $installer_settings['repositories'][$repository_id]['data']['downloads']['plugins'] );
|
55 |
$url = WP_Installer()->append_site_key_to_download_url( $a_plugin['url'], 'xxxxxx', $repository_id );
|
56 |
$tmpfname = wp_tempnam( $url );
|
57 |
|
58 |
+
$tmpname_length = strlen( basename( $tmpfname ) ) - 4; // -.tmp
|
59 |
|
60 |
+
if ( $upgrade_path_length + $tmpname_length + $longest_path[ $repository_id ] + $margin > $windows_max_path_length ) {
|
61 |
|
62 |
+
$this->is_win_paths_exception[ $repository_id ] = true;
|
63 |
|
64 |
+
}
|
65 |
|
66 |
+
}
|
67 |
|
68 |
|
69 |
+
}
|
70 |
|
71 |
+
}
|
72 |
|
73 |
+
return $this->is_win_paths_exception[ $repository_id ];
|
74 |
|
75 |
+
}
|
76 |
|
77 |
+
public function is_uploading_allowed() {
|
78 |
|
79 |
+
if ( ! isset( $this->uploading_allowed ) ) {
|
80 |
+
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
81 |
+
require_once WP_Installer()->plugin_path() . '/includes/class-installer-upgrader-skins.php';
|
82 |
|
83 |
+
$upgrader_skins = new Installer_Upgrader_Skins(); //use our custom (mute) Skin
|
84 |
+
$upgrader = new Plugin_Upgrader( $upgrader_skins );
|
85 |
|
86 |
+
ob_start();
|
87 |
+
$res = $upgrader->fs_connect( array( WP_CONTENT_DIR, WP_PLUGIN_DIR ) );
|
88 |
+
ob_end_clean();
|
89 |
|
90 |
+
if ( ! $res || is_wp_error( $res ) ) {
|
91 |
+
$this->uploading_allowed = false;
|
92 |
+
} else {
|
93 |
+
$this->uploading_allowed = true;
|
94 |
+
}
|
95 |
+
}
|
96 |
|
97 |
+
return $this->uploading_allowed;
|
98 |
|
99 |
+
}
|
100 |
|
101 |
+
public function cant_download( $repository_id ) {
|
102 |
|
103 |
+
return ! $this->is_uploading_allowed() || $this->is_win_paths_exception( $repository_id );
|
104 |
|
105 |
+
}
|
106 |
|
107 |
+
public function win_paths_exception_message() {
|
108 |
+
return __( 'Downloading is not possible. WordPress cannot create required folders because of the
|
109 |
+
256 characters limitation of the current Windows environment.', 'installer' );
|
110 |
+
}
|
111 |
|
112 |
+
public function prevent_plugins_update_on_plugins_page() {
|
113 |
|
114 |
+
$plugins = get_site_transient( 'update_plugins' );
|
115 |
+
if ( isset( $plugins->response ) && is_array( $plugins->response ) ) {
|
116 |
+
$plugins_with_updates = array_keys( $plugins->response );
|
117 |
+
}
|
118 |
|
119 |
+
if ( ! empty( $plugins_with_updates ) ) {
|
120 |
|
121 |
+
$plugins = get_plugins();
|
122 |
|
123 |
+
$installer_settings = WP_Installer()->settings;
|
124 |
+
if ( isset( $installer_settings['repositories'] ) ) {
|
125 |
+
foreach ( $installer_settings['repositories'] as $repository_id => $repository ) {
|
126 |
|
127 |
+
if ( $this->is_win_paths_exception( $repository_id ) ) {
|
128 |
|
129 |
+
$repositories_plugins = array();
|
130 |
+
foreach ( $repository['data']['packages'] as $package ) {
|
131 |
+
foreach ( $package['products'] as $product ) {
|
132 |
+
foreach ( $product['plugins'] as $plugin_slug ) {
|
133 |
+
$download = $installer_settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $plugin_slug ];
|
134 |
+
if ( empty( $download['free-on-wporg'] ) ) {
|
135 |
+
$repositories_plugins[ $download['slug'] ] = $download['name'];
|
136 |
+
}
|
137 |
+
}
|
138 |
+
}
|
139 |
+
}
|
140 |
|
141 |
+
foreach ( $plugins as $plugin_id => $plugin ) {
|
142 |
|
143 |
+
if ( in_array( $plugin_id, $plugins_with_updates ) ) {
|
144 |
|
145 |
+
$wp_plugin_slug = dirname( $plugin_id );
|
146 |
+
if ( empty( $wp_plugin_slug ) ) {
|
147 |
+
$wp_plugin_slug = basename( $plugin_id, '.php' );
|
148 |
+
}
|
149 |
|
150 |
+
foreach ( $repositories_plugins as $slug => $name ) {
|
151 |
+
if ( $wp_plugin_slug == $slug || $name == $plugin['Name'] || $name == $plugin['Title'] ) { //match order: slug, name, title
|
152 |
|
153 |
+
remove_action( "after_plugin_row_$plugin_id", 'wp_plugin_update_row', 10, 2 );
|
154 |
+
add_action( "after_plugin_row_$plugin_id", array(
|
155 |
+
$this,
|
156 |
+
'wp_plugin_update_row_win_exception',
|
157 |
+
), 10, 2 );
|
158 |
|
159 |
+
}
|
160 |
+
}
|
161 |
|
162 |
+
}
|
163 |
|
164 |
+
}
|
165 |
|
166 |
+
}
|
167 |
|
168 |
|
169 |
+
}
|
170 |
+
}
|
171 |
|
172 |
+
}
|
173 |
|
174 |
+
}
|
175 |
|
176 |
+
public function wp_plugin_update_row_win_exception() {
|
177 |
+
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
178 |
+
echo '<tr class="plugin-update-tr">';
|
179 |
+
echo '<td class="plugin-update colspanchange" colspan="' . esc_attr( $wp_list_table->get_column_count() ) .
|
180 |
+
'"><div class="update-message">' . $this->win_paths_exception_message() . '</div></td>';
|
181 |
+
echo '</tr>';
|
182 |
+
}
|
183 |
|
184 |
+
public function prevent_plugins_update_on_updates_screen() {
|
185 |
|
186 |
+
if ( isset( $_REQUEST['action'] ) ) {
|
187 |
|
188 |
+
$action = isset( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : '';
|
189 |
|
190 |
+
$installer_settings = WP_Installer()->settings;
|
191 |
|
192 |
+
//bulk mode
|
193 |
+
if ( 'update-selected' == $action ) {
|
194 |
|
195 |
+
global $plugins;
|
196 |
|
197 |
+
if ( isset( $plugins ) && is_array( $plugins ) ) {
|
198 |
|
199 |
+
foreach ( $plugins as $k => $plugin ) {
|
200 |
|
201 |
+
$wp_plugin_slug = dirname( $plugin );
|
202 |
|
203 |
+
foreach ( $installer_settings['repositories'] as $repository_id => $repository ) {
|
204 |
|
205 |
+
if ( $this->is_win_paths_exception( $repository_id ) ) {
|
206 |
|
207 |
+
foreach ( $repository['data']['packages'] as $package ) {
|
208 |
|
209 |
+
foreach ( $package['products'] as $product ) {
|
210 |
|
211 |
+
foreach ( $product['plugins'] as $plugin_slug ) {
|
212 |
|
213 |
+
$download = $installer_settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $plugin_slug ];
|
214 |
|
215 |
+
if ( $download['slug'] == $wp_plugin_slug && empty( $download['free-on-wporg'] ) ) {
|
216 |
|
217 |
+
echo '<div class="updated error"><p>' . $this->win_paths_exception_message() .
|
218 |
+
' <strong>(' . $download['name'] . ')</strong>' . '</p></div>';
|
219 |
+
unset( $plugins[ $k ] );
|
220 |
|
221 |
+
break( 3 );
|
222 |
|
223 |
+
}
|
224 |
|
225 |
+
}
|
226 |
|
227 |
+
}
|
228 |
|
229 |
+
}
|
230 |
|
231 |
|
232 |
+
}
|
233 |
|
234 |
+
}
|
235 |
|
236 |
+
}
|
237 |
|
238 |
+
}
|
239 |
|
240 |
+
}
|
241 |
|
242 |
|
243 |
+
if ( 'upgrade-plugin' == $action || 'update-plugin' == $action ) {
|
244 |
|
245 |
+
$plugin = isset( $_REQUEST['plugin'] ) ? trim( sanitize_text_field( $_REQUEST['plugin'] ) ) : '';
|
246 |
|
247 |
+
$wp_plugin_slug = dirname( $plugin );
|
248 |
|
249 |
+
foreach ( $installer_settings['repositories'] as $repository_id => $repository ) {
|
250 |
|
251 |
+
if ( $this->is_win_paths_exception( $repository_id ) ) {
|
252 |
+
foreach ( $repository['data']['packages'] as $package ) {
|
253 |
|
254 |
+
foreach ( $package['products'] as $product ) {
|
255 |
|
256 |
+
foreach ( $product['plugins'] as $plugin_slug ) {
|
257 |
+
$download = $installer_settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $plugin_slug ];
|
258 |
|
259 |
+
//match by folder, will change to match by name and folder
|
260 |
+
if ( $download['slug'] == $wp_plugin_slug && empty ( $download['free-on-wporg'] ) ) {
|
261 |
|
262 |
+
echo '<div class="updated error"><p>' . $this->win_paths_exception_message() . '</p></div>';
|
263 |
|
264 |
+
echo '<div class="wrap">';
|
265 |
+
echo '<h2>' . __( 'Update Plugin' ) . '</h2>';
|
266 |
+
echo '<a href="' . admin_url( 'update-core.php' ) . '">' . __( 'Return to the updates page', 'installer' ) . '</a>';
|
267 |
+
echo '</div>';
|
268 |
+
require_once( ABSPATH . 'wp-admin/admin-footer.php' );
|
269 |
+
exit;
|
270 |
|
271 |
+
}
|
272 |
|
273 |
+
}
|
274 |
|
275 |
+
}
|
276 |
|
277 |
+
}
|
278 |
+
}
|
279 |
|
280 |
+
}
|
281 |
|
282 |
+
}
|
283 |
+
}
|
284 |
|
285 |
+
}
|
286 |
|
287 |
|
288 |
}
|
library/otgs/installer/includes/class-installer-upgrader-skins.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Installer_Upgrader_Skins extends WP_Upgrader_Skin {
|
4 |
+
|
5 |
+
function __construct( $args = array() ) {
|
6 |
+
$defaults = array( 'url' => '', 'nonce' => '', 'title' => '', 'context' => false );
|
7 |
+
$this->options = wp_parse_args( $args, $defaults );
|
8 |
+
}
|
9 |
+
|
10 |
+
function header() {
|
11 |
+
|
12 |
+
}
|
13 |
+
|
14 |
+
function footer() {
|
15 |
+
|
16 |
+
}
|
17 |
+
|
18 |
+
function error( $error ) {
|
19 |
+
$this->installer_error = $error;
|
20 |
+
}
|
21 |
+
|
22 |
+
function add_strings() {
|
23 |
+
|
24 |
+
}
|
25 |
+
|
26 |
+
function feedback( $string ) {
|
27 |
+
|
28 |
+
}
|
29 |
+
|
30 |
+
function before() {
|
31 |
+
|
32 |
+
}
|
33 |
+
|
34 |
+
function after() {
|
35 |
+
|
36 |
+
}
|
37 |
+
|
38 |
+
}
|
library/otgs/installer/includes/class-translation-service-info.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Translation_Service_Info {
|
4 |
+
|
5 |
+
function __construct() {
|
6 |
+
|
7 |
+
add_action( 'installer_fetched_subscription_data', array( $this, 'save_info' ), 10, 2 );
|
8 |
+
|
9 |
+
}
|
10 |
+
|
11 |
+
function save_info( $data, $repository_id ) {
|
12 |
+
|
13 |
+
$ts_info = isset( WP_Installer()->settings['repositories'][ $repository_id ]['ts_info'] ) ?
|
14 |
+
WP_Installer()->settings['repositories'][ $repository_id ]['ts_info'] : false;
|
15 |
+
|
16 |
+
$save_settings = false;
|
17 |
+
if ( isset( $data->ts_info['preferred'] ) && empty( $ts_info['preferred'] ) ) {
|
18 |
+
WP_Installer()->settings['repositories'][ $repository_id ]['ts_info']['preferred'] = $data->ts_info['preferred'];
|
19 |
+
$save_settings = true;
|
20 |
+
}
|
21 |
+
|
22 |
+
if ( isset( $data->ts_info['referal'] ) && empty( $ts_info['referal'] ) ) {
|
23 |
+
WP_Installer()->settings['repositories'][ $repository_id ]['ts_info']['referal'] = $data->ts_info['referal'];
|
24 |
+
$save_settings = true;
|
25 |
+
}
|
26 |
+
|
27 |
+
if ( ! empty( $data->ts_info['client_id'] ) ) { // can be updated
|
28 |
+
WP_Installer()->settings['repositories'][ $repository_id ]['ts_info']['client_id'] = $data->ts_info['client_id'];
|
29 |
+
$save_settings = true;
|
30 |
+
}
|
31 |
+
|
32 |
+
if ( $save_settings ) {
|
33 |
+
WP_Installer()->save_settings();
|
34 |
+
}
|
35 |
+
|
36 |
+
}
|
37 |
+
|
38 |
+
}
|
39 |
+
|
40 |
+
new Translation_Service_Info();
|
library/otgs/installer/includes/{installer-api.php → class-wp-installer-api.php}
RENAMED
File without changes
|
library/otgs/installer/includes/class-wp-installer-channels.php
ADDED
@@ -0,0 +1,291 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class WP_Installer_Channels
|
5 |
+
* @since 1.8
|
6 |
+
*/
|
7 |
+
class WP_Installer_Channels{
|
8 |
+
|
9 |
+
const CHANNEL_PRODUCTION = 1;
|
10 |
+
const CHANNEL_BETA = 2;
|
11 |
+
const CHANNEL_DEVELOPMENT = 3;
|
12 |
+
|
13 |
+
protected static $_instance = null;
|
14 |
+
|
15 |
+
function __construct() {
|
16 |
+
add_action( 'init', array( $this, 'init' ), 20 ); // after Installer
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @return null|WP_Installer_Channels
|
21 |
+
*/
|
22 |
+
public static function instance() {
|
23 |
+
|
24 |
+
if ( is_null( self::$_instance ) ) {
|
25 |
+
self::$_instance = new self();
|
26 |
+
}
|
27 |
+
|
28 |
+
return self::$_instance;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Get the channel literal id based on the numeric id
|
33 |
+
*
|
34 |
+
* @param int $int
|
35 |
+
*
|
36 |
+
* @return string
|
37 |
+
*/
|
38 |
+
public static function channel_id( $int ) {
|
39 |
+
if ( self::CHANNEL_DEVELOPMENT === $int ) {
|
40 |
+
$channel = 'development';
|
41 |
+
} elseif ( self::CHANNEL_BETA === $int ) {
|
42 |
+
$channel = 'beta';
|
43 |
+
} else {
|
44 |
+
$channel = 'production';
|
45 |
+
}
|
46 |
+
|
47 |
+
return $channel;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Get the channel literal id based on the numeric id
|
52 |
+
*
|
53 |
+
* @param mixed $id
|
54 |
+
*
|
55 |
+
* @return string
|
56 |
+
*/
|
57 |
+
public static function channel_name_by_id( $id ) {
|
58 |
+
if ( self::CHANNEL_DEVELOPMENT === $id || self::channel_id( self::CHANNEL_DEVELOPMENT ) === $id ) {
|
59 |
+
$channel = __( 'Development', 'installer' );
|
60 |
+
} elseif ( self::CHANNEL_BETA === $id || self::channel_id( self::CHANNEL_BETA ) === $id ) {
|
61 |
+
$channel = __( 'Beta', 'installer' );
|
62 |
+
} else {
|
63 |
+
$channel = __( 'Production', 'installer' );
|
64 |
+
}
|
65 |
+
|
66 |
+
return $channel;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Initialization
|
71 |
+
*/
|
72 |
+
public function init(){
|
73 |
+
global $pagenow;
|
74 |
+
|
75 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
76 |
+
add_action( 'wp_ajax_installer_set_channel', array( $this, 'set_channel' ) );
|
77 |
+
}
|
78 |
+
|
79 |
+
if ( $pagenow === 'plugin-install.php' && isset( $_GET['tab'] ) && $_GET['tab'] === 'commercial' ) {
|
80 |
+
wp_enqueue_script( 'installer-channels', WP_Installer()->res_url() . '/res/js/channels.js', array( 'jquery' ), WP_Installer()->version() );
|
81 |
+
}
|
82 |
+
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Ajax handler for channel switching
|
87 |
+
*/
|
88 |
+
public function set_channel(){
|
89 |
+
$repository_id = sanitize_text_field( $_POST['repository_id'] );
|
90 |
+
$channel = intval( $_POST['channel'] );
|
91 |
+
|
92 |
+
$response = array();
|
93 |
+
|
94 |
+
if( $_POST['nonce'] === wp_create_nonce( 'installer_set_channel:' . $repository_id ) ){
|
95 |
+
|
96 |
+
if( isset( WP_Installer()->settings['repositories'][$repository_id] ) ){
|
97 |
+
WP_Installer()->settings['repositories'][$repository_id]['channel'] = $channel;
|
98 |
+
WP_Installer()->settings['repositories'][$repository_id]['no-prompt'] = $_POST['noprompt'] === 'true';
|
99 |
+
WP_Installer()->save_settings();
|
100 |
+
}
|
101 |
+
|
102 |
+
WP_Installer()->refresh_repositories_data();
|
103 |
+
|
104 |
+
$response['status'] = 'OK';
|
105 |
+
}
|
106 |
+
|
107 |
+
echo json_encode( $response );
|
108 |
+
exit;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* @param string $repository_id
|
113 |
+
*
|
114 |
+
* @return int
|
115 |
+
*/
|
116 |
+
public function get_channel( $repository_id ){
|
117 |
+
$channel = 0;
|
118 |
+
if( isset( WP_Installer()->settings['repositories'][$repository_id]['channel'] ) ){
|
119 |
+
$channel = WP_Installer()->settings['repositories'][$repository_id]['channel'];
|
120 |
+
}
|
121 |
+
return $channel;
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* @param string $repository_id
|
126 |
+
* @param array $downloads
|
127 |
+
*/
|
128 |
+
public function load_channel_selector( $repository_id, $downloads ) {
|
129 |
+
|
130 |
+
$available_channels = $this->get_available_channels( $repository_id );
|
131 |
+
|
132 |
+
if ( $available_channels ) {
|
133 |
+
$args = array(
|
134 |
+
'can_switch' => $this->can_use_unstable_channels( $downloads ) || $this->get_channel( $repository_id ) > 1,
|
135 |
+
'channels' => $available_channels,
|
136 |
+
'repository_id' => $repository_id,
|
137 |
+
'current_channel' => $this->get_channel( $repository_id ),
|
138 |
+
'no_prompt' => !empty( WP_Installer()->settings['repositories'][ $repository_id ]['no-prompt'] ),
|
139 |
+
'nonce' => wp_create_nonce( 'installer_set_channel:' . $repository_id )
|
140 |
+
);
|
141 |
+
|
142 |
+
extract( $args );
|
143 |
+
include WP_Installer()->plugin_path() . '/templates/channel-selector.php';
|
144 |
+
}
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* The beta and development channels can be used only when already using the most up to date versions
|
149 |
+
* @param array $downloads
|
150 |
+
*
|
151 |
+
* @return bool
|
152 |
+
*/
|
153 |
+
public function can_use_unstable_channels( $downloads ){
|
154 |
+
|
155 |
+
$can = true;
|
156 |
+
foreach( $downloads as $download ){
|
157 |
+
$available_version = $download['version'];
|
158 |
+
$installed_version = WP_Installer()->plugin_is_installed( $download['name'], $download['slug'] );
|
159 |
+
if( $installed_version !== false && version_compare( $available_version, $installed_version, '>' ) ){
|
160 |
+
$can = false;
|
161 |
+
break;
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
return $can;
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Get available updates channels. Only include channels with actual downloads available.
|
170 |
+
*
|
171 |
+
* @param string $repository_id
|
172 |
+
*
|
173 |
+
* @return array
|
174 |
+
*/
|
175 |
+
public function get_available_channels( $repository_id ) {
|
176 |
+
|
177 |
+
$beta = false;
|
178 |
+
$dev = false;
|
179 |
+
|
180 |
+
$downloads = WP_Installer()->settings['repositories'][ $repository_id ]['data']['downloads'];
|
181 |
+
foreach ( $downloads as $type => $download_types ) {
|
182 |
+
foreach ( $download_types as $download ) {
|
183 |
+
$extra_channels = isset( $download['extra_channels'] ) ? array_keys( $download['extra_channels'] ) : array();
|
184 |
+
if ( ! $beta && in_array( self::channel_id( self::CHANNEL_BETA ), $extra_channels ) ) {
|
185 |
+
$beta = true;
|
186 |
+
}
|
187 |
+
if ( ! $dev && in_array( self::channel_id( self::CHANNEL_DEVELOPMENT ), $extra_channels ) ) {
|
188 |
+
$dev = true;
|
189 |
+
}
|
190 |
+
if ( $beta && $dev ) {
|
191 |
+
break;
|
192 |
+
}
|
193 |
+
}
|
194 |
+
}
|
195 |
+
|
196 |
+
$channels = array();
|
197 |
+
if ( $beta || $dev ) {
|
198 |
+
$channels[ self::CHANNEL_PRODUCTION ] = self::channel_name_by_id( self::CHANNEL_PRODUCTION );
|
199 |
+
if ( $beta ) {
|
200 |
+
$channels[ self::CHANNEL_BETA ] = self::channel_name_by_id( self::CHANNEL_BETA );
|
201 |
+
}
|
202 |
+
if ( $dev ) {
|
203 |
+
$channels[ self::CHANNEL_DEVELOPMENT ] = self::channel_name_by_id( self::CHANNEL_DEVELOPMENT );
|
204 |
+
}
|
205 |
+
}
|
206 |
+
|
207 |
+
return $channels;
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* @param string $repository_id
|
212 |
+
* @param array $downloads
|
213 |
+
*
|
214 |
+
* @return array
|
215 |
+
*/
|
216 |
+
public function filter_downloads_by_channel( $repository_id, $downloads ) {
|
217 |
+
|
218 |
+
$current_channel = $this->get_channel( $repository_id );
|
219 |
+
|
220 |
+
foreach ( $downloads as $type => $type_downloads ) {
|
221 |
+
foreach ( $type_downloads as $slug => $download ) {
|
222 |
+
|
223 |
+
$override_download = false;
|
224 |
+
if ( $current_channel === self::CHANNEL_DEVELOPMENT ) {
|
225 |
+
if( ! empty( $download['channels']['development'] ) ){
|
226 |
+
$override_download = $download['channels']['development'];
|
227 |
+
$override_download['channel'] = self::channel_id( self::CHANNEL_DEVELOPMENT );
|
228 |
+
}elseif( ! empty( $download['channels']['beta'] ) ){
|
229 |
+
$override_download = $download['channels']['beta'];
|
230 |
+
$override_download['channel'] = self::channel_id( self::CHANNEL_BETA );
|
231 |
+
}
|
232 |
+
}elseif ( $current_channel === self::CHANNEL_BETA && ! empty( $download['channels']['beta'] ) ) {
|
233 |
+
$override_download = $download['channels']['beta'];
|
234 |
+
$override_download['channel'] = self::channel_id( self::CHANNEL_BETA );
|
235 |
+
}
|
236 |
+
|
237 |
+
if ( $override_download ) {
|
238 |
+
foreach ( $override_download as $key => $value ) {
|
239 |
+
$downloads[ $type ][ $slug ][ $key ] = $value;
|
240 |
+
}
|
241 |
+
} else {
|
242 |
+
$downloads[ $type ][ $slug ]['channel'] = self::channel_id( self::CHANNEL_PRODUCTION );
|
243 |
+
}
|
244 |
+
unset ( $downloads[ $type ][ $slug ]['channels'] );
|
245 |
+
|
246 |
+
$downloads[ $type ][ $slug ]['extra_channels'] = array();
|
247 |
+
if( isset( $download['channels'] ) ) {
|
248 |
+
foreach( $download['channels'] as $channel_id => $channel ){
|
249 |
+
$downloads[ $type ][ $slug ]['extra_channels'][$channel_id] = array(
|
250 |
+
'version' => $channel['version']
|
251 |
+
);
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
}
|
256 |
+
}
|
257 |
+
|
258 |
+
return $downloads;
|
259 |
+
}
|
260 |
+
|
261 |
+
/**
|
262 |
+
* Get the source channel for the installed version when on the Beta or Development channel
|
263 |
+
* @param string $version
|
264 |
+
* @param string $repository_id
|
265 |
+
* @param string $download_id
|
266 |
+
* @param string $download_kind
|
267 |
+
*
|
268 |
+
* @return string
|
269 |
+
*/
|
270 |
+
public function get_download_source_channel( $version, $repository_id, $download_id, $download_kind ) {
|
271 |
+
|
272 |
+
$version_channel = '';
|
273 |
+
$installer_settings = WP_Installer()->get_settings();
|
274 |
+
if ( isset( $installer_settings['repositories'][ $repository_id ] ) ) {
|
275 |
+
$repository_data = $installer_settings['repositories'][ $repository_id ]['data'];
|
276 |
+
if ( isset( $repository_data['downloads'][ $download_kind ][ $download_id ]['extra_channels'] ) ) {
|
277 |
+
|
278 |
+
foreach ( $repository_data['downloads'][ $download_kind ][ $download_id ]['extra_channels'] as $channel_id => $channel_data ) {
|
279 |
+
if ( $version === $channel_data['version'] ) {
|
280 |
+
$version_channel = self::channel_name_by_id( $channel_id );
|
281 |
+
break;
|
282 |
+
}
|
283 |
+
|
284 |
+
}
|
285 |
+
}
|
286 |
+
|
287 |
+
}
|
288 |
+
|
289 |
+
return $version_channel;
|
290 |
+
}
|
291 |
+
}
|
library/otgs/installer/includes/class-wp-installer.php
ADDED
@@ -0,0 +1,2769 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
final class WP_Installer {
|
4 |
+
protected static $_instance = null;
|
5 |
+
|
6 |
+
public $settings = array();
|
7 |
+
|
8 |
+
private $repositories = array();
|
9 |
+
|
10 |
+
protected $api_debug = '';
|
11 |
+
|
12 |
+
private $config = array();
|
13 |
+
|
14 |
+
protected $_plugins_renew_warnings = array();
|
15 |
+
|
16 |
+
protected $_gz_on = false;
|
17 |
+
|
18 |
+
private $admin_messages = array();
|
19 |
+
|
20 |
+
private $_using_icl = false;
|
21 |
+
private $_wpml_version = false;
|
22 |
+
|
23 |
+
private $package_source = array();
|
24 |
+
|
25 |
+
const SITE_KEY_VALIDATION_SOURCE_OTHER = 0;
|
26 |
+
const SITE_KEY_VALIDATION_SOURCE_DOWNLOAD_SPECIFIC = 1;
|
27 |
+
const SITE_KEY_VALIDATION_SOURCE_DOWNLOAD_REPORT = 2;
|
28 |
+
const SITE_KEY_VALIDATION_SOURCE_REGISTRATION = 3;
|
29 |
+
const SITE_KEY_VALIDATION_SOURCE_REVALIDATION = 4;
|
30 |
+
const SITE_KEY_VALIDATION_SOURCE_UPDATES_CHECK = 5;
|
31 |
+
|
32 |
+
public $dependencies;
|
33 |
+
|
34 |
+
public static function instance() {
|
35 |
+
|
36 |
+
if ( is_null( self::$_instance ) ) {
|
37 |
+
self::$_instance = new self();
|
38 |
+
}
|
39 |
+
|
40 |
+
return self::$_instance;
|
41 |
+
}
|
42 |
+
|
43 |
+
public function __construct() {
|
44 |
+
|
45 |
+
if ( ! is_admin() || ! is_user_logged_in() ) {
|
46 |
+
return;
|
47 |
+
} //Only for admin
|
48 |
+
|
49 |
+
$this->_gz_on = function_exists( 'gzuncompress' ) && function_exists( 'gzcompress' );
|
50 |
+
$this->settings = $this->get_settings();
|
51 |
+
|
52 |
+
add_action( 'admin_notices', array( $this, 'show_site_key_nags' ) );
|
53 |
+
|
54 |
+
add_action( 'admin_notices', array( $this, 'show_admin_messages' ) );
|
55 |
+
|
56 |
+
add_action( 'admin_init', array( $this, 'load_embedded_plugins' ), 0 );
|
57 |
+
|
58 |
+
add_action( 'admin_menu', array( $this, 'menu_setup' ) );
|
59 |
+
add_action( 'network_admin_menu', array( $this, 'menu_setup' ) );
|
60 |
+
|
61 |
+
if ( defined( 'DOING_AJAX' ) && isset( $_POST['action'] ) && $_POST['action'] == 'installer_download_plugin' ) {
|
62 |
+
add_filter( 'site_transient_update_plugins', array( $this, 'plugins_upgrade_check' ) );
|
63 |
+
}
|
64 |
+
add_filter( 'plugins_api', array( $this, 'custom_plugins_api_call' ), 10, 3 );
|
65 |
+
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'plugins_upgrade_check' ) );
|
66 |
+
|
67 |
+
// register repositories
|
68 |
+
$this->load_repositories_list();
|
69 |
+
|
70 |
+
// default config
|
71 |
+
$this->config['plugins_install_tab'] = false;
|
72 |
+
|
73 |
+
add_action( 'init', array( $this, 'init' ) );
|
74 |
+
|
75 |
+
//add_filter('wp_installer_buy_url', array($this, 'append_parameters_to_buy_url'));
|
76 |
+
|
77 |
+
add_action( 'init', array( $this, 'load_locale' ) );
|
78 |
+
|
79 |
+
}
|
80 |
+
|
81 |
+
public function get_repositories() {
|
82 |
+
|
83 |
+
return $this->repositories;
|
84 |
+
|
85 |
+
}
|
86 |
+
|
87 |
+
public function set_config( $key, $value ) {
|
88 |
+
|
89 |
+
$this->config[ $key ] = $value;
|
90 |
+
|
91 |
+
}
|
92 |
+
|
93 |
+
public function init() {
|
94 |
+
global $pagenow;
|
95 |
+
|
96 |
+
if ( empty( $this->settings['last_repositories_update'] ) || time() - $this->settings['last_repositories_update'] > 86400
|
97 |
+
|| ( isset( $_GET['force-check'] ) && $_GET['force-check'] == 1 )
|
98 |
+
) {
|
99 |
+
$this->refresh_repositories_data();
|
100 |
+
}
|
101 |
+
|
102 |
+
$this->dependencies = new Installer_Dependencies;
|
103 |
+
|
104 |
+
if ( empty( $this->settings['_pre_1_0_clean_up'] ) ) {
|
105 |
+
$this->_pre_1_0_clean_up();
|
106 |
+
}
|
107 |
+
|
108 |
+
$this->settings = $this->_old_products_format_backwards_compatibility( $this->settings );
|
109 |
+
|
110 |
+
if ( ! function_exists( 'get_plugins' ) ) {
|
111 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
112 |
+
}
|
113 |
+
|
114 |
+
$this->_using_icl = function_exists( 'wpml_site_uses_icl' ) && wpml_site_uses_icl();
|
115 |
+
$this->_wpml_version = defined( 'ICL_SITEPRESS_VERSION' ) ? ICL_SITEPRESS_VERSION : '';
|
116 |
+
|
117 |
+
wp_enqueue_script( 'installer-admin', $this->res_url() . '/res/js/admin.js', array( 'jquery' ), $this->version() );
|
118 |
+
wp_enqueue_style( 'installer-admin', $this->res_url() . '/res/css/admin.css', array(), $this->version() );
|
119 |
+
|
120 |
+
$translation_array = array(
|
121 |
+
'installing' => __( 'Installing %s', 'installer' ),
|
122 |
+
'updating' => __( 'Updating %s', 'installer' ),
|
123 |
+
'activating' => __( 'Activating %s', 'installer' )
|
124 |
+
);
|
125 |
+
|
126 |
+
wp_localize_script( 'installer-admin', 'installer_strings', $translation_array );
|
127 |
+
|
128 |
+
if ( $pagenow == 'plugins.php' ) {
|
129 |
+
add_action( 'admin_notices', array( $this, 'setup_plugins_page_notices' ) );
|
130 |
+
add_action( 'admin_notices', array( $this, 'setup_plugins_renew_warnings' ), 10 );
|
131 |
+
add_action( 'admin_notices', array( $this, 'queue_plugins_renew_warnings' ), 20 );
|
132 |
+
|
133 |
+
add_action( 'admin_init', array( $this, 'setup_plugins_action_links' ) );
|
134 |
+
|
135 |
+
}
|
136 |
+
|
137 |
+
if ( $this->is_repositories_page() ) {
|
138 |
+
add_action( 'admin_init', array( $this, 'validate_repository_subscription' ) );
|
139 |
+
}
|
140 |
+
|
141 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
142 |
+
add_action( 'wp_ajax_save_site_key', array( $this, 'save_site_key' ) );
|
143 |
+
add_action( 'wp_ajax_remove_site_key', array( $this, 'remove_site_key_ajax' ) );
|
144 |
+
add_action( 'wp_ajax_update_site_key', array( $this, 'update_site_key' ) );
|
145 |
+
|
146 |
+
add_action( 'wp_ajax_installer_download_plugin', array( $this, 'download_plugin_ajax_handler' ) );
|
147 |
+
add_action( 'wp_ajax_installer_activate_plugin', array( $this, 'activate_plugin' ) );
|
148 |
+
|
149 |
+
add_action( 'wp_ajax_installer_dismiss_nag', array( $this, 'dismiss_nag' ) );
|
150 |
+
}
|
151 |
+
|
152 |
+
if ( $pagenow == 'update.php' ) {
|
153 |
+
if ( isset( $_GET['action'] ) && $_GET['action'] == 'update-selected' ) {
|
154 |
+
add_action( 'admin_head', array( $this, 'plugin_upgrade_custom_errors' ) ); //iframe/bulk
|
155 |
+
} else {
|
156 |
+
add_action( 'all_admin_notices', array( $this, 'plugin_upgrade_custom_errors' ) ); //regular/singular
|
157 |
+
}
|
158 |
+
}
|
159 |
+
|
160 |
+
// WP 4.2
|
161 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
162 |
+
add_action( 'wp_ajax_update-plugin', array(
|
163 |
+
$this,
|
164 |
+
'plugin_upgrade_custom_errors'
|
165 |
+
), 0 ); // high priority, before WP
|
166 |
+
}
|
167 |
+
|
168 |
+
//Include theme support
|
169 |
+
include_once $this->plugin_path() . '/includes/class-installer-theme.php';
|
170 |
+
|
171 |
+
// Extra information about the source of Installer
|
172 |
+
$package_source_file = $this->plugin_path() . '/installer-source.json';
|
173 |
+
if ( file_exists( $package_source_file ) ) {
|
174 |
+
WP_Filesystem();
|
175 |
+
global $wp_filesystem;
|
176 |
+
$this->package_source = json_decode( $wp_filesystem->get_contents( $package_source_file ) );
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
protected function log( $message ) {
|
181 |
+
require_once ABSPATH . 'wp-admin/includes/file.php';
|
182 |
+
WP_Filesystem();
|
183 |
+
global $wp_filesystem;
|
184 |
+
if ( defined( 'WPML_INSTALLER_LOGGING' ) && WPML_INSTALLER_LOGGING ) {
|
185 |
+
$wp_filesystem->put_contents( $this->plugin_path() . '/installer.log', current_time( 'mysql' ) . "\t" . $message . "\n" );
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
public function register_admin_message( $text, $type = 'updated' ) {
|
190 |
+
$this->admin_messages[] = array( 'text' => $text, 'type' => $type );
|
191 |
+
}
|
192 |
+
|
193 |
+
public function show_admin_messages() {
|
194 |
+
if ( ! empty( $this->admin_messages ) ) {
|
195 |
+
$types = array( 'error', 'updated', 'notice' );
|
196 |
+
foreach ( $this->admin_messages as $message ) {
|
197 |
+
$class = in_array( $message['type'], $types ) ? $message['type'] : 'updated';
|
198 |
+
?>
|
199 |
+
<div class="<?php echo $class ?>">
|
200 |
+
<p>
|
201 |
+
<?php echo $message['text'] ?>
|
202 |
+
</p>
|
203 |
+
</div>
|
204 |
+
<?php
|
205 |
+
}
|
206 |
+
}
|
207 |
+
}
|
208 |
+
|
209 |
+
public function load_locale() {
|
210 |
+
if ( function_exists( 'get_user_locale' ) ) {
|
211 |
+
$locale = get_user_locale();
|
212 |
+
} else {
|
213 |
+
$locale = get_locale();
|
214 |
+
}
|
215 |
+
$locale = apply_filters( 'plugin_locale', $locale, 'installer' );
|
216 |
+
$mo_file = $this->plugin_path() . '/locale/installer-' . $locale . '.mo';
|
217 |
+
if ( file_exists( $mo_file ) ) {
|
218 |
+
load_textdomain( 'installer', $mo_file );
|
219 |
+
}
|
220 |
+
}
|
221 |
+
|
222 |
+
public function load_embedded_plugins() {
|
223 |
+
if ( file_exists( $this->plugin_path() . '/embedded-plugins' ) ) {
|
224 |
+
include_once $this->plugin_path() . '/embedded-plugins/embedded-plugins.class.php';
|
225 |
+
$this->installer_embedded_plugins = new Installer_Embedded_Plugins();
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
public function menu_setup() {
|
230 |
+
global $pagenow;
|
231 |
+
|
232 |
+
if ( is_multisite() && ! is_network_admin() ) {
|
233 |
+
$this->menu_multisite_redirect();
|
234 |
+
add_options_page( __( 'Installer', 'installer' ), __( 'Installer', 'installer' ), 'manage_options', 'installer', array(
|
235 |
+
$this,
|
236 |
+
'show_products'
|
237 |
+
) );
|
238 |
+
} else {
|
239 |
+
if ( $this->config['plugins_install_tab'] && is_admin() && $pagenow == 'plugin-install.php' ) {
|
240 |
+
// Default GUI, under Plugins -> Install
|
241 |
+
add_filter( 'install_plugins_tabs', array( $this, 'add_install_plugins_tab' ) );
|
242 |
+
add_action( 'install_plugins_commercial', array( $this, 'show_products' ) );
|
243 |
+
}
|
244 |
+
}
|
245 |
+
|
246 |
+
}
|
247 |
+
|
248 |
+
public function menu_url() {
|
249 |
+
if ( is_multisite() ) {
|
250 |
+
if ( is_network_admin() ) {
|
251 |
+
$url = network_admin_url( 'plugin-install.php?tab=commercial' );
|
252 |
+
} else {
|
253 |
+
$url = admin_url( 'options-general.php?page=installer' );
|
254 |
+
}
|
255 |
+
} else {
|
256 |
+
$url = admin_url( 'plugin-install.php?tab=commercial' );
|
257 |
+
}
|
258 |
+
|
259 |
+
return $url;
|
260 |
+
}
|
261 |
+
|
262 |
+
private function menu_multisite_redirect() {
|
263 |
+
global $pagenow;
|
264 |
+
|
265 |
+
if ( $pagenow == 'plugin-install.php' && isset( $_GET['tab'] ) && $_GET['tab'] == 'commercial' ) {
|
266 |
+
wp_redirect( $this->menu_url() );
|
267 |
+
exit;
|
268 |
+
}
|
269 |
+
|
270 |
+
}
|
271 |
+
|
272 |
+
private function _pre_1_0_clean_up() {
|
273 |
+
global $wpdb;
|
274 |
+
|
275 |
+
if ( ! defined( 'WPRC_VERSION' ) ) {
|
276 |
+
$old_tables = array(
|
277 |
+
$wpdb->prefix . 'wprc_cached_requests',
|
278 |
+
$wpdb->prefix . 'wprc_extension_types',
|
279 |
+
$wpdb->prefix . 'wprc_extensions',
|
280 |
+
$wpdb->prefix . 'wprc_repositories',
|
281 |
+
$wpdb->prefix . 'wprc_repositories_relationships',
|
282 |
+
);
|
283 |
+
|
284 |
+
foreach ( $old_tables as $table ) {
|
285 |
+
$wpdb->query( sprintf( "DROP TABLE IF EXISTS %s", $table ) );
|
286 |
+
}
|
287 |
+
|
288 |
+
}
|
289 |
+
|
290 |
+
$this->settings['_pre_1_0_clean_up'] = true;
|
291 |
+
$this->save_settings();
|
292 |
+
}
|
293 |
+
|
294 |
+
public function setup_plugins_action_links() {
|
295 |
+
|
296 |
+
$plugins = get_plugins();
|
297 |
+
|
298 |
+
$repositories_plugins = array();
|
299 |
+
|
300 |
+
if ( ! empty( $this->settings['repositories'] ) ) {
|
301 |
+
|
302 |
+
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
303 |
+
|
304 |
+
foreach ( $repository['data']['packages'] as $package ) {
|
305 |
+
|
306 |
+
foreach ( $package['products'] as $product ) {
|
307 |
+
|
308 |
+
foreach ( $product['plugins'] as $plugin_slug ) {
|
309 |
+
|
310 |
+
$download = $this->settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $plugin_slug ];
|
311 |
+
|
312 |
+
if ( ! isset( $repositories_plugins[ $repository_id ][ $download['slug'] ] ) ) {
|
313 |
+
$repositories_plugins[ $repository_id ][ $download['slug'] ] = array(
|
314 |
+
'name' => $download['name'],
|
315 |
+
'registered' => $this->plugin_is_registered( $repository_id, $download['slug'] ) ? 1 : 0
|
316 |
+
);
|
317 |
+
}
|
318 |
+
|
319 |
+
}
|
320 |
+
|
321 |
+
}
|
322 |
+
|
323 |
+
}
|
324 |
+
|
325 |
+
foreach ( $plugins as $plugin_id => $plugin ) {
|
326 |
+
|
327 |
+
$wp_plugin_slug = dirname( $plugin_id );
|
328 |
+
if ( empty( $wp_plugin_slug ) ) {
|
329 |
+
$wp_plugin_slug = basename( $plugin_id, '.php' );
|
330 |
+
}
|
331 |
+
|
332 |
+
foreach ( $repositories_plugins as $repository_id => $r_plugins ) {
|
333 |
+
|
334 |
+
foreach ( $r_plugins as $slug => $r_plugin ) {
|
335 |
+
|
336 |
+
if ( $wp_plugin_slug == $slug || $r_plugin['name'] == $plugin['Name'] || $r_plugin['name'] == $plugin['Title'] ) { //match order: slug, name, title
|
337 |
+
|
338 |
+
if ( $r_plugin['registered'] ) {
|
339 |
+
add_filter( 'plugin_action_links_' . $plugin_id, array(
|
340 |
+
$this,
|
341 |
+
'plugins_action_links_registered'
|
342 |
+
) );
|
343 |
+
} else {
|
344 |
+
add_filter( 'plugin_action_links_' . $plugin_id, array(
|
345 |
+
$this,
|
346 |
+
'plugins_action_links_not_registered'
|
347 |
+
) );
|
348 |
+
}
|
349 |
+
|
350 |
+
}
|
351 |
+
|
352 |
+
}
|
353 |
+
|
354 |
+
}
|
355 |
+
|
356 |
+
|
357 |
+
}
|
358 |
+
|
359 |
+
}
|
360 |
+
}
|
361 |
+
|
362 |
+
}
|
363 |
+
|
364 |
+
public function plugins_action_links_registered( $links ) {
|
365 |
+
$links[] = '<a href="' . $this->menu_url() . '">' . __( 'Registered', 'installer' ) . '</a>';
|
366 |
+
|
367 |
+
return $links;
|
368 |
+
}
|
369 |
+
|
370 |
+
public function plugins_action_links_not_registered( $links ) {
|
371 |
+
$links[] = '<a href="' . $this->menu_url() . '">' . __( 'Register', 'installer' ) . '</a>';
|
372 |
+
|
373 |
+
return $links;
|
374 |
+
}
|
375 |
+
|
376 |
+
public function plugin_is_registered( $repository_id, $slug ) {
|
377 |
+
|
378 |
+
$registered = false;
|
379 |
+
|
380 |
+
if ( $this->repository_has_valid_subscription( $repository_id ) ) {
|
381 |
+
|
382 |
+
$subscription_type = $this->get_subscription_type_for_repository( $repository_id );
|
383 |
+
$r_plugins = array();
|
384 |
+
|
385 |
+
foreach ( $this->settings['repositories'][ $repository_id ]['data']['packages'] as $package ) {
|
386 |
+
|
387 |
+
foreach ( $package['products'] as $product ) {
|
388 |
+
|
389 |
+
if ( $product['subscription_type'] == $subscription_type || $this->have_superior_subscription( $subscription_type, $product ) ) {
|
390 |
+
|
391 |
+
foreach ( $product['plugins'] as $plugin_slug ) {
|
392 |
+
|
393 |
+
$download = $this->settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $plugin_slug ];
|
394 |
+
|
395 |
+
if ( ! isset( $rep_plugins[ $download['slug'] ] ) ) {
|
396 |
+
$r_plugins[ $download['slug'] ] = $download['slug'];
|
397 |
+
}
|
398 |
+
|
399 |
+
}
|
400 |
+
|
401 |
+
}
|
402 |
+
|
403 |
+
}
|
404 |
+
|
405 |
+
}
|
406 |
+
|
407 |
+
$registered = isset( $r_plugins[ $slug ] );
|
408 |
+
|
409 |
+
}
|
410 |
+
|
411 |
+
|
412 |
+
return $registered;
|
413 |
+
|
414 |
+
}
|
415 |
+
|
416 |
+
public function version() {
|
417 |
+
return WP_INSTALLER_VERSION;
|
418 |
+
}
|
419 |
+
|
420 |
+
public function plugin_path() {
|
421 |
+
return untrailingslashit( plugin_dir_path( dirname( __FILE__ ) ) );
|
422 |
+
}
|
423 |
+
|
424 |
+
public function plugin_url() {
|
425 |
+
if ( isset( $this->config['in_theme_folder'] ) && ! empty( $this->config['in_theme_folder'] ) ) {
|
426 |
+
$url = untrailingslashit( get_template_directory_uri() . '/' . $this->config['in_theme_folder'] );
|
427 |
+
} else {
|
428 |
+
$url = untrailingslashit( plugins_url( '/', dirname( __FILE__ ) ) );
|
429 |
+
}
|
430 |
+
|
431 |
+
return $url;
|
432 |
+
}
|
433 |
+
|
434 |
+
public function is_repositories_page() {
|
435 |
+
global $pagenow;
|
436 |
+
|
437 |
+
return $pagenow == 'plugin-install.php' && isset( $_GET['tab'] ) && $_GET['tab'] == 'commercial';
|
438 |
+
}
|
439 |
+
|
440 |
+
public function res_url() {
|
441 |
+
if ( isset( $this->config['in_theme_folder'] ) && ! empty( $this->config['in_theme_folder'] ) ) {
|
442 |
+
$url = untrailingslashit( get_template_directory_uri() . '/' . $this->config['in_theme_folder'] );
|
443 |
+
} else {
|
444 |
+
$url = $this->plugin_url();
|
445 |
+
}
|
446 |
+
|
447 |
+
return $url;
|
448 |
+
}
|
449 |
+
|
450 |
+
public function save_settings() {
|
451 |
+
|
452 |
+
$_settings = serialize( $this->settings );
|
453 |
+
if ( $this->_gz_on ) {
|
454 |
+
$_settings = gzcompress( $_settings );
|
455 |
+
}
|
456 |
+
$_settings = base64_encode( $_settings );
|
457 |
+
|
458 |
+
update_option( 'wp_installer_settings', $_settings );
|
459 |
+
|
460 |
+
if ( is_multisite() && is_main_site() && isset( $this->settings['repositories'] ) ) {
|
461 |
+
$network_settings = array();
|
462 |
+
|
463 |
+
foreach ( $this->settings['repositories'] as $rep_id => $repository ) {
|
464 |
+
if ( isset( $repository['subscription'] ) ) {
|
465 |
+
$network_settings[ $rep_id ] = $repository['subscription'];
|
466 |
+
}
|
467 |
+
}
|
468 |
+
|
469 |
+
update_site_option( 'wp_installer_network', $network_settings );
|
470 |
+
|
471 |
+
|
472 |
+
}
|
473 |
+
|
474 |
+
}
|
475 |
+
|
476 |
+
public function get_settings( $refresh = false ) {
|
477 |
+
|
478 |
+
if ( $refresh || empty( $this->settings ) ) {
|
479 |
+
|
480 |
+
$_settings = get_option( 'wp_installer_settings' );
|
481 |
+
|
482 |
+
|
483 |
+
if ( is_array( $_settings ) || empty( $_settings ) ) { //backward compatibility 1.1
|
484 |
+
$this->settings = $_settings;
|
485 |
+
|
486 |
+
} else {
|
487 |
+
$_settings = base64_decode( $_settings );
|
488 |
+
if ( $this->_gz_on ) {
|
489 |
+
$_settings = gzuncompress( $_settings );
|
490 |
+
}
|
491 |
+
$this->settings = unserialize( $_settings );
|
492 |
+
}
|
493 |
+
|
494 |
+
// Initialize
|
495 |
+
if ( empty( $this->settings ) ) {
|
496 |
+
$this->settings = array(
|
497 |
+
'repositories' => array()
|
498 |
+
);
|
499 |
+
}
|
500 |
+
|
501 |
+
if ( is_multisite() ) {
|
502 |
+
$network_settings = maybe_unserialize( get_site_option( 'wp_installer_network' ) );
|
503 |
+
if ( $network_settings ) {
|
504 |
+
foreach ( $this->settings['repositories'] as $rep_id => $repository ) {
|
505 |
+
if ( isset( $network_settings[ $rep_id ] ) ) {
|
506 |
+
$this->settings['repositories'][ $rep_id ]['subscription'] = $network_settings[ $rep_id ];
|
507 |
+
}
|
508 |
+
}
|
509 |
+
}
|
510 |
+
}
|
511 |
+
|
512 |
+
$this->load_hardcoded_site_keys();
|
513 |
+
|
514 |
+
$this->_pre_1_8_backwards_compatibility( $this->settings );
|
515 |
+
|
516 |
+
$this->settings = $this->_old_products_format_backwards_compatibility( $this->settings );
|
517 |
+
|
518 |
+
}
|
519 |
+
|
520 |
+
return $this->settings;
|
521 |
+
}
|
522 |
+
|
523 |
+
private function load_hardcoded_site_keys() {
|
524 |
+
|
525 |
+
if ( ! empty( $this->settings['repositories'] ) ) {
|
526 |
+
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
527 |
+
|
528 |
+
if ( $site_key = self::get_repository_hardcoded_site_key( $repository_id ) ) {
|
529 |
+
|
530 |
+
$site_key_missing = empty( $this->settings['repositories'][ $repository_id ]['subscription']['data'] );
|
531 |
+
$site_key_changed = ! $site_key_missing &&
|
532 |
+
$this->settings['repositories'][ $repository_id ]['subscription']['key'] != $site_key;
|
533 |
+
|
534 |
+
if ( $site_key_missing || $site_key_changed ) {
|
535 |
+
|
536 |
+
if ( ! function_exists( 'get_plugins' ) ) {
|
537 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
538 |
+
}
|
539 |
+
$this->load_repositories_list();
|
540 |
+
$response = $this->save_site_key(
|
541 |
+
array(
|
542 |
+
'repository_id' => $repository_id,
|
543 |
+
'site_key' => $site_key,
|
544 |
+
'return' => true,
|
545 |
+
'nonce' => wp_create_nonce( 'save_site_key_' . $repository_id )
|
546 |
+
)
|
547 |
+
);
|
548 |
+
|
549 |
+
if ( ! empty( $response['error'] ) ) {
|
550 |
+
$this->remove_site_key( $repository_id );
|
551 |
+
|
552 |
+
$this->admin_messages[] = array(
|
553 |
+
'type' => 'error',
|
554 |
+
'text' => sprintf( __( 'You are using an invalid site key defined as the constant %s (most likely in wp-config.php).
|
555 |
+
Please remove it or use the correct value in order to be able to register correctly.', 'installer' ), 'OTGS_INSTALLER_SITE_KEY_' . strtoupper( $repository_id ) )
|
556 |
+
);
|
557 |
+
|
558 |
+
}
|
559 |
+
|
560 |
+
}
|
561 |
+
|
562 |
+
}
|
563 |
+
|
564 |
+
}
|
565 |
+
}
|
566 |
+
|
567 |
+
}
|
568 |
+
|
569 |
+
public static function get_repository_hardcoded_site_key( $repository_id ) {
|
570 |
+
|
571 |
+
$site_key = false;
|
572 |
+
|
573 |
+
$site_key_constant = 'OTGS_INSTALLER_SITE_KEY_' . strtoupper( $repository_id );
|
574 |
+
if ( defined( $site_key_constant ) ) {
|
575 |
+
$site_key = constant( $site_key_constant );
|
576 |
+
}
|
577 |
+
|
578 |
+
return $site_key;
|
579 |
+
}
|
580 |
+
|
581 |
+
//backward compatibility, add channel
|
582 |
+
private function _pre_1_8_backwards_compatibility( &$settings ) {
|
583 |
+
if ( empty( $settings['_pre_1_8_clean_up'] ) ) {
|
584 |
+
foreach ( $settings['repositories'] as $repository_id => $repository ) {
|
585 |
+
foreach ( $repository['data']['downloads']['plugins'] as $slug => $download ) {
|
586 |
+
if( !isset( $download['channel'] ) ){
|
587 |
+
$settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $slug ]['channel'] = '';
|
588 |
+
}
|
589 |
+
}
|
590 |
+
}
|
591 |
+
$this->save_settings();
|
592 |
+
}
|
593 |
+
}
|
594 |
+
|
595 |
+
//backward compatibility - support old products list format (downloads under products instead of global downloads list)
|
596 |
+
private function _old_products_format_backwards_compatibility( $settings ) {
|
597 |
+
|
598 |
+
if ( version_compare( $this->version(), '1.8', '<' ) && ! empty( $settings['repositories'] ) && empty( $this->_old_products_format_backwards_compatibility ) ) {
|
599 |
+
|
600 |
+
foreach ( $settings['repositories'] as $repository_id => $repository ) {
|
601 |
+
$populate_downloads = false;
|
602 |
+
if ( isset( $repository['data'] ) ) {
|
603 |
+
|
604 |
+
foreach ( $repository['data']['packages'] as $package_id => $package ) {
|
605 |
+
foreach ( $package['products'] as $product_id => $product ) {
|
606 |
+
if ( ! isset( $product['plugins'] ) ) {
|
607 |
+
$populate_downloads = true;
|
608 |
+
foreach ( $product['downloads'] as $download_id => $download ) {
|
609 |
+
$settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['plugins'][] = $download['slug'];
|
610 |
+
}
|
611 |
+
}
|
612 |
+
}
|
613 |
+
}
|
614 |
+
|
615 |
+
if ( $populate_downloads ) {
|
616 |
+
// Add downloads branch
|
617 |
+
foreach ( $repository['data']['packages'] as $package_id => $package ) {
|
618 |
+
foreach ( $package['products'] as $product_id => $product ) {
|
619 |
+
foreach ( $product['downloads'] as $download_id => $download ) {
|
620 |
+
if ( ! isset( $settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $download['slug'] ] ) ) {
|
621 |
+
$settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $download['slug'] ] = $download;
|
622 |
+
}
|
623 |
+
$settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['plugins'][] = $download['slug'];
|
624 |
+
}
|
625 |
+
unset( $settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['downloads'] );
|
626 |
+
}
|
627 |
+
}
|
628 |
+
}
|
629 |
+
}
|
630 |
+
}
|
631 |
+
|
632 |
+
$this->_old_products_format_backwards_compatibility = true;
|
633 |
+
}
|
634 |
+
|
635 |
+
return $settings;
|
636 |
+
}
|
637 |
+
|
638 |
+
public function get_installer_site_url( $repository_id = false ) {
|
639 |
+
global $current_site;
|
640 |
+
|
641 |
+
$site_url = get_site_url();
|
642 |
+
|
643 |
+
if ( $repository_id && is_multisite() && isset( $this->settings['repositories'] ) ) {
|
644 |
+
$network_settings = maybe_unserialize( get_site_option( 'wp_installer_network' ) );
|
645 |
+
|
646 |
+
if ( isset( $network_settings[ $repository_id ] ) ) {
|
647 |
+
$site_url = get_site_url( $current_site->blog_id );
|
648 |
+
}
|
649 |
+
|
650 |
+
}
|
651 |
+
|
652 |
+
return $site_url;
|
653 |
+
}
|
654 |
+
|
655 |
+
public function show_site_key_nags() {
|
656 |
+
$screen = get_current_screen();
|
657 |
+
|
658 |
+
if ( $screen->base == 'settings_page_installer' || ( $screen->base == 'plugin-install' && isset( $_GET['tab'] ) && $_GET['tab'] == 'commercial' ) ) {
|
659 |
+
return;
|
660 |
+
}
|
661 |
+
|
662 |
+
if ( ! empty( $this->config['site_key_nags'] ) ) {
|
663 |
+
|
664 |
+
foreach ( $this->config['site_key_nags'] as $nag ) {
|
665 |
+
|
666 |
+
if ( ! $this->repository_has_subscription( $nag['repository_id'] ) ) {
|
667 |
+
$show = true;
|
668 |
+
if ( ! empty( $nag['condition_cb'] ) ) {
|
669 |
+
$show = call_user_func( $nag['condition_cb'] );
|
670 |
+
}
|
671 |
+
|
672 |
+
if ( empty( $this->settings['dismissed_nags'][ $nag['repository_id'] ] ) && $show ) {
|
673 |
+
echo '<div class="updated error otgs-is-dismissible"><p>';
|
674 |
+
printf( __( "To get automatic updates, you need to register %s for this site. %sRegister %s%s", 'sitepress' ),
|
675 |
+
$nag['product_name'], '<a class="button-primary" href="' . $this->menu_url() . '">', $nag['product_name'], '</a>' );
|
676 |
+
|
677 |
+
echo '</p>';
|
678 |
+
echo '<span class="installer-dismiss-nag notice-dismiss" data-repository="' . $nag['repository_id'] . '"><span class="screen-reader-text">' . __( 'Dismiss', 'sitepress' ) . '</span></span>';
|
679 |
+
echo '</div>';
|
680 |
+
}
|
681 |
+
}
|
682 |
+
|
683 |
+
}
|
684 |
+
|
685 |
+
}
|
686 |
+
|
687 |
+
}
|
688 |
+
|
689 |
+
public function dismiss_nag() {
|
690 |
+
$this->settings['dismissed_nags'][ $_POST['repository'] ] = 1;
|
691 |
+
|
692 |
+
$this->save_settings();
|
693 |
+
|
694 |
+
echo json_encode( array() );
|
695 |
+
exit;
|
696 |
+
}
|
697 |
+
|
698 |
+
public function add_install_plugins_tab( $tabs ) {
|
699 |
+
|
700 |
+
$tabs['commercial'] = __( 'Commercial', 'installer' );
|
701 |
+
|
702 |
+
return $tabs;
|
703 |
+
}
|
704 |
+
|
705 |
+
public function load_repositories_list() {
|
706 |
+
global $wp_installer_instances;
|
707 |
+
|
708 |
+
foreach ( $wp_installer_instances as $instance ) {
|
709 |
+
|
710 |
+
if ( file_exists( dirname( $instance['bootfile'] ) . '/repositories.xml' ) ) {
|
711 |
+
$config_file = dirname( $instance['bootfile'] ) . '/repositories.xml';
|
712 |
+
|
713 |
+
if ( file_exists( dirname( $instance['bootfile'] ) . '/repositories.sandbox.xml' ) ) {
|
714 |
+
$config_file = dirname( $instance['bootfile'] ) . '/repositories.sandbox.xml';
|
715 |
+
add_filter( 'https_ssl_verify', '__return_false' );
|
716 |
+
}
|
717 |
+
|
718 |
+
$repos = simplexml_load_file( $config_file );
|
719 |
+
|
720 |
+
if ( $repos ) {
|
721 |
+
foreach ( $repos as $repo ) {
|
722 |
+
$id = strval( $repo->id );
|
723 |
+
|
724 |
+
$data['api-url'] = strval( $repo->apiurl );
|
725 |
+
$data['products'] = strval( $repo->products );
|
726 |
+
|
727 |
+
// excludes rule;
|
728 |
+
if ( isset( $this->config['repositories_exclude'] ) && in_array( $id, $this->config['repositories_exclude'] ) ) {
|
729 |
+
continue;
|
730 |
+
}
|
731 |
+
|
732 |
+
// includes rule;
|
733 |
+
if ( isset( $this->config['repositories_include'] ) && ! in_array( $id, $this->config['repositories_include'] ) ) {
|
734 |
+
continue;
|
735 |
+
}
|
736 |
+
|
737 |
+
$this->repositories[ $id ] = $data;
|
738 |
+
|
739 |
+
}
|
740 |
+
}
|
741 |
+
|
742 |
+
}
|
743 |
+
}
|
744 |
+
|
745 |
+
}
|
746 |
+
|
747 |
+
public function filter_repositories_list() {
|
748 |
+
|
749 |
+
if ( ! empty( $this->settings['repositories'] ) ) {
|
750 |
+
foreach ( $this->settings['repositories'] as $id => $repo_data ) {
|
751 |
+
|
752 |
+
// excludes rule;
|
753 |
+
if ( isset( $this->config['repositories_exclude'] ) && in_array( $id, $this->config['repositories_exclude'] ) ) {
|
754 |
+
unset( $this->settings['repositories'][ $id ] );
|
755 |
+
}
|
756 |
+
|
757 |
+
// includes rule;
|
758 |
+
if ( isset( $this->config['repositories_include'] ) && ! in_array( $id, $this->config['repositories_include'] ) ) {
|
759 |
+
unset( $this->settings['repositories'][ $id ] );
|
760 |
+
}
|
761 |
+
|
762 |
+
|
763 |
+
}
|
764 |
+
}
|
765 |
+
|
766 |
+
|
767 |
+
}
|
768 |
+
|
769 |
+
public function refresh_repositories_data() {
|
770 |
+
static $checked = false;
|
771 |
+
|
772 |
+
if ( defined( 'OTGS_DISABLE_AUTO_UPDATES' ) && OTGS_DISABLE_AUTO_UPDATES && empty( $_GET['force-check'] ) || $checked ) {
|
773 |
+
|
774 |
+
if ( empty( $this->settings['repositories'] ) && $this->is_repositories_page() ) {
|
775 |
+
|
776 |
+
foreach ( $this->repositories as $id => $data ) {
|
777 |
+
$repository_names[] = $id;
|
778 |
+
|
779 |
+
}
|
780 |
+
|
781 |
+
$error = sprintf( __( "Installer cannot display the products information because the automatic updating for %s was explicitly disabled with the configuration below (usually in wp-config.php):", 'installer' ), strtoupper( join( ', ', $repository_names ) ) );
|
782 |
+
$error .= '<br /><br /><code>define("OTGS_DISABLE_AUTO_UPDATES", true);</code><br /><br />';
|
783 |
+
$error .= sprintf( __( "In order to see the products information, please run the %smanual updates check%s to initialize the products list or (temporarily) remove the above code.", 'installer' ), '<a href="' . admin_url( 'update-core.php' ) . '">', '</a>' );
|
784 |
+
|
785 |
+
$this->register_admin_message( $error, 'error' );
|
786 |
+
|
787 |
+
|
788 |
+
}
|
789 |
+
|
790 |
+
return;
|
791 |
+
}
|
792 |
+
|
793 |
+
$checked = true;
|
794 |
+
|
795 |
+
foreach ( $this->repositories as $id => $data ) {
|
796 |
+
|
797 |
+
$response = wp_remote_get( $data['products'] );
|
798 |
+
|
799 |
+
if ( is_wp_error( $response ) ) {
|
800 |
+
// http fallback
|
801 |
+
$data['products'] = preg_replace( "@^https://@", 'http://', $data['products'] );
|
802 |
+
$response = wp_remote_get( $data['products'] );
|
803 |
+
}
|
804 |
+
|
805 |
+
if ( is_wp_error( $response ) ) {
|
806 |
+
|
807 |
+
$error = sprintf( __( "Installer cannot contact our updates server to get information about the available products and check for new versions. If you are seeing this message for the first time, you can ignore it, as it may be a temporary communication problem. If the problem persists and your WordPress admin is slowing down, you can disable automated version checks. Add the following line to your wp-config.php file:", 'installer' ), strtoupper( $id ) );
|
808 |
+
$error .= '<br /><br /><code>define("OTGS_DISABLE_AUTO_UPDATES", true);</code>';
|
809 |
+
|
810 |
+
$this->register_admin_message( $error, 'error' );
|
811 |
+
|
812 |
+
continue;
|
813 |
+
}
|
814 |
+
|
815 |
+
if ( $response && isset( $response['response']['code'] ) && $response['response']['code'] == 200 ) {
|
816 |
+
$body = wp_remote_retrieve_body( $response );
|
817 |
+
if ( $body ) {
|
818 |
+
$products = json_decode( $body, true );
|
819 |
+
|
820 |
+
if ( is_array( $products ) ) {
|
821 |
+
$products['downloads'] = WP_Installer_Channels()->filter_downloads_by_channel( $id, $products['downloads'] );
|
822 |
+
$this->set_release_notes( $products['downloads'] );
|
823 |
+
|
824 |
+
$this->settings['repositories'][ $id ]['data'] = $products;
|
825 |
+
$this->_pre_1_8_backwards_compatibility( $this->settings );
|
826 |
+
}
|
827 |
+
}
|
828 |
+
|
829 |
+
}
|
830 |
+
|
831 |
+
$this->log( sprintf( "Checked for %s updates: %s", $id, $data['products'] ) );
|
832 |
+
|
833 |
+
|
834 |
+
}
|
835 |
+
|
836 |
+
// cleanup
|
837 |
+
if ( empty( $this->settings['repositories'] ) ) {
|
838 |
+
$this->settings['repositories'] = array();
|
839 |
+
}
|
840 |
+
foreach ( $this->settings['repositories'] as $id => $data ) {
|
841 |
+
if ( ! in_array( $id, array_keys( $this->repositories ) ) ) {
|
842 |
+
unset( $this->settings['repositories'][ $id ] );
|
843 |
+
}
|
844 |
+
}
|
845 |
+
|
846 |
+
$this->settings['last_repositories_update'] = time();
|
847 |
+
|
848 |
+
$this->save_settings();
|
849 |
+
|
850 |
+
}
|
851 |
+
|
852 |
+
/**
|
853 |
+
* Gets the release notes for the available version from the changelog
|
854 |
+
*
|
855 |
+
* @param array $all_downloads
|
856 |
+
*/
|
857 |
+
private function set_release_notes( &$all_downloads ) {
|
858 |
+
foreach ( $all_downloads as $kind => $downloads ) {
|
859 |
+
foreach ( $downloads as $slug => $download ) {
|
860 |
+
$start = strpos( $download['changelog'], '<h4>' . $download['version'] . '</h4>' );
|
861 |
+
if ( $start !== false ) {
|
862 |
+
$start += strlen( $download['version'] ) + 9;
|
863 |
+
$end = strpos( $download['changelog'], '<h4>', 4 );
|
864 |
+
if ( $end ) {
|
865 |
+
$release_notes = substr( $download['changelog'], $start, $end - $start );
|
866 |
+
} else {
|
867 |
+
$release_notes = substr( $download['changelog'], $start );
|
868 |
+
}
|
869 |
+
}
|
870 |
+
$all_downloads[ $kind ][ $slug ]['release-notes'] = ! empty( $release_notes ) ? $release_notes : '';
|
871 |
+
}
|
872 |
+
}
|
873 |
+
}
|
874 |
+
|
875 |
+
public function show_products( $args = array() ) {
|
876 |
+
|
877 |
+
$screen = get_current_screen();
|
878 |
+
|
879 |
+
if ( $screen->base == 'settings_page_installer' ) { // settings page
|
880 |
+
echo '<div class="wrap">';
|
881 |
+
echo '<h2>' . __( 'Installer', 'installer' ) . '</h2>';
|
882 |
+
echo '<br />';
|
883 |
+
}
|
884 |
+
|
885 |
+
if ( ! is_array( $args ) ) {
|
886 |
+
$args = array();
|
887 |
+
}
|
888 |
+
if ( empty( $args['template'] ) ) {
|
889 |
+
$args['template'] = 'default';
|
890 |
+
}
|
891 |
+
|
892 |
+
$this->filter_repositories_list();
|
893 |
+
|
894 |
+
if ( ! empty( $this->settings['repositories'] ) ) {
|
895 |
+
|
896 |
+
$this->localize_strings();
|
897 |
+
$this->set_filtered_prices( $args );
|
898 |
+
$this->set_hierarchy_and_order();
|
899 |
+
|
900 |
+
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
901 |
+
|
902 |
+
if ( $args['template'] == 'compact' ) {
|
903 |
+
|
904 |
+
if ( isset( $args['repository'] ) && $args['repository'] == $repository_id ) {
|
905 |
+
include $this->plugin_path() . '/templates/products-compact.php';
|
906 |
+
}
|
907 |
+
|
908 |
+
} else {
|
909 |
+
|
910 |
+
include $this->plugin_path() . '/templates/repository-listing.php';
|
911 |
+
|
912 |
+
}
|
913 |
+
|
914 |
+
unset( $site_key, $subscription_type, $expired, $upgrade_options, $products_avaliable );
|
915 |
+
|
916 |
+
}
|
917 |
+
|
918 |
+
} else {
|
919 |
+
|
920 |
+
echo '<center>' . __( 'No repositories defined.', 'installer' ) . '</center>';
|
921 |
+
|
922 |
+
}
|
923 |
+
|
924 |
+
if ( $screen->base == 'settings_page_installer' ) { // settings page
|
925 |
+
echo '</div>';
|
926 |
+
}
|
927 |
+
|
928 |
+
|
929 |
+
}
|
930 |
+
|
931 |
+
public function get_product_price( $repository_id, $package_id, $product_id, $incl_discount = false ) {
|
932 |
+
|
933 |
+
$price = false;
|
934 |
+
|
935 |
+
foreach ( $this->settings['repositories'][ $repository_id ]['data']['packages'] as $package ) {
|
936 |
+
|
937 |
+
if ( $package['id'] == $package_id ) {
|
938 |
+
if ( isset( $package['products'][ $product_id ] ) ) {
|
939 |
+
if ( $incl_discount && isset( $package['products'][ $product_id ]['price_disc'] ) ) {
|
940 |
+
$price = $package['products'][ $product_id ]['price_disc'];
|
941 |
+
} elseif ( isset( $package['products'][ $product_id ]['price'] ) ) {
|
942 |
+
$price = $package['products'][ $product_id ]['price'];
|
943 |
+
}
|
944 |
+
}
|
945 |
+
break;
|
946 |
+
}
|
947 |
+
}
|
948 |
+
|
949 |
+
return $price;
|
950 |
+
}
|
951 |
+
|
952 |
+
private function _render_product_packages( $packages, $subscription_type, $expired, $upgrade_options, $repository_id ) {
|
953 |
+
|
954 |
+
$data = array();
|
955 |
+
|
956 |
+
foreach ( $packages as $package_id => $package ) {
|
957 |
+
|
958 |
+
$row = array( 'products' => array(), 'downloads' => array() );
|
959 |
+
foreach ( $package['products'] as $product ) {
|
960 |
+
|
961 |
+
// filter out free subscriptions from being displayed as buying options
|
962 |
+
if ( empty( $product['price'] ) && ( empty( $subscription_type ) || $expired ) ) {
|
963 |
+
continue;
|
964 |
+
}
|
965 |
+
|
966 |
+
//consider equivalent subscriptions
|
967 |
+
if ( empty( $product['subscription_type_equivalent'] ) ) {
|
968 |
+
$product['subscription_type_equivalent'] = '';
|
969 |
+
}
|
970 |
+
|
971 |
+
// buy base
|
972 |
+
if ( empty( $subscription_type ) || $expired ) {
|
973 |
+
|
974 |
+
$p['url'] = $this->append_parameters_to_buy_url( $product['url'], $repository_id );
|
975 |
+
if ( ! empty( $product['price_disc'] ) ) {
|
976 |
+
$p['label'] = $product['call2action'] . ' - ' . sprintf( '$%s %s$%d%s (USD)', $product['price_disc'], ' <del>', $product['price'], '</del>' );
|
977 |
+
} else {
|
978 |
+
$p['label'] = $product['call2action'] . ' - ' . sprintf( '$%d (USD)', $product['price'] );
|
979 |
+
}
|
980 |
+
$row['products'][] = $p;
|
981 |
+
|
982 |
+
// renew
|
983 |
+
} elseif ( isset( $subscription_type ) && ( $product['subscription_type'] == $subscription_type || $product['subscription_type_equivalent'] == $subscription_type ) ) {
|
984 |
+
|
985 |
+
if ( $product['renewals'] ) {
|
986 |
+
foreach ( $product['renewals'] as $renewal ) {
|
987 |
+
$p['url'] = $this->append_parameters_to_buy_url( $renewal['url'], $repository_id );
|
988 |
+
$p['label'] = $renewal['call2action'] . ' - ' . sprintf( '$%d (USD)', $renewal['price'] );
|
989 |
+
}
|
990 |
+
|
991 |
+
$row['products'][] = $p;
|
992 |
+
}
|
993 |
+
|
994 |
+
}
|
995 |
+
|
996 |
+
// upgrades
|
997 |
+
if ( ! empty( $upgrade_options[ $product['subscription_type'] ] ) ) {
|
998 |
+
|
999 |
+
foreach ( $upgrade_options[ $product['subscription_type'] ] as $stype => $upgrade ) {
|
1000 |
+
if ( $stype != $subscription_type ) {
|
1001 |
+
continue;
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
$p['url'] = $this->append_parameters_to_buy_url( $upgrade['url'], $repository_id );
|
1005 |
+
if ( ! empty( $upgrade['price_disc'] ) ) {
|
1006 |
+
$p['label'] = $upgrade['call2action'] . ' - ' . sprintf( '$%s %s$%d%s (USD)', $upgrade['price_disc'], ' <del>', $upgrade['price'], '</del>' );
|
1007 |
+
} else {
|
1008 |
+
$p['label'] = $upgrade['call2action'] . ' - ' . sprintf( '$%d (USD)', $upgrade['price'] );
|
1009 |
+
}
|
1010 |
+
$row['products'][] = $p;
|
1011 |
+
|
1012 |
+
}
|
1013 |
+
|
1014 |
+
}
|
1015 |
+
|
1016 |
+
// downloads
|
1017 |
+
if ( isset( $subscription_type ) && ! $expired && ( $product['subscription_type'] == $subscription_type || $product['subscription_type_equivalent'] == $subscription_type ) ) {
|
1018 |
+
|
1019 |
+
foreach ( $product['plugins'] as $plugin_slug ) {
|
1020 |
+
$row['downloads'][ $plugin_slug ] = $this->settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $plugin_slug ];
|
1021 |
+
}
|
1022 |
+
|
1023 |
+
}
|
1024 |
+
|
1025 |
+
//subpackages
|
1026 |
+
if ( ! empty( $package['sub-packages'] ) ) {
|
1027 |
+
$row['sub-packages'] = $package['sub-packages'];
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
}
|
1031 |
+
|
1032 |
+
$row['id'] = $package['id'];
|
1033 |
+
$row['image_url'] = $package['image_url'];
|
1034 |
+
$row['name'] = $package['name'];
|
1035 |
+
$row['description'] = $package['description'];
|
1036 |
+
|
1037 |
+
if ( ! empty( $row['products'] ) || ! empty( $row['downloads'] ) || ! empty( $row['sub-packages'] ) ) {
|
1038 |
+
$data[] = $row;
|
1039 |
+
}
|
1040 |
+
|
1041 |
+
|
1042 |
+
}
|
1043 |
+
|
1044 |
+
return $data;
|
1045 |
+
|
1046 |
+
}
|
1047 |
+
|
1048 |
+
public function get_extra_url_parameters() {
|
1049 |
+
|
1050 |
+
$parameters = array();
|
1051 |
+
|
1052 |
+
if ( ! empty( $this->package_source ) ) {
|
1053 |
+
foreach ( $this->package_source as $key => $val ) {
|
1054 |
+
$parameters[ $key ] = $val;
|
1055 |
+
}
|
1056 |
+
}
|
1057 |
+
|
1058 |
+
$parameters['installer_version'] = WP_INSTALLER_VERSION;
|
1059 |
+
$parameters['theme'] = wp_get_theme()->get( 'Name' );
|
1060 |
+
$parameters['site_name'] = get_bloginfo( 'name' );
|
1061 |
+
|
1062 |
+
return $parameters;
|
1063 |
+
}
|
1064 |
+
|
1065 |
+
public function append_parameters_to_buy_url( $url, $repository_id, $args = array() ) {
|
1066 |
+
|
1067 |
+
$url = add_query_arg( array( 'icl_site_url' => $this->get_installer_site_url( $repository_id ) ), $url );
|
1068 |
+
|
1069 |
+
$affiliate_id = false;
|
1070 |
+
$affiliate_key = false;
|
1071 |
+
|
1072 |
+
// Add extra parameters for custom Installer packages
|
1073 |
+
if ( ! empty( $this->package_source ) ) {
|
1074 |
+
$extra = $this->get_extra_url_parameters();
|
1075 |
+
|
1076 |
+
if ( ! empty( $extra['repository'] ) && $extra['repository'] == $repository_id ) {
|
1077 |
+
|
1078 |
+
if ( ! empty( $extra['affiliate_key'] ) && ! empty( $extra['user_id'] ) ) {
|
1079 |
+
$this->config[ 'affiliate_id:' . $repository_id ] = $extra['user_id'];
|
1080 |
+
$this->config[ 'affiliate_key:' . $repository_id ] = $extra['affiliate_key'];
|
1081 |
+
unset( $extra['affiliate_key'], $extra['user_id'], $extra['repository'] ); // no need to include these ones
|
1082 |
+
}
|
1083 |
+
|
1084 |
+
$url = add_query_arg( $extra, $url );
|
1085 |
+
}
|
1086 |
+
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
if ( isset( $this->config[ 'affiliate_id:' . $repository_id ] ) && isset( $this->config[ 'affiliate_key:' . $repository_id ] ) ) {
|
1090 |
+
|
1091 |
+
$affiliate_id = $this->config[ 'affiliate_id:' . $repository_id ];
|
1092 |
+
$affiliate_key = $this->config[ 'affiliate_key:' . $repository_id ];
|
1093 |
+
|
1094 |
+
} elseif ( isset( $args[ 'affiliate_id:' . $repository_id ] ) && isset( $args[ 'affiliate_key:' . $repository_id ] ) ) {
|
1095 |
+
|
1096 |
+
$affiliate_id = $args[ 'affiliate_id:' . $repository_id ];
|
1097 |
+
$affiliate_key = $args[ 'affiliate_key:' . $repository_id ];
|
1098 |
+
|
1099 |
+
} elseif ( defined( 'ICL_AFFILIATE_ID' ) && defined( 'ICL_AFFILIATE_KEY' ) ) { //support for 1 repo
|
1100 |
+
|
1101 |
+
$affiliate_id = ICL_AFFILIATE_ID;
|
1102 |
+
$affiliate_key = ICL_AFFILIATE_KEY;
|
1103 |
+
|
1104 |
+
} elseif ( isset( $this->config['affiliate_id'] ) && isset( $this->config['affiliate_key'] ) ) {
|
1105 |
+
// BACKWARDS COMPATIBILITY
|
1106 |
+
$affiliate_id = $this->config['affiliate_id'];
|
1107 |
+
$affiliate_key = $this->config['affiliate_key'];
|
1108 |
+
}
|
1109 |
+
|
1110 |
+
if ( $affiliate_id && $affiliate_key ) {
|
1111 |
+
$url = add_query_arg( array( 'aid' => $affiliate_id, 'affiliate_key' => $affiliate_key ), $url );
|
1112 |
+
}
|
1113 |
+
|
1114 |
+
if ( $repository_id == 'wpml' ) {
|
1115 |
+
$url = add_query_arg( array(
|
1116 |
+
'using_icl' => $this->_using_icl,
|
1117 |
+
'wpml_version' => $this->_wpml_version
|
1118 |
+
), $url );
|
1119 |
+
}
|
1120 |
+
|
1121 |
+
$url = apply_filters( 'wp_installer_buy_url', $url );
|
1122 |
+
|
1123 |
+
$url = esc_url( $url );
|
1124 |
+
|
1125 |
+
return $url;
|
1126 |
+
|
1127 |
+
}
|
1128 |
+
|
1129 |
+
public function save_site_key( $args = array() ) {
|
1130 |
+
|
1131 |
+
$error = '';
|
1132 |
+
|
1133 |
+
if ( isset( $args['repository_id'] ) ) {
|
1134 |
+
$repository_id = $args['repository_id'];
|
1135 |
+
} elseif ( isset( $_POST['repository_id'] ) ) {
|
1136 |
+
$repository_id = sanitize_text_field( $_POST['repository_id'] );
|
1137 |
+
} else {
|
1138 |
+
$repository_id = false;
|
1139 |
+
}
|
1140 |
+
|
1141 |
+
if ( isset( $args['nonce'] ) ) {
|
1142 |
+
$nonce = $args['nonce'];
|
1143 |
+
} elseif ( isset( $_POST['nonce'] ) ) {
|
1144 |
+
$nonce = sanitize_text_field( $_POST['nonce'] );
|
1145 |
+
} else {
|
1146 |
+
$nonce = '';
|
1147 |
+
}
|
1148 |
+
|
1149 |
+
if ( isset( $args['site_key'] ) ) {
|
1150 |
+
$site_key = $args['site_key'];
|
1151 |
+
} else {
|
1152 |
+
$site_key = sanitize_text_field( $_POST[ 'site_key_' . $repository_id ] );
|
1153 |
+
}
|
1154 |
+
$site_key = preg_replace( "/[^A-Za-z0-9]/", '', $site_key );
|
1155 |
+
|
1156 |
+
if ( $repository_id && $nonce && wp_create_nonce( 'save_site_key_' . $repository_id ) == $nonce ) {
|
1157 |
+
|
1158 |
+
try {
|
1159 |
+
$subscription_data = $this->fetch_subscription_data( $repository_id, $site_key, self::SITE_KEY_VALIDATION_SOURCE_REGISTRATION );
|
1160 |
+
|
1161 |
+
if ( $subscription_data ) {
|
1162 |
+
$this->settings['repositories'][ $repository_id ]['subscription'] = array(
|
1163 |
+
'key' => $site_key,
|
1164 |
+
'data' => $subscription_data,
|
1165 |
+
'registered_by' => get_current_user_id()
|
1166 |
+
);
|
1167 |
+
$this->save_settings();
|
1168 |
+
} else {
|
1169 |
+
$error = __( 'Invalid site key for the current site.', 'installer' )
|
1170 |
+
. '<br /><div class="installer-footnote">' . __( 'Please note that the site key is case sensitive.', 'installer' ) . '</div>';
|
1171 |
+
}
|
1172 |
+
|
1173 |
+
} catch ( Exception $e ) {
|
1174 |
+
$error = $e->getMessage();
|
1175 |
+
if ( preg_match( '#Could not resolve host: (.*)#', $error, $matches ) || preg_match( '#Couldn\'t resolve host \'(.*)\'#', $error, $matches ) ) {
|
1176 |
+
$error = sprintf( __( "%s cannot access %s to register. Try again to see if it's a temporary problem. If the problem continues, make sure that this site has access to the Internet. You can still use the plugin without registration, but you will not receive automated updates.", 'installer' ),
|
1177 |
+
'<strong><i>' . $this->get_generic_product_name( $repository_id ) . '</i></strong>',
|
1178 |
+
'<strong><i>' . $matches[1] . '</i></strong>'
|
1179 |
+
);
|
1180 |
+
}
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
}
|
1184 |
+
|
1185 |
+
$return = array( 'error' => $error );
|
1186 |
+
|
1187 |
+
if ( $this->api_debug ) {
|
1188 |
+
$return['debug'] = $this->api_debug;
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
if ( ! empty( $args['return'] ) ) {
|
1192 |
+
return $return;
|
1193 |
+
} else {
|
1194 |
+
echo json_encode( $return );
|
1195 |
+
exit;
|
1196 |
+
}
|
1197 |
+
|
1198 |
+
}
|
1199 |
+
|
1200 |
+
/**
|
1201 |
+
* Alias for WP_Installer::get_repository_site_key
|
1202 |
+
* @see WP_Installer::get_repository_site_key()
|
1203 |
+
*
|
1204 |
+
* @param string $repository_id
|
1205 |
+
*
|
1206 |
+
* @return string (site key) or bool
|
1207 |
+
*/
|
1208 |
+
public function get_site_key( $repository_id ) {
|
1209 |
+
return WP_Installer::get_repository_site_key( $repository_id );
|
1210 |
+
}
|
1211 |
+
|
1212 |
+
public function remove_site_key( $repository_id ) {
|
1213 |
+
if ( isset( $this->settings['repositories'][ $repository_id ] ) ) {
|
1214 |
+
unset( $this->settings['repositories'][ $repository_id ]['subscription'] );
|
1215 |
+
$this->save_settings();
|
1216 |
+
$this->refresh_repositories_data();
|
1217 |
+
}
|
1218 |
+
}
|
1219 |
+
|
1220 |
+
public function remove_site_key_ajax() {
|
1221 |
+
if ( $_POST['nonce'] == wp_create_nonce( 'remove_site_key_' . $_POST['repository_id'] ) ) {
|
1222 |
+
$this->remove_site_key( $_POST['repository_id'] );
|
1223 |
+
}
|
1224 |
+
exit;
|
1225 |
+
}
|
1226 |
+
|
1227 |
+
public function validate_repository_subscription() {
|
1228 |
+
$repository_id = isset( $_GET['validate_repository'] ) ? sanitize_text_field( $_GET['validate_repository'] ) : false;
|
1229 |
+
if ( $repository_id ) {
|
1230 |
+
|
1231 |
+
$site_key = $this->get_site_key( $repository_id );
|
1232 |
+
if ( $site_key ) {
|
1233 |
+
$subscription_data = $this->fetch_subscription_data( $repository_id, $site_key, self::SITE_KEY_VALIDATION_SOURCE_REVALIDATION );
|
1234 |
+
if ( empty( $subscription_data ) ) {
|
1235 |
+
unset( $this->settings['repositories'][ $repository_id ]['subscription'] );
|
1236 |
+
delete_site_transient( 'update_plugins' );
|
1237 |
+
$this->save_settings();
|
1238 |
+
}
|
1239 |
+
}
|
1240 |
+
|
1241 |
+
wp_redirect( $this->menu_url() . '#repository-' . $repository_id );
|
1242 |
+
exit;
|
1243 |
+
|
1244 |
+
}
|
1245 |
+
|
1246 |
+
}
|
1247 |
+
|
1248 |
+
public function update_site_key() {
|
1249 |
+
|
1250 |
+
$error = '';
|
1251 |
+
|
1252 |
+
$repository_id = sanitize_text_field( $_POST['repository_id'] );
|
1253 |
+
if ( $_POST['nonce'] == wp_create_nonce( 'update_site_key_' . $repository_id ) ) {
|
1254 |
+
|
1255 |
+
$site_key = $this->get_site_key( $_POST['repository_id'] );
|
1256 |
+
|
1257 |
+
if ( $site_key ) {
|
1258 |
+
try {
|
1259 |
+
$subscription_data = $this->fetch_subscription_data( $repository_id, $site_key, self::SITE_KEY_VALIDATION_SOURCE_UPDATES_CHECK );
|
1260 |
+
|
1261 |
+
if ( $subscription_data ) {
|
1262 |
+
$this->settings['repositories'][ $repository_id ]['subscription'] = array(
|
1263 |
+
'key' => $site_key,
|
1264 |
+
'data' => $subscription_data,
|
1265 |
+
'registered_by' => get_current_user_id()
|
1266 |
+
);
|
1267 |
+
|
1268 |
+
//also refresh products information
|
1269 |
+
$this->refresh_repositories_data();
|
1270 |
+
|
1271 |
+
$this->save_settings();
|
1272 |
+
|
1273 |
+
} else {
|
1274 |
+
unset( $this->settings['repositories'][ $repository_id ]['subscription'] );
|
1275 |
+
$error = __( 'Invalid site key for the current site. If the error persists, try to unregister first and then register again with the same site key.', 'installer' );
|
1276 |
+
}
|
1277 |
+
|
1278 |
+
|
1279 |
+
} catch ( Exception $e ) {
|
1280 |
+
$error = $e->getMessage();
|
1281 |
+
if ( preg_match( '#Could not resolve host: (.*)#', $error, $matches ) || preg_match( '#Couldn\'t resolve host \'(.*)\'#', $error, $matches ) ) {
|
1282 |
+
$error = sprintf( __( "%s cannot access %s to register. Try again to see if it's a temporary problem. If the problem continues, make sure that this site has access to the Internet. You can still use the plugin without registration, but you will not receive automated updates.", 'installer' ),
|
1283 |
+
'<strong><i>' . $this->get_generic_product_name( $repository_id ) . '</i></strong>',
|
1284 |
+
'<strong><i>' . $matches[1] . '</i></strong>'
|
1285 |
+
);
|
1286 |
+
}
|
1287 |
+
}
|
1288 |
+
|
1289 |
+
}
|
1290 |
+
|
1291 |
+
}
|
1292 |
+
|
1293 |
+
echo json_encode( array( 'error' => $error ) );
|
1294 |
+
|
1295 |
+
exit;
|
1296 |
+
}
|
1297 |
+
|
1298 |
+
public function api_debug_log( $text ) {
|
1299 |
+
|
1300 |
+
if ( defined( 'WPML_DEBUG_INSTALLER' ) && WPML_DEBUG_INSTALLER ) {
|
1301 |
+
|
1302 |
+
if ( ! is_scalar( $text ) ) {
|
1303 |
+
$text = print_r( $text, 1 );
|
1304 |
+
}
|
1305 |
+
|
1306 |
+
$this->api_debug .= $text . "\n";
|
1307 |
+
|
1308 |
+
}
|
1309 |
+
|
1310 |
+
}
|
1311 |
+
|
1312 |
+
public function fetch_subscription_data( $repository_id, $site_key, $source = self::SITE_KEY_VALIDATION_SOURCE_OTHER ) {
|
1313 |
+
|
1314 |
+
$subscription_data = false;
|
1315 |
+
|
1316 |
+
$args['body'] = array(
|
1317 |
+
'action' => 'site_key_validation',
|
1318 |
+
'site_key' => $site_key,
|
1319 |
+
'site_url' => $this->get_installer_site_url( $repository_id ),
|
1320 |
+
'source' => $source
|
1321 |
+
);
|
1322 |
+
|
1323 |
+
if ( $repository_id == 'wpml' ) {
|
1324 |
+
$args['body']['using_icl'] = $this->_using_icl;
|
1325 |
+
$args['body']['wpml_version'] = $this->_wpml_version;
|
1326 |
+
}
|
1327 |
+
|
1328 |
+
$args['body']['installer_version'] = WP_INSTALLER_VERSION;
|
1329 |
+
$args['body']['theme'] = wp_get_theme()->get( 'Name' );
|
1330 |
+
$args['body']['site_name'] = get_bloginfo( 'name' );
|
1331 |
+
|
1332 |
+
$args['body']['versions'] = $this->get_local_product_versions( $repository_id );
|
1333 |
+
|
1334 |
+
$args['timeout'] = 45;
|
1335 |
+
|
1336 |
+
// Add extra parameters for custom Installer packages
|
1337 |
+
if ( ! empty( $this->package_source ) ) {
|
1338 |
+
$extra = $this->get_extra_url_parameters();
|
1339 |
+
if ( ! empty( $extra['repository'] ) && $extra['repository'] == $repository_id ) {
|
1340 |
+
unset( $extra['repository'] );
|
1341 |
+
foreach ( $extra as $key => $val ) {
|
1342 |
+
$args['body'][ $key ] = $val;
|
1343 |
+
}
|
1344 |
+
}
|
1345 |
+
}
|
1346 |
+
|
1347 |
+
$response = wp_remote_post( $this->repositories[ $repository_id ]['api-url'], $args );
|
1348 |
+
|
1349 |
+
$this->api_debug_log( "POST {$this->repositories[$repository_id]['api-url']}" );
|
1350 |
+
$this->api_debug_log( $args );
|
1351 |
+
|
1352 |
+
$this->log( "POST {$this->repositories[$repository_id]['api-url']} - fetch subscription data" );
|
1353 |
+
|
1354 |
+
if ( ! is_wp_error( $response ) ) {
|
1355 |
+
$datas = wp_remote_retrieve_body( $response );
|
1356 |
+
|
1357 |
+
if ( is_serialized( $datas ) ) {
|
1358 |
+
$data = unserialize( $datas );
|
1359 |
+
$this->api_debug_log( $data );
|
1360 |
+
|
1361 |
+
if ( ! empty( $data->subscription_data ) ) {
|
1362 |
+
$subscription_data = $data->subscription_data;
|
1363 |
+
}
|
1364 |
+
|
1365 |
+
do_action( 'installer_fetched_subscription_data', $data, $repository_id );
|
1366 |
+
|
1367 |
+
} else {
|
1368 |
+
$this->api_debug_log( $datas );
|
1369 |
+
}
|
1370 |
+
|
1371 |
+
} else {
|
1372 |
+
|
1373 |
+
$this->api_debug_log( $response );
|
1374 |
+
throw new Exception( $response->get_error_message() );
|
1375 |
+
}
|
1376 |
+
|
1377 |
+
return $subscription_data;
|
1378 |
+
|
1379 |
+
}
|
1380 |
+
|
1381 |
+
function get_local_product_versions( $repository_id ) {
|
1382 |
+
|
1383 |
+
$versions = array();
|
1384 |
+
|
1385 |
+
foreach ( $this->settings['repositories'][ $repository_id ]['data']['packages'] as $package_id => $package ) {
|
1386 |
+
|
1387 |
+
foreach ( $package['products'] as $product_id => $product ) {
|
1388 |
+
|
1389 |
+
foreach ( $product['plugins'] as $plugin_slug ) {
|
1390 |
+
|
1391 |
+
$download = $this->settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $plugin_slug ];
|
1392 |
+
|
1393 |
+
if ( empty( $versions[ $download['slug'] ] ) ) {
|
1394 |
+
$v = $this->get_plugin_installed_version( $download['name'], $download['slug'] );
|
1395 |
+
if ( $v ) {
|
1396 |
+
$versions[ $download['slug'] ] = $v;
|
1397 |
+
}
|
1398 |
+
}
|
1399 |
+
|
1400 |
+
}
|
1401 |
+
|
1402 |
+
}
|
1403 |
+
|
1404 |
+
}
|
1405 |
+
|
1406 |
+
return $versions;
|
1407 |
+
}
|
1408 |
+
|
1409 |
+
public function get_repository_site_key( $repository_id ) {
|
1410 |
+
$site_key = false;
|
1411 |
+
|
1412 |
+
if ( ! empty( $this->settings['repositories'][ $repository_id ]['subscription']['key'] ) ) {
|
1413 |
+
$site_key = $this->settings['repositories'][ $repository_id ]['subscription']['key'];
|
1414 |
+
}
|
1415 |
+
|
1416 |
+
return $site_key;
|
1417 |
+
}
|
1418 |
+
|
1419 |
+
public function repository_has_valid_subscription( $repository_id ) {
|
1420 |
+
|
1421 |
+
$valid = false;
|
1422 |
+
|
1423 |
+
if ( ! empty( $this->settings['repositories'][ $repository_id ]['subscription'] ) ) {
|
1424 |
+
|
1425 |
+
$subscription = $this->settings['repositories'][ $repository_id ]['subscription']['data'];
|
1426 |
+
$valid = ( $subscription->status == 1 && ( strtotime( $subscription->expires ) > time() || empty( $subscription->expires ) ) ) || $subscription->status == 4;
|
1427 |
+
|
1428 |
+
}
|
1429 |
+
|
1430 |
+
return $valid;
|
1431 |
+
|
1432 |
+
}
|
1433 |
+
|
1434 |
+
public function repository_has_subscription( $repository_id ) {
|
1435 |
+
$key = false;
|
1436 |
+
if ( ! empty( $this->settings['repositories'][ $repository_id ]['subscription']['key'] ) ) {
|
1437 |
+
$key = $this->settings['repositories'][ $repository_id ]['subscription']['key'];
|
1438 |
+
}
|
1439 |
+
|
1440 |
+
return $key;
|
1441 |
+
|
1442 |
+
}
|
1443 |
+
|
1444 |
+
public function repository_has_expired_subscription( $repository_id ) {
|
1445 |
+
|
1446 |
+
return $this->repository_has_subscription( $repository_id ) && ! $this->repository_has_valid_subscription( $repository_id );
|
1447 |
+
|
1448 |
+
}
|
1449 |
+
|
1450 |
+
public function get_generic_product_name( $repository_id ) {
|
1451 |
+
|
1452 |
+
return $this->settings['repositories'][ $repository_id ]['data']['product-name'];
|
1453 |
+
|
1454 |
+
}
|
1455 |
+
|
1456 |
+
public function show_subscription_renew_warning( $repository_id, $subscription_id ) {
|
1457 |
+
|
1458 |
+
$show = false;
|
1459 |
+
|
1460 |
+
$data = $this->settings['repositories'][ $repository_id ]['data'];
|
1461 |
+
if ( ! empty( $data['subscriptions_meta'] ) ) {
|
1462 |
+
if ( isset( $data['subscriptions_meta']['expiration'] ) ) {
|
1463 |
+
|
1464 |
+
if ( ! empty( $data['subscriptions_meta']['expiration'][ $subscription_id ] ) ) {
|
1465 |
+
|
1466 |
+
$days = $data['subscriptions_meta']['expiration'][ $subscription_id ]['days_warning'];
|
1467 |
+
$message = $data['subscriptions_meta']['expiration'][ $subscription_id ]['warning_message'];
|
1468 |
+
|
1469 |
+
} else {
|
1470 |
+
|
1471 |
+
//defaults
|
1472 |
+
$days = 30;
|
1473 |
+
$message = __( 'You will have to renew your subscription in order to continue getting the updates and support.', 'installer' );
|
1474 |
+
|
1475 |
+
}
|
1476 |
+
|
1477 |
+
if ( ! empty( $this->settings['repositories'][ $repository_id ]['subscription'] ) ) {
|
1478 |
+
$subscription = $this->settings['repositories'][ $repository_id ]['subscription'];
|
1479 |
+
|
1480 |
+
if ( $subscription['data']->subscription_type == $subscription_id && ! empty( $subscription['data']->expires ) ) {
|
1481 |
+
|
1482 |
+
if ( strtotime( $subscription['data']->expires ) < strtotime( sprintf( "+%d day", $days ) ) ) {
|
1483 |
+
|
1484 |
+
$days_to_expiration = ceil( ( strtotime( $subscription['data']->expires ) - time() ) / 86400 );
|
1485 |
+
|
1486 |
+
echo '<div><p class="installer-warn-box">' .
|
1487 |
+
sprintf( _n( 'Your subscription expires in %d day.', 'Your subscription expires in %d days.', $days_to_expiration, 'installer' ), $days_to_expiration ) .
|
1488 |
+
'<br />' . $message .
|
1489 |
+
'</p></div>';
|
1490 |
+
|
1491 |
+
$show = true;
|
1492 |
+
|
1493 |
+
}
|
1494 |
+
|
1495 |
+
}
|
1496 |
+
|
1497 |
+
}
|
1498 |
+
|
1499 |
+
|
1500 |
+
}
|
1501 |
+
}
|
1502 |
+
|
1503 |
+
|
1504 |
+
return $show;
|
1505 |
+
|
1506 |
+
}
|
1507 |
+
|
1508 |
+
public function setup_plugins_renew_warnings() {
|
1509 |
+
|
1510 |
+
$plugins = get_plugins();
|
1511 |
+
|
1512 |
+
$subscriptions_with_warnings = array();
|
1513 |
+
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
1514 |
+
|
1515 |
+
if ( $this->repository_has_valid_subscription( $repository_id ) ) {
|
1516 |
+
$subscription_type = $this->settings['repositories'][ $repository_id ]['subscription']['data']->subscription_type;
|
1517 |
+
$expires = $this->settings['repositories'][ $repository_id ]['subscription']['data']->expires;
|
1518 |
+
|
1519 |
+
$never_expires = isset( $this->settings['repositories'][ $repository_id ]['subscription'] )
|
1520 |
+
&& empty( $this->settings['repositories'][ $repository_id ]['subscription']['data']->expires )
|
1521 |
+
&& (
|
1522 |
+
$this->settings['repositories'][ $repository_id ]['subscription']['data']->status == 4 ||
|
1523 |
+
$this->settings['repositories'][ $repository_id ]['subscription']['data']->status == 1
|
1524 |
+
);
|
1525 |
+
|
1526 |
+
if ( ! $never_expires ) {
|
1527 |
+
if ( isset( $this->settings['repositories'][ $repository_id ]['data']['subscriptions_meta']['expiration'][ $subscription_type ] ) ) {
|
1528 |
+
|
1529 |
+
$days_warning = $this->settings['repositories'][ $repository_id ]['data']['subscriptions_meta']['expiration'][ $subscription_type ]['days_warning'];
|
1530 |
+
$custom_message = $this->settings['repositories'][ $repository_id ]['data']['subscriptions_meta']['expiration'][ $subscription_type ]['warning_message'];
|
1531 |
+
|
1532 |
+
} else {
|
1533 |
+
//defaults
|
1534 |
+
$days_warning = 30;
|
1535 |
+
$custom_message = __( 'You will have to renew your subscription in order to continue getting the updates and support.', 'installer' );
|
1536 |
+
}
|
1537 |
+
|
1538 |
+
if ( strtotime( $expires ) < strtotime( sprintf( '+%d day', $days_warning ) ) ) {
|
1539 |
+
|
1540 |
+
$days_to_expiration = ceil( ( strtotime( $expires ) - time() ) / 86400 );
|
1541 |
+
|
1542 |
+
$message = sprintf( _n( 'Your subscription expires in %d day.', 'Your subscription expires in %d days.', $days_to_expiration, 'installer' ), $days_to_expiration );
|
1543 |
+
$subscriptions_with_warnings[ $subscription_type ] = $message . ' ' . $custom_message;
|
1544 |
+
|
1545 |
+
}
|
1546 |
+
}
|
1547 |
+
|
1548 |
+
}
|
1549 |
+
|
1550 |
+
}
|
1551 |
+
|
1552 |
+
|
1553 |
+
foreach ( $plugins as $plugin_id => $plugin ) {
|
1554 |
+
|
1555 |
+
$slug = dirname( $plugin_id );
|
1556 |
+
if ( empty( $slug ) ) {
|
1557 |
+
continue;
|
1558 |
+
}
|
1559 |
+
|
1560 |
+
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
1561 |
+
|
1562 |
+
if ( $this->repository_has_valid_subscription( $repository_id ) ) {
|
1563 |
+
|
1564 |
+
foreach ( $repository['data']['packages'] as $package ) {
|
1565 |
+
|
1566 |
+
foreach ( $package['products'] as $product ) {
|
1567 |
+
|
1568 |
+
foreach ( $product['plugins'] as $plugin_slug ) {
|
1569 |
+
|
1570 |
+
$download = $this->settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $plugin_slug ];
|
1571 |
+
|
1572 |
+
if ( $download['slug'] == $slug || $download['name'] == $plugin['Name'] || $download['name'] == $plugin['Title'] ) { //match order: slug, name, title
|
1573 |
+
|
1574 |
+
if ( isset( $subscriptions_with_warnings[ $product['subscription_type'] ] ) ) {
|
1575 |
+
|
1576 |
+
$this->_plugins_renew_warnings[ $plugin_id ] = $subscriptions_with_warnings[ $product['subscription_type'] ];
|
1577 |
+
|
1578 |
+
}
|
1579 |
+
|
1580 |
+
}
|
1581 |
+
|
1582 |
+
}
|
1583 |
+
|
1584 |
+
}
|
1585 |
+
|
1586 |
+
}
|
1587 |
+
|
1588 |
+
}
|
1589 |
+
|
1590 |
+
}
|
1591 |
+
|
1592 |
+
}
|
1593 |
+
|
1594 |
+
}
|
1595 |
+
|
1596 |
+
public function queue_plugins_renew_warnings() {
|
1597 |
+
|
1598 |
+
if ( ! empty( $this->_plugins_renew_warnings ) ) {
|
1599 |
+
|
1600 |
+
foreach ( $this->_plugins_renew_warnings as $plugin_id => $message ) {
|
1601 |
+
|
1602 |
+
add_action( "after_plugin_row_" . $plugin_id, array( $this, 'plugins_renew_warning' ), 10, 3 );
|
1603 |
+
}
|
1604 |
+
|
1605 |
+
}
|
1606 |
+
|
1607 |
+
}
|
1608 |
+
|
1609 |
+
public function plugins_renew_warning( $plugin_file, $plugin_data, $status ) {
|
1610 |
+
|
1611 |
+
if ( empty( $this->_plugins_renew_warnings[ $plugin_file ] ) ) {
|
1612 |
+
return;
|
1613 |
+
}
|
1614 |
+
|
1615 |
+
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
1616 |
+
?>
|
1617 |
+
|
1618 |
+
<tr class="plugin-update-tr">
|
1619 |
+
<td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="plugin-update colspanchange">
|
1620 |
+
<div class="update-message">
|
1621 |
+
<?php
|
1622 |
+
echo $this->_plugins_renew_warnings[ $plugin_file ] . ' ';
|
1623 |
+
printf( __( '%sRenew here%s.', 'installer' ),
|
1624 |
+
'<a href="' . $this->menu_url() . '">', '</a>' );
|
1625 |
+
?>
|
1626 |
+
</div>
|
1627 |
+
</tr>
|
1628 |
+
|
1629 |
+
<?php
|
1630 |
+
|
1631 |
+
}
|
1632 |
+
|
1633 |
+
public function get_subscription_type_for_repository( $repository_id ) {
|
1634 |
+
|
1635 |
+
$subscription_type = false;
|
1636 |
+
|
1637 |
+
if ( ! empty( $this->settings['repositories'][ $repository_id ]['subscription'] ) ) {
|
1638 |
+
$subscription_type = $this->settings['repositories'][ $repository_id ]['subscription']['data']->subscription_type;
|
1639 |
+
}
|
1640 |
+
|
1641 |
+
return $subscription_type;
|
1642 |
+
|
1643 |
+
}
|
1644 |
+
|
1645 |
+
public function have_superior_subscription( $subscription_type, $product ) {
|
1646 |
+
|
1647 |
+
$have = false;
|
1648 |
+
|
1649 |
+
if ( is_array( $product['upgrades'] ) ) {
|
1650 |
+
foreach ( $product['upgrades'] as $u ) {
|
1651 |
+
if ( $u['subscription_type'] == $subscription_type ) {
|
1652 |
+
$have = true;
|
1653 |
+
break;
|
1654 |
+
}
|
1655 |
+
}
|
1656 |
+
}
|
1657 |
+
|
1658 |
+
return $have;
|
1659 |
+
}
|
1660 |
+
|
1661 |
+
public function is_product_available_for_download( $product_name, $repository_id ) {
|
1662 |
+
|
1663 |
+
$available = false;
|
1664 |
+
|
1665 |
+
$subscription_type = $this->get_subscription_type_for_repository( $repository_id );
|
1666 |
+
$expired = $this->repository_has_expired_subscription( $repository_id );
|
1667 |
+
|
1668 |
+
if ( $this->repository_has_subscription( $repository_id ) && ! $expired ) {
|
1669 |
+
|
1670 |
+
$this->set_hierarchy_and_order();
|
1671 |
+
|
1672 |
+
foreach ( $this->settings['repositories'][ $repository_id ]['data']['packages'] as $package_id => $package ) {
|
1673 |
+
|
1674 |
+
$has_top_package = false;
|
1675 |
+
|
1676 |
+
foreach ( $package['products'] as $product ) {
|
1677 |
+
|
1678 |
+
if ( $subscription_type == $product['subscription_type'] ) {
|
1679 |
+
$has_top_package = true;
|
1680 |
+
if ( $product['name'] == $product_name ) {
|
1681 |
+
return $available = true;
|
1682 |
+
}
|
1683 |
+
}
|
1684 |
+
|
1685 |
+
}
|
1686 |
+
|
1687 |
+
if ( ! empty( $package['sub-packages'] ) ) {
|
1688 |
+
foreach ( $package['sub-packages'] as $sub_package ) {
|
1689 |
+
foreach ( $sub_package['products'] as $product ) {
|
1690 |
+
if ( $product['name'] == $product_name && ( $subscription_type == $product['subscription_type'] || $has_top_package ) ) {
|
1691 |
+
return $available = true;
|
1692 |
+
}
|
1693 |
+
}
|
1694 |
+
}
|
1695 |
+
}
|
1696 |
+
|
1697 |
+
}
|
1698 |
+
}
|
1699 |
+
|
1700 |
+
return $available;
|
1701 |
+
|
1702 |
+
}
|
1703 |
+
|
1704 |
+
public function get_upgrade_options( $repository_id ) {
|
1705 |
+
$all_upgrades = array();
|
1706 |
+
|
1707 |
+
|
1708 |
+
//get all products: packages and subpackages
|
1709 |
+
$all_products = array();
|
1710 |
+
foreach ( $this->settings['repositories'][ $repository_id ]['data']['packages'] as $package ) {
|
1711 |
+
foreach ( $package['products'] as $product ) {
|
1712 |
+
$all_products[] = $product;
|
1713 |
+
}
|
1714 |
+
if ( ! empty( $package['sub-packages'] ) ) {
|
1715 |
+
foreach ( $package['sub-packages'] as $subpackage ) {
|
1716 |
+
foreach ( $subpackage['products'] as $product ) {
|
1717 |
+
$all_products[] = $product;
|
1718 |
+
}
|
1719 |
+
|
1720 |
+
}
|
1721 |
+
|
1722 |
+
}
|
1723 |
+
|
1724 |
+
}
|
1725 |
+
|
1726 |
+
foreach ( $all_products as $product ) {
|
1727 |
+
if ( $product['upgrades'] ) {
|
1728 |
+
foreach ( $product['upgrades'] as $upgrade ) {
|
1729 |
+
if ( $this->repository_has_valid_subscription( $repository_id ) || ( $this->repository_has_subscription( $repository_id ) && $upgrade['including_expired'] ) ) {
|
1730 |
+
$all_upgrades[ $upgrade['subscription_type'] ][ $product['subscription_type'] ] = $upgrade;
|
1731 |
+
}
|
1732 |
+
}
|
1733 |
+
}
|
1734 |
+
}
|
1735 |
+
|
1736 |
+
return $all_upgrades;
|
1737 |
+
|
1738 |
+
}
|
1739 |
+
|
1740 |
+
public function append_site_key_to_download_url( $url, $key, $repository_id ) {
|
1741 |
+
|
1742 |
+
$url_params['site_key'] = $key;
|
1743 |
+
$url_params['site_url'] = $this->get_installer_site_url( $repository_id );
|
1744 |
+
|
1745 |
+
|
1746 |
+
// Add extra parameters for custom Installer packages
|
1747 |
+
if ( ! empty( $this->package_source ) ) {
|
1748 |
+
$extra = $this->get_extra_url_parameters();
|
1749 |
+
if ( ! empty( $extra['repository'] ) && $extra['repository'] == $repository_id ) {
|
1750 |
+
unset( $extra['repository'] );
|
1751 |
+
foreach ( $extra as $key => $val ) {
|
1752 |
+
$url_params[ $key ] = $val;
|
1753 |
+
}
|
1754 |
+
}
|
1755 |
+
}
|
1756 |
+
|
1757 |
+
$url = add_query_arg( $url_params, $url );
|
1758 |
+
|
1759 |
+
if ( $repository_id == 'wpml' ) {
|
1760 |
+
$url = add_query_arg( array(
|
1761 |
+
'using_icl' => $this->_using_icl,
|
1762 |
+
'wpml_version' => $this->_wpml_version
|
1763 |
+
), $url );
|
1764 |
+
}
|
1765 |
+
|
1766 |
+
return $url;
|
1767 |
+
|
1768 |
+
}
|
1769 |
+
|
1770 |
+
public function plugin_is_installed( $name, $slug, $version = null ) {
|
1771 |
+
|
1772 |
+
$is = false;
|
1773 |
+
|
1774 |
+
$plugins = get_plugins();
|
1775 |
+
|
1776 |
+
foreach ( $plugins as $plugin_id => $plugin ) {
|
1777 |
+
|
1778 |
+
$wp_plugin_slug = dirname( $plugin_id );
|
1779 |
+
|
1780 |
+
// Exception: embedded plugins
|
1781 |
+
if ( $wp_plugin_slug == $slug || $plugin['Name'] == $name || $plugin['Title'] == $name || ( $wp_plugin_slug == $slug . '-embedded' || $plugin['Name'] == $name . ' Embedded' ) ) {
|
1782 |
+
if ( $version ) {
|
1783 |
+
if ( version_compare( $plugin['Version'], $version, '>=' ) ) {
|
1784 |
+
$is = $plugin['Version'];
|
1785 |
+
}
|
1786 |
+
} else {
|
1787 |
+
$is = $plugin['Version'];
|
1788 |
+
}
|
1789 |
+
|
1790 |
+
break;
|
1791 |
+
}
|
1792 |
+
|
1793 |
+
}
|
1794 |
+
|
1795 |
+
//exception: Types name difference
|
1796 |
+
if ( ! $is && $name == 'Types' ) {
|
1797 |
+
return $this->plugin_is_installed( 'Types - Complete Solution for Custom Fields and Types', $slug, $version );
|
1798 |
+
}
|
1799 |
+
|
1800 |
+
return $is;
|
1801 |
+
}
|
1802 |
+
|
1803 |
+
public function plugin_is_embedded_version( $name, $slug ) {
|
1804 |
+
$is = false;
|
1805 |
+
|
1806 |
+
$plugins = get_plugins();
|
1807 |
+
|
1808 |
+
//false if teh full version is also installed
|
1809 |
+
$is_full_installed = false;
|
1810 |
+
foreach ( $plugins as $plugin_id => $plugin ) {
|
1811 |
+
|
1812 |
+
if ( ( $plugin['Name'] == $name && ! preg_match( "#-embedded$#", $slug ) ) ) {
|
1813 |
+
$is_full_installed = true;
|
1814 |
+
break;
|
1815 |
+
}
|
1816 |
+
|
1817 |
+
}
|
1818 |
+
|
1819 |
+
if ( $is_full_installed ) {
|
1820 |
+
return false;
|
1821 |
+
}
|
1822 |
+
|
1823 |
+
foreach ( $plugins as $plugin_id => $plugin ) {
|
1824 |
+
|
1825 |
+
// TBD
|
1826 |
+
$wp_plugin_slug = dirname( $plugin_id );
|
1827 |
+
if ( $wp_plugin_slug == $slug . '-embedded' && $plugin['Name'] == $name . ' Embedded' ) {
|
1828 |
+
$is = true;
|
1829 |
+
break;
|
1830 |
+
}
|
1831 |
+
|
1832 |
+
}
|
1833 |
+
|
1834 |
+
return $is;
|
1835 |
+
|
1836 |
+
}
|
1837 |
+
|
1838 |
+
//Alias for plugin_is_installed
|
1839 |
+
public function get_plugin_installed_version( $name, $slug ) {
|
1840 |
+
|
1841 |
+
return $this->plugin_is_installed( $name, $slug );
|
1842 |
+
|
1843 |
+
}
|
1844 |
+
|
1845 |
+
public function get_plugin_repository_version( $repository_id, $slug ) {
|
1846 |
+
$version = false;
|
1847 |
+
|
1848 |
+
if ( ! empty( $this->settings['repositories'][ $repository_id ]['data']['packages'] ) ) {
|
1849 |
+
foreach ( $this->settings['repositories'][ $repository_id ]['data']['packages'] as $package ) {
|
1850 |
+
foreach ( $package['products'] as $product ) {
|
1851 |
+
|
1852 |
+
foreach ( $product['plugins'] as $plugin_slug ) {
|
1853 |
+
|
1854 |
+
$download = $this->settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $plugin_slug ];
|
1855 |
+
|
1856 |
+
if ( $download['slug'] == $slug ) {
|
1857 |
+
$version = $download['version'];
|
1858 |
+
break ( 3 );
|
1859 |
+
}
|
1860 |
+
|
1861 |
+
}
|
1862 |
+
|
1863 |
+
}
|
1864 |
+
}
|
1865 |
+
}
|
1866 |
+
|
1867 |
+
return $version;
|
1868 |
+
}
|
1869 |
+
|
1870 |
+
public function is_uploading_allowed() {
|
1871 |
+
|
1872 |
+
//_deprecated_function ( __FUNCTION__, '1.7.3', 'Installer_Dependencies::' . __FUNCTION__ );
|
1873 |
+
return $this->dependencies->is_uploading_allowed();
|
1874 |
+
|
1875 |
+
}
|
1876 |
+
|
1877 |
+
public function download_plugin_ajax_handler() {
|
1878 |
+
|
1879 |
+
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
1880 |
+
require_once $this->plugin_path() . '/includes/class-installer-upgrader-skins.php';
|
1881 |
+
|
1882 |
+
$data = json_decode( base64_decode( sanitize_text_field( $_POST['data'] ) ), true );
|
1883 |
+
|
1884 |
+
$ret = false;
|
1885 |
+
$plugin_id = false;
|
1886 |
+
$message = '';
|
1887 |
+
|
1888 |
+
//validate subscription
|
1889 |
+
$site_key = $this->get_repository_site_key( $data['repository_id'] );
|
1890 |
+
$subscription_data = $this->fetch_subscription_data( $data['repository_id'], $site_key, self::SITE_KEY_VALIDATION_SOURCE_DOWNLOAD_REPORT );
|
1891 |
+
|
1892 |
+
if ( $subscription_data && ! is_wp_error( $subscription_data ) && $this->repository_has_valid_subscription( $data['repository_id'] ) ) {
|
1893 |
+
|
1894 |
+
if ( $data['nonce'] == wp_create_nonce( 'install_plugin_' . $data['url'] ) ) {
|
1895 |
+
|
1896 |
+
$upgrader_skins = new Installer_Upgrader_Skins(); //use our custom (mute) Skin
|
1897 |
+
$upgrader = new Plugin_Upgrader( $upgrader_skins );
|
1898 |
+
|
1899 |
+
remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
|
1900 |
+
|
1901 |
+
$plugins = get_plugins();
|
1902 |
+
|
1903 |
+
//upgrade or install?
|
1904 |
+
foreach ( $plugins as $id => $plugin ) {
|
1905 |
+
$wp_plugin_slug = dirname( $id );
|
1906 |
+
$is_embedded = $this->plugin_is_embedded_version( preg_replace( '/ Embedded$/', '', $plugin['Name'] ), preg_replace( '/-embedded$/', '', $wp_plugin_slug ) );
|
1907 |
+
|
1908 |
+
if ( $wp_plugin_slug == $data['slug'] || $is_embedded && preg_replace( '/-embedded$/', '', $wp_plugin_slug ) == $data['slug'] ) {
|
1909 |
+
$plugin_id = $id;
|
1910 |
+
break;
|
1911 |
+
}
|
1912 |
+
}
|
1913 |
+
|
1914 |
+
if ( $plugin_id && empty( $is_embedded ) ) { //upgrade
|
1915 |
+
$response['upgrade'] = 1;
|
1916 |
+
|
1917 |
+
$plugin_is_active = is_plugin_active( $plugin_id );
|
1918 |
+
|
1919 |
+
$ret = $upgrader->upgrade( $plugin_id );
|
1920 |
+
|
1921 |
+
if ( ! $ret && ! empty( $upgrader->skin->installer_error ) ) {
|
1922 |
+
if ( is_wp_error( $upgrader->skin->installer_error ) ) {
|
1923 |
+
$message = $upgrader->skin->installer_error->get_error_message() .
|
1924 |
+
' (' . $upgrader->skin->installer_error->get_error_data() . ')';
|
1925 |
+
}
|
1926 |
+
$plugin_version = 0;
|
1927 |
+
}else{
|
1928 |
+
if ( $plugin_is_active ) {
|
1929 |
+
//prevent redirects
|
1930 |
+
add_filter( 'wp_redirect', '__return_false' );
|
1931 |
+
activate_plugin( $plugin_id );
|
1932 |
+
}
|
1933 |
+
$plugin_version = $this->get_plugin_repository_version( $data['repository_id'], $data['slug'] );
|
1934 |
+
}
|
1935 |
+
|
1936 |
+
} else { //install
|
1937 |
+
|
1938 |
+
if ( $is_embedded ) {
|
1939 |
+
delete_plugins( array( $plugin_id ) );
|
1940 |
+
}
|
1941 |
+
|
1942 |
+
$response['install'] = 1;
|
1943 |
+
$ret = $upgrader->install( $data['url'] );
|
1944 |
+
if ( ! $ret && ! empty( $upgrader->skin->installer_error ) ) {
|
1945 |
+
if ( is_wp_error( $upgrader->skin->installer_error ) ) {
|
1946 |
+
$message = $upgrader->skin->installer_error->get_error_message() .
|
1947 |
+
' (' . $upgrader->skin->installer_error->get_error_data() . ')';
|
1948 |
+
}
|
1949 |
+
}
|
1950 |
+
}
|
1951 |
+
|
1952 |
+
$plugins = get_plugins(); //read again
|
1953 |
+
|
1954 |
+
if ( $ret ) {
|
1955 |
+
foreach ( $plugins as $id => $plugin ) {
|
1956 |
+
$wp_plugin_slug = dirname( $id );
|
1957 |
+
if ( $wp_plugin_slug == $data['slug'] ) {
|
1958 |
+
$plugin_version = $plugin['Version'];
|
1959 |
+
$plugin_id = $id;
|
1960 |
+
break;
|
1961 |
+
}
|
1962 |
+
}
|
1963 |
+
|
1964 |
+
}
|
1965 |
+
|
1966 |
+
if( WP_Installer_Channels()->get_channel( $data['repository_id'] ) !== WP_Installer_Channels::CHANNEL_PRODUCTION ){
|
1967 |
+
$download = $this->settings['repositories'][$data['repository_id']]['data']['downloads']['plugins'][$data['slug']];
|
1968 |
+
$non_stable = WP_Installer_Channels()->get_download_source_channel( $plugin_version, $data['repository_id'], $download['slug'], 'plugins' );
|
1969 |
+
}
|
1970 |
+
|
1971 |
+
}
|
1972 |
+
|
1973 |
+
} else { //subscription not valid
|
1974 |
+
|
1975 |
+
$ret = false;
|
1976 |
+
$message = __( 'Your subscription appears to no longer be valid. Please try to register again using a valid site key.', 'installer' );
|
1977 |
+
}
|
1978 |
+
|
1979 |
+
$response['version'] = isset( $plugin_version ) ? $plugin_version : 0;
|
1980 |
+
$response['non_stable']= isset( $non_stable ) ? $non_stable : '';
|
1981 |
+
$response['plugin_id'] = $plugin_id;
|
1982 |
+
$response['nonce'] = wp_create_nonce( 'activate_' . $plugin_id );
|
1983 |
+
$response['success'] = $ret;
|
1984 |
+
$response['message'] = $message;
|
1985 |
+
|
1986 |
+
echo json_encode( $response );
|
1987 |
+
exit;
|
1988 |
+
|
1989 |
+
}
|
1990 |
+
|
1991 |
+
public function download_plugin( $slug, $url ) {
|
1992 |
+
|
1993 |
+
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
1994 |
+
require_once $this->plugin_path() . '/includes/class-installer-upgrader-skins.php';
|
1995 |
+
|
1996 |
+
$upgrader_skins = new Installer_Upgrader_Skins(); //use our custom (mute) Skin
|
1997 |
+
$upgrader = new Plugin_Upgrader( $upgrader_skins );
|
1998 |
+
|
1999 |
+
remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
|
2000 |
+
|
2001 |
+
$plugins = get_plugins();
|
2002 |
+
|
2003 |
+
$plugin_id = false;
|
2004 |
+
|
2005 |
+
//upgrade or install?
|
2006 |
+
foreach ( $plugins as $id => $plugin ) {
|
2007 |
+
$wp_plugin_slug = dirname( $id );
|
2008 |
+
if ( $wp_plugin_slug == $slug ) {
|
2009 |
+
$plugin_id = $id;
|
2010 |
+
break;
|
2011 |
+
}
|
2012 |
+
}
|
2013 |
+
|
2014 |
+
if ( $plugin_id ) { //upgrade
|
2015 |
+
|
2016 |
+
$plugin_is_active = is_plugin_active( $plugin_id );
|
2017 |
+
|
2018 |
+
$ret = $upgrader->upgrade( $plugin_id );
|
2019 |
+
|
2020 |
+
if ( $plugin_is_active ) {
|
2021 |
+
activate_plugin( $plugin_id );
|
2022 |
+
}
|
2023 |
+
|
2024 |
+
} else { //install
|
2025 |
+
$ret = $upgrader->install( $url );
|
2026 |
+
}
|
2027 |
+
|
2028 |
+
return $ret;
|
2029 |
+
|
2030 |
+
}
|
2031 |
+
|
2032 |
+
public function activate_plugin() {
|
2033 |
+
|
2034 |
+
$error = '';
|
2035 |
+
|
2036 |
+
$plugin_id = sanitize_text_field( $_POST['plugin_id'] );
|
2037 |
+
if ( isset( $_POST['nonce'] ) && $plugin_id && $_POST['nonce'] == wp_create_nonce( 'activate_' . $plugin_id ) ) {
|
2038 |
+
|
2039 |
+
// Deactivate any embedded version
|
2040 |
+
$plugin_slug = dirname( $plugin_id );
|
2041 |
+
$active_plugins = get_option( 'active_plugins' );
|
2042 |
+
foreach ( $active_plugins as $plugin ) {
|
2043 |
+
$wp_plugin_slug = dirname( $plugin );
|
2044 |
+
if ( $wp_plugin_slug == $plugin_slug . '-embedded' ) {
|
2045 |
+
deactivate_plugins( array( $plugin ) );
|
2046 |
+
break;
|
2047 |
+
}
|
2048 |
+
}
|
2049 |
+
|
2050 |
+
//prevent redirects
|
2051 |
+
add_filter( 'wp_redirect', '__return_false', 10000 );
|
2052 |
+
|
2053 |
+
$return = activate_plugin( $plugin_id );
|
2054 |
+
|
2055 |
+
if ( is_wp_error( $return ) ) {
|
2056 |
+
$error = $return->get_error_message();
|
2057 |
+
}
|
2058 |
+
|
2059 |
+
} else {
|
2060 |
+
$error = 'error';
|
2061 |
+
}
|
2062 |
+
|
2063 |
+
$ret = array( 'error' => $error );
|
2064 |
+
|
2065 |
+
echo json_encode( $ret );
|
2066 |
+
exit;
|
2067 |
+
|
2068 |
+
}
|
2069 |
+
|
2070 |
+
public function custom_plugins_api_call( $false, $action, $args ) {
|
2071 |
+
|
2072 |
+
if ( $action == 'plugin_information' ) {
|
2073 |
+
|
2074 |
+
$plugins = get_plugins();
|
2075 |
+
$plugin_names = array();
|
2076 |
+
foreach ( $plugins as $plugin_id => $plugin ) {
|
2077 |
+
// plugins by WP slug which (plugin folder) which can be different
|
2078 |
+
// will use this to compare by title
|
2079 |
+
$plugin_names[ dirname( $plugin_id ) ] = array(
|
2080 |
+
'name' => $plugin['Name'],
|
2081 |
+
'title' => $plugin['Title'],
|
2082 |
+
);
|
2083 |
+
}
|
2084 |
+
|
2085 |
+
$slug = $args->slug;
|
2086 |
+
|
2087 |
+
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
2088 |
+
|
2089 |
+
if ( ! $this->repository_has_valid_subscription( $repository_id ) ) {
|
2090 |
+
$site_key = false;
|
2091 |
+
} else {
|
2092 |
+
$site_key = $repository['subscription']['key'];
|
2093 |
+
}
|
2094 |
+
|
2095 |
+
foreach ( $repository['data']['packages'] as $package ) {
|
2096 |
+
|
2097 |
+
foreach ( $package['products'] as $product ) {
|
2098 |
+
|
2099 |
+
foreach ( $product['plugins'] as $plugin_slug ) {
|
2100 |
+
|
2101 |
+
$download = $this->settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $plugin_slug ];
|
2102 |
+
|
2103 |
+
if ( $download['slug'] == $slug ||
|
2104 |
+
isset( $plugin_names[ $slug ] ) && (
|
2105 |
+
$plugin_names[ $slug ]['name'] == $download['name'] ||
|
2106 |
+
$plugin_names[ $slug ]['title'] == $download['name']
|
2107 |
+
)
|
2108 |
+
) {
|
2109 |
+
|
2110 |
+
if ( ! empty( $download['free-on-wporg'] ) && $download['channel'] == WP_Installer_Channels::CHANNEL_PRODUCTION ) {
|
2111 |
+
return false; // use data from wordpress.org
|
2112 |
+
}
|
2113 |
+
|
2114 |
+
$res = new stdClass();
|
2115 |
+
$res->external = true;
|
2116 |
+
|
2117 |
+
$res->name = $download['name'];
|
2118 |
+
$res->slug = $slug;
|
2119 |
+
$res->version = $download['version'];
|
2120 |
+
$res->author = '';
|
2121 |
+
$res->author_profile = '';
|
2122 |
+
$res->last_updated = $download['date'];
|
2123 |
+
|
2124 |
+
if ( $site_key ) {
|
2125 |
+
$res->download_link = $this->append_site_key_to_download_url( $download['url'], $site_key, $repository_id );
|
2126 |
+
}
|
2127 |
+
|
2128 |
+
$res->homepage = $repository['data']['url'];
|
2129 |
+
$res->sections = array(
|
2130 |
+
'Description' => $download['description'],
|
2131 |
+
'Changelog' => $download['changelog']
|
2132 |
+
);
|
2133 |
+
|
2134 |
+
return $res;
|
2135 |
+
|
2136 |
+
}
|
2137 |
+
|
2138 |
+
}
|
2139 |
+
|
2140 |
+
}
|
2141 |
+
|
2142 |
+
}
|
2143 |
+
|
2144 |
+
}
|
2145 |
+
|
2146 |
+
}
|
2147 |
+
|
2148 |
+
return $false;
|
2149 |
+
|
2150 |
+
}
|
2151 |
+
|
2152 |
+
public function plugins_upgrade_check( $update_plugins ) {
|
2153 |
+
|
2154 |
+
if ( ! empty( $this->settings['repositories'] ) ) {
|
2155 |
+
|
2156 |
+
$plugins = get_plugins();
|
2157 |
+
|
2158 |
+
foreach ( $plugins as $plugin_id => $plugin ) {
|
2159 |
+
|
2160 |
+
$slug = dirname( $plugin_id );
|
2161 |
+
if ( empty( $slug ) ) {
|
2162 |
+
continue;
|
2163 |
+
}
|
2164 |
+
|
2165 |
+
$version = $plugin['Version'];
|
2166 |
+
$name = $plugin['Name'];
|
2167 |
+
|
2168 |
+
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
2169 |
+
|
2170 |
+
|
2171 |
+
if ( ! $this->repository_has_valid_subscription( $repository_id ) ) {
|
2172 |
+
$site_key = false;
|
2173 |
+
} else {
|
2174 |
+
$site_key = $repository['subscription']['key'];
|
2175 |
+
//$subscription_type = $this->get_subscription_type_for_repository($repository_id);
|
2176 |
+
}
|
2177 |
+
|
2178 |
+
foreach ( $repository['data']['packages'] as $package ) {
|
2179 |
+
|
2180 |
+
foreach ( $package['products'] as $product ) {
|
2181 |
+
|
2182 |
+
foreach ( $product['plugins'] as $plugin_slug ) {
|
2183 |
+
|
2184 |
+
$download = $this->settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $plugin_slug ];
|
2185 |
+
|
2186 |
+
if ( ! empty( $download['free-on-wporg'] ) && $download['channel'] == WP_Installer_Channels::CHANNEL_PRODUCTION ) {
|
2187 |
+
continue;
|
2188 |
+
}
|
2189 |
+
|
2190 |
+
$needs_version_update = version_compare( $download['version'], $version, '>' ) ||
|
2191 |
+
! empty( $_POST['reset_to_channel'] );
|
2192 |
+
|
2193 |
+
if (
|
2194 |
+
empty( $update_plugins->response[ $plugin_id ] ) &&
|
2195 |
+
( $download['slug'] == $slug || $download['name'] == $name ) &&
|
2196 |
+
$needs_version_update
|
2197 |
+
) {
|
2198 |
+
|
2199 |
+
$response = new stdClass();
|
2200 |
+
$response->id = 0;
|
2201 |
+
$response->slug = $slug;
|
2202 |
+
$response->plugin = $plugin_id;
|
2203 |
+
$response->new_version = $download['version'];
|
2204 |
+
$response->upgrade_notice = '';
|
2205 |
+
$response->url = $download['url'];
|
2206 |
+
if ( $site_key ) {
|
2207 |
+
$response->package = $this->append_site_key_to_download_url( $download['url'], $site_key, $repository_id );
|
2208 |
+
}
|
2209 |
+
$update_plugins->checked[ $plugin_id ] = $version;
|
2210 |
+
$update_plugins->response[ $plugin_id ] = $response;
|
2211 |
+
|
2212 |
+
}
|
2213 |
+
|
2214 |
+
}
|
2215 |
+
|
2216 |
+
}
|
2217 |
+
|
2218 |
+
}
|
2219 |
+
|
2220 |
+
}
|
2221 |
+
|
2222 |
+
}
|
2223 |
+
|
2224 |
+
}
|
2225 |
+
|
2226 |
+
return $update_plugins;
|
2227 |
+
|
2228 |
+
}
|
2229 |
+
|
2230 |
+
public function setup_plugins_page_notices() {
|
2231 |
+
|
2232 |
+
$plugins = get_plugins();
|
2233 |
+
|
2234 |
+
foreach ( $plugins as $plugin_id => $plugin ) {
|
2235 |
+
|
2236 |
+
$slug = dirname( $plugin_id );
|
2237 |
+
if ( empty( $slug ) ) {
|
2238 |
+
continue;
|
2239 |
+
}
|
2240 |
+
|
2241 |
+
$name = $plugin['Name'];
|
2242 |
+
|
2243 |
+
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
2244 |
+
|
2245 |
+
if ( ! $this->repository_has_valid_subscription( $repository_id ) ) {
|
2246 |
+
$site_key = false;
|
2247 |
+
} else {
|
2248 |
+
$site_key = $repository['subscription']['key'];
|
2249 |
+
}
|
2250 |
+
|
2251 |
+
foreach ( $repository['data']['packages'] as $package ) {
|
2252 |
+
|
2253 |
+
foreach ( $package['products'] as $product ) {
|
2254 |
+
|
2255 |
+
foreach ( $product['plugins'] as $plugin_slug ) {
|
2256 |
+
|
2257 |
+
$download = $this->settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $plugin_slug ];
|
2258 |
+
|
2259 |
+
if ( ! empty( $download['free-on-wporg'] ) && $download['channel'] == WP_Installer_Channels::CHANNEL_PRODUCTION ) {
|
2260 |
+
continue;
|
2261 |
+
}
|
2262 |
+
|
2263 |
+
if ( $download['slug'] == $slug || $download['name'] == $name ) {
|
2264 |
+
|
2265 |
+
if ( ! $site_key || ! $this->plugin_is_registered( $repository_id, $download['slug'] ) ) {
|
2266 |
+
add_action( "after_plugin_row_" . $plugin_id, array(
|
2267 |
+
$this,
|
2268 |
+
'show_purchase_notice_under_plugin'
|
2269 |
+
), 10, 3 );
|
2270 |
+
}
|
2271 |
+
|
2272 |
+
}
|
2273 |
+
|
2274 |
+
}
|
2275 |
+
|
2276 |
+
}
|
2277 |
+
|
2278 |
+
}
|
2279 |
+
|
2280 |
+
}
|
2281 |
+
|
2282 |
+
}
|
2283 |
+
|
2284 |
+
}
|
2285 |
+
|
2286 |
+
public function show_purchase_notice_under_plugin( $plugin_file, $plugin_data, $status ) {
|
2287 |
+
|
2288 |
+
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
2289 |
+
$wp_version = preg_replace( '/-(.+)$/', '', $GLOBALS['wp_version'] );
|
2290 |
+
|
2291 |
+
if ( version_compare( $wp_version, '4.6', '>=' ) ) {
|
2292 |
+
|
2293 |
+
?>
|
2294 |
+
<tr class="plugin-update-tr installer-plugin-update-tr">
|
2295 |
+
<td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="plugin-update colspanchange">
|
2296 |
+
<div class="notice inline notice-warning notice-alt">
|
2297 |
+
<p class="installer-q-icon">
|
2298 |
+
<?php printf( __( 'You must have a valid subscription in order to get upgrades or support for this plugin. %sPurchase a subscription or enter an existing site key%s.', 'installer' ),
|
2299 |
+
'<a href="' . $this->menu_url() . '">', '</a>' ); ?>
|
2300 |
+
</p>
|
2301 |
+
</div>
|
2302 |
+
</td>
|
2303 |
+
</tr>
|
2304 |
+
<?php
|
2305 |
+
|
2306 |
+
} else {
|
2307 |
+
|
2308 |
+
?>
|
2309 |
+
<tr class="plugin-update-tr">
|
2310 |
+
<td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="plugin-update colspanchange">
|
2311 |
+
<div class="update-message installer-q-icon">
|
2312 |
+
<?php printf( __( 'You must have a valid subscription in order to get upgrades or support for this plugin. %sPurchase a subscription or enter an existing site key%s.', 'installer' ),
|
2313 |
+
'<a href="' . $this->menu_url() . '">', '</a>' ); ?>
|
2314 |
+
</div>
|
2315 |
+
</td>
|
2316 |
+
</tr>
|
2317 |
+
<?php
|
2318 |
+
|
2319 |
+
}
|
2320 |
+
|
2321 |
+
}
|
2322 |
+
|
2323 |
+
public function localize_strings() {
|
2324 |
+
|
2325 |
+
if ( ! empty( $this->settings['repositories'] ) ) {
|
2326 |
+
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
2327 |
+
//set name as call2action when don't have any
|
2328 |
+
//products
|
2329 |
+
foreach ( $repository['data']['packages'] as $package_id => $package ) {
|
2330 |
+
foreach ( $package['products'] as $product_id => $product ) {
|
2331 |
+
if ( empty( $product['call2action'] ) ) {
|
2332 |
+
$this->settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['call2action'] = $product['name'];
|
2333 |
+
}
|
2334 |
+
|
2335 |
+
foreach ( $product['upgrades'] as $idx => $upg ) {
|
2336 |
+
if ( empty( $upg['call2action'] ) ) {
|
2337 |
+
$this->settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['upgrades'][ $idx ]['call2action'] = $upg['name'];
|
2338 |
+
}
|
2339 |
+
}
|
2340 |
+
|
2341 |
+
foreach ( $product['renewals'] as $idx => $rnw ) {
|
2342 |
+
if ( empty( $rnw['call2action'] ) ) {
|
2343 |
+
$this->settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['renewals'][ $idx ]['call2action'] = $rnw['name'];
|
2344 |
+
}
|
2345 |
+
|
2346 |
+
}
|
2347 |
+
|
2348 |
+
}
|
2349 |
+
}
|
2350 |
+
}
|
2351 |
+
}
|
2352 |
+
|
2353 |
+
global $sitepress;
|
2354 |
+
if ( is_null( $sitepress ) ) {
|
2355 |
+
return;
|
2356 |
+
}
|
2357 |
+
|
2358 |
+
// default strings are always in English
|
2359 |
+
$user_admin_language = $sitepress->get_admin_language();
|
2360 |
+
|
2361 |
+
if ( $user_admin_language != 'en' ) {
|
2362 |
+
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
2363 |
+
|
2364 |
+
$localization = $repository['data']['localization'];
|
2365 |
+
|
2366 |
+
//packages
|
2367 |
+
foreach ( $repository['data']['packages'] as $package_id => $package ) {
|
2368 |
+
|
2369 |
+
if ( isset( $localization['packages'][ $package_id ]['name'][ $user_admin_language ] ) ) {
|
2370 |
+
$this->settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['name'] = $localization['packages'][ $package_id ]['name'][ $user_admin_language ];
|
2371 |
+
}
|
2372 |
+
if ( isset( $localization['packages'][ $package_id ]['description'][ $user_admin_language ] ) ) {
|
2373 |
+
$this->settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['description'] = $localization['packages'][ $package_id ]['description'][ $user_admin_language ];
|
2374 |
+
}
|
2375 |
+
|
2376 |
+
}
|
2377 |
+
|
2378 |
+
//products
|
2379 |
+
foreach ( $repository['data']['packages'] as $package_id => $package ) {
|
2380 |
+
foreach ( $package['products'] as $product_id => $product ) {
|
2381 |
+
|
2382 |
+
if ( isset( $localization['products'][ $product_id ]['name'][ $user_admin_language ] ) ) {
|
2383 |
+
$this->settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['name']
|
2384 |
+
= $localization['products'][ $product_id ]['name'][ $user_admin_language ];
|
2385 |
+
}
|
2386 |
+
if ( isset( $localization['products'][ $product_id ]['description'][ $user_admin_language ] ) ) {
|
2387 |
+
$this->settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['description']
|
2388 |
+
= $localization['products'][ $product_id ]['description'][ $user_admin_language ];
|
2389 |
+
}
|
2390 |
+
if ( isset( $localization['products'][ $product_id ]['call2action'][ $user_admin_language ] ) ) {
|
2391 |
+
$this->settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['name']
|
2392 |
+
= $localization['products'][ $product_id ]['call2action'][ $user_admin_language ];
|
2393 |
+
}
|
2394 |
+
|
2395 |
+
|
2396 |
+
}
|
2397 |
+
}
|
2398 |
+
|
2399 |
+
//subscription info
|
2400 |
+
if ( isset( $repository['data']['subscriptions_meta']['expiration'] ) ) {
|
2401 |
+
foreach ( $repository['data']['subscriptions_meta']['expiration'] as $subscription_id => $note ) {
|
2402 |
+
if ( isset( $localization['subscriptions-notes'][ $subscription_id ]['expiration-warning'][ $user_admin_language ] ) ) {
|
2403 |
+
$this->settings['repositories'][ $repository_id ]['data']['subscriptions_meta']['expiration'][ $subscription_id ]['warning_message']
|
2404 |
+
= $localization['subscriptions-notes'][ $subscription_id ]['expiration-warning'][ $user_admin_language ];
|
2405 |
+
}
|
2406 |
+
}
|
2407 |
+
}
|
2408 |
+
|
2409 |
+
}
|
2410 |
+
}
|
2411 |
+
|
2412 |
+
}
|
2413 |
+
|
2414 |
+
public function get_matching_cp( $repository, $args = array() ) {
|
2415 |
+
$match = false;
|
2416 |
+
|
2417 |
+
|
2418 |
+
$cp_name = $cp_author = false;
|
2419 |
+
|
2420 |
+
if ( isset( $this->config['src_name'] ) && isset( $this->config['src_author'] ) ) {
|
2421 |
+
|
2422 |
+
$cp_name = $this->config['src_name'];
|
2423 |
+
$cp_author = $this->config['src_author'];
|
2424 |
+
|
2425 |
+
} elseif ( isset( $args['src_name'] ) && isset( $args['src_author'] ) ) {
|
2426 |
+
|
2427 |
+
$cp_name = $args['src_name'];
|
2428 |
+
$cp_author = $args['src_author'];
|
2429 |
+
|
2430 |
+
}
|
2431 |
+
|
2432 |
+
if ( isset( $repository['data']['marketing_cp'] ) ) {
|
2433 |
+
|
2434 |
+
foreach ( $repository['data']['marketing_cp'] as $cp ) {
|
2435 |
+
|
2436 |
+
if ( ! empty( $cp['exp'] ) && time() > $cp['exp'] ) {
|
2437 |
+
continue;
|
2438 |
+
}
|
2439 |
+
|
2440 |
+
//Use theme_name for plugins too
|
2441 |
+
if ( ! empty( $cp['theme_name'] ) ) {
|
2442 |
+
if ( $cp['author_name'] == $cp_author && $cp['theme_name'] == $cp_name ) {
|
2443 |
+
$match = $cp;
|
2444 |
+
continue;
|
2445 |
+
}
|
2446 |
+
} else {
|
2447 |
+
if ( $cp['author_name'] == $cp_author ) {
|
2448 |
+
$match = $cp;
|
2449 |
+
continue;
|
2450 |
+
}
|
2451 |
+
}
|
2452 |
+
|
2453 |
+
}
|
2454 |
+
|
2455 |
+
}
|
2456 |
+
|
2457 |
+
return $match;
|
2458 |
+
}
|
2459 |
+
|
2460 |
+
public function set_filtered_prices( $args = array() ) {
|
2461 |
+
|
2462 |
+
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
2463 |
+
|
2464 |
+
$match = $this->get_matching_cp( $repository, $args );
|
2465 |
+
|
2466 |
+
if ( empty( $match ) ) {
|
2467 |
+
continue;
|
2468 |
+
}
|
2469 |
+
|
2470 |
+
foreach ( $repository['data']['packages'] as $package_id => $package ) {
|
2471 |
+
|
2472 |
+
foreach ( $package['products'] as $product_id => $product ) {
|
2473 |
+
|
2474 |
+
if ( $match['dtp'] == '%' ) {
|
2475 |
+
$fprice = round( $product['price'] * ( 1 - $match['amt'] / 100 ), 2 );
|
2476 |
+
$fprice = $fprice != round( $fprice ) ? sprintf( '%.2f', $fprice ) : round( $fprice, 0 );
|
2477 |
+
} elseif ( $match['dtp'] == '-' ) {
|
2478 |
+
$fprice = $product['price'] - $match['amt'];
|
2479 |
+
} else {
|
2480 |
+
$fprice = $product['price'];
|
2481 |
+
}
|
2482 |
+
|
2483 |
+
if ( $fprice ) {
|
2484 |
+
$this->settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['price_disc'] = $fprice;
|
2485 |
+
|
2486 |
+
$url_glue = false !== strpos( $this->settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['url'], '?' ) ? '&' : '?';
|
2487 |
+
$cpndata = base64_encode( json_encode( array(
|
2488 |
+
'theme_author' => $match['author_name'],
|
2489 |
+
'theme_name' => $match['theme_name'],
|
2490 |
+
'vlc' => $match['vlc']
|
2491 |
+
) ) );
|
2492 |
+
$this->settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['url'] .= $url_glue . 'cpn=' . $cpndata;
|
2493 |
+
|
2494 |
+
foreach ( $product['upgrades'] as $upgrade_id => $upgrade ) {
|
2495 |
+
|
2496 |
+
$fprice = false;
|
2497 |
+
if ( $match['dtp'] == '%' ) {
|
2498 |
+
$fprice = round( $upgrade['price'] * ( 1 - $match['amt'] / 100 ), 2 );
|
2499 |
+
$fprice = $fprice != round( $fprice ) ? sprintf( '%.2f', $fprice ) : round( $fprice, 0 );
|
2500 |
+
} elseif ( $match['dtp'] == '-' ) {
|
2501 |
+
$fprice = $upgrade['price'] - $match['amt'];
|
2502 |
+
}
|
2503 |
+
if ( $fprice ) {
|
2504 |
+
$this->settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['upgrades'][ $upgrade_id ]['price_disc'] = $fprice;
|
2505 |
+
$this->settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['upgrades'][ $upgrade_id ]['url'] .= $url_glue . 'cpn=' . $cpndata;
|
2506 |
+
}
|
2507 |
+
|
2508 |
+
|
2509 |
+
}
|
2510 |
+
|
2511 |
+
}
|
2512 |
+
|
2513 |
+
}
|
2514 |
+
|
2515 |
+
}
|
2516 |
+
|
2517 |
+
}
|
2518 |
+
|
2519 |
+
}
|
2520 |
+
|
2521 |
+
public function set_hierarchy_and_order() {
|
2522 |
+
|
2523 |
+
//2 levels
|
2524 |
+
if ( ! empty( $this->settings['repositories'] ) ) {
|
2525 |
+
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
2526 |
+
|
2527 |
+
if ( empty( $repository['data']['packages'] ) ) {
|
2528 |
+
continue;
|
2529 |
+
}
|
2530 |
+
|
2531 |
+
$all_packages = $repository['data']['packages'];
|
2532 |
+
$ordered_packages = array();
|
2533 |
+
|
2534 |
+
//backward compatibility - 'order'
|
2535 |
+
foreach ( $all_packages as $k => $v ) {
|
2536 |
+
if ( ! isset( $v['order'] ) ) {
|
2537 |
+
$all_packages[ $k ]['order'] = 0;
|
2538 |
+
}
|
2539 |
+
}
|
2540 |
+
|
2541 |
+
//select parents
|
2542 |
+
foreach ( $all_packages as $package_id => $package ) {
|
2543 |
+
if ( empty( $package['parent'] ) ) {
|
2544 |
+
$ordered_packages[ $package_id ] = $package;
|
2545 |
+
}
|
2546 |
+
}
|
2547 |
+
|
2548 |
+
//add sub-packages
|
2549 |
+
foreach ( $all_packages as $package_id => $package ) {
|
2550 |
+
if ( ! empty( $package['parent'] ) ) {
|
2551 |
+
if ( isset( $ordered_packages[ $package['parent'] ] ) ) {
|
2552 |
+
$ordered_packages[ $package['parent'] ]['sub-packages'][ $package_id ] = $package;
|
2553 |
+
}
|
2554 |
+
}
|
2555 |
+
}
|
2556 |
+
|
2557 |
+
// order parents
|
2558 |
+
usort( $ordered_packages, array( $this, '_order_packages_callback' ) );
|
2559 |
+
//order sub-packages
|
2560 |
+
foreach ( $ordered_packages as $package_id => $package ) {
|
2561 |
+
if ( ! empty( $package['sub-packages'] ) ) {
|
2562 |
+
usort( $ordered_packages[ $package_id ]['sub-packages'], create_function( '$a, $b', 'return $a[\'order\'] > $b[\'order\'];' ) );
|
2563 |
+
}
|
2564 |
+
}
|
2565 |
+
|
2566 |
+
$this->settings['repositories'][ $repository_id ]['data']['packages'] = $ordered_packages;
|
2567 |
+
|
2568 |
+
|
2569 |
+
}
|
2570 |
+
}
|
2571 |
+
|
2572 |
+
|
2573 |
+
}
|
2574 |
+
|
2575 |
+
public function _order_packages_callback( $a, $b ) {
|
2576 |
+
return $a['order'] > $b['order'];
|
2577 |
+
}
|
2578 |
+
|
2579 |
+
public function get_support_tag_by_name( $name, $repository ) {
|
2580 |
+
|
2581 |
+
if ( is_array( $this->settings['repositories'][ $repository ]['data']['support_tags'] ) ) {
|
2582 |
+
foreach ( $this->settings['repositories'][ $repository ]['data']['support_tags'] as $support_tag ) {
|
2583 |
+
if ( $support_tag['name'] == $name ) {
|
2584 |
+
return $support_tag['url'];
|
2585 |
+
}
|
2586 |
+
}
|
2587 |
+
}
|
2588 |
+
|
2589 |
+
return false;
|
2590 |
+
}
|
2591 |
+
|
2592 |
+
public function plugin_upgrade_custom_errors() {
|
2593 |
+
|
2594 |
+
if ( isset( $_REQUEST['action'] ) ) {
|
2595 |
+
|
2596 |
+
$action = isset( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : '';
|
2597 |
+
|
2598 |
+
//bulk mode
|
2599 |
+
if ( 'update-selected' == $action ) {
|
2600 |
+
|
2601 |
+
global $plugins;
|
2602 |
+
|
2603 |
+
if ( isset( $plugins ) && is_array( $plugins ) ) {
|
2604 |
+
|
2605 |
+
foreach ( $plugins as $k => $plugin ) {
|
2606 |
+
$plugin_repository = false;
|
2607 |
+
|
2608 |
+
$wp_plugin_slug = dirname( $plugin );
|
2609 |
+
|
2610 |
+
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
2611 |
+
|
2612 |
+
foreach ( $repository['data']['packages'] as $package ) {
|
2613 |
+
|
2614 |
+
foreach ( $package['products'] as $product ) {
|
2615 |
+
|
2616 |
+
foreach ( $product['plugins'] as $plugin_slug ) {
|
2617 |
+
|
2618 |
+
$download = $this->settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $plugin_slug ];
|
2619 |
+
|
2620 |
+
if ( $download['slug'] == $wp_plugin_slug ) {
|
2621 |
+
$plugin_repository = $repository_id;
|
2622 |
+
$product_name = $repository['data']['product-name'];
|
2623 |
+
$plugin_name = $download['name'];
|
2624 |
+
$free_on_wporg = ! empty( $download['free-on-wporg'] ) && $download['channel'] == WP_Installer_Channels::CHANNEL_PRODUCTION;
|
2625 |
+
break;
|
2626 |
+
}
|
2627 |
+
|
2628 |
+
}
|
2629 |
+
|
2630 |
+
}
|
2631 |
+
|
2632 |
+
}
|
2633 |
+
|
2634 |
+
}
|
2635 |
+
|
2636 |
+
if ( $plugin_repository ) {
|
2637 |
+
|
2638 |
+
//validate subscription
|
2639 |
+
static $sub_cache = array();
|
2640 |
+
|
2641 |
+
if ( empty( $sub_cache[ $plugin_repository ] ) ) {
|
2642 |
+
$site_key = $this->get_repository_site_key( $plugin_repository );
|
2643 |
+
if ( $site_key ) {
|
2644 |
+
$subscription_data = $this->fetch_subscription_data( $plugin_repository, $site_key, self::SITE_KEY_VALIDATION_SOURCE_REVALIDATION );
|
2645 |
+
}
|
2646 |
+
|
2647 |
+
$sub_cache[ $plugin_repository ]['site_key'] = $site_key;
|
2648 |
+
$sub_cache[ $plugin_repository ]['subscription_data'] = isset( $subscription_data ) ? $subscription_data : false;
|
2649 |
+
} else {
|
2650 |
+
|
2651 |
+
$site_key = $sub_cache[ $plugin_repository ]['site_key'];
|
2652 |
+
$subscription_data = $sub_cache[ $plugin_repository ]['subscription_data'];
|
2653 |
+
|
2654 |
+
}
|
2655 |
+
|
2656 |
+
if ( ! $site_key && ! empty( $free_on_wporg ) ) { // allow the download from wp.org
|
2657 |
+
continue;
|
2658 |
+
}
|
2659 |
+
|
2660 |
+
if ( empty( $site_key ) || empty( $subscription_data ) ) {
|
2661 |
+
|
2662 |
+
|
2663 |
+
$error_message = sprintf( __( "%s cannot update because your site's registration is not valid. Please %sregister %s%s again for this site first.", 'installer' ),
|
2664 |
+
'<strong>' . $plugin_name . '</strong>', '<a target="_top" href="' . $this->menu_url() . '&validate_repository=' . $plugin_repository .
|
2665 |
+
'#repository-' . $plugin_repository . '">', $product_name, '</a>' );
|
2666 |
+
|
2667 |
+
echo '<div class="updated error"><p>' . $error_message . '</p></div>';
|
2668 |
+
|
2669 |
+
unset( $plugins[ $k ] );
|
2670 |
+
|
2671 |
+
|
2672 |
+
}
|
2673 |
+
|
2674 |
+
}
|
2675 |
+
|
2676 |
+
}
|
2677 |
+
|
2678 |
+
}
|
2679 |
+
|
2680 |
+
}
|
2681 |
+
|
2682 |
+
|
2683 |
+
if ( 'upgrade-plugin' == $action || 'update-plugin' == $action ) {
|
2684 |
+
|
2685 |
+
$plugin = isset( $_REQUEST['plugin'] ) ? trim( sanitize_text_field( $_REQUEST['plugin'] ) ) : '';
|
2686 |
+
|
2687 |
+
$wp_plugin_slug = dirname( $plugin );
|
2688 |
+
|
2689 |
+
$plugin_repository = false;
|
2690 |
+
|
2691 |
+
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
2692 |
+
|
2693 |
+
foreach ( $repository['data']['packages'] as $package ) {
|
2694 |
+
|
2695 |
+
foreach ( $package['products'] as $product ) {
|
2696 |
+
|
2697 |
+
foreach ( $product['plugins'] as $plugin_slug ) {
|
2698 |
+
$download = $this->settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $plugin_slug ];
|
2699 |
+
|
2700 |
+
//match by folder, will change to match by name and folder
|
2701 |
+
if ( $download['slug'] == $wp_plugin_slug ) {
|
2702 |
+
$plugin_repository = $repository_id;
|
2703 |
+
$product_name = $repository['data']['product-name'];
|
2704 |
+
$plugin_name = $download['name'];
|
2705 |
+
$free_on_wporg = ! empty( $download['free-on-wporg'] ) && $download['channel'] == WP_Installer_Channels::CHANNEL_PRODUCTION;
|
2706 |
+
break;
|
2707 |
+
}
|
2708 |
+
|
2709 |
+
}
|
2710 |
+
|
2711 |
+
}
|
2712 |
+
|
2713 |
+
}
|
2714 |
+
|
2715 |
+
}
|
2716 |
+
|
2717 |
+
if ( $plugin_repository ) {
|
2718 |
+
|
2719 |
+
//validate subscription
|
2720 |
+
$site_key = $this->get_repository_site_key( $plugin_repository );
|
2721 |
+
if ( $site_key ) {
|
2722 |
+
$subscription_data = $this->fetch_subscription_data( $plugin_repository, $site_key, self::SITE_KEY_VALIDATION_SOURCE_REVALIDATION );
|
2723 |
+
}
|
2724 |
+
|
2725 |
+
if ( ( empty( $site_key ) || empty( $subscription_data ) ) && empty( $free_on_wporg ) ) {
|
2726 |
+
|
2727 |
+
$error_message = sprintf( __( "%s cannot update because your site's registration is not valid. Please %sregister %s%s again for this site first.", 'installer' ),
|
2728 |
+
'<strong>' . $plugin_name . '</strong>', '<a href="' . $this->menu_url() . '&validate_repository=' . $plugin_repository .
|
2729 |
+
'#repository-' . $plugin_repository . '">', $product_name, '</a>' );
|
2730 |
+
|
2731 |
+
if ( defined( 'DOING_AJAX' ) ) { //WP 4.2
|
2732 |
+
|
2733 |
+
$status = array(
|
2734 |
+
'update' => 'plugin',
|
2735 |
+
'plugin' => $plugin,
|
2736 |
+
'slug' => sanitize_key( $_POST['slug'] ),
|
2737 |
+
'oldVersion' => '',
|
2738 |
+
'newVersion' => '',
|
2739 |
+
);
|
2740 |
+
|
2741 |
+
$status['errorCode'] = 'wp_installer_invalid_subscription';
|
2742 |
+
$status['error'] = $error_message;
|
2743 |
+
|
2744 |
+
wp_send_json_error( $status );
|
2745 |
+
|
2746 |
+
} else { // WP 4.1.1
|
2747 |
+
echo '<div class="updated error"><p>' . $error_message . '</p></div>';
|
2748 |
+
|
2749 |
+
|
2750 |
+
echo '<div class="wrap">';
|
2751 |
+
echo '<h2>' . __( 'Update Plugin', 'installer' ) . '</h2>';
|
2752 |
+
echo '<a href="' . admin_url( 'plugins.php' ) . '">' . __( 'Return to the plugins page', 'installer' ) . '</a>';
|
2753 |
+
echo '</div>';
|
2754 |
+
require_once( ABSPATH . 'wp-admin/admin-footer.php' );
|
2755 |
+
exit;
|
2756 |
+
|
2757 |
+
}
|
2758 |
+
|
2759 |
+
}
|
2760 |
+
|
2761 |
+
|
2762 |
+
}
|
2763 |
+
|
2764 |
+
}
|
2765 |
+
}
|
2766 |
+
|
2767 |
+
}
|
2768 |
+
|
2769 |
+
}
|
library/otgs/installer/includes/functions-core.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function WP_Installer(){
|
4 |
+
return WP_Installer::instance();
|
5 |
+
}
|
6 |
+
|
7 |
+
function WP_Installer_Channels(){
|
8 |
+
return WP_Installer_Channels::instance();
|
9 |
+
}
|
library/otgs/installer/includes/functions-templates.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// Ext function
|
4 |
+
function WP_Installer_Show_Products($args = array()){
|
5 |
+
WP_Installer()->show_products($args);
|
6 |
+
}
|
library/otgs/installer/includes/installer-upgrader-skins.php
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Installer_Upgrader_Skins extends WP_Upgrader_Skin{
|
3 |
-
|
4 |
-
function __construct($args = array()){
|
5 |
-
$defaults = array( 'url' => '', 'nonce' => '', 'title' => '', 'context' => false );
|
6 |
-
$this->options = wp_parse_args($args, $defaults);
|
7 |
-
}
|
8 |
-
|
9 |
-
function header(){
|
10 |
-
|
11 |
-
}
|
12 |
-
|
13 |
-
function footer(){
|
14 |
-
|
15 |
-
}
|
16 |
-
|
17 |
-
function error($error){
|
18 |
-
$this->installer_error = $error;
|
19 |
-
}
|
20 |
-
|
21 |
-
function add_strings(){
|
22 |
-
|
23 |
-
}
|
24 |
-
|
25 |
-
function feedback($string){
|
26 |
-
|
27 |
-
}
|
28 |
-
|
29 |
-
function before(){
|
30 |
-
|
31 |
-
}
|
32 |
-
|
33 |
-
function after(){
|
34 |
-
|
35 |
-
}
|
36 |
-
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
library/otgs/installer/includes/installer.class.php
DELETED
@@ -1,2672 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
final class WP_Installer{
|
4 |
-
protected static $_instance = null;
|
5 |
-
|
6 |
-
public $settings = array();
|
7 |
-
|
8 |
-
private $repositories = array();
|
9 |
-
|
10 |
-
protected $api_debug = '';
|
11 |
-
|
12 |
-
private $config = array();
|
13 |
-
|
14 |
-
protected $_plugins_renew_warnings = array();
|
15 |
-
|
16 |
-
protected $_gz_on = false;
|
17 |
-
|
18 |
-
private $admin_messages = array();
|
19 |
-
|
20 |
-
private $_using_icl = false;
|
21 |
-
private $_wpml_version = false;
|
22 |
-
|
23 |
-
private $package_source = array();
|
24 |
-
|
25 |
-
const SITE_KEY_VALIDATION_SOURCE_OTHER = 0;
|
26 |
-
const SITE_KEY_VALIDATION_SOURCE_DOWNLOAD_SPECIFIC = 1;
|
27 |
-
const SITE_KEY_VALIDATION_SOURCE_DOWNLOAD_REPORT = 2;
|
28 |
-
const SITE_KEY_VALIDATION_SOURCE_REGISTRATION = 3;
|
29 |
-
const SITE_KEY_VALIDATION_SOURCE_REVALIDATION = 4;
|
30 |
-
const SITE_KEY_VALIDATION_SOURCE_UPDATES_CHECK = 5;
|
31 |
-
|
32 |
-
public $dependencies;
|
33 |
-
|
34 |
-
public static function instance() {
|
35 |
-
|
36 |
-
if ( is_null( self::$_instance ) ) {
|
37 |
-
self::$_instance = new self();
|
38 |
-
}
|
39 |
-
|
40 |
-
return self::$_instance;
|
41 |
-
}
|
42 |
-
|
43 |
-
public function __construct(){
|
44 |
-
|
45 |
-
if(!is_admin() || !is_user_logged_in()) return; //Only for admin
|
46 |
-
|
47 |
-
$this->_gz_on = function_exists('gzuncompress') && function_exists('gzcompress');
|
48 |
-
$this->settings = $this->get_settings();
|
49 |
-
|
50 |
-
add_action('admin_notices', array($this, 'show_site_key_nags'));
|
51 |
-
|
52 |
-
add_action('admin_notices', array($this, 'show_admin_messages'));
|
53 |
-
|
54 |
-
add_action('admin_init', array($this, 'load_embedded_plugins'), 0);
|
55 |
-
|
56 |
-
add_action('admin_menu', array($this, 'menu_setup'));
|
57 |
-
add_action('network_admin_menu', array($this, 'menu_setup'));
|
58 |
-
|
59 |
-
if(defined('DOING_AJAX') && isset($_POST['action']) && $_POST['action'] == 'installer_download_plugin'){
|
60 |
-
add_filter( 'site_transient_update_plugins', array( $this, 'plugins_upgrade_check') );
|
61 |
-
}
|
62 |
-
add_filter('plugins_api', array( $this, 'custom_plugins_api_call'), 10, 3);
|
63 |
-
add_filter('pre_set_site_transient_update_plugins', array( $this, 'plugins_upgrade_check'));
|
64 |
-
|
65 |
-
// register repositories
|
66 |
-
$this->load_repositories_list();
|
67 |
-
|
68 |
-
if( empty($this->settings['last_repositories_update']) || time() - $this->settings['last_repositories_update'] > 86400
|
69 |
-
|| ( isset($_GET['force-check']) && $_GET['force-check'] == 1 ) ){
|
70 |
-
$this->refresh_repositories_data();
|
71 |
-
}
|
72 |
-
|
73 |
-
// default config
|
74 |
-
$this->config['plugins_install_tab'] = false;
|
75 |
-
|
76 |
-
add_action('init', array($this, 'init'));
|
77 |
-
|
78 |
-
//add_filter('wp_installer_buy_url', array($this, 'append_parameters_to_buy_url'));
|
79 |
-
|
80 |
-
add_action('init', array($this,'load_locale'));
|
81 |
-
|
82 |
-
}
|
83 |
-
|
84 |
-
public function get_repositories() {
|
85 |
-
|
86 |
-
return $this->repositories;
|
87 |
-
|
88 |
-
}
|
89 |
-
|
90 |
-
public function set_config($key, $value){
|
91 |
-
|
92 |
-
$this->config[$key] = $value;
|
93 |
-
|
94 |
-
}
|
95 |
-
|
96 |
-
public function init(){
|
97 |
-
global $pagenow;
|
98 |
-
|
99 |
-
$this->dependencies = new Installer_Dependencies;
|
100 |
-
|
101 |
-
if(empty($this->settings['_pre_1_0_clean_up'])) {
|
102 |
-
$this->_pre_1_0_clean_up();
|
103 |
-
}
|
104 |
-
|
105 |
-
$this->settings = $this->_old_products_format_backwards_compatibility($this->settings);
|
106 |
-
|
107 |
-
if ( !function_exists( 'get_plugins' ) ) {
|
108 |
-
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
109 |
-
}
|
110 |
-
|
111 |
-
$this->_using_icl = function_exists('wpml_site_uses_icl') && wpml_site_uses_icl();
|
112 |
-
$this->_wpml_version = defined('ICL_SITEPRESS_VERSION') ? ICL_SITEPRESS_VERSION : '';
|
113 |
-
|
114 |
-
wp_enqueue_script('installer-admin', $this->res_url() . '/res/js/admin.js', array('jquery'), $this->version());
|
115 |
-
wp_enqueue_style('installer-admin', $this->res_url() . '/res/css/admin.css', array(), $this->version());
|
116 |
-
|
117 |
-
$translation_array = array(
|
118 |
-
'installing' => __( 'Installing %s', 'installer' ),
|
119 |
-
'updating' => __( 'Updating %s', 'installer' ),
|
120 |
-
'activating' => __( 'Activating %s', 'installer' )
|
121 |
-
);
|
122 |
-
|
123 |
-
wp_localize_script( 'installer-admin', 'installer_strings', $translation_array );
|
124 |
-
|
125 |
-
if($pagenow == 'plugins.php'){
|
126 |
-
add_action('admin_notices', array($this, 'setup_plugins_page_notices'));
|
127 |
-
add_action('admin_notices', array($this, 'setup_plugins_renew_warnings'), 10);
|
128 |
-
add_action('admin_notices', array($this, 'queue_plugins_renew_warnings'), 20);
|
129 |
-
|
130 |
-
add_action('admin_init', array($this, 'setup_plugins_action_links'));
|
131 |
-
|
132 |
-
}
|
133 |
-
|
134 |
-
if($this->is_repositories_page()){
|
135 |
-
add_action('admin_init', array($this, 'validate_repository_subscription'));
|
136 |
-
}
|
137 |
-
|
138 |
-
if(defined('DOING_AJAX')){
|
139 |
-
add_action('wp_ajax_save_site_key', array($this, 'save_site_key'));
|
140 |
-
add_action('wp_ajax_remove_site_key', array($this, 'remove_site_key_ajax'));
|
141 |
-
add_action('wp_ajax_update_site_key', array($this, 'update_site_key'));
|
142 |
-
|
143 |
-
add_action('wp_ajax_installer_download_plugin', array($this, 'download_plugin_ajax_handler'));
|
144 |
-
add_action('wp_ajax_installer_activate_plugin', array($this, 'activate_plugin'));
|
145 |
-
|
146 |
-
add_action('wp_ajax_installer_dismiss_nag', array($this, 'dismiss_nag'));
|
147 |
-
}
|
148 |
-
|
149 |
-
if($pagenow == 'update.php'){
|
150 |
-
if(isset($_GET['action']) && $_GET['action'] == 'update-selected'){
|
151 |
-
add_action('admin_head', array($this, 'plugin_upgrade_custom_errors')); //iframe/bulk
|
152 |
-
}else{
|
153 |
-
add_action('all_admin_notices', array($this, 'plugin_upgrade_custom_errors')); //regular/singular
|
154 |
-
}
|
155 |
-
}
|
156 |
-
|
157 |
-
// WP 4.2
|
158 |
-
if(defined('DOING_AJAX')){
|
159 |
-
add_action('wp_ajax_update-plugin', array($this, 'plugin_upgrade_custom_errors'), 0); // high priority, before WP
|
160 |
-
}
|
161 |
-
|
162 |
-
//Include theme support
|
163 |
-
include_once $this->plugin_path() . '/includes/class-installer-theme.php';
|
164 |
-
|
165 |
-
// Extra information about the source of Installer
|
166 |
-
$package_source_file = $this->plugin_path() . '/installer-source.json';
|
167 |
-
if( file_exists( $package_source_file ) ){
|
168 |
-
WP_Filesystem();
|
169 |
-
global $wp_filesystem;
|
170 |
-
$this->package_source = json_decode( $wp_filesystem->get_contents( $package_source_file ) );
|
171 |
-
}
|
172 |
-
}
|
173 |
-
|
174 |
-
protected function log($message){
|
175 |
-
require_once ABSPATH . 'wp-admin/includes/file.php';
|
176 |
-
WP_Filesystem();
|
177 |
-
global $wp_filesystem;
|
178 |
-
if( defined('WPML_INSTALLER_LOGGING') && WPML_INSTALLER_LOGGING ){
|
179 |
-
$wp_filesystem->put_contents( $this->plugin_path() . '/installer.log', current_time( 'mysql' ) . "\t" . $message . "\n" );
|
180 |
-
}
|
181 |
-
}
|
182 |
-
|
183 |
-
public function register_admin_message($text, $type = 'updated'){
|
184 |
-
$this->admin_messages[] = array('text' => $text, 'type' => $type);
|
185 |
-
}
|
186 |
-
|
187 |
-
public function show_admin_messages(){
|
188 |
-
if(!empty($this->admin_messages)){
|
189 |
-
$types = array( 'error', 'updated', 'notice' );
|
190 |
-
foreach($this->admin_messages as $message){
|
191 |
-
$class = in_array( $message['type'], $types ) ? $message['type'] : 'updated';
|
192 |
-
?>
|
193 |
-
<div class="<?php echo $class ?>">
|
194 |
-
<p>
|
195 |
-
<?php echo $message['text'] ?>
|
196 |
-
</p>
|
197 |
-
</div>
|
198 |
-
<?php
|
199 |
-
}
|
200 |
-
}
|
201 |
-
}
|
202 |
-
|
203 |
-
public function load_locale(){
|
204 |
-
if( function_exists('get_user_locale') ){
|
205 |
-
$locale = get_user_locale();
|
206 |
-
}else{
|
207 |
-
$locale = get_locale();
|
208 |
-
}
|
209 |
-
$locale = apply_filters( 'plugin_locale', $locale, 'installer' );
|
210 |
-
$mo_file = $this->plugin_path() . '/locale/installer-' . $locale . '.mo';
|
211 |
-
if(file_exists($mo_file)){
|
212 |
-
load_textdomain( 'installer', $mo_file );
|
213 |
-
}
|
214 |
-
}
|
215 |
-
|
216 |
-
public function load_embedded_plugins(){
|
217 |
-
if(file_exists($this->plugin_path() . '/embedded-plugins' )) {
|
218 |
-
include_once $this->plugin_path() . '/embedded-plugins/embedded-plugins.class.php';
|
219 |
-
$this->installer_embedded_plugins = new Installer_Embedded_Plugins();
|
220 |
-
}
|
221 |
-
}
|
222 |
-
|
223 |
-
public function menu_setup(){
|
224 |
-
global $pagenow;
|
225 |
-
|
226 |
-
if(is_multisite() && !is_network_admin()){
|
227 |
-
$this->menu_multisite_redirect();
|
228 |
-
add_options_page(__('Installer', 'installer'), __('Installer', 'installer'), 'manage_options', 'installer', array($this, 'show_products')) ;
|
229 |
-
}else{
|
230 |
-
if($this->config['plugins_install_tab'] && is_admin() && $pagenow == 'plugin-install.php'){
|
231 |
-
// Default GUI, under Plugins -> Install
|
232 |
-
add_filter('install_plugins_tabs', array($this, 'add_install_plugins_tab'));
|
233 |
-
add_action('install_plugins_commercial', array($this, 'show_products'));
|
234 |
-
}
|
235 |
-
}
|
236 |
-
|
237 |
-
}
|
238 |
-
|
239 |
-
public function menu_url(){
|
240 |
-
if(is_multisite()){
|
241 |
-
if(is_network_admin()){
|
242 |
-
$url = network_admin_url('plugin-install.php?tab=commercial');
|
243 |
-
}else{
|
244 |
-
$url = admin_url('options-general.php?page=installer');
|
245 |
-
}
|
246 |
-
}else{
|
247 |
-
$url = admin_url('plugin-install.php?tab=commercial');
|
248 |
-
}
|
249 |
-
return $url;
|
250 |
-
}
|
251 |
-
|
252 |
-
private function menu_multisite_redirect(){
|
253 |
-
global $pagenow;
|
254 |
-
|
255 |
-
if($pagenow == 'plugin-install.php' && isset($_GET['tab']) && $_GET['tab'] == 'commercial'){
|
256 |
-
wp_redirect($this->menu_url());
|
257 |
-
exit;
|
258 |
-
}
|
259 |
-
|
260 |
-
}
|
261 |
-
|
262 |
-
private function _pre_1_0_clean_up(){
|
263 |
-
global $wpdb;
|
264 |
-
|
265 |
-
if(!defined('WPRC_VERSION')){
|
266 |
-
$old_tables = array(
|
267 |
-
$wpdb->prefix . 'wprc_cached_requests',
|
268 |
-
$wpdb->prefix . 'wprc_extension_types',
|
269 |
-
$wpdb->prefix . 'wprc_extensions',
|
270 |
-
$wpdb->prefix . 'wprc_repositories',
|
271 |
-
$wpdb->prefix . 'wprc_repositories_relationships',
|
272 |
-
);
|
273 |
-
|
274 |
-
foreach($old_tables as $table){
|
275 |
-
$wpdb->query(sprintf("DROP TABLE IF EXISTS %s", $table));
|
276 |
-
}
|
277 |
-
|
278 |
-
}
|
279 |
-
|
280 |
-
$this->settings['_pre_1_0_clean_up'] = true;
|
281 |
-
$this->save_settings();
|
282 |
-
}
|
283 |
-
|
284 |
-
public function setup_plugins_action_links(){
|
285 |
-
|
286 |
-
$plugins = get_plugins();
|
287 |
-
|
288 |
-
$repositories_plugins = array();
|
289 |
-
|
290 |
-
if( !empty($this->settings['repositories']) ) {
|
291 |
-
|
292 |
-
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
293 |
-
|
294 |
-
foreach ( $repository['data']['packages'] as $package ) {
|
295 |
-
|
296 |
-
foreach ( $package['products'] as $product ) {
|
297 |
-
|
298 |
-
foreach ( $product['plugins'] as $plugin_slug ) {
|
299 |
-
|
300 |
-
$download = $this->settings['repositories'][$repository_id]['data']['downloads']['plugins'][$plugin_slug];
|
301 |
-
|
302 |
-
if ( !isset($repositories_plugins[$repository_id][$download['slug']]) ) {
|
303 |
-
$repositories_plugins[$repository_id][$download['slug']] = array(
|
304 |
-
'name' => $download['name'],
|
305 |
-
'registered' => $this->plugin_is_registered( $repository_id, $download['slug'] ) ? 1 : 0
|
306 |
-
);
|
307 |
-
}
|
308 |
-
|
309 |
-
}
|
310 |
-
|
311 |
-
}
|
312 |
-
|
313 |
-
}
|
314 |
-
|
315 |
-
foreach ( $plugins as $plugin_id => $plugin ) {
|
316 |
-
|
317 |
-
$wp_plugin_slug = dirname( $plugin_id );
|
318 |
-
if ( empty($wp_plugin_slug) ) {
|
319 |
-
$wp_plugin_slug = basename( $plugin_id, '.php' );
|
320 |
-
}
|
321 |
-
|
322 |
-
foreach ( $repositories_plugins as $repository_id => $r_plugins ) {
|
323 |
-
|
324 |
-
foreach ( $r_plugins as $slug => $r_plugin ) {
|
325 |
-
|
326 |
-
if ( $wp_plugin_slug == $slug || $r_plugin['name'] == $plugin['Name'] || $r_plugin['name'] == $plugin['Title'] ) { //match order: slug, name, title
|
327 |
-
|
328 |
-
if ( $r_plugin['registered'] ) {
|
329 |
-
add_filter( 'plugin_action_links_' . $plugin_id, array($this, 'plugins_action_links_registered') );
|
330 |
-
} else {
|
331 |
-
add_filter( 'plugin_action_links_' . $plugin_id, array($this, 'plugins_action_links_not_registered') );
|
332 |
-
}
|
333 |
-
|
334 |
-
}
|
335 |
-
|
336 |
-
}
|
337 |
-
|
338 |
-
}
|
339 |
-
|
340 |
-
|
341 |
-
}
|
342 |
-
|
343 |
-
}
|
344 |
-
}
|
345 |
-
|
346 |
-
}
|
347 |
-
|
348 |
-
public function plugins_action_links_registered($links){
|
349 |
-
$links[] = '<a href="' . $this->menu_url() . '">' . __('Registered', 'installer') . '</a>';
|
350 |
-
return $links;
|
351 |
-
}
|
352 |
-
|
353 |
-
public function plugins_action_links_not_registered($links){
|
354 |
-
$links[] = '<a href="' . $this->menu_url() . '">' . __('Register', 'installer') . '</a>';
|
355 |
-
return $links;
|
356 |
-
}
|
357 |
-
|
358 |
-
public function plugin_is_registered($repository_id, $slug){
|
359 |
-
|
360 |
-
$registered = false;
|
361 |
-
|
362 |
-
if( $this->repository_has_valid_subscription($repository_id) ){
|
363 |
-
|
364 |
-
$subscription_type = $this->get_subscription_type_for_repository($repository_id);
|
365 |
-
$r_plugins = array();
|
366 |
-
|
367 |
-
foreach($this->settings['repositories'][$repository_id]['data']['packages'] as $package){
|
368 |
-
|
369 |
-
foreach($package['products'] as $product){
|
370 |
-
|
371 |
-
if( $product['subscription_type'] == $subscription_type || $this->have_superior_subscription($subscription_type, $product) ) {
|
372 |
-
|
373 |
-
foreach ($product['plugins'] as $plugin_slug) {
|
374 |
-
|
375 |
-
$download = $this->settings['repositories'][$repository_id]['data']['downloads']['plugins'][$plugin_slug];
|
376 |
-
|
377 |
-
if (!isset($rep_plugins[$download['slug']])) {
|
378 |
-
$r_plugins[$download['slug']] = $download['slug'];
|
379 |
-
}
|
380 |
-
|
381 |
-
}
|
382 |
-
|
383 |
-
}
|
384 |
-
|
385 |
-
}
|
386 |
-
|
387 |
-
}
|
388 |
-
|
389 |
-
$registered = isset($r_plugins[$slug]);
|
390 |
-
|
391 |
-
}
|
392 |
-
|
393 |
-
|
394 |
-
return $registered;
|
395 |
-
|
396 |
-
}
|
397 |
-
|
398 |
-
public function version(){
|
399 |
-
return WP_INSTALLER_VERSION;
|
400 |
-
}
|
401 |
-
|
402 |
-
public function plugin_path() {
|
403 |
-
return untrailingslashit( plugin_dir_path( dirname(__FILE__) ) );
|
404 |
-
}
|
405 |
-
|
406 |
-
public function plugin_url() {
|
407 |
-
if(isset($this->config['in_theme_folder']) && !empty($this->config['in_theme_folder'])){
|
408 |
-
$url = untrailingslashit(get_template_directory_uri() . '/' . $this->config['in_theme_folder']);
|
409 |
-
}else{
|
410 |
-
$url = untrailingslashit( plugins_url( '/', dirname(__FILE__) ) );
|
411 |
-
}
|
412 |
-
|
413 |
-
return $url;
|
414 |
-
}
|
415 |
-
|
416 |
-
public function is_repositories_page(){
|
417 |
-
global $pagenow;
|
418 |
-
|
419 |
-
return $pagenow == 'plugin-install.php' && isset($_GET['tab']) && $_GET['tab'] == 'commercial';
|
420 |
-
}
|
421 |
-
|
422 |
-
public function res_url(){
|
423 |
-
if(isset($this->config['in_theme_folder']) && !empty($this->config['in_theme_folder'])){
|
424 |
-
$url = untrailingslashit(get_template_directory_uri() . '/' . $this->config['in_theme_folder']);
|
425 |
-
}else{
|
426 |
-
$url = $this->plugin_url();
|
427 |
-
}
|
428 |
-
return $url;
|
429 |
-
}
|
430 |
-
|
431 |
-
public function save_settings(){
|
432 |
-
|
433 |
-
$_settings = serialize($this->settings);
|
434 |
-
if($this->_gz_on){
|
435 |
-
$_settings = gzcompress($_settings);
|
436 |
-
}
|
437 |
-
$_settings = base64_encode($_settings);
|
438 |
-
|
439 |
-
update_option( 'wp_installer_settings', $_settings );
|
440 |
-
|
441 |
-
if( is_multisite() && is_main_site() && isset($this->settings['repositories']) ){
|
442 |
-
$network_settings = array();
|
443 |
-
|
444 |
-
foreach( $this->settings['repositories'] as $rep_id => $repository ){
|
445 |
-
if( isset($repository['subscription']) )
|
446 |
-
$network_settings[$rep_id] = $repository['subscription'];
|
447 |
-
}
|
448 |
-
|
449 |
-
update_site_option( 'wp_installer_network', $network_settings );
|
450 |
-
|
451 |
-
|
452 |
-
}
|
453 |
-
|
454 |
-
}
|
455 |
-
|
456 |
-
public function get_settings($refresh = false){
|
457 |
-
|
458 |
-
if($refresh || empty($this->settings)){
|
459 |
-
|
460 |
-
$_settings = get_option('wp_installer_settings');
|
461 |
-
|
462 |
-
|
463 |
-
if (is_array($_settings) || empty($_settings)) { //backward compatibility 1.1
|
464 |
-
$this->settings = $_settings;
|
465 |
-
|
466 |
-
} else {
|
467 |
-
$_settings = base64_decode($_settings);
|
468 |
-
if ($this->_gz_on) {
|
469 |
-
$_settings = gzuncompress($_settings);
|
470 |
-
}
|
471 |
-
$this->settings = unserialize($_settings);
|
472 |
-
}
|
473 |
-
|
474 |
-
// Initialize
|
475 |
-
if( empty( $this->settings ) ){
|
476 |
-
$this->settings = array(
|
477 |
-
'repositories' => array()
|
478 |
-
);
|
479 |
-
}
|
480 |
-
|
481 |
-
if ( is_multisite() ) {
|
482 |
-
$network_settings = maybe_unserialize(get_site_option('wp_installer_network'));
|
483 |
-
if ($network_settings) {
|
484 |
-
foreach ($this->settings['repositories'] as $rep_id => $repository) {
|
485 |
-
if (isset($network_settings[$rep_id])) {
|
486 |
-
$this->settings['repositories'][$rep_id]['subscription'] = $network_settings[$rep_id];
|
487 |
-
}
|
488 |
-
}
|
489 |
-
}
|
490 |
-
}
|
491 |
-
|
492 |
-
$this->load_hardcoded_site_keys();
|
493 |
-
|
494 |
-
$this->settings = $this->_pre_1_6_backwards_compatibility($this->settings);
|
495 |
-
|
496 |
-
$this->settings = $this->_old_products_format_backwards_compatibility($this->settings);
|
497 |
-
|
498 |
-
}
|
499 |
-
|
500 |
-
return $this->settings;
|
501 |
-
}
|
502 |
-
|
503 |
-
private function load_hardcoded_site_keys(){
|
504 |
-
|
505 |
-
if( !empty( $this->settings['repositories'] ) ) {
|
506 |
-
foreach ( $this->settings['repositories'] as $repository_id => $repository ) {
|
507 |
-
|
508 |
-
if ( $site_key = self::get_repository_hardcoded_site_key( $repository_id ) ) {
|
509 |
-
|
510 |
-
$site_key_missing = empty($this->settings['repositories'][$repository_id]['subscription']['data']);
|
511 |
-
$site_key_changed = !$site_key_missing &&
|
512 |
-
$this->settings['repositories'][$repository_id]['subscription']['key'] != $site_key;
|
513 |
-
|
514 |
-
if ( $site_key_missing || $site_key_changed ) {
|
515 |
-
|
516 |
-
if ( !function_exists( 'get_plugins' ) ) {
|
517 |
-
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
518 |
-
}
|
519 |
-
$this->load_repositories_list();
|
520 |
-
$response = $this->save_site_key(
|
521 |
-
array(
|
522 |
-
'repository_id' => $repository_id,
|
523 |
-
'site_key' => $site_key,
|
524 |
-
'return' => true,
|
525 |
-
'nonce' => wp_create_nonce( 'save_site_key_' . $repository_id )
|
526 |
-
)
|
527 |
-
);
|
528 |
-
|
529 |
-
if ( !empty($response['error']) ) {
|
530 |
-
$this->remove_site_key( $repository_id );
|
531 |
-
|
532 |
-
$this->admin_messages[] = array(
|
533 |
-
'type' => 'error',
|
534 |
-
'text' => sprintf( __( 'You are using an invalid site key defined as the constant %s (most likely in wp-config.php).
|
535 |
-
Please remove it or use the correct value in order to be able to register correctly.', 'installer' ), 'OTGS_INSTALLER_SITE_KEY_' . strtoupper( $repository_id ) )
|
536 |
-
);
|
537 |
-
|
538 |
-
}
|
539 |
-
|
540 |
-
}
|
541 |
-
|
542 |
-
}
|
543 |
-
|
544 |
-
}
|
545 |
-
}
|
546 |
-
|
547 |
-
}
|
548 |
-
|
549 |
-
public static function get_repository_hardcoded_site_key( $repository_id ){
|
550 |
-
|
551 |
-
$site_key = false;
|
552 |
-
|
553 |
-
$site_key_constant = 'OTGS_INSTALLER_SITE_KEY_' . strtoupper( $repository_id );
|
554 |
-
if( defined( $site_key_constant ) ){
|
555 |
-
$site_key = constant( $site_key_constant );
|
556 |
-
}
|
557 |
-
|
558 |
-
return $site_key;
|
559 |
-
}
|
560 |
-
|
561 |
-
//backward compatibility, will remove 'basename' in version 1.8
|
562 |
-
private function _pre_1_6_backwards_compatibility($settings){
|
563 |
-
|
564 |
-
if( version_compare($this->version(), '1.8', '<') && !empty($settings['repositories']) ){
|
565 |
-
foreach ($settings['repositories'] as $repository_id => $repository) {
|
566 |
-
if( isset( $repository['data'] ) ) {
|
567 |
-
foreach ( $repository['data']['downloads']['plugins'] as $slug => $download ) {
|
568 |
-
$settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $slug ]['slug'] = $download['basename'];
|
569 |
-
}
|
570 |
-
}
|
571 |
-
}
|
572 |
-
}
|
573 |
-
|
574 |
-
return $settings;
|
575 |
-
}
|
576 |
-
|
577 |
-
//backward compatibility - support old products list format (downloads under products instead of global downloads list)
|
578 |
-
private function _old_products_format_backwards_compatibility($settings){
|
579 |
-
|
580 |
-
if( version_compare($this->version(), '1.8', '<') && !empty($settings['repositories']) && empty($this->_old_products_format_backwards_compatibility) ) {
|
581 |
-
|
582 |
-
foreach ($settings['repositories'] as $repository_id => $repository) {
|
583 |
-
$populate_downloads = false;
|
584 |
-
if( isset( $repository['data'] ) ) {
|
585 |
-
|
586 |
-
foreach ( $repository['data']['packages'] as $package_id => $package ) {
|
587 |
-
foreach ( $package['products'] as $product_id => $product ) {
|
588 |
-
if ( ! isset( $product['plugins'] ) ) {
|
589 |
-
$populate_downloads = true;
|
590 |
-
foreach ( $product['downloads'] as $download_id => $download ) {
|
591 |
-
$settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['plugins'][] = $download['slug'];
|
592 |
-
}
|
593 |
-
}
|
594 |
-
}
|
595 |
-
}
|
596 |
-
|
597 |
-
if ( $populate_downloads ) {
|
598 |
-
// Add downloads branch
|
599 |
-
foreach ( $repository['data']['packages'] as $package_id => $package ) {
|
600 |
-
foreach ( $package['products'] as $product_id => $product ) {
|
601 |
-
foreach ( $product['downloads'] as $download_id => $download ) {
|
602 |
-
if ( ! isset( $settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $download['slug'] ] ) ) {
|
603 |
-
$settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $download['slug'] ] = $download;
|
604 |
-
}
|
605 |
-
$settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['plugins'][] = $download['slug'];
|
606 |
-
}
|
607 |
-
unset( $settings['repositories'][ $repository_id ]['data']['packages'][ $package_id ]['products'][ $product_id ]['downloads'] );
|
608 |
-
}
|
609 |
-
}
|
610 |
-
}
|
611 |
-
}
|
612 |
-
}
|
613 |
-
|
614 |
-
$this->_old_products_format_backwards_compatibility = true;
|
615 |
-
}
|
616 |
-
|
617 |
-
return $settings;
|
618 |
-
}
|
619 |
-
|
620 |
-
public function get_installer_site_url( $repository_id = false ){
|
621 |
-
global $current_site;
|
622 |
-
|
623 |
-
$site_url = get_site_url();
|
624 |
-
|
625 |
-
if( $repository_id && is_multisite() && isset( $this->settings['repositories'] ) ){
|
626 |
-
$network_settings = maybe_unserialize( get_site_option('wp_installer_network') );
|
627 |
-
|
628 |
-
if ( isset( $network_settings[$repository_id] ) ) {
|
629 |
-
$site_url = get_site_url( $current_site->blog_id );
|
630 |
-
}
|
631 |
-
|
632 |
-
}
|
633 |
-
|
634 |
-
return $site_url;
|
635 |
-
}
|
636 |
-
|
637 |
-
public function show_site_key_nags(){
|
638 |
-
$screen = get_current_screen();
|
639 |
-
|
640 |
-
if($screen->base == 'settings_page_installer' || ($screen->base == 'plugin-install' && isset($_GET['tab']) && $_GET['tab'] == 'commercial')){
|
641 |
-
return;
|
642 |
-
}
|
643 |
-
|
644 |
-
if(!empty($this->config['site_key_nags'])){
|
645 |
-
|
646 |
-
foreach($this->config['site_key_nags'] as $nag){
|
647 |
-
|
648 |
-
if(!$this->repository_has_subscription($nag['repository_id'] )){
|
649 |
-
$show = true;
|
650 |
-
if(!empty($nag['condition_cb'])){
|
651 |
-
$show = call_user_func($nag['condition_cb']);
|
652 |
-
}
|
653 |
-
|
654 |
-
if(empty($this->settings['dismissed_nags'][$nag['repository_id']]) && $show){
|
655 |
-
echo '<div class="updated error otgs-is-dismissible"><p>';
|
656 |
-
printf(__("To get automatic updates, you need to register %s for this site. %sRegister %s%s", 'sitepress'),
|
657 |
-
$nag['product_name'], '<a class="button-primary" href="' . $this->menu_url() . '">', $nag['product_name'], '</a>');
|
658 |
-
|
659 |
-
echo '</p>';
|
660 |
-
echo '<span class="installer-dismiss-nag notice-dismiss" data-repository="' . $nag['repository_id'] . '"><span class="screen-reader-text">' . __('Dismiss', 'sitepress') . '</span></span>';
|
661 |
-
echo '</div>';
|
662 |
-
}
|
663 |
-
}
|
664 |
-
|
665 |
-
}
|
666 |
-
|
667 |
-
}
|
668 |
-
|
669 |
-
}
|
670 |
-
|
671 |
-
public function dismiss_nag(){
|
672 |
-
$this->settings['dismissed_nags'][$_POST['repository']] = 1;
|
673 |
-
|
674 |
-
$this->save_settings();
|
675 |
-
|
676 |
-
echo json_encode(array());
|
677 |
-
exit;
|
678 |
-
}
|
679 |
-
|
680 |
-
public function add_install_plugins_tab($tabs){
|
681 |
-
|
682 |
-
$tabs['commercial'] = __('Commercial', 'installer');
|
683 |
-
|
684 |
-
return $tabs;
|
685 |
-
}
|
686 |
-
|
687 |
-
public function load_repositories_list(){
|
688 |
-
global $wp_installer_instances;
|
689 |
-
|
690 |
-
foreach ($wp_installer_instances as $instance) {
|
691 |
-
|
692 |
-
if (file_exists(dirname($instance['bootfile']) . '/repositories.xml')) {
|
693 |
-
$config_file = dirname($instance['bootfile']) . '/repositories.xml';
|
694 |
-
|
695 |
-
if (file_exists(dirname($instance['bootfile']) . '/repositories.sandbox.xml')) {
|
696 |
-
$config_file = dirname($instance['bootfile']) . '/repositories.sandbox.xml';
|
697 |
-
add_filter('https_ssl_verify', '__return_false');
|
698 |
-
}
|
699 |
-
|
700 |
-
$repos = simplexml_load_file($config_file);
|
701 |
-
|
702 |
-
if($repos) {
|
703 |
-
foreach ($repos as $repo) {
|
704 |
-
$id = strval($repo->id);
|
705 |
-
|
706 |
-
$data['api-url'] = strval($repo->apiurl);
|
707 |
-
$data['products'] = strval($repo->products);
|
708 |
-
|
709 |
-
// excludes rule;
|
710 |
-
if (isset($this->config['repositories_exclude']) && in_array($id, $this->config['repositories_exclude'])) {
|
711 |
-
continue;
|
712 |
-
}
|
713 |
-
|
714 |
-
// includes rule;
|
715 |
-
if (isset($this->config['repositories_include']) && !in_array($id, $this->config['repositories_include'])) {
|
716 |
-
continue;
|
717 |
-
}
|
718 |
-
|
719 |
-
$this->repositories[$id] = $data;
|
720 |
-
|
721 |
-
}
|
722 |
-
}
|
723 |
-
|
724 |
-
}
|
725 |
-
}
|
726 |
-
|
727 |
-
}
|
728 |
-
|
729 |
-
public function filter_repositories_list(){
|
730 |
-
|
731 |
-
if(!empty($this->settings['repositories'])) {
|
732 |
-
foreach ($this->settings['repositories'] as $id => $repo_data) {
|
733 |
-
|
734 |
-
// excludes rule;
|
735 |
-
if (isset($this->config['repositories_exclude']) && in_array($id, $this->config['repositories_exclude'])) {
|
736 |
-
unset($this->settings['repositories'][$id]);
|
737 |
-
}
|
738 |
-
|
739 |
-
// includes rule;
|
740 |
-
if (isset($this->config['repositories_include']) && !in_array($id, $this->config['repositories_include'])) {
|
741 |
-
unset($this->settings['repositories'][$id]);
|
742 |
-
}
|
743 |
-
|
744 |
-
|
745 |
-
}
|
746 |
-
}
|
747 |
-
|
748 |
-
|
749 |
-
}
|
750 |
-
|
751 |
-
public function refresh_repositories_data(){
|
752 |
-
static $checked = false;
|
753 |
-
|
754 |
-
if( defined('OTGS_DISABLE_AUTO_UPDATES') && OTGS_DISABLE_AUTO_UPDATES && empty($_GET['force-check']) || $checked ){
|
755 |
-
|
756 |
-
if(empty($this->settings['repositories']) && $this->is_repositories_page()){
|
757 |
-
|
758 |
-
foreach($this->repositories as $id => $data) {
|
759 |
-
$repository_names[] = $id;
|
760 |
-
|
761 |
-
}
|
762 |
-
|
763 |
-
$error = sprintf(__("Installer cannot display the products information because the automatic updating for %s was explicitly disabled with the configuration below (usually in wp-config.php):", 'installer'), strtoupper( join(', ', $repository_names) ));
|
764 |
-
$error .= '<br /><br /><code>define("OTGS_DISABLE_AUTO_UPDATES", true);</code><br /><br />';
|
765 |
-
$error .= sprintf(__("In order to see the products information, please run the %smanual updates check%s to initialize the products list or (temporarily) remove the above code.", 'installer'), '<a href="' . admin_url('update-core.php') . '">', '</a>');
|
766 |
-
|
767 |
-
$this->register_admin_message($error, 'error');
|
768 |
-
|
769 |
-
|
770 |
-
}
|
771 |
-
|
772 |
-
return;
|
773 |
-
}
|
774 |
-
|
775 |
-
$checked = true;
|
776 |
-
|
777 |
-
foreach($this->repositories as $id => $data){
|
778 |
-
|
779 |
-
$response = wp_remote_get($data['products']);
|
780 |
-
|
781 |
-
if(is_wp_error($response)){
|
782 |
-
// http fallback
|
783 |
-
$data['products'] = preg_replace("@^https://@", 'http://', $data['products']);
|
784 |
-
$response = wp_remote_get($data['products']);
|
785 |
-
}
|
786 |
-
|
787 |
-
if(is_wp_error($response)){
|
788 |
-
|
789 |
-
$error = sprintf(__("Installer cannot contact our updates server to get information about the available products and check for new versions. If you are seeing this message for the first time, you can ignore it, as it may be a temporary communication problem. If the problem persists and your WordPress admin is slowing down, you can disable automated version checks. Add the following line to your wp-config.php file:", 'installer'), strtoupper($id));
|
790 |
-
$error .= '<br /><br /><code>define("OTGS_DISABLE_AUTO_UPDATES", true);</code>';
|
791 |
-
|
792 |
-
$this->register_admin_message($error, 'error');
|
793 |
-
|
794 |
-
continue;
|
795 |
-
}
|
796 |
-
|
797 |
-
if($response && isset($response['response']['code']) && $response['response']['code'] == 200){
|
798 |
-
$body = wp_remote_retrieve_body($response);
|
799 |
-
if($body){
|
800 |
-
$products = json_decode($body, true);
|
801 |
-
|
802 |
-
if(is_array($products)){
|
803 |
-
$this->settings['repositories'][$id]['data'] = $products;
|
804 |
-
$this->settings = $this->_pre_1_6_backwards_compatibility($this->settings);
|
805 |
-
}
|
806 |
-
}
|
807 |
-
|
808 |
-
}
|
809 |
-
|
810 |
-
$this->log( sprintf("Checked for %s updates: %s", $id, $data['products']) );
|
811 |
-
|
812 |
-
|
813 |
-
}
|
814 |
-
|
815 |
-
// cleanup
|
816 |
-
if(empty($this->settings['repositories'])){
|
817 |
-
$this->settings['repositories'] = array();
|
818 |
-
}
|
819 |
-
foreach($this->settings['repositories'] as $id => $data){
|
820 |
-
if(!in_array($id, array_keys($this->repositories))){
|
821 |
-
unset($this->settings['repositories'][$id]);
|
822 |
-
}
|
823 |
-
}
|
824 |
-
|
825 |
-
$this->settings['last_repositories_update']= time();
|
826 |
-
|
827 |
-
$this->save_settings();
|
828 |
-
|
829 |
-
}
|
830 |
-
|
831 |
-
public function show_products($args = array()){
|
832 |
-
|
833 |
-
$screen = get_current_screen();
|
834 |
-
|
835 |
-
if($screen->base == 'settings_page_installer'){ // settings page
|
836 |
-
echo '<div class="wrap">';
|
837 |
-
echo '<h2>' . __('Installer', 'installer') . '</h2>';
|
838 |
-
echo '<br />';
|
839 |
-
}
|
840 |
-
|
841 |
-
if(!is_array($args)) $args = array();
|
842 |
-
if(empty($args['template'])) $args['template'] = 'default';
|
843 |
-
|
844 |
-
$this->filter_repositories_list();
|
845 |
-
|
846 |
-
if(!empty($this->settings['repositories'])){
|
847 |
-
|
848 |
-
$this->localize_strings();
|
849 |
-
$this->set_filtered_prices($args);
|
850 |
-
$this->set_hierarchy_and_order();
|
851 |
-
|
852 |
-
foreach($this->settings['repositories'] as $repository_id => $repository){
|
853 |
-
|
854 |
-
if($args['template'] == 'compact'){
|
855 |
-
|
856 |
-
if(isset($args['repository']) && $args['repository'] == $repository_id){
|
857 |
-
include $this->plugin_path() . '/templates/products-compact.php';
|
858 |
-
}
|
859 |
-
|
860 |
-
}else{
|
861 |
-
|
862 |
-
include $this->plugin_path() . '/templates/repository-listing.php';
|
863 |
-
|
864 |
-
}
|
865 |
-
|
866 |
-
unset($site_key, $subscription_type, $expired, $upgrade_options, $products_avaliable);
|
867 |
-
|
868 |
-
}
|
869 |
-
|
870 |
-
}else{
|
871 |
-
|
872 |
-
echo '<center>' . __('No repositories defined.', 'installer') . '</center>';
|
873 |
-
|
874 |
-
}
|
875 |
-
|
876 |
-
if($screen->base == 'settings_page_installer'){ // settings page
|
877 |
-
echo '</div>';
|
878 |
-
}
|
879 |
-
|
880 |
-
|
881 |
-
}
|
882 |
-
|
883 |
-
public function get_product_price($repository_id, $package_id, $product_id, $incl_discount = false){
|
884 |
-
|
885 |
-
$price = false;
|
886 |
-
|
887 |
-
foreach($this->settings['repositories'][$repository_id]['data']['packages'] as $package ){
|
888 |
-
|
889 |
-
if($package['id'] == $package_id){
|
890 |
-
if(isset($package['products'][$product_id])){
|
891 |
-
if($incl_discount && isset($package['products'][$product_id]['price_disc'])){
|
892 |
-
$price = $package['products'][$product_id]['price_disc'];
|
893 |
-
}elseif(isset($package['products'][$product_id]['price'])){
|
894 |
-
$price = $package['products'][$product_id]['price'];
|
895 |
-
}
|
896 |
-
}
|
897 |
-
break;
|
898 |
-
}
|
899 |
-
}
|
900 |
-
|
901 |
-
return $price;
|
902 |
-
}
|
903 |
-
|
904 |
-
private function _render_product_packages($packages, $subscription_type, $expired, $upgrade_options, $repository_id){
|
905 |
-
|
906 |
-
$data = array();
|
907 |
-
|
908 |
-
foreach($packages as $package_id => $package){
|
909 |
-
|
910 |
-
$row = array('products' => array(), 'downloads' => array());
|
911 |
-
foreach($package['products'] as $product){
|
912 |
-
|
913 |
-
// filter out free subscriptions from being displayed as buying options
|
914 |
-
if( empty($product['price']) && (empty($subscription_type) || $expired) ){
|
915 |
-
continue;
|
916 |
-
}
|
917 |
-
|
918 |
-
//consider equivalent subscriptions
|
919 |
-
if( empty($product['subscription_type_equivalent'])){
|
920 |
-
$product['subscription_type_equivalent'] = '';
|
921 |
-
}
|
922 |
-
|
923 |
-
// buy base
|
924 |
-
if(empty($subscription_type) || $expired) {
|
925 |
-
|
926 |
-
$p['url'] = $this->append_parameters_to_buy_url($product['url'], $repository_id);
|
927 |
-
if (!empty($product['price_disc'])) {
|
928 |
-
$p['label'] = $product['call2action'] . ' - ' . sprintf('$%s %s$%d%s (USD)', $product['price_disc'], ' <del>', $product['price'], '</del>');
|
929 |
-
} else {
|
930 |
-
$p['label'] = $product['call2action'] . ' - ' . sprintf('$%d (USD)', $product['price']);
|
931 |
-
}
|
932 |
-
$row['products'][] = $p;
|
933 |
-
|
934 |
-
// renew
|
935 |
-
} elseif(isset($subscription_type) && ($product['subscription_type'] == $subscription_type || $product['subscription_type_equivalent'] == $subscription_type)){
|
936 |
-
|
937 |
-
if($product['renewals']) {
|
938 |
-
foreach ($product['renewals'] as $renewal) {
|
939 |
-
$p['url'] = $this->append_parameters_to_buy_url($renewal['url'], $repository_id);
|
940 |
-
$p['label'] = $renewal['call2action'] . ' - ' . sprintf('$%d (USD)', $renewal['price']);
|
941 |
-
}
|
942 |
-
|
943 |
-
$row['products'][] = $p;
|
944 |
-
}
|
945 |
-
|
946 |
-
}
|
947 |
-
|
948 |
-
// upgrades
|
949 |
-
if(!empty($upgrade_options[$product['subscription_type']])){
|
950 |
-
|
951 |
-
foreach($upgrade_options[$product['subscription_type']] as $stype => $upgrade){
|
952 |
-
if($stype != $subscription_type) continue;
|
953 |
-
|
954 |
-
$p['url'] = $this->append_parameters_to_buy_url($upgrade['url'], $repository_id);
|
955 |
-
if (!empty($upgrade['price_disc'])) {
|
956 |
-
$p['label'] = $upgrade['call2action'] . ' - ' . sprintf('$%s %s$%d%s (USD)', $upgrade['price_disc'], ' <del>', $upgrade['price'], '</del>');
|
957 |
-
} else {
|
958 |
-
$p['label'] = $upgrade['call2action'] . ' - ' . sprintf('$%d (USD)', $upgrade['price']);
|
959 |
-
}
|
960 |
-
$row['products'][] = $p;
|
961 |
-
|
962 |
-
}
|
963 |
-
|
964 |
-
}
|
965 |
-
|
966 |
-
// downloads
|
967 |
-
if(isset($subscription_type) && !$expired && ($product['subscription_type'] == $subscription_type || $product['subscription_type_equivalent'] == $subscription_type)){
|
968 |
-
foreach($product['plugins'] as $plugin_slug){
|
969 |
-
$row['downloads'][ $plugin_slug ] = $this->settings['repositories'][$repository_id]['data']['downloads']['plugins'][$plugin_slug];
|
970 |
-
}
|
971 |
-
}
|
972 |
-
|
973 |
-
//subpackages
|
974 |
-
if(!empty($package['sub-packages'])){
|
975 |
-
$row['sub-packages'] = $package['sub-packages'];
|
976 |
-
}
|
977 |
-
|
978 |
-
}
|
979 |
-
|
980 |
-
$row['id'] = $package['id'];
|
981 |
-
$row['image_url'] = $package['image_url'];
|
982 |
-
$row['name'] = $package['name'];
|
983 |
-
$row['description'] = $package['description'];
|
984 |
-
|
985 |
-
if(!empty($row['products']) || !empty($row['downloads']) || !empty($row['sub-packages'])){
|
986 |
-
$data[] = $row;
|
987 |
-
}
|
988 |
-
|
989 |
-
|
990 |
-
}
|
991 |
-
|
992 |
-
return $data;
|
993 |
-
|
994 |
-
}
|
995 |
-
|
996 |
-
public function get_extra_url_parameters(){
|
997 |
-
|
998 |
-
$parameters = array();
|
999 |
-
|
1000 |
-
if(!empty($this->package_source)){
|
1001 |
-
foreach($this->package_source as $key => $val){
|
1002 |
-
$parameters[$key] = $val;
|
1003 |
-
}
|
1004 |
-
}
|
1005 |
-
|
1006 |
-
$parameters['installer_version'] = WP_INSTALLER_VERSION;
|
1007 |
-
$parameters['theme'] = wp_get_theme()->get( 'Name' );
|
1008 |
-
$parameters['site_name'] = get_bloginfo( 'name' );
|
1009 |
-
|
1010 |
-
return $parameters;
|
1011 |
-
}
|
1012 |
-
|
1013 |
-
public function append_parameters_to_buy_url($url, $repository_id, $args = array()){
|
1014 |
-
|
1015 |
-
$url = add_query_arg( array('icl_site_url' => $this->get_installer_site_url( $repository_id ) ), $url );
|
1016 |
-
|
1017 |
-
$affiliate_id = false;
|
1018 |
-
$affiliate_key = false;
|
1019 |
-
|
1020 |
-
// Add extra parameters for custom Installer packages
|
1021 |
-
if( !empty($this->package_source) ){
|
1022 |
-
$extra = $this->get_extra_url_parameters();
|
1023 |
-
|
1024 |
-
if( !empty($extra['repository']) && $extra['repository'] == $repository_id ) {
|
1025 |
-
|
1026 |
-
if( !empty($extra['affiliate_key']) && !empty($extra['user_id']) ){
|
1027 |
-
$this->config['affiliate_id:' . $repository_id] = $extra['user_id'];
|
1028 |
-
$this->config['affiliate_key:' . $repository_id] = $extra['affiliate_key'];
|
1029 |
-
unset($extra['affiliate_key'], $extra['user_id'], $extra['repository']); // no need to include these ones
|
1030 |
-
}
|
1031 |
-
|
1032 |
-
$url = add_query_arg($extra, $url);
|
1033 |
-
}
|
1034 |
-
|
1035 |
-
}
|
1036 |
-
|
1037 |
-
if(isset($this->config['affiliate_id:' . $repository_id]) && isset($this->config['affiliate_key:' . $repository_id])){
|
1038 |
-
|
1039 |
-
$affiliate_id = $this->config['affiliate_id:' . $repository_id];
|
1040 |
-
$affiliate_key = $this->config['affiliate_key:' . $repository_id];
|
1041 |
-
|
1042 |
-
}elseif(isset($args['affiliate_id:' . $repository_id]) && isset($args['affiliate_key:' . $repository_id])){
|
1043 |
-
|
1044 |
-
$affiliate_id = $args['affiliate_id:' . $repository_id];
|
1045 |
-
$affiliate_key = $args['affiliate_key:' . $repository_id];
|
1046 |
-
|
1047 |
-
}elseif(defined('ICL_AFFILIATE_ID') && defined('ICL_AFFILIATE_KEY')){ //support for 1 repo
|
1048 |
-
|
1049 |
-
$affiliate_id = ICL_AFFILIATE_ID;
|
1050 |
-
$affiliate_key = ICL_AFFILIATE_KEY;
|
1051 |
-
|
1052 |
-
}elseif(isset($this->config['affiliate_id']) && isset($this->config['affiliate_key'])) {
|
1053 |
-
// BACKWARDS COMPATIBILITY
|
1054 |
-
$affiliate_id = $this->config['affiliate_id'];
|
1055 |
-
$affiliate_key = $this->config['affiliate_key'];
|
1056 |
-
}
|
1057 |
-
|
1058 |
-
if($affiliate_id && $affiliate_key){
|
1059 |
-
$url = add_query_arg(array('aid' => $affiliate_id, 'affiliate_key' => $affiliate_key), $url);
|
1060 |
-
}
|
1061 |
-
|
1062 |
-
if($repository_id == 'wpml'){
|
1063 |
-
$url = add_query_arg(array('using_icl' => $this->_using_icl, 'wpml_version' => $this->_wpml_version), $url);
|
1064 |
-
}
|
1065 |
-
|
1066 |
-
$url = apply_filters('wp_installer_buy_url', $url);
|
1067 |
-
|
1068 |
-
$url = esc_url($url);
|
1069 |
-
|
1070 |
-
return $url;
|
1071 |
-
|
1072 |
-
}
|
1073 |
-
|
1074 |
-
public function save_site_key($args = array()){
|
1075 |
-
|
1076 |
-
$error = '';
|
1077 |
-
|
1078 |
-
if( isset( $args['repository_id'] ) ){
|
1079 |
-
$repository_id = $args['repository_id'];
|
1080 |
-
}elseif( isset( $_POST['repository_id'] ) ){
|
1081 |
-
$repository_id = sanitize_text_field( $_POST['repository_id'] );
|
1082 |
-
}else{
|
1083 |
-
$repository_id = false;
|
1084 |
-
}
|
1085 |
-
|
1086 |
-
if( isset( $args['nonce'] ) ){
|
1087 |
-
$nonce = $args['nonce'];
|
1088 |
-
}elseif( isset($_POST['nonce'] ) ){
|
1089 |
-
$nonce = sanitize_text_field( $_POST['nonce'] );
|
1090 |
-
}else{
|
1091 |
-
$nonce = '';
|
1092 |
-
}
|
1093 |
-
|
1094 |
-
if( isset( $args['site_key'] ) ){
|
1095 |
-
$site_key = $args['site_key'];
|
1096 |
-
} else {
|
1097 |
-
$site_key = sanitize_text_field( $_POST[ 'site_key_' . $repository_id] );
|
1098 |
-
}
|
1099 |
-
$site_key = preg_replace("/[^A-Za-z0-9]/", '', $site_key);
|
1100 |
-
|
1101 |
-
if($repository_id && $nonce && wp_create_nonce('save_site_key_' . $repository_id) == $nonce){
|
1102 |
-
|
1103 |
-
try {
|
1104 |
-
$subscription_data = $this->fetch_subscription_data( $repository_id, $site_key, self::SITE_KEY_VALIDATION_SOURCE_REGISTRATION );
|
1105 |
-
|
1106 |
-
if ( $subscription_data ) {
|
1107 |
-
$this->settings['repositories'][$repository_id]['subscription'] = array(
|
1108 |
-
'key' => $site_key,
|
1109 |
-
'data' => $subscription_data,
|
1110 |
-
'registered_by' => get_current_user_id()
|
1111 |
-
);
|
1112 |
-
$this->save_settings();
|
1113 |
-
} else {
|
1114 |
-
$error = __( 'Invalid site key for the current site.', 'installer' )
|
1115 |
-
. '<br /><div class="installer-footnote">' . __('Please note that the site key is case sensitive.', 'installer') . '</div>';
|
1116 |
-
}
|
1117 |
-
|
1118 |
-
} catch (Exception $e ){
|
1119 |
-
$error = $e->getMessage();
|
1120 |
-
if( preg_match('#Could not resolve host: (.*)#', $error, $matches) || preg_match('#Couldn\'t resolve host \'(.*)\'#', $error, $matches) ){
|
1121 |
-
$error = sprintf(__("%s cannot access %s to register. Try again to see if it's a temporary problem. If the problem continues, make sure that this site has access to the Internet. You can still use the plugin without registration, but you will not receive automated updates.", 'installer'),
|
1122 |
-
'<strong><i>' . $this->get_generic_product_name($repository_id) . '</i></strong>',
|
1123 |
-
'<strong><i>' . $matches[1]. '</i></strong>'
|
1124 |
-
) ;
|
1125 |
-
}
|
1126 |
-
}
|
1127 |
-
|
1128 |
-
}
|
1129 |
-
|
1130 |
-
$return = array('error' => $error);
|
1131 |
-
|
1132 |
-
if($this->api_debug){
|
1133 |
-
$return['debug'] = $this->api_debug;
|
1134 |
-
}
|
1135 |
-
|
1136 |
-
if(!empty($args['return'])){
|
1137 |
-
return $return;
|
1138 |
-
}else{
|
1139 |
-
echo json_encode($return);
|
1140 |
-
exit;
|
1141 |
-
}
|
1142 |
-
|
1143 |
-
}
|
1144 |
-
|
1145 |
-
/**
|
1146 |
-
* Alias for WP_Installer::get_repository_site_key
|
1147 |
-
* @see WP_Installer::get_repository_site_key()
|
1148 |
-
*
|
1149 |
-
* @param string $repository_id
|
1150 |
-
* @return string (site key) or bool
|
1151 |
-
*/
|
1152 |
-
public function get_site_key($repository_id){
|
1153 |
-
return WP_Installer::get_repository_site_key( $repository_id );
|
1154 |
-
}
|
1155 |
-
|
1156 |
-
public function remove_site_key( $repository_id ){
|
1157 |
-
if( isset( $this->settings['repositories'][$repository_id] ) ){
|
1158 |
-
unset($this->settings['repositories'][$repository_id]['subscription']);
|
1159 |
-
$this->save_settings();
|
1160 |
-
$this->refresh_repositories_data();
|
1161 |
-
}
|
1162 |
-
}
|
1163 |
-
|
1164 |
-
public function remove_site_key_ajax(){
|
1165 |
-
if($_POST['nonce'] == wp_create_nonce('remove_site_key_' . $_POST['repository_id'])){
|
1166 |
-
$this->remove_site_key( $_POST['repository_id'] );
|
1167 |
-
}
|
1168 |
-
exit;
|
1169 |
-
}
|
1170 |
-
|
1171 |
-
public function validate_repository_subscription(){
|
1172 |
-
$repository_id = isset($_GET['validate_repository']) ? sanitize_text_field( $_GET['validate_repository'] ) : false;
|
1173 |
-
if($repository_id){
|
1174 |
-
|
1175 |
-
$site_key = $this->get_site_key($repository_id);
|
1176 |
-
if($site_key) {
|
1177 |
-
$subscription_data = $this->fetch_subscription_data( $repository_id, $site_key, self::SITE_KEY_VALIDATION_SOURCE_REVALIDATION);
|
1178 |
-
if(empty($subscription_data)){
|
1179 |
-
unset($this->settings['repositories'][$repository_id]['subscription']);
|
1180 |
-
delete_site_transient('update_plugins');
|
1181 |
-
$this->save_settings();
|
1182 |
-
}
|
1183 |
-
}
|
1184 |
-
|
1185 |
-
wp_redirect($this->menu_url() . '#repository-' . $repository_id);
|
1186 |
-
exit;
|
1187 |
-
|
1188 |
-
}
|
1189 |
-
|
1190 |
-
}
|
1191 |
-
|
1192 |
-
public function update_site_key(){
|
1193 |
-
|
1194 |
-
$error = '';
|
1195 |
-
|
1196 |
-
$repository_id = sanitize_text_field ( $_POST['repository_id'] );
|
1197 |
-
if($_POST['nonce'] == wp_create_nonce('update_site_key_' . $repository_id )){
|
1198 |
-
|
1199 |
-
$site_key = $this->get_site_key($_POST['repository_id']);
|
1200 |
-
|
1201 |
-
if($site_key){
|
1202 |
-
try {
|
1203 |
-
$subscription_data = $this->fetch_subscription_data( $repository_id, $site_key, self::SITE_KEY_VALIDATION_SOURCE_UPDATES_CHECK );
|
1204 |
-
|
1205 |
-
if ( $subscription_data ) {
|
1206 |
-
$this->settings['repositories'][$repository_id]['subscription'] = array(
|
1207 |
-
'key' => $site_key,
|
1208 |
-
'data' => $subscription_data,
|
1209 |
-
'registered_by' => get_current_user_id()
|
1210 |
-
);
|
1211 |
-
|
1212 |
-
//also refresh products information
|
1213 |
-
$this->refresh_repositories_data();
|
1214 |
-
|
1215 |
-
$this->save_settings();
|
1216 |
-
|
1217 |
-
} else {
|
1218 |
-
unset($this->settings['repositories'][$repository_id]['subscription']);
|
1219 |
-
$error = __( 'Invalid site key for the current site. If the error persists, try to unregister first and then register again with the same site key.', 'installer' );
|
1220 |
-
}
|
1221 |
-
|
1222 |
-
|
1223 |
-
} catch (Exception $e ){
|
1224 |
-
$error = $e->getMessage();
|
1225 |
-
if( preg_match('#Could not resolve host: (.*)#', $error, $matches) || preg_match('#Couldn\'t resolve host \'(.*)\'#', $error, $matches) ){
|
1226 |
-
$error = sprintf(__("%s cannot access %s to register. Try again to see if it's a temporary problem. If the problem continues, make sure that this site has access to the Internet. You can still use the plugin without registration, but you will not receive automated updates.", 'installer'),
|
1227 |
-
'<strong><i>' . $this->get_generic_product_name($repository_id) . '</i></strong>',
|
1228 |
-
'<strong><i>' . $matches[1]. '</i></strong>'
|
1229 |
-
) ;
|
1230 |
-
}
|
1231 |
-
}
|
1232 |
-
|
1233 |
-
}
|
1234 |
-
|
1235 |
-
}
|
1236 |
-
|
1237 |
-
echo json_encode(array('error' => $error));
|
1238 |
-
|
1239 |
-
exit;
|
1240 |
-
}
|
1241 |
-
|
1242 |
-
public function api_debug_log($text){
|
1243 |
-
|
1244 |
-
if(defined('WPML_DEBUG_INSTALLER') && WPML_DEBUG_INSTALLER){
|
1245 |
-
|
1246 |
-
if(!is_scalar($text)){
|
1247 |
-
$text = print_r($text, 1);
|
1248 |
-
}
|
1249 |
-
|
1250 |
-
$this->api_debug .= $text . "\n";
|
1251 |
-
|
1252 |
-
}
|
1253 |
-
|
1254 |
-
}
|
1255 |
-
|
1256 |
-
public function fetch_subscription_data( $repository_id, $site_key, $source = self::SITE_KEY_VALIDATION_SOURCE_OTHER ){
|
1257 |
-
|
1258 |
-
$subscription_data = false;
|
1259 |
-
|
1260 |
-
$args['body'] = array(
|
1261 |
-
'action' => 'site_key_validation',
|
1262 |
-
'site_key' => $site_key,
|
1263 |
-
'site_url' => $this->get_installer_site_url( $repository_id ),
|
1264 |
-
'source' => $source
|
1265 |
-
);
|
1266 |
-
|
1267 |
-
if($repository_id == 'wpml'){
|
1268 |
-
$args['body']['using_icl'] = $this->_using_icl;
|
1269 |
-
$args['body']['wpml_version'] = $this->_wpml_version;
|
1270 |
-
}
|
1271 |
-
|
1272 |
-
$args['body']['installer_version'] = WP_INSTALLER_VERSION;
|
1273 |
-
$args['body']['theme'] = wp_get_theme()->get( 'Name' );
|
1274 |
-
$args['body']['site_name'] = get_bloginfo( 'name' );
|
1275 |
-
|
1276 |
-
$args['body']['versions'] = $this->get_local_product_versions( $repository_id );
|
1277 |
-
|
1278 |
-
$args['timeout'] = 45;
|
1279 |
-
|
1280 |
-
// Add extra parameters for custom Installer packages
|
1281 |
-
if( !empty($this->package_source) ){
|
1282 |
-
$extra = $this->get_extra_url_parameters();
|
1283 |
-
if( !empty($extra['repository']) && $extra['repository'] == $repository_id ) {
|
1284 |
-
unset($extra['repository']);
|
1285 |
-
foreach($extra as $key => $val){
|
1286 |
-
$args['body'][$key] = $val;
|
1287 |
-
}
|
1288 |
-
}
|
1289 |
-
}
|
1290 |
-
|
1291 |
-
$response = wp_remote_post($this->repositories[$repository_id]['api-url'], $args);
|
1292 |
-
|
1293 |
-
$this->api_debug_log("POST {$this->repositories[$repository_id]['api-url']}");
|
1294 |
-
$this->api_debug_log($args);
|
1295 |
-
|
1296 |
-
$this->log("POST {$this->repositories[$repository_id]['api-url']} - fetch subscription data");
|
1297 |
-
|
1298 |
-
if( !is_wp_error($response) ){
|
1299 |
-
$datas = wp_remote_retrieve_body($response);
|
1300 |
-
|
1301 |
-
if(is_serialized($datas)){
|
1302 |
-
$data = unserialize($datas);
|
1303 |
-
$this->api_debug_log($data);
|
1304 |
-
|
1305 |
-
if( !empty( $data->subscription_data ) ){
|
1306 |
-
$subscription_data = $data->subscription_data;
|
1307 |
-
}
|
1308 |
-
|
1309 |
-
do_action( 'installer_fetched_subscription_data', $data, $repository_id);
|
1310 |
-
|
1311 |
-
}else{
|
1312 |
-
$this->api_debug_log($datas);
|
1313 |
-
}
|
1314 |
-
|
1315 |
-
}else{
|
1316 |
-
|
1317 |
-
$this->api_debug_log($response);
|
1318 |
-
throw new Exception( $response->get_error_message() );
|
1319 |
-
}
|
1320 |
-
|
1321 |
-
return $subscription_data;
|
1322 |
-
|
1323 |
-
}
|
1324 |
-
|
1325 |
-
function get_local_product_versions( $repository_id ){
|
1326 |
-
|
1327 |
-
$versions = array();
|
1328 |
-
|
1329 |
-
foreach( $this->settings['repositories'][$repository_id]['data']['packages'] as $package_id => $package ){
|
1330 |
-
|
1331 |
-
foreach( $package['products'] as $product_id => $product ){
|
1332 |
-
|
1333 |
-
foreach( $product['plugins'] as $plugin_slug ){
|
1334 |
-
|
1335 |
-
$download = $this->settings['repositories'][$repository_id]['data']['downloads']['plugins'][$plugin_slug];
|
1336 |
-
|
1337 |
-
if( empty( $versions[$download['slug']] ) ) {
|
1338 |
-
$v = $this->get_plugin_installed_version($download['name'], $download['slug']);
|
1339 |
-
if($v){
|
1340 |
-
$versions[$download['slug']] = $v;
|
1341 |
-
}
|
1342 |
-
}
|
1343 |
-
|
1344 |
-
}
|
1345 |
-
|
1346 |
-
}
|
1347 |
-
|
1348 |
-
}
|
1349 |
-
|
1350 |
-
return $versions;
|
1351 |
-
}
|
1352 |
-
|
1353 |
-
public function get_repository_site_key($repository_id){
|
1354 |
-
$site_key = false;
|
1355 |
-
|
1356 |
-
if(!empty($this->settings['repositories'][$repository_id]['subscription']['key'])){
|
1357 |
-
$site_key = $this->settings['repositories'][$repository_id]['subscription']['key'];
|
1358 |
-
}
|
1359 |
-
|
1360 |
-
return $site_key;
|
1361 |
-
}
|
1362 |
-
|
1363 |
-
public function repository_has_valid_subscription($repository_id){
|
1364 |
-
|
1365 |
-
$valid = false;
|
1366 |
-
|
1367 |
-
if(!empty($this->settings['repositories'][$repository_id]['subscription'])){
|
1368 |
-
|
1369 |
-
$subscription = $this->settings['repositories'][$repository_id]['subscription']['data'];
|
1370 |
-
$valid = ( $subscription->status == 1 && (strtotime($subscription->expires) > time() || empty($subscription->expires)) ) || $subscription->status == 4;
|
1371 |
-
|
1372 |
-
}
|
1373 |
-
return $valid;
|
1374 |
-
|
1375 |
-
}
|
1376 |
-
|
1377 |
-
public function repository_has_subscription($repository_id){
|
1378 |
-
$key = false;
|
1379 |
-
if(!empty($this->settings['repositories'][$repository_id]['subscription']['key'])){
|
1380 |
-
$key = $this->settings['repositories'][$repository_id]['subscription']['key'];
|
1381 |
-
}
|
1382 |
-
|
1383 |
-
return $key;
|
1384 |
-
|
1385 |
-
}
|
1386 |
-
|
1387 |
-
public function repository_has_expired_subscription($repository_id){
|
1388 |
-
|
1389 |
-
return $this->repository_has_subscription($repository_id) && !$this->repository_has_valid_subscription($repository_id);
|
1390 |
-
|
1391 |
-
}
|
1392 |
-
|
1393 |
-
public function get_generic_product_name($repository_id){
|
1394 |
-
|
1395 |
-
return $this->settings['repositories'][$repository_id]['data']['product-name'];
|
1396 |
-
|
1397 |
-
}
|
1398 |
-
|
1399 |
-
public function show_subscription_renew_warning($repository_id, $subscription_id){
|
1400 |
-
|
1401 |
-
$show = false;
|
1402 |
-
|
1403 |
-
$data = $this->settings['repositories'][$repository_id]['data'];
|
1404 |
-
if(!empty($data['subscriptions_meta'])){
|
1405 |
-
if(isset($data['subscriptions_meta']['expiration'])){
|
1406 |
-
|
1407 |
-
if(!empty($data['subscriptions_meta']['expiration'][$subscription_id])){
|
1408 |
-
|
1409 |
-
$days = $data['subscriptions_meta']['expiration'][$subscription_id]['days_warning'];
|
1410 |
-
$message = $data['subscriptions_meta']['expiration'][$subscription_id]['warning_message'];
|
1411 |
-
|
1412 |
-
}else{
|
1413 |
-
|
1414 |
-
//defaults
|
1415 |
-
$days = 30;
|
1416 |
-
$message = __('You will have to renew your subscription in order to continue getting the updates and support.', 'installer');
|
1417 |
-
|
1418 |
-
}
|
1419 |
-
|
1420 |
-
if(!empty($this->settings['repositories'][$repository_id]['subscription'])){
|
1421 |
-
$subscription = $this->settings['repositories'][$repository_id]['subscription'];
|
1422 |
-
|
1423 |
-
if($subscription['data']->subscription_type == $subscription_id && !empty($subscription['data']->expires)){
|
1424 |
-
|
1425 |
-
if(strtotime($subscription['data']->expires) < strtotime(sprintf("+%d day", $days))){
|
1426 |
-
|
1427 |
-
$days_to_expiration = ceil((strtotime($subscription['data']->expires) - time()) / 86400);
|
1428 |
-
|
1429 |
-
echo '<div><p class="installer-warn-box">' .
|
1430 |
-
sprintf(_n('Your subscription expires in %d day.', 'Your subscription expires in %d days.', $days_to_expiration, 'installer'), $days_to_expiration) .
|
1431 |
-
'<br />' . $message .
|
1432 |
-
'</p></div>';
|
1433 |
-
|
1434 |
-
$show = true;
|
1435 |
-
|
1436 |
-
}
|
1437 |
-
|
1438 |
-
}
|
1439 |
-
|
1440 |
-
}
|
1441 |
-
|
1442 |
-
|
1443 |
-
}
|
1444 |
-
}
|
1445 |
-
|
1446 |
-
|
1447 |
-
return $show;
|
1448 |
-
|
1449 |
-
}
|
1450 |
-
|
1451 |
-
public function setup_plugins_renew_warnings(){
|
1452 |
-
|
1453 |
-
$plugins = get_plugins();
|
1454 |
-
|
1455 |
-
$subscriptions_with_warnings = array();
|
1456 |
-
foreach($this->settings['repositories'] as $repository_id => $repository){
|
1457 |
-
|
1458 |
-
if($this->repository_has_valid_subscription($repository_id)){
|
1459 |
-
$subscription_type = $this->settings['repositories'][$repository_id]['subscription']['data']->subscription_type;
|
1460 |
-
$expires = $this->settings['repositories'][$repository_id]['subscription']['data']->expires;
|
1461 |
-
|
1462 |
-
$never_expires = isset($this->settings['repositories'][$repository_id]['subscription'])
|
1463 |
-
&& empty($this->settings['repositories'][$repository_id]['subscription']['data']->expires)
|
1464 |
-
&& (
|
1465 |
-
$this->settings['repositories'][$repository_id]['subscription']['data']->status == 4 ||
|
1466 |
-
$this->settings['repositories'][$repository_id]['subscription']['data']->status == 1
|
1467 |
-
);
|
1468 |
-
|
1469 |
-
if(!$never_expires){
|
1470 |
-
if(isset($this->settings['repositories'][$repository_id]['data']['subscriptions_meta']['expiration'][$subscription_type])){
|
1471 |
-
|
1472 |
-
$days_warning = $this->settings['repositories'][$repository_id]['data']['subscriptions_meta']['expiration'][$subscription_type]['days_warning'];
|
1473 |
-
$custom_message = $this->settings['repositories'][$repository_id]['data']['subscriptions_meta']['expiration'][$subscription_type]['warning_message'];
|
1474 |
-
|
1475 |
-
}else{
|
1476 |
-
//defaults
|
1477 |
-
$days_warning = 30;
|
1478 |
-
$custom_message = __('You will have to renew your subscription in order to continue getting the updates and support.', 'installer');
|
1479 |
-
}
|
1480 |
-
|
1481 |
-
if(strtotime($expires) < strtotime(sprintf('+%d day', $days_warning)) ){
|
1482 |
-
|
1483 |
-
$days_to_expiration = ceil((strtotime($expires) - time()) / 86400);
|
1484 |
-
|
1485 |
-
$message = sprintf(_n('Your subscription expires in %d day.', 'Your subscription expires in %d days.', $days_to_expiration, 'installer'), $days_to_expiration);
|
1486 |
-
$subscriptions_with_warnings[$subscription_type] = $message . ' ' . $custom_message;
|
1487 |
-
|
1488 |
-
}
|
1489 |
-
}
|
1490 |
-
|
1491 |
-
}
|
1492 |
-
|
1493 |
-
}
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
foreach($plugins as $plugin_id => $plugin){
|
1498 |
-
|
1499 |
-
$slug = dirname($plugin_id);
|
1500 |
-
if(empty($slug)) continue;
|
1501 |
-
|
1502 |
-
foreach($this->settings['repositories'] as $repository_id => $repository){
|
1503 |
-
|
1504 |
-
if($this->repository_has_valid_subscription($repository_id)){
|
1505 |
-
|
1506 |
-
foreach($repository['data']['packages'] as $package){
|
1507 |
-
|
1508 |
-
foreach($package['products'] as $product){
|
1509 |
-
|
1510 |
-
foreach($product['plugins'] as $plugin_slug){
|
1511 |
-
|
1512 |
-
$download = $this->settings['repositories'][$repository_id]['data']['downloads']['plugins'][$plugin_slug];
|
1513 |
-
|
1514 |
-
if($download['slug'] == $slug || $download['name'] == $plugin['Name'] || $download['name'] == $plugin['Title']){ //match order: slug, name, title
|
1515 |
-
|
1516 |
-
if(isset($subscriptions_with_warnings[$product['subscription_type']])){
|
1517 |
-
|
1518 |
-
$this->_plugins_renew_warnings[$plugin_id] = $subscriptions_with_warnings[$product['subscription_type']];
|
1519 |
-
|
1520 |
-
}
|
1521 |
-
|
1522 |
-
}
|
1523 |
-
|
1524 |
-
}
|
1525 |
-
|
1526 |
-
}
|
1527 |
-
|
1528 |
-
}
|
1529 |
-
|
1530 |
-
}
|
1531 |
-
|
1532 |
-
}
|
1533 |
-
|
1534 |
-
}
|
1535 |
-
|
1536 |
-
}
|
1537 |
-
|
1538 |
-
public function queue_plugins_renew_warnings() {
|
1539 |
-
|
1540 |
-
if(!empty($this->_plugins_renew_warnings)){
|
1541 |
-
|
1542 |
-
foreach($this->_plugins_renew_warnings as $plugin_id => $message){
|
1543 |
-
|
1544 |
-
add_action( "after_plugin_row_" . $plugin_id, array($this, 'plugins_renew_warning'), 10, 3 );
|
1545 |
-
}
|
1546 |
-
|
1547 |
-
}
|
1548 |
-
|
1549 |
-
}
|
1550 |
-
|
1551 |
-
public function plugins_renew_warning($plugin_file, $plugin_data, $status){
|
1552 |
-
|
1553 |
-
if(empty($this->_plugins_renew_warnings[$plugin_file])) return;
|
1554 |
-
|
1555 |
-
$wp_list_table = _get_list_table('WP_Plugins_List_Table');
|
1556 |
-
?>
|
1557 |
-
|
1558 |
-
<tr class="plugin-update-tr"><td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="plugin-update colspanchange">
|
1559 |
-
<div class="update-message">
|
1560 |
-
<?php
|
1561 |
-
echo $this->_plugins_renew_warnings[$plugin_file]. ' ';
|
1562 |
-
printf(__('%sRenew here%s.', 'installer'),
|
1563 |
-
'<a href="' . $this->menu_url() . '">', '</a>');
|
1564 |
-
?>
|
1565 |
-
</div>
|
1566 |
-
</tr>
|
1567 |
-
|
1568 |
-
<?php
|
1569 |
-
|
1570 |
-
}
|
1571 |
-
|
1572 |
-
public function get_subscription_type_for_repository($repository_id){
|
1573 |
-
|
1574 |
-
$subscription_type = false;
|
1575 |
-
|
1576 |
-
if(!empty($this->settings['repositories'][$repository_id]['subscription'])){
|
1577 |
-
$subscription_type = $this->settings['repositories'][$repository_id]['subscription']['data']->subscription_type;
|
1578 |
-
}
|
1579 |
-
|
1580 |
-
return $subscription_type;
|
1581 |
-
|
1582 |
-
}
|
1583 |
-
|
1584 |
-
public function have_superior_subscription($subscription_type, $product){
|
1585 |
-
|
1586 |
-
$have = false;
|
1587 |
-
|
1588 |
-
if(is_array($product['upgrades'])){
|
1589 |
-
foreach($product['upgrades'] as $u){
|
1590 |
-
if($u['subscription_type'] == $subscription_type){
|
1591 |
-
$have = true;
|
1592 |
-
break;
|
1593 |
-
}
|
1594 |
-
}
|
1595 |
-
}
|
1596 |
-
|
1597 |
-
return $have;
|
1598 |
-
}
|
1599 |
-
|
1600 |
-
public function is_product_available_for_download($product_name, $repository_id){
|
1601 |
-
|
1602 |
-
$available = false;
|
1603 |
-
|
1604 |
-
$subscription_type = $this->get_subscription_type_for_repository($repository_id);
|
1605 |
-
$expired = $this->repository_has_expired_subscription($repository_id);
|
1606 |
-
|
1607 |
-
if($this->repository_has_subscription($repository_id) && !$expired){
|
1608 |
-
|
1609 |
-
$this->set_hierarchy_and_order();
|
1610 |
-
|
1611 |
-
foreach($this->settings['repositories'][$repository_id]['data']['packages'] as $package_id => $package){
|
1612 |
-
|
1613 |
-
$has_top_package = false;
|
1614 |
-
|
1615 |
-
foreach($package['products'] as $product){
|
1616 |
-
|
1617 |
-
if($subscription_type == $product['subscription_type']){
|
1618 |
-
$has_top_package = true;
|
1619 |
-
if($product['name'] == $product_name){
|
1620 |
-
return $available = true;
|
1621 |
-
}
|
1622 |
-
}
|
1623 |
-
|
1624 |
-
}
|
1625 |
-
|
1626 |
-
if(!empty($package['sub-packages'])){
|
1627 |
-
foreach($package['sub-packages'] as $sub_package){
|
1628 |
-
foreach($sub_package['products'] as $product){
|
1629 |
-
if($product['name'] == $product_name && ($subscription_type == $product['subscription_type'] || $has_top_package)){
|
1630 |
-
return $available = true;
|
1631 |
-
}
|
1632 |
-
}
|
1633 |
-
}
|
1634 |
-
}
|
1635 |
-
|
1636 |
-
}
|
1637 |
-
}
|
1638 |
-
|
1639 |
-
return $available;
|
1640 |
-
|
1641 |
-
}
|
1642 |
-
|
1643 |
-
public function get_upgrade_options($repository_id){
|
1644 |
-
$all_upgrades = array();
|
1645 |
-
|
1646 |
-
|
1647 |
-
//get all products: packages and subpackages
|
1648 |
-
$all_products = array();
|
1649 |
-
foreach($this->settings['repositories'][$repository_id]['data']['packages'] as $package){
|
1650 |
-
foreach($package['products'] as $product) {
|
1651 |
-
$all_products[] = $product;
|
1652 |
-
}
|
1653 |
-
if(!empty($package['sub-packages'])){
|
1654 |
-
foreach($package['sub-packages'] as $subpackage){
|
1655 |
-
foreach($subpackage['products'] as $product) {
|
1656 |
-
$all_products[] = $product;
|
1657 |
-
}
|
1658 |
-
|
1659 |
-
}
|
1660 |
-
|
1661 |
-
}
|
1662 |
-
|
1663 |
-
}
|
1664 |
-
|
1665 |
-
foreach( $all_products as $product ) {
|
1666 |
-
if ($product['upgrades']) {
|
1667 |
-
foreach ($product['upgrades'] as $upgrade) {
|
1668 |
-
if ($this->repository_has_valid_subscription($repository_id) || ($this->repository_has_subscription($repository_id) && $upgrade['including_expired'])) {
|
1669 |
-
$all_upgrades[$upgrade['subscription_type']][$product['subscription_type']] = $upgrade;
|
1670 |
-
}
|
1671 |
-
}
|
1672 |
-
}
|
1673 |
-
}
|
1674 |
-
|
1675 |
-
return $all_upgrades;
|
1676 |
-
|
1677 |
-
}
|
1678 |
-
|
1679 |
-
public function append_site_key_to_download_url($url, $key, $repository_id){
|
1680 |
-
|
1681 |
-
$url_params['site_key'] = $key;
|
1682 |
-
$url_params['site_url'] = $this->get_installer_site_url( $repository_id );
|
1683 |
-
|
1684 |
-
|
1685 |
-
// Add extra parameters for custom Installer packages
|
1686 |
-
if( !empty($this->package_source) ){
|
1687 |
-
$extra = $this->get_extra_url_parameters();
|
1688 |
-
if( !empty($extra['repository']) && $extra['repository'] == $repository_id ) {
|
1689 |
-
unset($extra['repository']);
|
1690 |
-
foreach($extra as $key => $val){
|
1691 |
-
$url_params[$key] = $val;
|
1692 |
-
}
|
1693 |
-
}
|
1694 |
-
}
|
1695 |
-
|
1696 |
-
$url = add_query_arg($url_params, $url);
|
1697 |
-
|
1698 |
-
if($repository_id == 'wpml'){
|
1699 |
-
$url = add_query_arg(array('using_icl' => $this->_using_icl, 'wpml_version' => $this->_wpml_version), $url);
|
1700 |
-
}
|
1701 |
-
|
1702 |
-
return $url;
|
1703 |
-
|
1704 |
-
}
|
1705 |
-
|
1706 |
-
public function plugin_is_installed($name, $slug, $version = null){
|
1707 |
-
|
1708 |
-
$is = false;
|
1709 |
-
|
1710 |
-
$plugins = get_plugins();
|
1711 |
-
|
1712 |
-
foreach($plugins as $plugin_id => $plugin){
|
1713 |
-
|
1714 |
-
$wp_plugin_slug = dirname($plugin_id);
|
1715 |
-
|
1716 |
-
// Exception: embedded plugins
|
1717 |
-
if( $wp_plugin_slug == $slug || $plugin['Name'] == $name || $plugin['Title'] == $name || ( $wp_plugin_slug == $slug . '-embedded' || $plugin['Name'] == $name . ' Embedded' ) ){
|
1718 |
-
if($version){
|
1719 |
-
if(version_compare($plugin['Version'], $version, '>=')){
|
1720 |
-
$is = $plugin['Version'];
|
1721 |
-
}
|
1722 |
-
}else{
|
1723 |
-
$is = $plugin['Version'];
|
1724 |
-
}
|
1725 |
-
|
1726 |
-
break;
|
1727 |
-
}
|
1728 |
-
|
1729 |
-
}
|
1730 |
-
|
1731 |
-
//exception: Types name difference
|
1732 |
-
if(!$is && $name == 'Types'){
|
1733 |
-
return $this->plugin_is_installed('Types - Complete Solution for Custom Fields and Types', $slug, $version);
|
1734 |
-
}
|
1735 |
-
|
1736 |
-
return $is;
|
1737 |
-
}
|
1738 |
-
|
1739 |
-
public function plugin_is_embedded_version($name, $slug){
|
1740 |
-
$is = false;
|
1741 |
-
|
1742 |
-
$plugins = get_plugins();
|
1743 |
-
|
1744 |
-
//false if teh full version is also installed
|
1745 |
-
$is_full_installed = false;
|
1746 |
-
foreach($plugins as $plugin_id => $plugin){
|
1747 |
-
|
1748 |
-
if(($plugin['Name'] == $name && !preg_match("#-embedded$#", $slug)) ){
|
1749 |
-
$is_full_installed = true;
|
1750 |
-
break;
|
1751 |
-
}
|
1752 |
-
|
1753 |
-
}
|
1754 |
-
|
1755 |
-
if($is_full_installed){
|
1756 |
-
return false;
|
1757 |
-
}
|
1758 |
-
|
1759 |
-
foreach($plugins as $plugin_id => $plugin){
|
1760 |
-
|
1761 |
-
// TBD
|
1762 |
-
$wp_plugin_slug = dirname($plugin_id);
|
1763 |
-
if( $wp_plugin_slug == $slug . '-embedded' && $plugin['Name'] == $name . ' Embedded'){
|
1764 |
-
$is = true;
|
1765 |
-
break;
|
1766 |
-
}
|
1767 |
-
|
1768 |
-
}
|
1769 |
-
|
1770 |
-
return $is;
|
1771 |
-
|
1772 |
-
}
|
1773 |
-
|
1774 |
-
//Alias for plugin_is_installed
|
1775 |
-
public function get_plugin_installed_version($name, $slug){
|
1776 |
-
|
1777 |
-
return $this->plugin_is_installed($name, $slug);
|
1778 |
-
|
1779 |
-
}
|
1780 |
-
|
1781 |
-
public function get_plugin_repository_version($repository_id, $slug){
|
1782 |
-
$version = false;
|
1783 |
-
|
1784 |
-
if(!empty($this->settings['repositories'][$repository_id]['data']['packages'])){
|
1785 |
-
foreach($this->settings['repositories'][$repository_id]['data']['packages'] as $package){
|
1786 |
-
foreach($package['products'] as $product) {
|
1787 |
-
|
1788 |
-
foreach($product['plugins'] as $plugin_slug){
|
1789 |
-
|
1790 |
-
$download = $this->settings['repositories'][$repository_id]['data']['downloads']['plugins'][$plugin_slug];
|
1791 |
-
|
1792 |
-
if($download['slug'] == $slug){
|
1793 |
-
$version = $download['version'];
|
1794 |
-
break (3);
|
1795 |
-
}
|
1796 |
-
|
1797 |
-
}
|
1798 |
-
|
1799 |
-
}
|
1800 |
-
}
|
1801 |
-
}
|
1802 |
-
|
1803 |
-
return $version;
|
1804 |
-
}
|
1805 |
-
|
1806 |
-
public function is_uploading_allowed(){
|
1807 |
-
|
1808 |
-
//_deprecated_function ( __FUNCTION__, '1.7.3', 'Installer_Dependencies::' . __FUNCTION__ );
|
1809 |
-
return $this->dependencies->is_uploading_allowed();
|
1810 |
-
|
1811 |
-
}
|
1812 |
-
|
1813 |
-
public function download_plugin_ajax_handler(){
|
1814 |
-
|
1815 |
-
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
1816 |
-
require_once $this->plugin_path() . '/includes/installer-upgrader-skins.php';
|
1817 |
-
|
1818 |
-
$data = json_decode( base64_decode( sanitize_text_field ( $_POST['data'] ) ), true );
|
1819 |
-
|
1820 |
-
$ret = false;
|
1821 |
-
$plugin_id = false;
|
1822 |
-
$message = '';
|
1823 |
-
|
1824 |
-
//validate subscription
|
1825 |
-
$site_key = $this->get_repository_site_key($data['repository_id']);
|
1826 |
-
$subscription_data = $this->fetch_subscription_data( $data['repository_id'], $site_key , self::SITE_KEY_VALIDATION_SOURCE_DOWNLOAD_REPORT);
|
1827 |
-
|
1828 |
-
if($subscription_data && !is_wp_error($subscription_data) && $this->repository_has_valid_subscription($data['repository_id'])){
|
1829 |
-
|
1830 |
-
if($data['nonce'] == wp_create_nonce('install_plugin_' . $data['url'])){
|
1831 |
-
|
1832 |
-
$upgrader_skins = new Installer_Upgrader_Skins(); //use our custom (mute) Skin
|
1833 |
-
$upgrader = new Plugin_Upgrader($upgrader_skins);
|
1834 |
-
|
1835 |
-
remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
|
1836 |
-
|
1837 |
-
$plugins = get_plugins();
|
1838 |
-
|
1839 |
-
//upgrade or install?
|
1840 |
-
foreach($plugins as $id => $plugin){
|
1841 |
-
$wp_plugin_slug = dirname($id);
|
1842 |
-
$is_embedded = $this->plugin_is_embedded_version(preg_replace('/ Embedded$/', '', $plugin['Name']), preg_replace('/-embedded$/', '', $wp_plugin_slug));
|
1843 |
-
|
1844 |
-
if($wp_plugin_slug == $data['slug'] || $is_embedded && preg_replace('/-embedded$/', '', $wp_plugin_slug) == $data['slug']){
|
1845 |
-
$plugin_id = $id;
|
1846 |
-
break;
|
1847 |
-
}
|
1848 |
-
}
|
1849 |
-
|
1850 |
-
if($plugin_id && empty($is_embedded)){ //upgrade
|
1851 |
-
$response['upgrade'] = 1;
|
1852 |
-
|
1853 |
-
$plugin_is_active = is_plugin_active($plugin_id);
|
1854 |
-
|
1855 |
-
$ret = $upgrader->upgrade($plugin_id);
|
1856 |
-
|
1857 |
-
if(!$ret && !empty($upgrader->skin->installer_error)){
|
1858 |
-
if(is_wp_error($upgrader->skin->installer_error)){
|
1859 |
-
$message = $upgrader->skin->installer_error->get_error_message() .
|
1860 |
-
' (' . $upgrader->skin->installer_error->get_error_data() . ')';
|
1861 |
-
}
|
1862 |
-
}
|
1863 |
-
|
1864 |
-
if($plugin_is_active){
|
1865 |
-
//prevent redirects
|
1866 |
-
add_filter('wp_redirect', '__return_false');
|
1867 |
-
activate_plugin($plugin_id);
|
1868 |
-
}
|
1869 |
-
|
1870 |
-
}else{ //install
|
1871 |
-
|
1872 |
-
if($is_embedded){
|
1873 |
-
delete_plugins(array($plugin_id));
|
1874 |
-
}
|
1875 |
-
|
1876 |
-
$response['install'] = 1;
|
1877 |
-
$ret = $upgrader->install($data['url']);
|
1878 |
-
if(!$ret && !empty($upgrader->skin->installer_error)){
|
1879 |
-
if(is_wp_error($upgrader->skin->installer_error)){
|
1880 |
-
$message = $upgrader->skin->installer_error->get_error_message() .
|
1881 |
-
' (' . $upgrader->skin->installer_error->get_error_data() . ')';
|
1882 |
-
}
|
1883 |
-
}
|
1884 |
-
}
|
1885 |
-
|
1886 |
-
$plugins = get_plugins(); //read again
|
1887 |
-
|
1888 |
-
if($ret && !empty($_POST['activate'])){
|
1889 |
-
foreach($plugins as $id => $plugin){
|
1890 |
-
$wp_plugin_slug = dirname($id);
|
1891 |
-
if($wp_plugin_slug == $data['slug']){
|
1892 |
-
$plugin_version = $plugin['Version'];
|
1893 |
-
$plugin_id = $id;
|
1894 |
-
break;
|
1895 |
-
}
|
1896 |
-
}
|
1897 |
-
|
1898 |
-
}
|
1899 |
-
|
1900 |
-
}
|
1901 |
-
|
1902 |
-
} else { //subscription not valid
|
1903 |
-
|
1904 |
-
$ret = false;
|
1905 |
-
$message = __('Your subscription appears to no longer be valid. Please try to register again using a valid site key.', 'installer');
|
1906 |
-
}
|
1907 |
-
|
1908 |
-
$response['version'] = isset($plugin_version) ? $plugin_version : 0;
|
1909 |
-
$response['plugin_id'] = $plugin_id;
|
1910 |
-
$response['nonce'] = wp_create_nonce('activate_' . $plugin_id);
|
1911 |
-
$response['success'] = $ret;
|
1912 |
-
$response['message'] = $message;
|
1913 |
-
|
1914 |
-
echo json_encode( $response );
|
1915 |
-
exit;
|
1916 |
-
|
1917 |
-
}
|
1918 |
-
|
1919 |
-
public function download_plugin($slug, $url){
|
1920 |
-
|
1921 |
-
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
1922 |
-
require_once $this->plugin_path() . '/includes/installer-upgrader-skins.php';
|
1923 |
-
|
1924 |
-
$upgrader_skins = new Installer_Upgrader_Skins(); //use our custom (mute) Skin
|
1925 |
-
$upgrader = new Plugin_Upgrader($upgrader_skins);
|
1926 |
-
|
1927 |
-
remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
|
1928 |
-
|
1929 |
-
$plugins = get_plugins();
|
1930 |
-
|
1931 |
-
$plugin_id = false;
|
1932 |
-
|
1933 |
-
//upgrade or install?
|
1934 |
-
foreach($plugins as $id => $plugin){
|
1935 |
-
$wp_plugin_slug = dirname($id);
|
1936 |
-
if($wp_plugin_slug == $slug){
|
1937 |
-
$plugin_id = $id;
|
1938 |
-
break;
|
1939 |
-
}
|
1940 |
-
}
|
1941 |
-
|
1942 |
-
if($plugin_id){ //upgrade
|
1943 |
-
|
1944 |
-
$plugin_is_active = is_plugin_active($plugin_id);
|
1945 |
-
|
1946 |
-
$ret = $upgrader->upgrade($plugin_id);
|
1947 |
-
|
1948 |
-
if($plugin_is_active){
|
1949 |
-
activate_plugin($plugin_id);
|
1950 |
-
}
|
1951 |
-
|
1952 |
-
}else{ //install
|
1953 |
-
$ret = $upgrader->install($url);
|
1954 |
-
}
|
1955 |
-
|
1956 |
-
return $ret;
|
1957 |
-
|
1958 |
-
}
|
1959 |
-
|
1960 |
-
public function activate_plugin(){
|
1961 |
-
|
1962 |
-
$error = '';
|
1963 |
-
|
1964 |
-
$plugin_id = sanitize_text_field ( $_POST['plugin_id'] );
|
1965 |
-
if(isset($_POST['nonce']) && $plugin_id && $_POST['nonce'] == wp_create_nonce('activate_' . $plugin_id )){
|
1966 |
-
|
1967 |
-
// Deactivate any embedded version
|
1968 |
-
$plugin_slug = dirname($plugin_id);
|
1969 |
-
$active_plugins = get_option('active_plugins');
|
1970 |
-
foreach($active_plugins as $plugin){
|
1971 |
-
$wp_plugin_slug = dirname($plugin);
|
1972 |
-
if($wp_plugin_slug == $plugin_slug . '-embedded'){
|
1973 |
-
deactivate_plugins(array($plugin));
|
1974 |
-
break;
|
1975 |
-
}
|
1976 |
-
}
|
1977 |
-
|
1978 |
-
//prevent redirects
|
1979 |
-
add_filter('wp_redirect', '__return_false', 10000);
|
1980 |
-
|
1981 |
-
$return = activate_plugin($plugin_id);
|
1982 |
-
|
1983 |
-
if(is_wp_error($return)){
|
1984 |
-
$error = $return->get_error_message();
|
1985 |
-
}
|
1986 |
-
|
1987 |
-
}else{
|
1988 |
-
$error = 'error';
|
1989 |
-
}
|
1990 |
-
|
1991 |
-
$ret = array('error' => $error);
|
1992 |
-
|
1993 |
-
echo json_encode($ret);
|
1994 |
-
exit;
|
1995 |
-
|
1996 |
-
}
|
1997 |
-
|
1998 |
-
public function custom_plugins_api_call($false, $action, $args){
|
1999 |
-
|
2000 |
-
if($action == 'plugin_information'){
|
2001 |
-
|
2002 |
-
$plugins = get_plugins();
|
2003 |
-
$plugin_names = array();
|
2004 |
-
foreach( $plugins as $plugin_id => $plugin ) {
|
2005 |
-
// plugins by WP slug which (plugin folder) which can be different
|
2006 |
-
// will use this to compare by title
|
2007 |
-
$plugin_names[ dirname( $plugin_id ) ] = array(
|
2008 |
-
'name' => $plugin['Name'],
|
2009 |
-
'title' => $plugin['Title'],
|
2010 |
-
);
|
2011 |
-
}
|
2012 |
-
|
2013 |
-
$slug = $args->slug;
|
2014 |
-
|
2015 |
-
foreach($this->settings['repositories'] as $repository_id => $repository){
|
2016 |
-
|
2017 |
-
if(!$this->repository_has_valid_subscription($repository_id)){
|
2018 |
-
$site_key = false;
|
2019 |
-
}else{
|
2020 |
-
$site_key = $repository['subscription']['key'];
|
2021 |
-
}
|
2022 |
-
|
2023 |
-
foreach($repository['data']['packages'] as $package){
|
2024 |
-
|
2025 |
-
foreach($package['products'] as $product){
|
2026 |
-
|
2027 |
-
foreach($product['plugins'] as $plugin_slug){
|
2028 |
-
|
2029 |
-
$download = $this->settings['repositories'][$repository_id]['data']['downloads']['plugins'][$plugin_slug];
|
2030 |
-
|
2031 |
-
if( $download['slug'] == $slug ||
|
2032 |
-
isset( $plugin_names[$slug] ) && (
|
2033 |
-
$plugin_names[$slug]['name'] == $download['name'] ||
|
2034 |
-
$plugin_names[$slug]['title'] == $download['name']
|
2035 |
-
)
|
2036 |
-
){
|
2037 |
-
|
2038 |
-
if( !empty( $download['free-on-wporg'] ) ){
|
2039 |
-
return false; // use data from wordpress.org
|
2040 |
-
}
|
2041 |
-
|
2042 |
-
$res = new stdClass();
|
2043 |
-
$res->external = true;
|
2044 |
-
|
2045 |
-
$res->name = $download['name'];
|
2046 |
-
$res->slug = $slug;
|
2047 |
-
$res->version = $download['version'];
|
2048 |
-
$res->author = '';
|
2049 |
-
$res->author_profile = '';
|
2050 |
-
$res->last_updated = $download['date'];
|
2051 |
-
|
2052 |
-
if($site_key){
|
2053 |
-
$res->download_link = $this->append_site_key_to_download_url($download['url'], $site_key, $repository_id);
|
2054 |
-
}
|
2055 |
-
|
2056 |
-
$res->homepage = $repository['data']['url'];
|
2057 |
-
$res->sections = array('Description' => $download['description'], 'Changelog' => $download['changelog']);
|
2058 |
-
|
2059 |
-
return $res;
|
2060 |
-
|
2061 |
-
}
|
2062 |
-
|
2063 |
-
}
|
2064 |
-
|
2065 |
-
}
|
2066 |
-
|
2067 |
-
}
|
2068 |
-
|
2069 |
-
}
|
2070 |
-
|
2071 |
-
}
|
2072 |
-
|
2073 |
-
return $false;
|
2074 |
-
|
2075 |
-
}
|
2076 |
-
|
2077 |
-
public function plugins_upgrade_check($update_plugins){
|
2078 |
-
|
2079 |
-
if(!empty($this->settings['repositories'])){
|
2080 |
-
|
2081 |
-
$plugins = get_plugins();
|
2082 |
-
|
2083 |
-
foreach($plugins as $plugin_id => $plugin){
|
2084 |
-
|
2085 |
-
$slug = dirname($plugin_id);
|
2086 |
-
if(empty($slug)) continue;
|
2087 |
-
|
2088 |
-
$version = $plugin['Version'];
|
2089 |
-
$name = $plugin['Name'];
|
2090 |
-
|
2091 |
-
foreach($this->settings['repositories'] as $repository_id => $repository){
|
2092 |
-
|
2093 |
-
|
2094 |
-
if(!$this->repository_has_valid_subscription($repository_id)){
|
2095 |
-
$site_key = false;
|
2096 |
-
}else{
|
2097 |
-
$site_key = $repository['subscription']['key'];
|
2098 |
-
//$subscription_type = $this->get_subscription_type_for_repository($repository_id);
|
2099 |
-
}
|
2100 |
-
|
2101 |
-
foreach($repository['data']['packages'] as $package){
|
2102 |
-
|
2103 |
-
foreach($package['products'] as $product){
|
2104 |
-
|
2105 |
-
foreach($product['plugins'] as $plugin_slug){
|
2106 |
-
|
2107 |
-
$download = $this->settings['repositories'][$repository_id]['data']['downloads']['plugins'][$plugin_slug];
|
2108 |
-
|
2109 |
-
if(!empty($download['free-on-wporg'])) {
|
2110 |
-
continue;
|
2111 |
-
}
|
2112 |
-
|
2113 |
-
if(empty($update_plugins->response[$plugin_id]) && ($download['slug'] == $slug || $download['name'] == $name ) && version_compare($download['version'], $version, '>')){
|
2114 |
-
|
2115 |
-
$response = new stdClass();
|
2116 |
-
$response->id = 0;
|
2117 |
-
$response->slug = $slug;
|
2118 |
-
$response->plugin = $plugin_id;
|
2119 |
-
$response->new_version = $download['version'];
|
2120 |
-
$response->upgrade_notice = '';
|
2121 |
-
$response->url = $download['url'];
|
2122 |
-
if($site_key){
|
2123 |
-
$response->package = $this->append_site_key_to_download_url($download['url'], $site_key, $repository_id);
|
2124 |
-
}
|
2125 |
-
$update_plugins->checked[$plugin_id] = $version;
|
2126 |
-
$update_plugins->response[$plugin_id] = $response;
|
2127 |
-
|
2128 |
-
}
|
2129 |
-
|
2130 |
-
}
|
2131 |
-
|
2132 |
-
}
|
2133 |
-
|
2134 |
-
}
|
2135 |
-
|
2136 |
-
}
|
2137 |
-
|
2138 |
-
}
|
2139 |
-
|
2140 |
-
}
|
2141 |
-
|
2142 |
-
return $update_plugins;
|
2143 |
-
|
2144 |
-
}
|
2145 |
-
|
2146 |
-
public function setup_plugins_page_notices(){
|
2147 |
-
|
2148 |
-
$plugins = get_plugins();
|
2149 |
-
|
2150 |
-
foreach($plugins as $plugin_id => $plugin){
|
2151 |
-
|
2152 |
-
$slug = dirname($plugin_id);
|
2153 |
-
if(empty($slug)) continue;
|
2154 |
-
|
2155 |
-
$name = $plugin['Name'];
|
2156 |
-
|
2157 |
-
foreach($this->settings['repositories'] as $repository_id => $repository){
|
2158 |
-
|
2159 |
-
if(!$this->repository_has_valid_subscription($repository_id)){
|
2160 |
-
$site_key = false;
|
2161 |
-
}else{
|
2162 |
-
$site_key = $repository['subscription']['key'];
|
2163 |
-
}
|
2164 |
-
|
2165 |
-
foreach($repository['data']['packages'] as $package){
|
2166 |
-
|
2167 |
-
foreach($package['products'] as $product){
|
2168 |
-
|
2169 |
-
foreach($product['plugins'] as $plugin_slug){
|
2170 |
-
|
2171 |
-
$download = $this->settings['repositories'][$repository_id]['data']['downloads']['plugins'][$plugin_slug];
|
2172 |
-
|
2173 |
-
if(!empty($download['free-on-wporg'])) {
|
2174 |
-
continue;
|
2175 |
-
}
|
2176 |
-
|
2177 |
-
if( $download['slug'] == $slug || $download['name'] == $name ){
|
2178 |
-
|
2179 |
-
if( !$site_key || !$this->plugin_is_registered($repository_id, $download['slug']) ){
|
2180 |
-
add_action( "after_plugin_row_" . $plugin_id, array($this, 'show_purchase_notice_under_plugin'), 10, 3 );
|
2181 |
-
}
|
2182 |
-
|
2183 |
-
}
|
2184 |
-
|
2185 |
-
}
|
2186 |
-
|
2187 |
-
}
|
2188 |
-
|
2189 |
-
}
|
2190 |
-
|
2191 |
-
}
|
2192 |
-
|
2193 |
-
}
|
2194 |
-
|
2195 |
-
}
|
2196 |
-
|
2197 |
-
public function show_purchase_notice_under_plugin($plugin_file, $plugin_data, $status){
|
2198 |
-
|
2199 |
-
$wp_list_table = _get_list_table('WP_Plugins_List_Table');
|
2200 |
-
$wp_version = preg_replace( '/-(.+)$/', '', $GLOBALS['wp_version'] );
|
2201 |
-
|
2202 |
-
if( version_compare( $wp_version, '4.6', '>=' ) ){
|
2203 |
-
|
2204 |
-
?>
|
2205 |
-
<tr class="plugin-update-tr installer-plugin-update-tr">
|
2206 |
-
<td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="plugin-update colspanchange">
|
2207 |
-
<div class="notice inline notice-warning notice-alt">
|
2208 |
-
<p class="installer-q-icon">
|
2209 |
-
<?php printf( __('You must have a valid subscription in order to get upgrades or support for this plugin. %sPurchase a subscription or enter an existing site key%s.', 'installer'),
|
2210 |
-
'<a href="' . $this->menu_url() . '">', '</a>'); ?>
|
2211 |
-
</p>
|
2212 |
-
</div>
|
2213 |
-
</td>
|
2214 |
-
</tr>
|
2215 |
-
<?php
|
2216 |
-
|
2217 |
-
} else {
|
2218 |
-
|
2219 |
-
?>
|
2220 |
-
<tr class="plugin-update-tr">
|
2221 |
-
<td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="plugin-update colspanchange">
|
2222 |
-
<div class="update-message installer-q-icon">
|
2223 |
-
<?php printf( __('You must have a valid subscription in order to get upgrades or support for this plugin. %sPurchase a subscription or enter an existing site key%s.', 'installer'),
|
2224 |
-
'<a href="' . $this->menu_url() . '">', '</a>'); ?>
|
2225 |
-
</div>
|
2226 |
-
</td>
|
2227 |
-
</tr>
|
2228 |
-
<?php
|
2229 |
-
|
2230 |
-
}
|
2231 |
-
|
2232 |
-
}
|
2233 |
-
|
2234 |
-
public function localize_strings(){
|
2235 |
-
|
2236 |
-
if(!empty($this->settings['repositories'])){
|
2237 |
-
foreach($this->settings['repositories'] as $repository_id => $repository){
|
2238 |
-
//set name as call2action when don't have any
|
2239 |
-
//products
|
2240 |
-
foreach($repository['data']['packages'] as $package_id => $package){
|
2241 |
-
foreach($package['products'] as $product_id => $product){
|
2242 |
-
if(empty($product['call2action'])){
|
2243 |
-
$this->settings['repositories'][$repository_id]['data']['packages'][$package_id]['products'][$product_id]['call2action'] = $product['name'];
|
2244 |
-
}
|
2245 |
-
|
2246 |
-
foreach($product['upgrades'] as $idx => $upg){
|
2247 |
-
if(empty($upg['call2action'])){
|
2248 |
-
$this->settings['repositories'][$repository_id]['data']['packages'][$package_id]['products'][$product_id]['upgrades'][$idx]['call2action'] = $upg['name'];
|
2249 |
-
}
|
2250 |
-
}
|
2251 |
-
|
2252 |
-
foreach($product['renewals'] as $idx => $rnw){
|
2253 |
-
if(empty($rnw['call2action'])){
|
2254 |
-
$this->settings['repositories'][$repository_id]['data']['packages'][$package_id]['products'][$product_id]['renewals'][$idx]['call2action'] = $rnw['name'];
|
2255 |
-
}
|
2256 |
-
|
2257 |
-
}
|
2258 |
-
|
2259 |
-
}
|
2260 |
-
}
|
2261 |
-
}
|
2262 |
-
}
|
2263 |
-
|
2264 |
-
global $sitepress;
|
2265 |
-
if(is_null($sitepress)){
|
2266 |
-
return;
|
2267 |
-
}
|
2268 |
-
|
2269 |
-
// default strings are always in English
|
2270 |
-
$user_admin_language = $sitepress->get_admin_language();
|
2271 |
-
|
2272 |
-
if($user_admin_language != 'en'){
|
2273 |
-
foreach($this->settings['repositories'] as $repository_id => $repository){
|
2274 |
-
|
2275 |
-
$localization = $repository['data']['localization'];
|
2276 |
-
|
2277 |
-
//packages
|
2278 |
-
foreach($repository['data']['packages'] as $package_id => $package){
|
2279 |
-
|
2280 |
-
if( isset($localization['packages'][$package_id]['name'][$user_admin_language]) ){
|
2281 |
-
$this->settings['repositories'][$repository_id]['data']['packages'][$package_id]['name'] = $localization['packages'][$package_id]['name'][$user_admin_language];
|
2282 |
-
}
|
2283 |
-
if( isset($localization['packages'][$package_id]['description'][$user_admin_language]) ){
|
2284 |
-
$this->settings['repositories'][$repository_id]['data']['packages'][$package_id]['description'] = $localization['packages'][$package_id]['description'][$user_admin_language];
|
2285 |
-
}
|
2286 |
-
|
2287 |
-
}
|
2288 |
-
|
2289 |
-
//products
|
2290 |
-
foreach($repository['data']['packages'] as $package_id => $package){
|
2291 |
-
foreach($package['products'] as $product_id => $product){
|
2292 |
-
|
2293 |
-
if( isset($localization['products'][$product_id]['name'][$user_admin_language]) ){
|
2294 |
-
$this->settings['repositories'][$repository_id]['data']['packages'][$package_id]['products'][$product_id]['name']
|
2295 |
-
= $localization['products'][$product_id]['name'][$user_admin_language];
|
2296 |
-
}
|
2297 |
-
if( isset($localization['products'][$product_id]['description'][$user_admin_language]) ){
|
2298 |
-
$this->settings['repositories'][$repository_id]['data']['packages'][$package_id]['products'][$product_id]['description']
|
2299 |
-
= $localization['products'][$product_id]['description'][$user_admin_language];
|
2300 |
-
}
|
2301 |
-
if( isset($localization['products'][$product_id]['call2action'][$user_admin_language]) ){
|
2302 |
-
$this->settings['repositories'][$repository_id]['data']['packages'][$package_id]['products'][$product_id]['name']
|
2303 |
-
= $localization['products'][$product_id]['call2action'][$user_admin_language];
|
2304 |
-
}
|
2305 |
-
|
2306 |
-
|
2307 |
-
}
|
2308 |
-
}
|
2309 |
-
|
2310 |
-
//subscription info
|
2311 |
-
if(isset($repository['data']['subscriptions_meta']['expiration'])){
|
2312 |
-
foreach($repository['data']['subscriptions_meta']['expiration'] as $subscription_id => $note){
|
2313 |
-
if(isset($localization['subscriptions-notes'][$subscription_id]['expiration-warning'][$user_admin_language])){
|
2314 |
-
$this->settings['repositories'][$repository_id]['data']['subscriptions_meta']['expiration'][$subscription_id]['warning_message']
|
2315 |
-
= $localization['subscriptions-notes'][$subscription_id]['expiration-warning'][$user_admin_language];
|
2316 |
-
}
|
2317 |
-
}
|
2318 |
-
}
|
2319 |
-
|
2320 |
-
}
|
2321 |
-
}
|
2322 |
-
|
2323 |
-
}
|
2324 |
-
|
2325 |
-
public function get_matching_cp($repository, $args = array()){
|
2326 |
-
$match = false;
|
2327 |
-
|
2328 |
-
|
2329 |
-
$cp_name = $cp_author = false;
|
2330 |
-
|
2331 |
-
if(isset($this->config['src_name']) && isset($this->config['src_author'])){
|
2332 |
-
|
2333 |
-
$cp_name = $this->config['src_name'];
|
2334 |
-
$cp_author = $this->config['src_author'];
|
2335 |
-
|
2336 |
-
}elseif(isset($args['src_name']) && isset($args['src_author'])){
|
2337 |
-
|
2338 |
-
$cp_name = $args['src_name'];
|
2339 |
-
$cp_author = $args['src_author'];
|
2340 |
-
|
2341 |
-
}
|
2342 |
-
|
2343 |
-
if(isset($repository['data']['marketing_cp'])){
|
2344 |
-
|
2345 |
-
foreach($repository['data']['marketing_cp'] as $cp){
|
2346 |
-
|
2347 |
-
if(!empty($cp['exp']) && time() > $cp['exp']){
|
2348 |
-
continue;
|
2349 |
-
}
|
2350 |
-
|
2351 |
-
//Use theme_name for plugins too
|
2352 |
-
if(!empty($cp['theme_name'])){
|
2353 |
-
if($cp['author_name'] == $cp_author && $cp['theme_name'] == $cp_name){
|
2354 |
-
$match = $cp;
|
2355 |
-
continue;
|
2356 |
-
}
|
2357 |
-
}else{
|
2358 |
-
if($cp['author_name'] == $cp_author){
|
2359 |
-
$match = $cp;
|
2360 |
-
continue;
|
2361 |
-
}
|
2362 |
-
}
|
2363 |
-
|
2364 |
-
}
|
2365 |
-
|
2366 |
-
}
|
2367 |
-
|
2368 |
-
return $match;
|
2369 |
-
}
|
2370 |
-
|
2371 |
-
public function set_filtered_prices($args = array()){
|
2372 |
-
|
2373 |
-
foreach($this->settings['repositories'] as $repository_id => $repository){
|
2374 |
-
|
2375 |
-
$match = $this->get_matching_cp($repository, $args);
|
2376 |
-
|
2377 |
-
if(empty($match)) continue;
|
2378 |
-
|
2379 |
-
foreach($repository['data']['packages'] as $package_id => $package){
|
2380 |
-
|
2381 |
-
foreach($package['products'] as $product_id => $product){
|
2382 |
-
|
2383 |
-
if($match['dtp'] == '%'){
|
2384 |
-
$fprice = round( $product['price'] * (1 - $match['amt']/100), 2 );
|
2385 |
-
$fprice = $fprice != round($fprice) ? sprintf('%.2f', $fprice) : round($fprice, 0);
|
2386 |
-
}elseif($match['dtp'] == '-'){
|
2387 |
-
$fprice = $product['price'] - $match['amt'];
|
2388 |
-
}else{
|
2389 |
-
$fprice = $product['price'];
|
2390 |
-
}
|
2391 |
-
|
2392 |
-
if($fprice){
|
2393 |
-
$this->settings['repositories'][$repository_id]['data']['packages'][$package_id]['products'][$product_id]['price_disc'] = $fprice;
|
2394 |
-
|
2395 |
-
$url_glue = false !== strpos($this->settings['repositories'][$repository_id]['data']['packages'][$package_id]['products'][$product_id]['url'], '?') ? '&' : '?';
|
2396 |
-
$cpndata = base64_encode(json_encode(array('theme_author' => $match['author_name'], 'theme_name' => $match['theme_name'], 'vlc' => $match['vlc'])));
|
2397 |
-
$this->settings['repositories'][$repository_id]['data']['packages'][$package_id]['products'][$product_id]['url'] .= $url_glue . 'cpn=' . $cpndata;
|
2398 |
-
|
2399 |
-
foreach($product['upgrades'] as $upgrade_id => $upgrade){
|
2400 |
-
|
2401 |
-
$fprice = false;
|
2402 |
-
if($match['dtp'] == '%'){
|
2403 |
-
$fprice = round( $upgrade['price'] * (1 - $match['amt']/100), 2 );
|
2404 |
-
$fprice = $fprice != round($fprice) ? sprintf('%.2f', $fprice) : round($fprice, 0);
|
2405 |
-
}elseif($match['dtp'] == '-'){
|
2406 |
-
$fprice = $upgrade['price'] - $match['amt'];
|
2407 |
-
}
|
2408 |
-
if($fprice){
|
2409 |
-
$this->settings['repositories'][$repository_id]['data']['packages'][$package_id]['products'][$product_id]['upgrades'][$upgrade_id]['price_disc'] = $fprice;
|
2410 |
-
$this->settings['repositories'][$repository_id]['data']['packages'][$package_id]['products'][$product_id]['upgrades'][$upgrade_id]['url'] .= $url_glue . 'cpn=' . $cpndata;
|
2411 |
-
}
|
2412 |
-
|
2413 |
-
|
2414 |
-
}
|
2415 |
-
|
2416 |
-
}
|
2417 |
-
|
2418 |
-
}
|
2419 |
-
|
2420 |
-
}
|
2421 |
-
|
2422 |
-
}
|
2423 |
-
|
2424 |
-
}
|
2425 |
-
|
2426 |
-
public function set_hierarchy_and_order(){
|
2427 |
-
|
2428 |
-
//2 levels
|
2429 |
-
if(!empty($this->settings['repositories'])) {
|
2430 |
-
foreach ($this->settings['repositories'] as $repository_id => $repository) {
|
2431 |
-
|
2432 |
-
if( empty( $repository['data']['packages'] ) ) continue;
|
2433 |
-
|
2434 |
-
$all_packages = $repository['data']['packages'];
|
2435 |
-
$ordered_packages = array();
|
2436 |
-
|
2437 |
-
//backward compatibility - 'order'
|
2438 |
-
foreach($all_packages as $k => $v){
|
2439 |
-
if(!isset($v['order'])){
|
2440 |
-
$all_packages[$k]['order'] = 0;
|
2441 |
-
}
|
2442 |
-
}
|
2443 |
-
|
2444 |
-
//select parents
|
2445 |
-
foreach ($all_packages as $package_id => $package) {
|
2446 |
-
if(empty($package['parent'])){
|
2447 |
-
$ordered_packages[$package_id] = $package;
|
2448 |
-
}
|
2449 |
-
}
|
2450 |
-
|
2451 |
-
//add sub-packages
|
2452 |
-
foreach($all_packages as $package_id => $package){
|
2453 |
-
if(!empty($package['parent'])) {
|
2454 |
-
if(isset($ordered_packages[$package['parent']])){
|
2455 |
-
$ordered_packages[$package['parent']]['sub-packages'][$package_id] = $package;
|
2456 |
-
}
|
2457 |
-
}
|
2458 |
-
}
|
2459 |
-
|
2460 |
-
// order parents
|
2461 |
-
usort($ordered_packages, array($this, '_order_packages_callback'));
|
2462 |
-
//order sub-packages
|
2463 |
-
foreach($ordered_packages as $package_id => $package){
|
2464 |
-
if(!empty($package['sub-packages'])) {
|
2465 |
-
usort($ordered_packages[$package_id]['sub-packages'], create_function('$a, $b', 'return $a[\'order\'] > $b[\'order\'];'));
|
2466 |
-
}
|
2467 |
-
}
|
2468 |
-
|
2469 |
-
$this->settings['repositories'][$repository_id]['data']['packages'] = $ordered_packages;
|
2470 |
-
|
2471 |
-
|
2472 |
-
}
|
2473 |
-
}
|
2474 |
-
|
2475 |
-
|
2476 |
-
}
|
2477 |
-
|
2478 |
-
public function _order_packages_callback($a, $b){
|
2479 |
-
return $a['order'] > $b['order'];
|
2480 |
-
}
|
2481 |
-
|
2482 |
-
public function get_support_tag_by_name( $name, $repository ){
|
2483 |
-
|
2484 |
-
if( is_array($this->settings['repositories'][$repository]['data']['support_tags'] )){
|
2485 |
-
foreach( $this->settings['repositories'][$repository]['data']['support_tags'] as $support_tag){
|
2486 |
-
if( $support_tag['name'] == $name ){
|
2487 |
-
return $support_tag['url'];
|
2488 |
-
}
|
2489 |
-
}
|
2490 |
-
}
|
2491 |
-
|
2492 |
-
return false;
|
2493 |
-
}
|
2494 |
-
|
2495 |
-
public function plugin_upgrade_custom_errors(){
|
2496 |
-
|
2497 |
-
if ( isset($_REQUEST['action']) ) {
|
2498 |
-
|
2499 |
-
$action = isset($_REQUEST['action']) ? sanitize_text_field ( $_REQUEST['action'] ) : '';
|
2500 |
-
|
2501 |
-
//bulk mode
|
2502 |
-
if('update-selected' == $action) {
|
2503 |
-
|
2504 |
-
global $plugins;
|
2505 |
-
|
2506 |
-
if(isset($plugins) && is_array($plugins)) {
|
2507 |
-
|
2508 |
-
foreach ($plugins as $k => $plugin) {
|
2509 |
-
$plugin_repository = false;
|
2510 |
-
|
2511 |
-
$wp_plugin_slug = dirname($plugin);
|
2512 |
-
|
2513 |
-
foreach ($this->settings['repositories'] as $repository_id => $repository) {
|
2514 |
-
|
2515 |
-
foreach ($repository['data']['packages'] as $package) {
|
2516 |
-
|
2517 |
-
foreach ($package['products'] as $product) {
|
2518 |
-
|
2519 |
-
foreach ($product['plugins'] as $plugin_slug) {
|
2520 |
-
|
2521 |
-
$download = $this->settings['repositories'][$repository_id]['data']['downloads']['plugins'][$plugin_slug];
|
2522 |
-
|
2523 |
-
if ($download['slug'] == $wp_plugin_slug) {
|
2524 |
-
$plugin_repository = $repository_id;
|
2525 |
-
$product_name = $repository['data']['product-name'];
|
2526 |
-
$plugin_name = $download['name'];
|
2527 |
-
$free_on_wporg = !empty($download['free-on-wporg']);
|
2528 |
-
break;
|
2529 |
-
}
|
2530 |
-
|
2531 |
-
}
|
2532 |
-
|
2533 |
-
}
|
2534 |
-
|
2535 |
-
}
|
2536 |
-
|
2537 |
-
}
|
2538 |
-
|
2539 |
-
if ($plugin_repository) {
|
2540 |
-
|
2541 |
-
//validate subscription
|
2542 |
-
static $sub_cache = array();
|
2543 |
-
|
2544 |
-
if(empty($sub_cache[$plugin_repository])){
|
2545 |
-
$site_key = $this->get_repository_site_key($plugin_repository);
|
2546 |
-
if ($site_key) {
|
2547 |
-
$subscription_data = $this->fetch_subscription_data( $plugin_repository, $site_key, self::SITE_KEY_VALIDATION_SOURCE_REVALIDATION );
|
2548 |
-
}
|
2549 |
-
|
2550 |
-
$sub_cache[$plugin_repository]['site_key'] = $site_key;
|
2551 |
-
$sub_cache[$plugin_repository]['subscription_data'] = isset($subscription_data) ? $subscription_data : false;
|
2552 |
-
}else{
|
2553 |
-
|
2554 |
-
$site_key = $sub_cache[$plugin_repository]['site_key'];
|
2555 |
-
$subscription_data = $sub_cache[$plugin_repository]['subscription_data'];
|
2556 |
-
|
2557 |
-
}
|
2558 |
-
|
2559 |
-
if(!$site_key && !empty($free_on_wporg)){ // allow the download from wp.org
|
2560 |
-
continue;
|
2561 |
-
}
|
2562 |
-
|
2563 |
-
if (empty($site_key) || empty($subscription_data)) {
|
2564 |
-
|
2565 |
-
|
2566 |
-
$error_message = sprintf(__("%s cannot update because your site's registration is not valid. Please %sregister %s%s again for this site first.", 'installer'),
|
2567 |
-
'<strong>' . $plugin_name . '</strong>', '<a target="_top" href="' . $this->menu_url() . '&validate_repository=' . $plugin_repository .
|
2568 |
-
'#repository-' . $plugin_repository . '">', $product_name, '</a>');
|
2569 |
-
|
2570 |
-
echo '<div class="updated error"><p>' . $error_message . '</p></div>';
|
2571 |
-
|
2572 |
-
unset($plugins[$k]);
|
2573 |
-
|
2574 |
-
|
2575 |
-
}
|
2576 |
-
|
2577 |
-
}
|
2578 |
-
|
2579 |
-
}
|
2580 |
-
|
2581 |
-
}
|
2582 |
-
|
2583 |
-
}
|
2584 |
-
|
2585 |
-
|
2586 |
-
if( 'upgrade-plugin' == $action || 'update-plugin' == $action ) {
|
2587 |
-
|
2588 |
-
$plugin = isset($_REQUEST['plugin']) ? trim( sanitize_text_field ( $_REQUEST['plugin'] ) ) : '';
|
2589 |
-
|
2590 |
-
$wp_plugin_slug = dirname($plugin);
|
2591 |
-
|
2592 |
-
$plugin_repository = false;
|
2593 |
-
|
2594 |
-
foreach($this->settings['repositories'] as $repository_id => $repository){
|
2595 |
-
|
2596 |
-
foreach($repository['data']['packages'] as $package){
|
2597 |
-
|
2598 |
-
foreach($package['products'] as $product){
|
2599 |
-
|
2600 |
-
foreach($product['plugins'] as $plugin_slug){
|
2601 |
-
$download = $this->settings['repositories'][$repository_id]['data']['downloads']['plugins'][$plugin_slug];
|
2602 |
-
|
2603 |
-
//match by folder, will change to match by name and folder
|
2604 |
-
if($download['slug'] == $wp_plugin_slug) {
|
2605 |
-
$plugin_repository = $repository_id;
|
2606 |
-
$product_name = $repository['data']['product-name'];
|
2607 |
-
$plugin_name = $download['name'];
|
2608 |
-
$free_on_wporg = !empty($download['free-on-wporg']);
|
2609 |
-
break;
|
2610 |
-
}
|
2611 |
-
|
2612 |
-
}
|
2613 |
-
|
2614 |
-
}
|
2615 |
-
|
2616 |
-
}
|
2617 |
-
|
2618 |
-
}
|
2619 |
-
|
2620 |
-
if($plugin_repository) {
|
2621 |
-
|
2622 |
-
//validate subscription
|
2623 |
-
$site_key = $this->get_repository_site_key($plugin_repository);
|
2624 |
-
if ($site_key) {
|
2625 |
-
$subscription_data = $this->fetch_subscription_data( $plugin_repository, $site_key, self::SITE_KEY_VALIDATION_SOURCE_REVALIDATION );
|
2626 |
-
}
|
2627 |
-
|
2628 |
-
if ( (empty($site_key) || empty($subscription_data)) && empty($free_on_wporg)) {
|
2629 |
-
|
2630 |
-
$error_message = sprintf(__("%s cannot update because your site's registration is not valid. Please %sregister %s%s again for this site first.", 'installer'),
|
2631 |
-
'<strong>'.$plugin_name . '</strong>', '<a href="' . $this->menu_url() . '&validate_repository=' . $plugin_repository .
|
2632 |
-
'#repository-' . $plugin_repository . '">', $product_name, '</a>');
|
2633 |
-
|
2634 |
-
if(defined('DOING_AJAX')){ //WP 4.2
|
2635 |
-
|
2636 |
-
$status = array(
|
2637 |
-
'update' => 'plugin',
|
2638 |
-
'plugin' => $plugin,
|
2639 |
-
'slug' => sanitize_key( $_POST['slug'] ),
|
2640 |
-
'oldVersion' => '',
|
2641 |
-
'newVersion' => '',
|
2642 |
-
);
|
2643 |
-
|
2644 |
-
$status['errorCode'] = 'wp_installer_invalid_subscription';
|
2645 |
-
$status['error'] = $error_message;
|
2646 |
-
|
2647 |
-
wp_send_json_error( $status );
|
2648 |
-
|
2649 |
-
} else { // WP 4.1.1
|
2650 |
-
echo '<div class="updated error"><p>' . $error_message . '</p></div>';
|
2651 |
-
|
2652 |
-
|
2653 |
-
echo '<div class="wrap">';
|
2654 |
-
echo '<h2>' . __( 'Update Plugin', 'installer' ) . '</h2>';
|
2655 |
-
echo '<a href="' . admin_url('plugins.php') . '">' . __( 'Return to the plugins page', 'installer' ) . '</a>';
|
2656 |
-
echo '</div>';
|
2657 |
-
require_once(ABSPATH . 'wp-admin/admin-footer.php');
|
2658 |
-
exit;
|
2659 |
-
|
2660 |
-
}
|
2661 |
-
|
2662 |
-
}
|
2663 |
-
|
2664 |
-
|
2665 |
-
}
|
2666 |
-
|
2667 |
-
}
|
2668 |
-
}
|
2669 |
-
|
2670 |
-
}
|
2671 |
-
|
2672 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
library/otgs/installer/includes/translation-service-info.class.php
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TranslationServiceInfo{
|
4 |
-
|
5 |
-
function __construct(){
|
6 |
-
|
7 |
-
add_action('installer_fetched_subscription_data',array($this, 'save_info'), 10, 2);
|
8 |
-
|
9 |
-
}
|
10 |
-
|
11 |
-
function save_info($data, $repository_id) {
|
12 |
-
|
13 |
-
$ts_info = isset( WP_Installer()->settings['repositories'][$repository_id]['ts_info'] ) ?
|
14 |
-
WP_Installer()->settings['repositories'][$repository_id]['ts_info'] : false;
|
15 |
-
|
16 |
-
$save_settings = false;
|
17 |
-
if(isset($data->ts_info['preferred']) && empty($ts_info['preferred'])){
|
18 |
-
WP_Installer()->settings['repositories'][$repository_id]['ts_info']['preferred'] = $data->ts_info['preferred'];
|
19 |
-
$save_settings = true;
|
20 |
-
}
|
21 |
-
|
22 |
-
if(isset($data->ts_info['referal']) && empty($ts_info['referal'])){
|
23 |
-
WP_Installer()->settings['repositories'][$repository_id]['ts_info']['referal'] = $data->ts_info['referal'];
|
24 |
-
$save_settings = true;
|
25 |
-
}
|
26 |
-
|
27 |
-
if ( !empty( $data->ts_info['client_id'] ) ) { // can be updated
|
28 |
-
WP_Installer()->settings['repositories'][$repository_id]['ts_info']['client_id'] = $data->ts_info['client_id'];
|
29 |
-
$save_settings = true;
|
30 |
-
}
|
31 |
-
|
32 |
-
if($save_settings){
|
33 |
-
WP_Installer()->save_settings();
|
34 |
-
}
|
35 |
-
|
36 |
-
}
|
37 |
-
|
38 |
-
}
|
39 |
-
|
40 |
-
new TranslationServiceInfo();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
library/otgs/installer/installer.log
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
2017-03-21 14:12:38 Checked for toolset updates: http://d7j863fr5jhrr.cloudfront.net/toolset33-products.json
|
|
library/otgs/installer/installer.php
CHANGED
@@ -1,22 +1,18 @@
|
|
1 |
-
<?php
|
2 |
-
define('WP_INSTALLER_VERSION', '1.
|
3 |
-
|
4 |
-
include_once dirname(__FILE__) . '/includes/installer.class.php';
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
}
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
|
|
11 |
WP_Installer();
|
|
|
12 |
|
13 |
-
include_once WP_Installer()->plugin_path() . '/includes/installer-api.php';
|
14 |
-
include_once WP_Installer()->plugin_path() . '/includes/translation-service-info.class.php';
|
15 |
-
include_once WP_Installer()->plugin_path() . '/includes/class-installer-dependencies.php';
|
16 |
|
17 |
-
// Ext function
|
18 |
-
function WP_Installer_Show_Products($args = array()){
|
19 |
-
|
20 |
-
WP_Installer()->show_products($args);
|
21 |
-
|
22 |
-
}
|
1 |
+
<?php
|
2 |
+
define( 'WP_INSTALLER_VERSION', '1.8.1' );
|
|
|
|
|
3 |
|
4 |
+
include_once dirname( __FILE__ ) . '/includes/functions-core.php';
|
5 |
+
include_once dirname( __FILE__ ) . '/includes/class-wp-installer.php';
|
|
|
6 |
|
7 |
+
include_once WP_Installer()->plugin_path() . '/includes/class-wp-installer-api.php';
|
8 |
+
include_once WP_Installer()->plugin_path() . '/includes/class-translation-service-info.php';
|
9 |
+
include_once WP_Installer()->plugin_path() . '/includes/class-installer-dependencies.php';
|
10 |
+
include_once WP_Installer()->plugin_path() . '/includes/class-wp-installer-channels.php';
|
11 |
+
|
12 |
+
include_once WP_Installer()->plugin_path() . '/includes/functions-templates.php';
|
13 |
|
14 |
+
// Initialization
|
15 |
WP_Installer();
|
16 |
+
WP_Installer_Channels();
|
17 |
|
|
|
|
|
|
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
library/otgs/installer/loader.php
CHANGED
@@ -19,7 +19,7 @@ $wp_installer_instance = dirname(__FILE__) . '/installer.php';
|
|
19 |
global $wp_installer_instances;
|
20 |
$wp_installer_instances[$wp_installer_instance] = array(
|
21 |
'bootfile' => $wp_installer_instance,
|
22 |
-
'version' => '1.
|
23 |
);
|
24 |
|
25 |
|
19 |
global $wp_installer_instances;
|
20 |
$wp_installer_instances[$wp_installer_instance] = array(
|
21 |
'bootfile' => $wp_installer_instance,
|
22 |
+
'version' => '1.8.1'
|
23 |
);
|
24 |
|
25 |
|
library/otgs/installer/res/css/admin.css
CHANGED
@@ -11,6 +11,16 @@
|
|
11 |
.installer-status-updating{color: #FF9900; }
|
12 |
.installer-status-updated{color: #003300; font-weight: bold; }
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
.installer-status-activating{color: #996666 }
|
15 |
.installer-status-activated{color: #333366; font-weight: bold; }
|
16 |
|
@@ -63,8 +73,12 @@
|
|
63 |
font-style: italic;
|
64 |
}
|
65 |
|
|
|
|
|
|
|
|
|
66 |
.installer-warn-box{
|
67 |
-
-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;border:1px solid #
|
68 |
color: #333;
|
69 |
padding: 5px;
|
70 |
}
|
@@ -189,6 +203,60 @@
|
|
189 |
padding-left:24px;
|
190 |
}
|
191 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
.otgs-is-dismissible {
|
193 |
position: relative;
|
194 |
padding-right: 38px;
|
@@ -198,4 +266,24 @@
|
|
198 |
}
|
199 |
.otgs-is-dismissible p [class*="button-"] {
|
200 |
margin: -5px 5px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
}
|
11 |
.installer-status-updating{color: #FF9900; }
|
12 |
.installer-status-updated{color: #003300; font-weight: bold; }
|
13 |
|
14 |
+
.installer-status-installed .error-details:before,
|
15 |
+
.installer-status-updated .error-details:before{
|
16 |
+
content: "\f534";
|
17 |
+
font: 200 16px/1 dashicons;
|
18 |
+
vertical-align: text-bottom;
|
19 |
+
margin-left: 5px;
|
20 |
+
color: red;
|
21 |
+
cursor: help;
|
22 |
+
}
|
23 |
+
|
24 |
.installer-status-activating{color: #996666 }
|
25 |
.installer-status-activated{color: #333366; font-weight: bold; }
|
26 |
|
73 |
font-style: italic;
|
74 |
}
|
75 |
|
76 |
+
.installer-warn-text{
|
77 |
+
color: #FF6400;
|
78 |
+
}
|
79 |
+
|
80 |
.installer-warn-box{
|
81 |
+
-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;border:1px solid #FF6400;background-color:#df8a48;
|
82 |
color: #333;
|
83 |
padding: 5px;
|
84 |
}
|
203 |
padding-left:24px;
|
204 |
}
|
205 |
|
206 |
+
.installer-release-notes{
|
207 |
+
display: none;
|
208 |
+
}
|
209 |
+
|
210 |
+
.handle.extended:after{
|
211 |
+
content: "▾";
|
212 |
+
font-size: 24px;
|
213 |
+
vertical-align:bottom;
|
214 |
+
}
|
215 |
+
.installer-table-wrap a.handle:active,
|
216 |
+
.installer-table-wrap a.handle:focus{
|
217 |
+
outline:0;
|
218 |
+
border:none;
|
219 |
+
-moz-outline-style: none;
|
220 |
+
-webkit-box-shadow: none;
|
221 |
+
box-shadow: none;
|
222 |
+
}
|
223 |
+
|
224 |
+
.installer-release-notes .arrow_box {
|
225 |
+
position: relative;
|
226 |
+
background: #eee;
|
227 |
+
border: 1px solid #ccc;
|
228 |
+
}
|
229 |
+
.installer-release-notes .arrow_box:after, .installer-release-notes .arrow_box:before {
|
230 |
+
bottom: 100%;
|
231 |
+
left: 50%;
|
232 |
+
border: solid transparent;
|
233 |
+
content: " ";
|
234 |
+
height: 0;
|
235 |
+
width: 0;
|
236 |
+
position: absolute;
|
237 |
+
pointer-events: none;
|
238 |
+
}
|
239 |
+
|
240 |
+
.installer-release-notes .arrow_box:after {
|
241 |
+
border-color: rgba(238, 238, 238, 0);
|
242 |
+
border-bottom-color: #eee;
|
243 |
+
border-width: 16px;
|
244 |
+
margin-left: -16px;
|
245 |
+
}
|
246 |
+
.installer-release-notes .arrow_box:before {
|
247 |
+
border-color: rgba(204, 204, 204, 0);
|
248 |
+
border-bottom-color: #ccc;
|
249 |
+
border-width: 17px;
|
250 |
+
margin-left: -17px;
|
251 |
+
}
|
252 |
+
|
253 |
+
.installer-release-notes .arrow_box div{
|
254 |
+
margin-top:5px;
|
255 |
+
padding: 10px;
|
256 |
+
overflow-y: auto;
|
257 |
+
max-height: 400px;
|
258 |
+
}
|
259 |
+
|
260 |
.otgs-is-dismissible {
|
261 |
position: relative;
|
262 |
padding-right: 38px;
|
266 |
}
|
267 |
.otgs-is-dismissible p [class*="button-"] {
|
268 |
margin: -5px 5px;
|
269 |
+
}
|
270 |
+
|
271 |
+
.otgsi_downloads_form{
|
272 |
+
margin-top: 15px;
|
273 |
+
}
|
274 |
+
|
275 |
+
.spinner-with-text{
|
276 |
+
padding-left: 25px;
|
277 |
+
float:none;
|
278 |
+
width: auto;
|
279 |
+
}
|
280 |
+
.installer-channel-update-ok{
|
281 |
+
padding-left: 10px;
|
282 |
+
display: none;
|
283 |
+
color: #006600;
|
284 |
+
}
|
285 |
+
.installer-channel-update-fail{
|
286 |
+
padding-left: 10px;
|
287 |
+
display: none;
|
288 |
+
color: #962722;
|
289 |
}
|
library/otgs/installer/res/js/admin.js
CHANGED
@@ -1,5 +1,9 @@
|
|
|
|
|
|
1 |
var otgs_wp_installer = {
|
2 |
-
|
|
|
|
|
3 |
init: function(){
|
4 |
|
5 |
jQuery('.otgs_wp_installer_table').on('click', '.enter_site_key_js', otgs_wp_installer.show_site_key_form);
|
@@ -38,6 +42,7 @@
|
|
38 |
jQuery( '.plugin-install-tab-commercial .search-plugins' ).remove();
|
39 |
}
|
40 |
|
|
|
41 |
},
|
42 |
|
43 |
getQueryParameters : function(str) {
|
@@ -258,9 +263,14 @@
|
|
258 |
}
|
259 |
|
260 |
|
261 |
-
data = {
|
|
|
|
|
|
|
|
|
|
|
262 |
|
263 |
-
jQuery.ajax({
|
264 |
url: ajaxurl,
|
265 |
type: 'POST',
|
266 |
dataType: 'json',
|
@@ -270,22 +280,35 @@
|
|
270 |
|
271 |
if(!ret.success){
|
272 |
installed.addClass('installer-status-error');
|
273 |
-
installed.html(
|
|
|
|
|
|
|
274 |
|
275 |
if(ret.message){
|
276 |
-
installed.closest('.otgs_wp_installer_table')
|
|
|
|
|
|
|
277 |
}else{
|
278 |
-
installed.closest('.otgs_wp_installer_table')
|
|
|
|
|
|
|
279 |
}
|
280 |
|
281 |
-
|
282 |
}
|
283 |
|
284 |
installed.show();
|
285 |
spinner.fadeOut();
|
286 |
|
287 |
if(ret.version){
|
288 |
-
|
|
|
|
|
|
|
|
|
289 |
}
|
290 |
|
291 |
if(ret.success && activate){
|
@@ -315,6 +338,8 @@
|
|
315 |
otgs_wp_installer.hide_download_progress_status(downloads_form);
|
316 |
downloads_form.find('div.installer-status-success').show();
|
317 |
action_button.removeAttr('disabled');
|
|
|
|
|
318 |
}
|
319 |
}
|
320 |
});
|
@@ -326,6 +351,9 @@
|
|
326 |
otgs_wp_installer.hide_download_progress_status(downloads_form);
|
327 |
downloads_form.find('div.installer-status-success').show();
|
328 |
action_button.removeAttr('disabled');
|
|
|
|
|
|
|
329 |
}
|
330 |
}
|
331 |
}
|
@@ -336,8 +364,7 @@
|
|
336 |
|
337 |
return false;
|
338 |
},
|
339 |
-
|
340 |
-
|
341 |
show_download_progress_status: function(downloads_form, text){
|
342 |
|
343 |
downloads_form.find('.installer-download-progress-status').html(text).fadeIn();
|
@@ -412,8 +439,21 @@
|
|
412 |
|
413 |
}
|
414 |
|
415 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
416 |
|
|
|
|
|
|
|
417 |
|
418 |
}
|
419 |
|
1 |
+
|
2 |
+
|
3 |
var otgs_wp_installer = {
|
4 |
+
|
5 |
+
plugins_update_XHR :{},
|
6 |
+
|
7 |
init: function(){
|
8 |
|
9 |
jQuery('.otgs_wp_installer_table').on('click', '.enter_site_key_js', otgs_wp_installer.show_site_key_form);
|
42 |
jQuery( '.plugin-install-tab-commercial .search-plugins' ).remove();
|
43 |
}
|
44 |
|
45 |
+
jQuery('.installer-table-wrap').on('click', '.js-release-notes', otgs_wp_installer.toggle_release_notes);
|
46 |
},
|
47 |
|
48 |
getQueryParameters : function(str) {
|
263 |
}
|
264 |
|
265 |
|
266 |
+
data = {
|
267 |
+
action: 'installer_download_plugin',
|
268 |
+
data: elem.val(),
|
269 |
+
activate: activate,
|
270 |
+
reset_to_channel: downloads_form.find('input[name="reset-to-channel"]').val()
|
271 |
+
}
|
272 |
|
273 |
+
otgs_wp_installer.plugins_update_XHR = jQuery.ajax({
|
274 |
url: ajaxurl,
|
275 |
type: 'POST',
|
276 |
dataType: 'json',
|
280 |
|
281 |
if(!ret.success){
|
282 |
installed.addClass('installer-status-error');
|
283 |
+
installed.html(
|
284 |
+
installed.data('fail') +
|
285 |
+
'<a class="error-details" href="#" title="' + ret.message + '"></a>'
|
286 |
+
);
|
287 |
|
288 |
if(ret.message){
|
289 |
+
installed.closest('.otgs_wp_installer_table')
|
290 |
+
.find('.installer-error-box')
|
291 |
+
.html('<p>' + ret.message + '</p>')
|
292 |
+
.show();
|
293 |
}else{
|
294 |
+
installed.closest('.otgs_wp_installer_table')
|
295 |
+
.find('.installer-error-box')
|
296 |
+
.html('<p>' + downloads_form.find('.installer-revalidate-message').html() + '</p>')
|
297 |
+
.show();
|
298 |
}
|
299 |
|
300 |
+
downloads_form.trigger('installer-update-fail');
|
301 |
}
|
302 |
|
303 |
installed.show();
|
304 |
spinner.fadeOut();
|
305 |
|
306 |
if(ret.version){
|
307 |
+
var updated_version = '<span class="installer-green-text">' + ret.version + '</span>';
|
308 |
+
if( ret.non_stable ){
|
309 |
+
updated_version += ' (' + ret.non_stable + ')';
|
310 |
+
}
|
311 |
+
this_tr.find('.installer_version_installed').html(updated_version);
|
312 |
}
|
313 |
|
314 |
if(ret.success && activate){
|
338 |
otgs_wp_installer.hide_download_progress_status(downloads_form);
|
339 |
downloads_form.find('div.installer-status-success').show();
|
340 |
action_button.removeAttr('disabled');
|
341 |
+
|
342 |
+
downloads_form.trigger('installer-update-complete');
|
343 |
}
|
344 |
}
|
345 |
});
|
351 |
otgs_wp_installer.hide_download_progress_status(downloads_form);
|
352 |
downloads_form.find('div.installer-status-success').show();
|
353 |
action_button.removeAttr('disabled');
|
354 |
+
|
355 |
+
downloads_form.trigger('installer-update-complete');
|
356 |
+
|
357 |
}
|
358 |
}
|
359 |
}
|
364 |
|
365 |
return false;
|
366 |
},
|
367 |
+
|
|
|
368 |
show_download_progress_status: function(downloads_form, text){
|
369 |
|
370 |
downloads_form.find('.installer-download-progress-status').html(text).fadeIn();
|
439 |
|
440 |
}
|
441 |
|
442 |
+
},
|
443 |
+
|
444 |
+
toggle_release_notes: function(){
|
445 |
+
var handle = jQuery(this);
|
446 |
+
var tr = handle.closest('tr');
|
447 |
+
if( tr.next('.installer-release-notes').is(':visible') ){
|
448 |
+
handle.removeClass('extended');
|
449 |
+
}else{
|
450 |
+
handle.addClass('extended');
|
451 |
+
}
|
452 |
+
tr.next('.installer-release-notes').fadeToggle();
|
453 |
|
454 |
+
return false;
|
455 |
+
}
|
456 |
+
|
457 |
|
458 |
}
|
459 |
|
library/otgs/installer/res/js/channels.js
ADDED
@@ -0,0 +1,261 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($){
|
2 |
+
|
3 |
+
var updateErrors = [];
|
4 |
+
var channelUpdateInProgress = false;
|
5 |
+
|
6 |
+
function channelSelectorInit(){
|
7 |
+
|
8 |
+
$('.otgs_wp_installer_table')
|
9 |
+
.on('focus', '.installer-channel-selector', saveCurrentValue)
|
10 |
+
.on('change', '.installer-channel-selector', maybeShowPrompt);
|
11 |
+
|
12 |
+
$('.otgs_wp_installer_table')
|
13 |
+
.on('click', '.installer-channel-retry', retryChannelSwitch)
|
14 |
+
|
15 |
+
$('.installer-switch-confirmation')
|
16 |
+
.on('click', '.js-cancel', cancelSwitch)
|
17 |
+
.on('click', '.js-proceed', changeChannel);
|
18 |
+
|
19 |
+
$('.otgsi_downloads_form').on('installer-update-complete', maybeShowWarn);
|
20 |
+
$('.otgsi_downloads_form').on('installer-update-complete', hideUpdateProgress);
|
21 |
+
|
22 |
+
$('.otgsi_downloads_form').on('installer-update-complete', showConfirmationMessage);
|
23 |
+
|
24 |
+
$('.otgsi_downloads_form').on('installer-update-fail', logUpdateError);
|
25 |
+
|
26 |
+
}
|
27 |
+
|
28 |
+
function saveCurrentValue(){
|
29 |
+
$(this).data('previous-value', $(this).val());
|
30 |
+
}
|
31 |
+
|
32 |
+
function maybeShowPrompt(){
|
33 |
+
var selectorContainer = $(this).closest('.installer-channel-selector-wrap');
|
34 |
+
var prompt = selectorContainer.find('.installer-switch-confirmation:hidden');
|
35 |
+
|
36 |
+
if(prompt.length){
|
37 |
+
prompt.show();
|
38 |
+
selectorContainer.find('select').prop('disabled', true);
|
39 |
+
var warnText = selectorContainer.find('.installer-warn-text');
|
40 |
+
warnText.hide();
|
41 |
+
}else{
|
42 |
+
changeChannel(selectorContainer);
|
43 |
+
}
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
function changeChannel(selectorContainer){
|
48 |
+
|
49 |
+
if(selectorContainer.type == 'click'){
|
50 |
+
var selectorContainer = $(this).closest('.installer-channel-selector-wrap');
|
51 |
+
}
|
52 |
+
|
53 |
+
var select = selectorContainer.find('select');
|
54 |
+
select.prop('disabled', true);
|
55 |
+
|
56 |
+
hideConfirmationMessage(select);
|
57 |
+
showUpdateProgress(select);
|
58 |
+
|
59 |
+
selectorContainer.find('.installer-switch-confirmation').hide();
|
60 |
+
|
61 |
+
var data = {
|
62 |
+
action: 'installer_set_channel',
|
63 |
+
repository_id: select.data('repository-id'),
|
64 |
+
channel: select.val(),
|
65 |
+
nonce: select.parent().find('.nonce').val(),
|
66 |
+
noprompt: selectorContainer.find('.js-remember').length ?
|
67 |
+
selectorContainer.find('.js-remember').attr('checked') == 'checked' : 0
|
68 |
+
}
|
69 |
+
|
70 |
+
resetUpdateErrors();
|
71 |
+
otgs_wp_installer.reset_errors();
|
72 |
+
channelUpdateInProgress = true;
|
73 |
+
|
74 |
+
// save selection
|
75 |
+
jQuery.ajax({
|
76 |
+
url: ajaxurl,
|
77 |
+
type: 'POST',
|
78 |
+
dataType: 'json',
|
79 |
+
data: data,
|
80 |
+
success: function (ret) {
|
81 |
+
if( ret.status == 'OK'){
|
82 |
+
var tableSelector = '#installer_repo_' + select.data('repository-id') + ' .installer-table-wrap';
|
83 |
+
$(tableSelector).load( location.href + ' ' + tableSelector + ' table.widefat', function(){
|
84 |
+
|
85 |
+
var upgradesCount = $(tableSelector).find('tr .installer-red-text').length
|
86 |
+
|| select.val() == 1 && $(tableSelector).find('td.installer_version_installed .unstable').length;
|
87 |
+
if( upgradesCount > 0){
|
88 |
+
automaticUpgrade(tableSelector);
|
89 |
+
}else{
|
90 |
+
$('#installer_repo_' + select.data('repository-id') + ' .otgsi_downloads_form')
|
91 |
+
.trigger('installer-update-complete');
|
92 |
+
}
|
93 |
+
|
94 |
+
select.prop('disabled', false);
|
95 |
+
} );
|
96 |
+
}
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
});
|
101 |
+
|
102 |
+
}
|
103 |
+
|
104 |
+
function retryChannelSwitch(){
|
105 |
+
var selectorContainer = $(this).closest('.installer-channel-selector-wrap');
|
106 |
+
changeChannel(selectorContainer);
|
107 |
+
return false;
|
108 |
+
}
|
109 |
+
|
110 |
+
function cancelSwitch(){
|
111 |
+
$(this).closest('.installer-switch-confirmation').hide();
|
112 |
+
var select = $(this).closest('.installer-switch-confirmation').prev().find('.installer-channel-selector');
|
113 |
+
var previousValue = select.data('previous-value');
|
114 |
+
|
115 |
+
select.val(previousValue).prop('disabled', false);
|
116 |
+
|
117 |
+
if( select.val() > 1){
|
118 |
+
var selectorContainer = $(this).closest('.installer-channel-selector-wrap');
|
119 |
+
var warnText = selectorContainer.find('.installer-warn-text');
|
120 |
+
warnText.show();
|
121 |
+
}
|
122 |
+
|
123 |
+
}
|
124 |
+
|
125 |
+
function automaticUpgrade(downloadsTable){
|
126 |
+
$(downloadsTable + ' tr').each(
|
127 |
+
function () {
|
128 |
+
var needsUpgrade = $(this).find(
|
129 |
+
'td.installer_version_installed .installer-red-text, ' +
|
130 |
+
'td.installer_version_installed .unstable'
|
131 |
+
).length > 0;
|
132 |
+
if (needsUpgrade) {
|
133 |
+
$(this).find('td :checkbox').prop('disabled', false).prop('checked', true);
|
134 |
+
}
|
135 |
+
}
|
136 |
+
);
|
137 |
+
|
138 |
+
$(downloadsTable)
|
139 |
+
.closest('form')
|
140 |
+
.append('<input type="hidden" name="reset-to-channel" value="1">')
|
141 |
+
.submit();
|
142 |
+
|
143 |
+
}
|
144 |
+
|
145 |
+
function maybeShowWarn(){
|
146 |
+
|
147 |
+
var select = $(this)
|
148 |
+
.closest('.otgs_wp_installer_table')
|
149 |
+
.find('.installer-channel-selector')
|
150 |
+
|
151 |
+
if(select.val() > 1 && !hasUpdateErrors()){
|
152 |
+
|
153 |
+
var warnText = select
|
154 |
+
.closest('.installer-channel-selector-wrap')
|
155 |
+
.find('.installer-warn-text');
|
156 |
+
warnText.show();
|
157 |
+
|
158 |
+
}
|
159 |
+
|
160 |
+
|
161 |
+
}
|
162 |
+
|
163 |
+
function showUpdateProgress(select){
|
164 |
+
|
165 |
+
var spinner = select
|
166 |
+
.closest('.installer-channel-selector-wrap')
|
167 |
+
.find('.spinner-with-text');
|
168 |
+
|
169 |
+
spinner.addClass('is-active').show();
|
170 |
+
|
171 |
+
}
|
172 |
+
|
173 |
+
function hideUpdateProgress(){
|
174 |
+
|
175 |
+
var spinner = $(this)
|
176 |
+
.closest('.otgs_wp_installer_table')
|
177 |
+
.find('.installer-channel-selector-wrap')
|
178 |
+
.find('.spinner-with-text');
|
179 |
+
|
180 |
+
spinner.removeClass('is-active').hide();
|
181 |
+
|
182 |
+
}
|
183 |
+
|
184 |
+
function showConfirmationMessage(){
|
185 |
+
|
186 |
+
if( ! channelUpdateInProgress ) return false;
|
187 |
+
|
188 |
+
var selectWrap = $(this)
|
189 |
+
.closest('.otgs_wp_installer_table')
|
190 |
+
.find('.installer-channel-selector-wrap');
|
191 |
+
|
192 |
+
var select = $(this)
|
193 |
+
.closest('.otgs_wp_installer_table')
|
194 |
+
.find('.installer-channel-selector');
|
195 |
+
|
196 |
+
var channelName = select.find('option:selected').text();
|
197 |
+
|
198 |
+
if( hasUpdateErrors() ) {
|
199 |
+
|
200 |
+
var message = selectWrap.find('.installer-channel-update-fail');
|
201 |
+
// suppress default errors
|
202 |
+
$(this).closest('.otgs_wp_installer_table').find('.installer-error-box').hide();
|
203 |
+
|
204 |
+
var channelType = select.val() == 1 ? 'stable' : 'unstable';
|
205 |
+
message.html(message.data('text-' + channelType).replace(/%CHANNEL%/, channelName));
|
206 |
+
|
207 |
+
}else{
|
208 |
+
|
209 |
+
var message = selectWrap.find('.installer-channel-update-ok');
|
210 |
+
message.html(message.data('text').replace(/%CHANNEL%/, channelName));
|
211 |
+
}
|
212 |
+
|
213 |
+
message.show();
|
214 |
+
|
215 |
+
channelUpdateInProgress = false;
|
216 |
+
}
|
217 |
+
|
218 |
+
function hideConfirmationMessage(select){
|
219 |
+
|
220 |
+
var selectWrap = select.closest('.installer-channel-selector-wrap');
|
221 |
+
if( hasUpdateErrors() ){
|
222 |
+
var message = selectWrap.find('.installer-channel-update-fail');
|
223 |
+
}else{
|
224 |
+
var message = selectWrap.find('.installer-channel-update-ok');
|
225 |
+
}
|
226 |
+
|
227 |
+
message.hide();
|
228 |
+
}
|
229 |
+
|
230 |
+
/*
|
231 |
+
function showFailureMessage(download_form){
|
232 |
+
var message = download_form
|
233 |
+
.closest('.otgs_wp_installer_table')
|
234 |
+
.find('.installer-channel-selector-wrap')
|
235 |
+
.find('.installer-channel-update-fail');
|
236 |
+
|
237 |
+
var channelName = $(this)
|
238 |
+
.closest('.otgs_wp_installer_table')
|
239 |
+
.find('.installer-channel-selector option:selected')
|
240 |
+
.text();
|
241 |
+
|
242 |
+
message.html( message.data('text').replace(/%CHANNEL%/, channelName) );
|
243 |
+
message.show();
|
244 |
+
}
|
245 |
+
*/
|
246 |
+
|
247 |
+
function logUpdateError(){
|
248 |
+
updateErrors.push(1);
|
249 |
+
}
|
250 |
+
|
251 |
+
function resetUpdateErrors(){
|
252 |
+
updateErrors = [];
|
253 |
+
}
|
254 |
+
|
255 |
+
function hasUpdateErrors() {
|
256 |
+
return updateErrors.length;
|
257 |
+
}
|
258 |
+
|
259 |
+
$(document).ready( channelSelectorInit );
|
260 |
+
|
261 |
+
})(jQuery)
|
library/otgs/installer/templates/channel-selector.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="installer-channel-selector-wrap">
|
2 |
+
<label>
|
3 |
+
<?php esc_html_e('Updates channel:', 'installer'); ?>
|
4 |
+
<select class="installer-channel-selector" data-repository-id="<?php echo $repository_id ?>"<?php if( !$can_switch ): ?> disabled<?php endif ?>>
|
5 |
+
<?php foreach( $channels as $channel_id => $channel_name ): ?>
|
6 |
+
<option value="<?php echo $channel_id ?>" <?php
|
7 |
+
if( $channel_id == $current_channel ): ?>selected="selected"<?php
|
8 |
+
endif; ?>><?php echo $channel_name ?></option>
|
9 |
+
<?php endforeach ?>
|
10 |
+
</select>
|
11 |
+
<span class="installer-status-note" <?php if( $can_switch ): ?>style="display:none" <?php endif; ?>>
|
12 |
+
<?php _e("To select different update channels (beta, development) you must update your existing products to their most recent stable versions.", 'installer') ?>
|
13 |
+
</span>
|
14 |
+
<span class="spinner spinner-with-text">
|
15 |
+
<?php _e( "Updating the plugins on your site. Please don't close this page or navigate away.", 'installer' ); ?>
|
16 |
+
</span>
|
17 |
+
<span class="installer-channel-update-ok" data-text="<?php
|
18 |
+
esc_attr_e( sprintf("Update completed. You are now using the %s channel of %s.",
|
19 |
+
'%CHANNEL%', WP_Installer()->get_generic_product_name( $repository_id ) ) ) ?>">
|
20 |
+
</span>
|
21 |
+
<span class="installer-channel-update-fail" data-text-unstable="<?php
|
22 |
+
$support_url = $repository_id ==='toolset' ? 'https://wp-types.com/forums/forum/support-2/' : 'https://wpml.org/forums/forum/english-support/';
|
23 |
+
$download_url = $repository_id ==='toolset' ? 'https://wp-types.com/account/downloads/' : 'https://wpml.org/account/downloads/';
|
24 |
+
echo esc_attr( sprintf(
|
25 |
+
__( "Something went wrong and we could not install all updates from the %s channel. Click here to %stry again%s. If the errors persist, please switch back to the Production channel and contact the %s%s support%s.", 'installer' ),
|
26 |
+
'%CHANNEL%',
|
27 |
+
'<a href="#" class="installer-channel-retry"><strong>',
|
28 |
+
'</strong></a>',
|
29 |
+
'<a href="' . $support_url . '">', WP_Installer()->get_generic_product_name( $repository_id ), '</a>'
|
30 |
+
) );
|
31 |
+
?>" data-text-stable="<?php
|
32 |
+
echo esc_attr( sprintf(
|
33 |
+
esc_attr__( "There was a problem switching to the %s channel. You can %sretry%s. If the problem continues, please %sdownload %s%s and install again manually", 'installer' ),
|
34 |
+
'%CHANNEL%',
|
35 |
+
'<a href="#" class="installer-channel-retry"><strong>',
|
36 |
+
'</strong></a>',
|
37 |
+
'<a href="' . $download_url . '">', WP_Installer()->get_generic_product_name( $repository_id ), '</a>'
|
38 |
+
) );
|
39 |
+
?>">
|
40 |
+
</span>
|
41 |
+
<input type="hidden" class="nonce" value="<?php echo $nonce ?>" />
|
42 |
+
</label>
|
43 |
+
|
44 |
+
<?php if( !$no_prompt ): ?>
|
45 |
+
<div class="installer-warn-box installer-switch-confirmation" style="margin-top: 10px; display: none">
|
46 |
+
<p class="alignright">
|
47 |
+
<button class="button-secondary js-cancel"><?php _e("Cancel", 'installer') ?></button>
|
48 |
+
<button class="button-primary js-proceed"><?php _e("Switch", 'installer') ?></button>
|
49 |
+
</p>
|
50 |
+
<p>
|
51 |
+
<?php _e("Plugins will be updated to their most advanced version in the channel that you selected.", 'installer') ?>
|
52 |
+
</p>
|
53 |
+
<label>
|
54 |
+
<input type="checkbox" value="1" class="js-remember"/>
|
55 |
+
<?php _e("Remember my preference.", 'installer') ?><br />
|
56 |
+
</label>
|
57 |
+
</div>
|
58 |
+
<?php endif; ?>
|
59 |
+
|
60 |
+
<div class="installer-warn-text" <?php if( WP_Installer_Channels()->get_channel( $repository_id ) <= 1 ): ?>style="display:none" <?php endif; ?>>
|
61 |
+
<?php printf(
|
62 |
+
__("You are using a potentially less stable channel for %s. If you didn't enable this on purpose, you should switch to the 'Production' channel.", 'installer'),
|
63 |
+
WP_Installer()->get_generic_product_name( $repository_id )
|
64 |
+
);
|
65 |
+
?>
|
66 |
+
</div>
|
67 |
+
|
68 |
+
</div>
|
library/otgs/installer/templates/downloads-list.php
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
-
|
2 |
-
<strong><?php _e('Downloads:', 'installer') ?></strong>
|
3 |
-
|
4 |
<form method="post" class="otgsi_downloads_form">
|
5 |
-
|
6 |
-
<
|
|
|
7 |
<thead>
|
8 |
<tr>
|
9 |
<th> </th>
|
10 |
<th><?php _e('Plugin', 'installer') ?></th>
|
11 |
-
<th><?php _e('
|
|
|
12 |
<th><?php _e('Released', 'installer') ?></th>
|
13 |
-
<th
|
14 |
<th> </th>
|
15 |
<th> </th>
|
16 |
<th> </th>
|
@@ -18,7 +18,7 @@
|
|
18 |
</thead>
|
19 |
<tbody>
|
20 |
<?php
|
21 |
-
foreach($package['downloads'] as $download): ?>
|
22 |
<tr>
|
23 |
<td>
|
24 |
<label>
|
@@ -33,19 +33,34 @@
|
|
33 |
);
|
34 |
?>
|
35 |
<input type="checkbox" name="downloads[]" value="<?php echo base64_encode(json_encode($download_data)); ?>" <?php
|
36 |
-
if($this->plugin_is_installed($download['name'], $download['slug'], $download['version']
|
37 |
-
|
|
|
38 |
</label>
|
39 |
</td>
|
40 |
<td class="installer_plugin_name"><?php echo $download['name'] ?></td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
<td><?php echo $download['version'] ?></td>
|
42 |
<td><?php echo date_i18n('F j, Y', strtotime($download['date'])) ?></td>
|
43 |
-
<td
|
44 |
-
|
45 |
-
<
|
46 |
-
<?php if($this->plugin_is_embedded_version($download['name'], $download['slug'])): ?> <?php _e('(embedded)', 'installer'); ?><?php endif; ?>
|
47 |
<?php endif; ?>
|
48 |
-
</td>
|
49 |
<td>
|
50 |
<span class="installer-status-installing"><?php _e('installing...', 'installer') ?></span>
|
51 |
<span class="installer-status-updating"><?php _e('updating...', 'installer') ?></span>
|
@@ -58,10 +73,19 @@
|
|
58 |
</td>
|
59 |
<td class="for_spinner_js"><span class="spinner"></span></td>
|
60 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
<?php endforeach; ?>
|
62 |
</tbody>
|
63 |
</table>
|
64 |
-
|
65 |
<br />
|
66 |
|
67 |
<div class="installer-error-box">
|
1 |
+
|
|
|
|
|
2 |
<form method="post" class="otgsi_downloads_form">
|
3 |
+
|
4 |
+
<div class="installer-table-wrap">
|
5 |
+
<table class="widefat">
|
6 |
<thead>
|
7 |
<tr>
|
8 |
<th> </th>
|
9 |
<th><?php _e('Plugin', 'installer') ?></th>
|
10 |
+
<th><?php _e('Installed', 'installer') ?></th>
|
11 |
+
<th><?php _e('Current', 'installer') ?></th>
|
12 |
<th><?php _e('Released', 'installer') ?></th>
|
13 |
+
<th> </th>
|
14 |
<th> </th>
|
15 |
<th> </th>
|
16 |
<th> </th>
|
18 |
</thead>
|
19 |
<tbody>
|
20 |
<?php
|
21 |
+
foreach($package['downloads'] as $download_id => $download): ?>
|
22 |
<tr>
|
23 |
<td>
|
24 |
<label>
|
33 |
);
|
34 |
?>
|
35 |
<input type="checkbox" name="downloads[]" value="<?php echo base64_encode(json_encode($download_data)); ?>" <?php
|
36 |
+
if( $this->plugin_is_installed($download['name'], $download['slug'], $download['version'] )
|
37 |
+
&& ! $this->plugin_is_embedded_version( $download['name'], $download['slug'] )
|
38 |
+
|| WP_Installer()->dependencies->cant_download( $repository_id ) ): ?>disabled="disabled"<?php endif; ?> />
|
39 |
</label>
|
40 |
</td>
|
41 |
<td class="installer_plugin_name"><?php echo $download['name'] ?></td>
|
42 |
+
<td class="installer_version_installed">
|
43 |
+
<?php if ( $v = $this->plugin_is_installed( $download['name'], $download['slug'] ) ): ?>
|
44 |
+
<?php
|
45 |
+
$class = version_compare( $v, $download['version'], '>=' ) ? 'installer-green-text' : 'installer-red-text';
|
46 |
+
$class .= version_compare( $v, $download['version'], '>' ) ? ' unstable' : '';
|
47 |
+
?>
|
48 |
+
<span class="<?php echo $class ?>"><?php echo $v; ?></span>
|
49 |
+
<?php if ( $this->plugin_is_embedded_version( $download['name'], $download['slug'] ) ): ?> <?php _e( '(embedded)', 'installer' ); ?><?php endif; ?>
|
50 |
+
<?php if(
|
51 |
+
WP_Installer_Channels()->get_channel( $repository_id ) !== WP_Installer_Channels::CHANNEL_PRODUCTION &&
|
52 |
+
$non_stable = WP_Installer_Channels()->get_download_source_channel( $v, $repository_id, $download_id, 'plugins')
|
53 |
+
) : ?>
|
54 |
+
(<?php echo $non_stable ?>)
|
55 |
+
<?php endif; ?>
|
56 |
+
<?php endif; ?>
|
57 |
+
</td>
|
58 |
<td><?php echo $download['version'] ?></td>
|
59 |
<td><?php echo date_i18n('F j, Y', strtotime($download['date'])) ?></td>
|
60 |
+
<td>
|
61 |
+
<?php if ( !empty( $download['release-notes'] ) ): ?>
|
62 |
+
<a class="js-release-notes handle" href="#"><?php esc_html_e( 'Release notes', 'installer' ) ?></a></td>
|
|
|
63 |
<?php endif; ?>
|
|
|
64 |
<td>
|
65 |
<span class="installer-status-installing"><?php _e('installing...', 'installer') ?></span>
|
66 |
<span class="installer-status-updating"><?php _e('updating...', 'installer') ?></span>
|
73 |
</td>
|
74 |
<td class="for_spinner_js"><span class="spinner"></span></td>
|
75 |
</tr>
|
76 |
+
<?php if ( !empty( $download['release-notes'] ) ): ?>
|
77 |
+
<tr class="installer-release-notes">
|
78 |
+
<td colspan="9">
|
79 |
+
<div class="arrow_box">
|
80 |
+
<div><?php echo force_balance_tags( $download['release-notes'] ) ?></div>
|
81 |
+
</div>
|
82 |
+
</td>
|
83 |
+
</tr>
|
84 |
+
<?php endif; ?>
|
85 |
<?php endforeach; ?>
|
86 |
</tbody>
|
87 |
</table>
|
88 |
+
</div>
|
89 |
<br />
|
90 |
|
91 |
<div class="installer-error-box">
|
library/otgs/installer/templates/repository-listing.php
CHANGED
@@ -137,9 +137,12 @@
|
|
137 |
<?php endforeach; ?>
|
138 |
<?php endif; ?>
|
139 |
|
140 |
-
|
141 |
-
|
142 |
-
|
|
|
|
|
|
|
143 |
|
144 |
<?php if(!empty($package['sub-packages'])): ?>
|
145 |
|
137 |
<?php endforeach; ?>
|
138 |
<?php endif; ?>
|
139 |
|
140 |
+
<?php
|
141 |
+
if ( $package['downloads'] ) {
|
142 |
+
WP_Installer_Channels()->load_channel_selector( $repository_id, $package['downloads'] );
|
143 |
+
include $this->plugin_path() . '/templates/downloads-list.php';
|
144 |
+
}
|
145 |
+
?>
|
146 |
|
147 |
<?php if(!empty($package['sub-packages'])): ?>
|
148 |
|
library/toolset/onthego-resources/changelog.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
OnTheGo Resources 2.0 (December 22, 2016)
|
2 |
-
- Improved assets loading so it can also happen in the frontend on demand
|
3 |
|
4 |
-------------------------------------------------------------------------------------------------------------------
|
5 |
OnTheGo Resources 1.9 (December 5, 2016)
|
1 |
OnTheGo Resources 2.0 (December 22, 2016)
|
2 |
+
- - Improved assets loading so it can also happen in the frontend on demand
|
3 |
|
4 |
-------------------------------------------------------------------------------------------------------------------
|
5 |
OnTheGo Resources 1.9 (December 5, 2016)
|
library/toolset/onthego-resources/loader.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
// is made to the onthego-resources code.
|
17 |
// The version number will then be used to work out which plugin has the latest
|
18 |
// version of the code.
|
19 |
-
$onthegosystems_branding_version =
|
20 |
|
21 |
|
22 |
// ----------------------------------------------------------------------//
|
16 |
// is made to the onthego-resources code.
|
17 |
// The version number will then be used to work out which plugin has the latest
|
18 |
// version of the code.
|
19 |
+
$onthegosystems_branding_version = 21;
|
20 |
|
21 |
|
22 |
// ----------------------------------------------------------------------//
|
library/toolset/onthego-resources/onthego-styles/onthego-admin-styles.css
CHANGED
@@ -16,7 +16,6 @@ li#toplevel_page_CRED_Forms div.wp-menu-image:before,
|
|
16 |
li#toplevel_page_wpcf div.wp-menu-image:before,
|
17 |
li#toplevel_page_types_access div.wp-menu-image:before,
|
18 |
li#toplevel_page_CRED_Commerce div.wp-menu-image:before,
|
19 |
-
li#toplevel_page_dd_layouts_edit .dashicons-admin-generic:before,
|
20 |
li#toplevel_page_toolset-packager div.wp-menu-image:before,
|
21 |
li#toplevel_page_toolset-settings div.wp-menu-image:before {
|
22 |
font-family: "onthegosystems-icons"!important;
|
16 |
li#toplevel_page_wpcf div.wp-menu-image:before,
|
17 |
li#toplevel_page_types_access div.wp-menu-image:before,
|
18 |
li#toplevel_page_CRED_Commerce div.wp-menu-image:before,
|
|
|
19 |
li#toplevel_page_toolset-packager div.wp-menu-image:before,
|
20 |
li#toplevel_page_toolset-settings div.wp-menu-image:before {
|
21 |
font-family: "onthegosystems-icons"!important;
|
library/toolset/onthego-resources/onthegosystems-icons/.fontcustom-manifest.json
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
{
|
2 |
"checksum": {
|
3 |
-
"previous": "
|
4 |
-
"current": "
|
5 |
},
|
6 |
"fonts": [
|
7 |
-
"fonts/onthegosystems-
|
8 |
-
"fonts/onthegosystems-
|
9 |
-
"fonts/onthegosystems-
|
10 |
-
"fonts/onthegosystems-
|
11 |
],
|
12 |
"glyphs": {
|
13 |
"access": {
|
@@ -90,10 +90,6 @@
|
|
90 |
"codepoint": 61744,
|
91 |
"source": "vectors/list-group.svg"
|
92 |
},
|
93 |
-
"many-to-many": {
|
94 |
-
"codepoint": 61752,
|
95 |
-
"source": "vectors/many-to-many.svg"
|
96 |
-
},
|
97 |
"module": {
|
98 |
"codepoint": 61720,
|
99 |
"source": "vectors/module.svg"
|
@@ -106,14 +102,6 @@
|
|
106 |
"codepoint": 61745,
|
107 |
"source": "vectors/navbar.svg"
|
108 |
},
|
109 |
-
"one-to-many": {
|
110 |
-
"codepoint": 61753,
|
111 |
-
"source": "vectors/one-to-many.svg"
|
112 |
-
},
|
113 |
-
"one-to-one": {
|
114 |
-
"codepoint": 61754,
|
115 |
-
"source": "vectors/one-to-one.svg"
|
116 |
-
},
|
117 |
"packager": {
|
118 |
"codepoint": 61728,
|
119 |
"source": "vectors/packager.svg"
|
1 |
{
|
2 |
"checksum": {
|
3 |
+
"previous": "c2bf5434fb5ba6db313a98fb4e1bf3479154a52d11ff65763e7707dfe4069a7b",
|
4 |
+
"current": "c2bf5434fb5ba6db313a98fb4e1bf3479154a52d11ff65763e7707dfe4069a7b"
|
5 |
},
|
6 |
"fonts": [
|
7 |
+
"fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.ttf",
|
8 |
+
"fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.svg",
|
9 |
+
"fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.woff",
|
10 |
+
"fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.eot"
|
11 |
],
|
12 |
"glyphs": {
|
13 |
"access": {
|
90 |
"codepoint": 61744,
|
91 |
"source": "vectors/list-group.svg"
|
92 |
},
|
|
|
|
|
|
|
|
|
93 |
"module": {
|
94 |
"codepoint": 61720,
|
95 |
"source": "vectors/module.svg"
|
102 |
"codepoint": 61745,
|
103 |
"source": "vectors/navbar.svg"
|
104 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
"packager": {
|
106 |
"codepoint": 61728,
|
107 |
"source": "vectors/packager.svg"
|
library/toolset/onthego-resources/onthegosystems-icons/css/_onthegosystems-icons.scss
CHANGED
@@ -4,11 +4,11 @@
|
|
4 |
|
5 |
@font-face {
|
6 |
font-family: "onthegosystems-icons";
|
7 |
-
src: url("../fonts/onthegosystems-
|
8 |
-
src: url("../fonts/onthegosystems-
|
9 |
-
url("../fonts/onthegosystems-
|
10 |
-
url("../fonts/onthegosystems-
|
11 |
-
url("../fonts/onthegosystems-
|
12 |
font-weight: normal;
|
13 |
font-style: normal;
|
14 |
}
|
@@ -16,7 +16,7 @@
|
|
16 |
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
17 |
@font-face {
|
18 |
font-family: "onthegosystems-icons";
|
19 |
-
src: url("../fonts/onthegosystems-
|
20 |
}
|
21 |
}
|
22 |
|
@@ -43,12 +43,9 @@
|
|
43 |
.icon-layouts-genesis-logo:before,
|
44 |
.icon-layouts-logo:before,
|
45 |
.icon-list-group:before,
|
46 |
-
.icon-many-to-many:before,
|
47 |
.icon-module:before,
|
48 |
.icon-module-logo:before,
|
49 |
.icon-navbar:before,
|
50 |
-
.icon-one-to-many:before,
|
51 |
-
.icon-one-to-one:before,
|
52 |
.icon-packager:before,
|
53 |
.icon-packager-logo:before,
|
54 |
.icon-panels:before,
|
@@ -98,12 +95,9 @@
|
|
98 |
.icon-layouts-genesis-logo:before { content: "\f127"; }
|
99 |
.icon-layouts-logo:before { content: "\f117"; }
|
100 |
.icon-list-group:before { content: "\f130"; }
|
101 |
-
.icon-many-to-many:before { content: "\f138"; }
|
102 |
.icon-module:before { content: "\f118"; }
|
103 |
.icon-module-logo:before { content: "\f119"; }
|
104 |
.icon-navbar:before { content: "\f131"; }
|
105 |
-
.icon-one-to-many:before { content: "\f139"; }
|
106 |
-
.icon-one-to-one:before { content: "\f13a"; }
|
107 |
.icon-packager:before { content: "\f120"; }
|
108 |
.icon-packager-logo:before { content: "\f121"; }
|
109 |
.icon-panels:before { content: "\f133"; }
|
@@ -140,12 +134,9 @@ $font-onthegosystems-icons-layouts-genesis: "\f129";
|
|
140 |
$font-onthegosystems-icons-layouts-genesis-logo: "\f127";
|
141 |
$font-onthegosystems-icons-layouts-logo: "\f117";
|
142 |
$font-onthegosystems-icons-list-group: "\f130";
|
143 |
-
$font-onthegosystems-icons-many-to-many: "\f138";
|
144 |
$font-onthegosystems-icons-module: "\f118";
|
145 |
$font-onthegosystems-icons-module-logo: "\f119";
|
146 |
$font-onthegosystems-icons-navbar: "\f131";
|
147 |
-
$font-onthegosystems-icons-one-to-many: "\f139";
|
148 |
-
$font-onthegosystems-icons-one-to-one: "\f13a";
|
149 |
$font-onthegosystems-icons-packager: "\f120";
|
150 |
$font-onthegosystems-icons-packager-logo: "\f121";
|
151 |
$font-onthegosystems-icons-panels: "\f133";
|
4 |
|
5 |
@font-face {
|
6 |
font-family: "onthegosystems-icons";
|
7 |
+
src: url("../fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.eot");
|
8 |
+
src: url("../fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.eot?#iefix") format("embedded-opentype"),
|
9 |
+
url("../fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.woff") format("woff"),
|
10 |
+
url("../fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.ttf") format("truetype"),
|
11 |
+
url("../fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.svg#onthegosystems-icons") format("svg");
|
12 |
font-weight: normal;
|
13 |
font-style: normal;
|
14 |
}
|
16 |
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
17 |
@font-face {
|
18 |
font-family: "onthegosystems-icons";
|
19 |
+
src: url("../fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.svg#onthegosystems-icons") format("svg");
|
20 |
}
|
21 |
}
|
22 |
|
43 |
.icon-layouts-genesis-logo:before,
|
44 |
.icon-layouts-logo:before,
|
45 |
.icon-list-group:before,
|
|
|
46 |
.icon-module:before,
|
47 |
.icon-module-logo:before,
|
48 |
.icon-navbar:before,
|
|
|
|
|
49 |
.icon-packager:before,
|
50 |
.icon-packager-logo:before,
|
51 |
.icon-panels:before,
|
95 |
.icon-layouts-genesis-logo:before { content: "\f127"; }
|
96 |
.icon-layouts-logo:before { content: "\f117"; }
|
97 |
.icon-list-group:before { content: "\f130"; }
|
|
|
98 |
.icon-module:before { content: "\f118"; }
|
99 |
.icon-module-logo:before { content: "\f119"; }
|
100 |
.icon-navbar:before { content: "\f131"; }
|
|
|
|
|
101 |
.icon-packager:before { content: "\f120"; }
|
102 |
.icon-packager-logo:before { content: "\f121"; }
|
103 |
.icon-panels:before { content: "\f133"; }
|
134 |
$font-onthegosystems-icons-layouts-genesis-logo: "\f127";
|
135 |
$font-onthegosystems-icons-layouts-logo: "\f117";
|
136 |
$font-onthegosystems-icons-list-group: "\f130";
|
|
|
137 |
$font-onthegosystems-icons-module: "\f118";
|
138 |
$font-onthegosystems-icons-module-logo: "\f119";
|
139 |
$font-onthegosystems-icons-navbar: "\f131";
|
|
|
|
|
140 |
$font-onthegosystems-icons-packager: "\f120";
|
141 |
$font-onthegosystems-icons-packager-logo: "\f121";
|
142 |
$font-onthegosystems-icons-panels: "\f133";
|
library/toolset/onthego-resources/onthegosystems-icons/css/onthegosystems-icons.css
CHANGED
@@ -4,11 +4,11 @@
|
|
4 |
|
5 |
@font-face {
|
6 |
font-family: "onthegosystems-icons";
|
7 |
-
src: url("../fonts/onthegosystems-
|
8 |
-
src: url("../fonts/onthegosystems-
|
9 |
-
url("../fonts/onthegosystems-
|
10 |
-
url("../fonts/onthegosystems-
|
11 |
-
url("../fonts/onthegosystems-
|
12 |
font-weight: normal;
|
13 |
font-style: normal;
|
14 |
}
|
@@ -16,7 +16,7 @@
|
|
16 |
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
17 |
@font-face {
|
18 |
font-family: "onthegosystems-icons";
|
19 |
-
src: url("../fonts/onthegosystems-
|
20 |
}
|
21 |
}
|
22 |
|
@@ -43,12 +43,9 @@
|
|
43 |
.icon-layouts-genesis-logo:before,
|
44 |
.icon-layouts-logo:before,
|
45 |
.icon-list-group:before,
|
46 |
-
.icon-many-to-many:before,
|
47 |
.icon-module:before,
|
48 |
.icon-module-logo:before,
|
49 |
.icon-navbar:before,
|
50 |
-
.icon-one-to-many:before,
|
51 |
-
.icon-one-to-one:before,
|
52 |
.icon-packager:before,
|
53 |
.icon-packager-logo:before,
|
54 |
.icon-panels:before,
|
@@ -98,12 +95,9 @@
|
|
98 |
.icon-layouts-genesis-logo:before { content: "\f127"; }
|
99 |
.icon-layouts-logo:before { content: "\f117"; }
|
100 |
.icon-list-group:before { content: "\f130"; }
|
101 |
-
.icon-many-to-many:before { content: "\f138"; }
|
102 |
.icon-module:before { content: "\f118"; }
|
103 |
.icon-module-logo:before { content: "\f119"; }
|
104 |
.icon-navbar:before { content: "\f131"; }
|
105 |
-
.icon-one-to-many:before { content: "\f139"; }
|
106 |
-
.icon-one-to-one:before { content: "\f13a"; }
|
107 |
.icon-packager:before { content: "\f120"; }
|
108 |
.icon-packager-logo:before { content: "\f121"; }
|
109 |
.icon-panels:before { content: "\f133"; }
|
4 |
|
5 |
@font-face {
|
6 |
font-family: "onthegosystems-icons";
|
7 |
+
src: url("../fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.eot");
|
8 |
+
src: url("../fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.eot?#iefix") format("embedded-opentype"),
|
9 |
+
url("../fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.woff") format("woff"),
|
10 |
+
url("../fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.ttf") format("truetype"),
|
11 |
+
url("../fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.svg#onthegosystems-icons") format("svg");
|
12 |
font-weight: normal;
|
13 |
font-style: normal;
|
14 |
}
|
16 |
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
17 |
@font-face {
|
18 |
font-family: "onthegosystems-icons";
|
19 |
+
src: url("../fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.svg#onthegosystems-icons") format("svg");
|
20 |
}
|
21 |
}
|
22 |
|
43 |
.icon-layouts-genesis-logo:before,
|
44 |
.icon-layouts-logo:before,
|
45 |
.icon-list-group:before,
|
|
|
46 |
.icon-module:before,
|
47 |
.icon-module-logo:before,
|
48 |
.icon-navbar:before,
|
|
|
|
|
49 |
.icon-packager:before,
|
50 |
.icon-packager-logo:before,
|
51 |
.icon-panels:before,
|
95 |
.icon-layouts-genesis-logo:before { content: "\f127"; }
|
96 |
.icon-layouts-logo:before { content: "\f117"; }
|
97 |
.icon-list-group:before { content: "\f130"; }
|
|
|
98 |
.icon-module:before { content: "\f118"; }
|
99 |
.icon-module-logo:before { content: "\f119"; }
|
100 |
.icon-navbar:before { content: "\f131"; }
|
|
|
|
|
101 |
.icon-packager:before { content: "\f120"; }
|
102 |
.icon-packager-logo:before { content: "\f121"; }
|
103 |
.icon-panels:before { content: "\f133"; }
|
library/toolset/onthego-resources/onthegosystems-icons/fonts/onthegosystems-icons-preview.html
CHANGED
@@ -141,11 +141,11 @@
|
|
141 |
|
142 |
@font-face {
|
143 |
font-family: "onthegosystems-icons";
|
144 |
-
src: url("./onthegosystems-
|
145 |
-
src: url("./onthegosystems-
|
146 |
-
url("./onthegosystems-
|
147 |
-
url("./onthegosystems-
|
148 |
-
url("./onthegosystems-
|
149 |
font-weight: normal;
|
150 |
font-style: normal;
|
151 |
}
|
@@ -153,7 +153,7 @@
|
|
153 |
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
154 |
@font-face {
|
155 |
font-family: "onthegosystems-icons";
|
156 |
-
src: url("./onthegosystems-
|
157 |
}
|
158 |
}
|
159 |
|
@@ -180,12 +180,9 @@
|
|
180 |
.icon-layouts-genesis-logo:before,
|
181 |
.icon-layouts-logo:before,
|
182 |
.icon-list-group:before,
|
183 |
-
.icon-many-to-many:before,
|
184 |
.icon-module:before,
|
185 |
.icon-module-logo:before,
|
186 |
.icon-navbar:before,
|
187 |
-
.icon-one-to-many:before,
|
188 |
-
.icon-one-to-one:before,
|
189 |
.icon-packager:before,
|
190 |
.icon-packager-logo:before,
|
191 |
.icon-panels:before,
|
@@ -235,12 +232,9 @@
|
|
235 |
.icon-layouts-genesis-logo:before { content: "\f127"; }
|
236 |
.icon-layouts-logo:before { content: "\f117"; }
|
237 |
.icon-list-group:before { content: "\f130"; }
|
238 |
-
.icon-many-to-many:before { content: "\f138"; }
|
239 |
.icon-module:before { content: "\f118"; }
|
240 |
.icon-module-logo:before { content: "\f119"; }
|
241 |
.icon-navbar:before { content: "\f131"; }
|
242 |
-
.icon-one-to-many:before { content: "\f139"; }
|
243 |
-
.icon-one-to-one:before { content: "\f13a"; }
|
244 |
.icon-packager:before { content: "\f120"; }
|
245 |
.icon-packager-logo:before { content: "\f121"; }
|
246 |
.icon-panels:before { content: "\f133"; }
|
@@ -271,7 +265,7 @@
|
|
271 |
<body class="characters-off">
|
272 |
<div id="page" class="container">
|
273 |
<header>
|
274 |
-
<h1>onthegosystems-icons contains
|
275 |
<a onclick="toggleCharacters(); return false;" href="#">Toggle Preview Characters</a>
|
276 |
</header>
|
277 |
|
@@ -536,19 +530,6 @@
|
|
536 |
</div>
|
537 |
</div>
|
538 |
|
539 |
-
<div class="glyph">
|
540 |
-
<div class="preview-glyphs">
|
541 |
-
<span class="step size-12"><span class="letters">Pp</span><i id="icon-many-to-many" class="icon-many-to-many"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="icon-many-to-many" class="icon-many-to-many"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="icon-many-to-many" class="icon-many-to-many"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="icon-many-to-many" class="icon-many-to-many"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="icon-many-to-many" class="icon-many-to-many"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="icon-many-to-many" class="icon-many-to-many"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="icon-many-to-many" class="icon-many-to-many"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="icon-many-to-many" class="icon-many-to-many"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="icon-many-to-many" class="icon-many-to-many"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="icon-many-to-many" class="icon-many-to-many"></i></span>
|
542 |
-
</div>
|
543 |
-
<div class="preview-scale">
|
544 |
-
<span class="step">12</span><span class="step">14</span><span class="step">16</span><span class="step">18</span><span class="step">21</span><span class="step">24</span><span class="step">36</span><span class="step">48</span><span class="step">60</span><span class="step">72</span>
|
545 |
-
</div>
|
546 |
-
<div class="usage">
|
547 |
-
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".icon-many-to-many" />
|
548 |
-
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&#xf138;" />
|
549 |
-
</div>
|
550 |
-
</div>
|
551 |
-
|
552 |
<div class="glyph">
|
553 |
<div class="preview-glyphs">
|
554 |
<span class="step size-12"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span>
|
@@ -588,32 +569,6 @@
|
|
588 |
</div>
|
589 |
</div>
|
590 |
|
591 |
-
<div class="glyph">
|
592 |
-
<div class="preview-glyphs">
|
593 |
-
<span class="step size-12"><span class="letters">Pp</span><i id="icon-one-to-many" class="icon-one-to-many"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="icon-one-to-many" class="icon-one-to-many"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="icon-one-to-many" class="icon-one-to-many"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="icon-one-to-many" class="icon-one-to-many"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="icon-one-to-many" class="icon-one-to-many"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="icon-one-to-many" class="icon-one-to-many"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="icon-one-to-many" class="icon-one-to-many"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="icon-one-to-many" class="icon-one-to-many"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="icon-one-to-many" class="icon-one-to-many"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="icon-one-to-many" class="icon-one-to-many"></i></span>
|
594 |
-
</div>
|
595 |
-
<div class="preview-scale">
|
596 |
-
<span class="step">12</span><span class="step">14</span><span class="step">16</span><span class="step">18</span><span class="step">21</span><span class="step">24</span><span class="step">36</span><span class="step">48</span><span class="step">60</span><span class="step">72</span>
|
597 |
-
</div>
|
598 |
-
<div class="usage">
|
599 |
-
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".icon-one-to-many" />
|
600 |
-
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&#xf139;" />
|
601 |
-
</div>
|
602 |
-
</div>
|
603 |
-
|
604 |
-
<div class="glyph">
|
605 |
-
<div class="preview-glyphs">
|
606 |
-
<span class="step size-12"><span class="letters">Pp</span><i id="icon-one-to-one" class="icon-one-to-one"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="icon-one-to-one" class="icon-one-to-one"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="icon-one-to-one" class="icon-one-to-one"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="icon-one-to-one" class="icon-one-to-one"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="icon-one-to-one" class="icon-one-to-one"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="icon-one-to-one" class="icon-one-to-one"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="icon-one-to-one" class="icon-one-to-one"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="icon-one-to-one" class="icon-one-to-one"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="icon-one-to-one" class="icon-one-to-one"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="icon-one-to-one" class="icon-one-to-one"></i></span>
|
607 |
-
</div>
|
608 |
-
<div class="preview-scale">
|
609 |
-
<span class="step">12</span><span class="step">14</span><span class="step">16</span><span class="step">18</span><span class="step">21</span><span class="step">24</span><span class="step">36</span><span class="step">48</span><span class="step">60</span><span class="step">72</span>
|
610 |
-
</div>
|
611 |
-
<div class="usage">
|
612 |
-
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".icon-one-to-one" />
|
613 |
-
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&#xf13a;" />
|
614 |
-
</div>
|
615 |
-
</div>
|
616 |
-
|
617 |
<div class="glyph">
|
618 |
<div class="preview-glyphs">
|
619 |
<span class="step size-12"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span>
|
141 |
|
142 |
@font-face {
|
143 |
font-family: "onthegosystems-icons";
|
144 |
+
src: url("./onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.eot");
|
145 |
+
src: url("./onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.eot?#iefix") format("embedded-opentype"),
|
146 |
+
url("./onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.woff") format("woff"),
|
147 |
+
url("./onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.ttf") format("truetype"),
|
148 |
+
url("./onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.svg#onthegosystems-icons") format("svg");
|
149 |
font-weight: normal;
|
150 |
font-style: normal;
|
151 |
}
|
153 |
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
154 |
@font-face {
|
155 |
font-family: "onthegosystems-icons";
|
156 |
+
src: url("./onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.svg#onthegosystems-icons") format("svg");
|
157 |
}
|
158 |
}
|
159 |
|
180 |
.icon-layouts-genesis-logo:before,
|
181 |
.icon-layouts-logo:before,
|
182 |
.icon-list-group:before,
|
|
|
183 |
.icon-module:before,
|
184 |
.icon-module-logo:before,
|
185 |
.icon-navbar:before,
|
|
|
|
|
186 |
.icon-packager:before,
|
187 |
.icon-packager-logo:before,
|
188 |
.icon-panels:before,
|
232 |
.icon-layouts-genesis-logo:before { content: "\f127"; }
|
233 |
.icon-layouts-logo:before { content: "\f117"; }
|
234 |
.icon-list-group:before { content: "\f130"; }
|
|
|
235 |
.icon-module:before { content: "\f118"; }
|
236 |
.icon-module-logo:before { content: "\f119"; }
|
237 |
.icon-navbar:before { content: "\f131"; }
|
|
|
|
|
238 |
.icon-packager:before { content: "\f120"; }
|
239 |
.icon-packager-logo:before { content: "\f121"; }
|
240 |
.icon-panels:before { content: "\f133"; }
|
265 |
<body class="characters-off">
|
266 |
<div id="page" class="container">
|
267 |
<header>
|
268 |
+
<h1>onthegosystems-icons contains 38 glyphs:</h1>
|
269 |
<a onclick="toggleCharacters(); return false;" href="#">Toggle Preview Characters</a>
|
270 |
</header>
|
271 |
|
530 |
</div>
|
531 |
</div>
|
532 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
533 |
<div class="glyph">
|
534 |
<div class="preview-glyphs">
|
535 |
<span class="step size-12"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="icon-module" class="icon-module"></i></span>
|
569 |
</div>
|
570 |
</div>
|
571 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
572 |
<div class="glyph">
|
573 |
<div class="preview-glyphs">
|
574 |
<span class="step size-12"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="icon-packager" class="icon-packager"></i></span>
|
library/toolset/onthego-resources/onthegosystems-icons/fonts/onthegosystems-icons_66f9f492f35a2f7dd54f8e6f1fdc63d5.eot
DELETED
Binary file
|
library/toolset/onthego-resources/onthegosystems-icons/fonts/onthegosystems-icons_66f9f492f35a2f7dd54f8e6f1fdc63d5.ttf
DELETED
Binary file
|
library/toolset/onthego-resources/onthegosystems-icons/fonts/onthegosystems-icons_66f9f492f35a2f7dd54f8e6f1fdc63d5.woff
DELETED
Binary file
|
library/toolset/onthego-resources/onthegosystems-icons/fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.eot
ADDED
Binary file
|
library/toolset/onthego-resources/onthegosystems-icons/fonts/{onthegosystems-icons_66f9f492f35a2f7dd54f8e6f1fdc63d5.svg → onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.svg}
RENAMED
@@ -1,42 +1,43 @@
|
|
1 |
<?xml version="1.0" standalone="no"?>
|
2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3 |
<!--
|
4 |
-
2017-
|
5 |
-->
|
6 |
-
<svg xmlns="http://www.w3.org/2000/svg">
|
7 |
<metadata>
|
8 |
-
Created by FontForge
|
9 |
-
By
|
10 |
-
|
11 |
</metadata>
|
12 |
<defs>
|
13 |
<font id="onthegosystems-icons" horiz-adv-x="512" >
|
14 |
<font-face
|
15 |
font-family="onthegosystems-icons"
|
16 |
-
font-weight="
|
17 |
font-stretch="normal"
|
18 |
units-per-em="512"
|
19 |
-
panose-1="2 0
|
20 |
ascent="448"
|
21 |
descent="-64"
|
22 |
bbox="0 -64 2082.65 448"
|
23 |
underline-thickness="25.6"
|
24 |
underline-position="-51.2"
|
25 |
-
unicode-range="U+0020-
|
26 |
/>
|
27 |
<missing-glyph />
|
28 |
<glyph glyph-name="space" unicode=" " horiz-adv-x="200"
|
29 |
/>
|
30 |
-
<glyph glyph-name="
|
31 |
-
d="
|
32 |
-
|
|
|
33 |
<glyph glyph-name="uniF122" unicode=""
|
34 |
d="M260.664 55.4453h-209.93l104.963 176.74l104.967 176.025l104.968 -176.378l104.962 -176.388h-209.93zM284.613 161.191l7.23633 129.573h-61.3564l7.24609 -129.573h46.874zM231.062 113.25c0 -8.2168 2.65039 -14.6348 7.95215 -19.2402
|
35 |
c5.30566 -4.61523 12.6455 -6.91797 22.0186 -6.91797c9.2793 0 16.4961 2.30762 21.6602 6.91797c5.16406 4.60547 7.74121 11.0234 7.74121 19.2402c0 8.31445 -2.48828 14.7725 -7.45703 19.3877c-4.96777 4.61523 -12.2832 6.91797 -21.9443 6.91797
|
36 |
c-9.75488 0 -17.1875 -2.30762 -22.2979 -6.91797c-5.11523 -4.62012 -7.67285 -11.0781 -7.67285 -19.3877z" />
|
37 |
<glyph glyph-name="uniF12F" unicode=""
|
38 |
-
d="M496.098 434.785l-8.
|
39 |
-
c0 -21.8164 17.7051 -39.
|
40 |
<glyph glyph-name="uniF111" unicode=""
|
41 |
d="M258.637 256.013c18.6494 0 33.8242 -15.1738 33.8242 -33.8242v-22.5342h-67.6484v22.5342c0 18.6504 15.1748 33.8242 33.8242 33.8242zM371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v76.8008h76.7998v-76.8008zM344.313 43.6348
|
42 |
v138.451c0 9.70312 -7.85938 17.5752 -17.5742 17.5752h-7.21289v22.5342c0 33.5684 -27.3154 60.877 -60.8896 60.877c-33.5615 0 -60.877 -27.3086 -60.877 -60.877v-22.5342h-9.47168c-9.69629 0 -17.5615 -7.87207 -17.5615 -17.5752v-138.451
|
@@ -52,33 +53,33 @@ c-1.39551 0.966797 -4.49316 2.66895 -9.29297 2.66895h-46.8281c-5.38965 0 -9.0175
|
|
52 |
c-1.64453 -1.10742 -5.29297 -0.774414 -10.9375 -0.774414h-7.85254c-4.05762 0 -8.29492 -1.49121 -9.60645 -2.70801c-1.31836 -1.24121 -3.5332 -4.69043 -3.5332 -8.65234zM409.715 175.731c1.8623 4.05762 2.78418 6.52148 2.79688 7.0459
|
53 |
c-0.255859 1.75391 -2.88574 2.82227 -7.8457 2.82227h-204.23c-4.90234 0 -8.26953 -0.742188 -10.125 -1.83008c-1.85645 -1.10059 -3.75684 -3.76953 -5.69629 -7.6416l-57.3242 -112.128h226.374z" />
|
54 |
<glyph glyph-name="uniF128" unicode=""
|
55 |
-
d="M371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v76.8008h76.7998v-76.8008zM121.99 155.591c0 -
|
56 |
-
s-134.01 -
|
57 |
-
v21.4209h59.6738v-70.8486c-4.
|
58 |
-
c-12.2881 0 -23.
|
59 |
-
c4.14746 10.4893 10.0801 19.5322 17.7979 27.1289c7.71875 7.60352 17.
|
60 |
-
c5.
|
61 |
-
c-2.
|
62 |
-
c-7.
|
63 |
-
c2.45801 -6.91113 5.85645 -12.
|
64 |
<glyph glyph-name="uniF130" unicode=""
|
65 |
d="M204.961 -49.2695v102.285h421.251v-102.285h-421.251zM204.961 330.962v102.331h421.251v-102.331h-421.251zM204.961 140.846v102.331h421.251v-102.331h-421.251zM18.5225 -49.2695v102.285h133.262v-102.285h-133.262zM18.5225 330.962v102.331h133.262v-102.331
|
66 |
h-133.262zM18.5225 140.846v102.331h133.262v-102.331h-133.262z" />
|
67 |
<glyph glyph-name="uniF125" unicode=""
|
68 |
d="M270.061 278.381c47.4307 0 85.7793 -38.4131 85.7793 -85.7471c0 -62.7969 -72.333 -135.693 -75.4814 -138.938c-2.5791 -2.5791 -6.49609 -4.49316 -10.2979 -4.49316c-3.82715 0 -7.01367 1.34375 -10.2139 4.49316
|
69 |
c-3.19434 3.23828 -75.5264 76.1406 -75.5264 138.938c0 47.3281 38.4062 85.7471 85.7402 85.7471zM420.448 16.5762c-1.90137 -3.16211 -5.05664 -4.49316 -8.9668 -4.49316h-279.642c-3.2002 0 -7.02051 1.90723 -8.97266 4.49316
|
70 |
-
c-1.90723 3.23828 -2.53418 6.38672 -0.614258 9.63184l33.3057 79.2959c1.90039 3.92285 5.10742 6.49609 9.58105 6.49609h31.9863v-21.1777h-24.9658l-24.96 -58.
|
71 |
-
l33.3125 -79.2959c3.14844 -3.24512 2.47656 -7.05273 0.556641 -9.63184zM233.6 195.2c0 -
|
72 |
-
c-25.0671 0 -37.6006 -12.5332 -37.6006 -37.5996z" />
|
73 |
<glyph glyph-name="uniF135" unicode=""
|
74 |
d="M672.731 -44.9854v476.32h476.538v-476.32h-476.538zM60.1328 -44.9854v476.32h476.451v-476.32h-476.451zM1308.57 -44.9854v476.32h476.581v-476.32h-476.581zM264.289 263.99h-0.783203l-50.2998 -24.0186l-10.3555 46.4268l70.4014 32.5469h50.8652v-264.551
|
75 |
-
h-59.8281v209.596zM826.414 54.3945v37.4199l33.7646 30.458c58.
|
76 |
-
c-17.5586 -0.943359 -42.9004 -10.6895 -56.5654 -21.7559l-17.4043 43.9463c20.9336 15.041 58.8438 27.248 84.6211 27.248c0.458984 0 1.20312 -0.00390625 1.66211 -0.00976562c2.
|
77 |
-
c45.2266 0 81.
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
|
|
82 |
<glyph glyph-name="uniF110" unicode=""
|
83 |
d="M344.313 43.6348c0 -9.70215 -7.86523 -17.5742 -17.5742 -17.5742h-138.451c-9.70215 0 -17.5615 7.87207 -17.5615 17.5742v138.451c0 9.70312 7.86523 17.5752 17.5615 17.5752h138.451c9.71484 0 17.5742 -7.87207 17.5742 -17.5752v-138.451zM319.526 155.699
|
84 |
h-27.0654v66.4893c0 18.6504 -15.1748 33.8242 -33.8242 33.8242s-33.8242 -15.1738 -33.8242 -33.8242v-57.4717h-27.0527v57.4717c0 33.5684 27.3154 60.877 60.877 60.877c33.5742 0 60.8896 -27.3086 60.8896 -60.877v-66.4893z" />
|
@@ -87,55 +88,55 @@ d="M371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v7
|
|
87 |
M310.381 49.0107c4.81934 0 9.09473 0.40332 12.8125 1.24219c3.72461 0.819336 7.23242 1.91309 10.541 3.2959v22.8477h-14.8799c-2.20801 0 -3.93652 0.588867 -5.1709 1.75391c-1.23535 1.16504 -1.86328 2.64941 -1.86328 4.43555v19.2188h53.5303v-63.5586
|
88 |
c-3.85938 -2.81543 -7.87207 -5.24121 -12.0449 -7.2832c-4.16602 -2.02832 -8.61426 -3.70508 -13.3252 -5.01074c-4.72266 -1.30566 -9.74707 -2.26562 -15.084 -2.89258c-5.33789 -0.621094 -11.0791 -0.928711 -17.2041 -0.928711
|
89 |
c-11.0205 0 -21.209 1.94629 -30.5791 5.83105c-9.36914 3.90332 -17.4785 9.2666 -24.3389 16.1338c-6.86035 6.8418 -12.2305 14.9893 -16.1221 24.3906c-3.89062 9.40137 -5.84277 19.6162 -5.84277 30.6367c0 11.2256 1.8623 21.543 5.58105 30.9443
|
90 |
-
c3.71777 9.41406 9.04297 17.5234 15.9609 24.3389c6.93164 6.81641 15.29 12.1279 25.1143 15.917c9.80469 3.78223 20.7871 5.66992 32.9082 5.66992c6.26562 0 12.1602 -0.517578 17.6709 -1.
|
91 |
c4.63965 -1.79199 8.90234 -3.92285 12.7549 -6.40039c3.86523 -2.48242 7.30859 -5.16406 10.3359 -8.06348l-10.1309 -15.3926c-0.959961 -1.45898 -2.1123 -2.58496 -3.46289 -3.41699c-1.33789 -0.819336 -2.80273 -1.22852 -4.39648 -1.22852
|
92 |
c-2.06055 0 -4.18555 0.677734 -6.40625 2.06055c-2.75195 1.64453 -5.35059 3.07812 -7.7959 4.28125c-2.44434 1.20312 -4.94043 2.18848 -7.49414 2.9502c-2.54102 0.755859 -5.23535 1.30566 -8.06348 1.6582c-2.81641 0.345703 -5.99121 0.518555 -9.50488 0.518555
|
93 |
c-6.53418 0 -12.4287 -1.15918 -17.6699 -3.46289c-5.23535 -2.32324 -9.68945 -5.56836 -13.3828 -9.7666c-3.67285 -4.19141 -6.52734 -9.24121 -8.51758 -15.1426c-1.99707 -5.88086 -3.00195 -12.4473 -3.00195 -19.6797c0 -8 1.10059 -15.085 3.31543 -21.2861
|
94 |
c2.20117 -6.20215 5.24805 -11.4365 9.13867 -15.7061c3.8916 -4.26855 8.50586 -7.52637 13.8496 -9.75293c5.35059 -2.25293 11.1875 -3.36719 17.5234 -3.36719z" />
|
95 |
<glyph glyph-name="uniF12B" unicode=""
|
96 |
-
d="M1462.46 195.143l-243.607 -223.575h-507.86l243.761 223.678l-243.557 217.136h507.605zM2082.65 195.143l-243.
|
97 |
v459.926h464.884z" />
|
98 |
<glyph glyph-name="uniF117" unicode=""
|
99 |
d="M371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v76.8008h76.7998v-76.8008zM183.577 12.877v174.188h-70.3359v-174.188h70.3359zM396.8 12.877v174.188h-195.501v-174.188h195.501zM396.8 205.178v74.6494h-283.559v-74.6494h283.559z
|
100 |
" />
|
101 |
<glyph glyph-name="uniF12D" unicode=""
|
102 |
-
d="M495.838 -44.7412v338.07h338.
|
103 |
-
c0
|
104 |
-
|
105 |
-
c0 -
|
106 |
<glyph glyph-name="uniF11A" unicode=""
|
107 |
d="M399.36 330.24h61.4395v-368.641h-399.359v368.641h61.4395v92.1602h92.1602v-92.1602h92.1602v92.1602h92.1602v-92.1602zM116.173 121.979c0 2.90332 -0.839844 5.0791 -2.51953 6.54395c-1.68359 1.45898 -4.1875 2.19141 -7.50586 2.19141h-7.26465
|
108 |
-
l-6.72266 -31.8008h5.16113l2.49805 11.8887h2.3916c4.39258 0 7.
|
109 |
-
c0.849609 -0.726562 1.27441 -1.87402 1.27441 -3.45605c0 -2.11914 -0.
|
110 |
v-0.00488281h-5.14062l-2.67285 -12.6982c-0.173828 -0.895508 -0.347656 -1.78613 -0.522461 -2.6875c-0.173828 -0.885742 -0.260742 -1.78223 -0.260742 -2.69824c0 -2.06836 0.527344 -3.64062 1.58691 -4.74121c1.05469 -1.11133 2.55566 -1.65918 4.50098 -1.65918
|
111 |
c1.49023 0 2.88281 0.384766 4.17285 1.18262c1.29004 0.798828 2.53418 2.02832 3.72168 3.71777h0.174805l-0.456055 -4.45996h4.02441l5.06836 24.0488h-5.06836l-2.15039 -10.1992c-0.435547 -2.06348 -1.0498 -3.86035 -1.84863 -5.38086
|
112 |
-
c-0.798828 -1.
|
113 |
-
c-1.16211 0.291992 -2.31934 0.44043 -3.48145 0.44043c-2.91309 0 -5.25879 -0.870117 -7.03516 -2.61621c-1.78125 -1.74121 -2.66699 -4.02441 -2.66699 -6.87598c0 -2.
|
114 |
c-1.44922 -0.681641 -2.51367 -1.37793 -3.18457 -2.12012c-0.675781 -0.732422 -1.01367 -1.60254 -1.01367 -2.60059c0 -1.17773 0.552734 -2.10938 1.65332 -2.75977c-2.23242 -0.748047 -3.85059 -1.66895 -4.8584 -2.76465
|
115 |
c-1.00391 -1.08594 -1.51074 -2.37598 -1.51074 -3.87109c0 -1.89941 0.814453 -3.38965 2.42676 -4.47949c1.61816 -1.08594 3.89648 -1.62305 6.84082 -1.62305c4.03418 0 7.1416 0.767578 9.33301 2.31934c2.19141 1.56152 3.28223 3.74707 3.28223 6.58887
|
116 |
-
c0 1.77148 -0.552734 3.13379 -1.65332 4.08105c-1.10156 0.947266 -2.92383 1.58691 -5.47852 1.90918l-2.76562 0.337891c-0.870117 0.123047 -1.53516 0.
|
117 |
c0 0.926758 0.80957 1.67969 2.41699 2.25781c0.583984 -0.107422 1.24902 -0.168945 2.00195 -0.168945c2.89844 0 5.21191 0.814453 6.9375 2.46289s2.59082 3.87012 2.59082 6.6709c0 1.14746 -0.205078 2.13574 -0.609375 2.98047l4.17285 0.716797zM160.404 99.3027
|
118 |
l2.98047 -0.307617c1.6377 -0.168945 2.78516 -0.470703 3.43555 -0.890625c0.649414 -0.419922 0.977539 -0.999023 0.977539 -1.74121c0 -1.46387 -0.666016 -2.59082 -2.00195 -3.36914c-1.33105 -0.788086 -3.18457 -1.17188 -5.54492 -1.17188
|
119 |
-
c-1.6543 0 -2.88281 0.28125 -3.68652 0.829102c-0.803711 0.558594 -1.20801 1.30566 -1.20801 2.25293c0 1.13184 0.43457 2.08887 1.30566 2.84668c0.870117 0.77832 2.11914 1.28516 3.74219 1.55176zM166.277 119.982c1.92969 0 2.89258 -1.03418 2.89258 -3.
|
120 |
-
c0 -1.
|
121 |
-
c-0.517578 0.563477 -0.773438 1.35156 -0.773438 2.38086c0 1.13672 0.194336 2.20117 0.588867 3.16406c0.388672 0.962891 0.941406 1.72559 1.65332 2.2832c0.707031 0.547852 1.53613 0.830078 2.47852 0.830078zM182.277 98.
|
122 |
-
l-5.13086 -24.
|
123 |
-
c0 0.789062 -0.241211 1.36719 -0.
|
124 |
-
c0.333008 1.62305 0.501953 2.93945 0.501953 3.93262c0 2.03223 -0.538086 3.59863 -1.60254 4.7002c-1.06543 1.10547 -2.57031 1.64844 -4.51074 1.64844c-1.49512 0 -2.87793 -0.394531 -4.
|
125 |
h-0.194336l0.455078 4.45996h-4.00391l-5.12988 -24.0488h5.12988l2.13574 10.1992c0.404297 1.97168 1.01367 3.73242 1.82227 5.28906c0.814453 1.55664 1.73047 2.75488 2.74414 3.5791s2.04297 1.23828 3.08789 1.23828c1.86816 0 2.80566 -0.952148 2.80566 -2.85156
|
126 |
-
c0 -0.603516 -0.12793 -1.55078 -0.389648 -2.85645zM230.753 106.302c0 0.936523 -0.163086 1.
|
127 |
c-1.47949 0.798828 -2.45801 1.44824 -2.93359 1.96094c-0.481445 0.506836 -0.72168 1.08496 -0.72168 1.74023c0 0.855469 0.332031 1.52051 0.988281 2.00195c0.655273 0.481445 1.51465 0.72168 2.5752 0.72168c1.82715 0 3.75781 -0.547852 5.78516 -1.64844
|
128 |
l1.6543 3.83008c-2.17676 1.20801 -4.68555 1.81738 -7.52637 1.81738c-2.64258 0 -4.73633 -0.639648 -6.28809 -1.90918c-1.55078 -1.28027 -2.3291 -3.04199 -2.3291 -5.28906c0 -1.36719 0.374023 -2.57031 1.12109 -3.56934
|
129 |
c0.74707 -1.00781 2.02734 -2.00195 3.83984 -2.96875c1.55176 -0.886719 2.58105 -1.58789 3.07715 -2.12012c0.49707 -0.527344 0.748047 -1.15723 0.748047 -1.9043c0 -0.994141 -0.435547 -1.79785 -1.30566 -2.37109
|
130 |
c-0.871094 -0.573242 -2.00781 -0.870117 -3.41504 -0.870117c-2.30469 0 -4.56738 0.650391 -6.78418 1.95605v-4.4082c1.91504 -0.967773 4.24902 -1.45996 7.00391 -1.45996c3.04688 0 5.42773 0.675781 7.1377 2.0332c1.70996 1.35645 2.56445 3.28711 2.56445 5.7959z
|
131 |
M242.826 88.2129c2.12988 0 3.86035 0.639648 5.16602 1.90918c1.32129 1.29004 2.27344 3.3125 2.85156 6.05176l4.84863 22.9072h4.98242l0.803711 3.87598h-4.97656l0.394531 1.86328c0.317383 1.42871 0.777344 2.44727 1.38184 3.07715
|
132 |
-
c0.598633 0.620117 1.40332 0.9375 2.40137 0.9375c0.901367 0 1.88379 -0.205078 2.95898 -0.609375l1.32617 3.82422c-1.39746 0.625 -2.92871 0.942383 -4.58691 0.942383c-2.
|
133 |
-
c-1.31055 -1.
|
134 |
-
c0.855469 -0.342773 1.93555 -0.500977 3.24121 -0.500977zM282.772 113.956c0 2.89258 -0.798828 5.19141 -2.38086 6.87598c-1.60254 1.67969 -3.80957 2.
|
135 |
c-1.88477 -1.3418 -3.33398 -3.2207 -4.37305 -5.62207c-1.0293 -2.41602 -1.55078 -5.06348 -1.55078 -7.94629c0 -2.85156 0.818359 -5.11426 2.45215 -6.77344c1.63867 -1.65918 3.85059 -2.4834 6.64062 -2.4834c2.40625 0 4.53613 0.640625 6.37988 1.92578
|
136 |
-
c1.85254 1.2793 3.30664 3.
|
137 |
-
c-1.0498 -0.988281 -2.22266 -1.48047 -3.52246 -1.48047c-1.4082 0 -2.46289 0.430664 -3.19043 1.29102c-0.72168 0.849609 -1.06934 2.08887 -1.06934 3.69141c0 2.01172 0.291016 3.90625 0.879883 5.68848c0.579102 1.76562 1.4082 3.17871 2.47363 4.
|
138 |
-
c1.06445 1.
|
139 |
h-0.189453l0.450195 4.45996h-3.99316l-5.13574 -24.0488h5.13574l2.30371 10.8701c0.557617 2.66211 1.56641 4.80762 3 6.44629c1.43945 1.63281 3.07227 2.45215 4.88965 2.45215c0.702148 0 1.44434 -0.107422 2.22754 -0.3125l1.11621 4.7666
|
140 |
c-0.675781 0.174805 -1.44922 0.266602 -2.35059 0.266602zM119.286 43.2178l14.249 31.8008h-5.35059l-7.78809 -18.4014c-0.276367 -0.620117 -0.716797 -1.71582 -1.32617 -3.3125c-0.608398 -1.58789 -1.11621 -3.02637 -1.52051 -4.2959h-0.173828l0.0664062 4.09082
|
141 |
l-0.0664062 3.67578l-0.670898 18.2432h-4.89453l-8.41699 -18.2891c-0.855469 -1.94043 -1.88477 -4.52051 -3.08789 -7.7207h-0.12793c0.18457 3.0459 0.282227 5.5498 0.282227 7.52637l-0.415039 18.4834h-4.98145l1.15137 -31.8008h5.56543l8.37695 18.3193
|
@@ -143,67 +144,67 @@ c1.01367 2.12988 1.86328 4.23926 2.54395 6.32324h0.12793l-0.0869141 -2.30371l0.1
|
|
143 |
c-2.44727 0 -4.6084 -0.670898 -6.48242 -2.01172c-1.87402 -1.3418 -3.32812 -3.2207 -4.3623 -5.62207c-1.03906 -2.41699 -1.55664 -5.06348 -1.55664 -7.94629c0 -2.85156 0.819336 -5.11523 2.45801 -6.77344c1.63281 -1.65918 3.85059 -2.4834 6.63086 -2.4834
|
144 |
c2.40625 0 4.53613 0.639648 6.38379 1.9248c1.84863 1.28027 3.30273 3.11816 4.3623 5.51953c1.06055 2.40625 1.58789 5.07422 1.58789 7.99707zM147.395 58.4961c0 -2.13477 -0.291992 -4.08594 -0.865234 -5.8623
|
145 |
c-0.583984 -1.77148 -1.39258 -3.15918 -2.4375 -4.14258c-1.04395 -0.988281 -2.2168 -1.47949 -3.52246 -1.47949c-1.4082 0 -2.47266 0.430664 -3.18945 1.29004c-0.716797 0.850586 -1.0752 2.08887 -1.0752 3.69141c0 2.0127 0.291992 3.90723 0.880859 5.68848
|
146 |
-
c0.583008 1.7666 1.41309 3.17969 2.47754 4.21387c1.06543 1.
|
147 |
c-1.35156 0 -2.62695 -0.394531 -3.82422 -1.14746c-1.20898 -0.762695 -2.41211 -2.01172 -3.61523 -3.75293h-0.194336l0.455078 4.45996h-4.00293l-5.13086 -24.0488h5.13086l2.30371 10.8701c0.563477 2.66211 1.56641 4.80762 3 6.44531
|
148 |
-
c1.43848 1.63379 3.07227 2.45312 4.89453 2.45312c0.702148 0 1.43945 -0.107422 2.22266 -0.3125l1.10547 4.7666c-0.660156 0.173828 -1.
|
149 |
-
c-1.73633 -1.41309 -3.12891 -3.41992 -4.16309 -6.00098c-1.03906 -2.
|
150 |
-
c1.1875 0.650391 2.
|
151 |
-
M182.543 46.9199c-2.27246 0 -3.41504 1.47461 -3.41504 4.41797c0 2.0127 0.323242 3.99902 0.958008 5.93945s1.49512 3.47168 2.
|
152 |
c0.629883 -0.798828 0.947266 -1.8584 0.947266 -3.17969c0 -1.96094 -0.347656 -3.89648 -1.05469 -5.81152c-0.701172 -1.91504 -1.63867 -3.46094 -2.80566 -4.64844c-1.16699 -1.20312 -2.34473 -1.79199 -3.5332 -1.79199zM223.053 66.2988
|
153 |
c0 2.90332 -0.839844 5.0791 -2.51367 6.54297c-1.68457 1.45996 -4.18848 2.19141 -7.50586 2.19141h-7.26562l-6.72266 -31.7998h5.15625l2.49805 11.8887h2.3916c4.39258 0 7.81836 0.962891 10.2754 2.89258c2.45801 1.93066 3.68652 4.69043 3.68652 8.28418z
|
154 |
-
M207.632 59.4941l2.38574 11.1875h2.59082c1.75586 0 3.05078 -0.
|
155 |
-
M239.943 67.7227c-1.34668 0 -2.62109 -0.394531 -3.82422 -1.14746c-1.20801 -0.762695 -2.
|
156 |
c1.43848 1.63379 3.07129 2.45312 4.89453 2.45312c0.701172 0 1.43848 -0.107422 2.22168 -0.3125l1.10645 4.7666c-0.661133 0.173828 -1.44922 0.266602 -2.3457 0.266602zM251.484 42.7881c1.43359 0 2.7334 0.137695 3.89062 0.378906
|
157 |
-
c1.16797 0.271484 2.44727 0.726562 3.
|
158 |
-
v0.
|
159 |
c-2.38086 0 -4.53125 -0.670898 -6.45117 -2.02246s-3.44531 -3.26172 -4.56641 -5.73438c-1.12207 -2.46289 -1.68457 -5.13574 -1.68457 -8.0127c0 -2.87793 0.798828 -5.11523 2.40137 -6.7334c1.60254 -1.61719 3.8291 -2.41602 6.68652 -2.41602zM254.792 63.8008
|
160 |
c0.911133 0 1.60254 -0.205078 2.07324 -0.609375c0.46582 -0.415039 0.696289 -0.983398 0.696289 -1.73047c0 -1.42871 -0.773438 -2.5293 -2.30859 -3.29785c-1.53613 -0.783203 -3.67188 -1.16699 -6.39551 -1.16699h-0.634766
|
161 |
c0.538086 2.04785 1.41797 3.69629 2.6416 4.93555c1.22363 1.24414 2.53516 1.86914 3.92773 1.86914zM280.289 50.6211c0 0.9375 -0.168945 1.7666 -0.496094 2.46777c-0.328125 0.722656 -0.819336 1.38281 -1.45996 1.99219
|
162 |
-
c-0.
|
163 |
c1.82715 0 3.75781 -0.547852 5.78516 -1.64844l1.64844 3.83008c-2.18066 1.20801 -4.67969 1.81738 -7.53125 1.81738c-2.6416 0 -4.73047 -0.640625 -6.28711 -1.91016c-1.55176 -1.2793 -2.3252 -3.04102 -2.3252 -5.28906
|
164 |
-
c0 -1.
|
165 |
c-0.870117 -0.573242 -2.01172 -0.870117 -3.40918 -0.870117c-2.30957 0 -4.5625 0.649414 -6.79004 1.95508v-4.4082c1.9209 -0.967773 4.25 -1.45898 7.00977 -1.45898c3.04102 0 5.42188 0.675781 7.13184 2.03223c1.71582 1.35742 2.57031 3.28711 2.57031 5.7959z
|
166 |
-
M299.898 50.6211c0 0.9375 -0.168945 1.7666 -0.496094 2.46777c-0.328125 0.722656 -0.819336 1.38281 -1.45898 1.99219c-0.629883 0.609375 -1.
|
167 |
-
c-0.481445 0.506836 -0.72168 1.08594 -0.72168 1.74121c0 0.
|
168 |
-
c-2.18066 1.20801 -4.67969 1.81738 -7.53125 1.81738c-2.6416 0 -4.73047 -0.640625 -6.28711 -1.91016c-1.55176 -1.2793 -2.32422 -3.04102 -2.32422 -5.28906c0 -1.
|
169 |
c1.55176 -0.885742 2.58008 -1.58691 3.08203 -2.11914c0.492188 -0.527344 0.748047 -1.15723 0.748047 -1.90527c0 -0.993164 -0.44043 -1.79688 -1.31055 -2.37012c-0.871094 -0.573242 -2.0127 -0.870117 -3.41016 -0.870117
|
170 |
c-2.30957 0 -4.5625 0.649414 -6.78906 1.95508v-4.4082c1.91992 -0.967773 4.24902 -1.45898 7.00879 -1.45898c3.04102 0 5.42188 0.675781 7.13281 2.03223c1.71484 1.35742 2.56934 3.28711 2.56934 5.7959zM119.152 6.96875
|
171 |
c0 4.03906 -1.05957 7.11621 -3.17383 9.2207c-2.11523 2.09961 -5.14062 3.14844 -9.06738 3.14844h-8.02832l-6.72266 -31.7998h8.72461c3.7373 0 6.99316 0.798828 9.76367 2.37012c2.76953 1.57715 4.87891 3.83984 6.32812 6.76855s2.17578 6.35938 2.17578 10.292z
|
172 |
-
M101.146 -8.
|
173 |
-
c-1.01855 -2.25781 -2.48828 -4.01953 -4.40332 -5.26367s-4.15723 -1.
|
174 |
-
c-1.
|
175 |
-
c4.46484 0 7.90527 0.75293 10.3223 2.2373c2.41602 1.
|
176 |
-
|
177 |
c0.46582 -0.414062 0.696289 -0.982422 0.696289 -1.73047c0 -1.42871 -0.773438 -2.5293 -2.30957 -3.29688c-1.53613 -0.783203 -3.6709 -1.16797 -6.39453 -1.16797h-0.634766c0.537109 2.04883 1.41797 3.69727 2.6416 4.93652
|
178 |
-
c1.22852 1.24414 2.53418 1.86816 3.92676 1.86816zM148.04 -12.4619v0h5.97461l13.0098 24.0586h-5.4375l-6.76367 -13.0098c-0.332031 -0.604492 -0.803711 -1.55664 -1.41309 -2.87207c-0.
|
179 |
-
c0 2.00195 -0.102539 4.16309 -0.307617 6.46191l-1.19727 13.0098h-5.04395zM175.391 -12.8926c1.43848 0 2.73926 0.138672 3.90137 0.
|
180 |
-
c-1.0293 -0.28125 -2.06348 -0.
|
181 |
-
c2.41699 1.
|
182 |
-
c-1.12109 -2.46289 -1.68457 -5.13574 -1.68457 -8.
|
183 |
-
c0 -1.42871 -0.772461 -2.5293 -2.30859 -3.29688c-1.53613 -0.783203 -3.6709 -1.16797 -6.
|
184 |
l-7.17871 -33.8486h5.08984zM222.459 2.5957c0 2.89258 -0.798828 5.19727 -2.3916 6.87598c-1.5918 1.67969 -3.80371 2.51953 -6.62988 2.51953c-2.44727 0 -4.6084 -0.670898 -6.48242 -2.0127c-1.87305 -1.34082 -3.32715 -3.21973 -4.36133 -5.62109
|
185 |
-
c-1.04004 -2.41699 -1.55664 -5.
|
186 |
c1.05469 2.40625 1.58691 5.07324 1.58691 7.99707zM217.303 2.81641c0 -2.13574 -0.291992 -4.08594 -0.865234 -5.86328c-0.583008 -1.77148 -1.39258 -3.1582 -2.43652 -4.1416c-1.04492 -0.988281 -2.21777 -1.47949 -3.52246 -1.47949
|
187 |
c-1.4082 0 -2.47363 0.429688 -3.19043 1.29004c-0.716797 0.849609 -1.0752 2.08887 -1.0752 3.69141c0 2.0127 0.291992 3.90625 0.880859 5.68848c0.583984 1.7666 1.41309 3.17969 2.47852 4.21387c1.06445 1.03906 2.27246 1.55664 3.61914 1.55664
|
188 |
c1.32129 0 2.33496 -0.430664 3.04688 -1.31055c0.711914 -0.880859 1.06445 -2.08984 1.06445 -3.64551zM236.651 -12.8926c2.09961 0 4.02441 0.716797 5.77539 2.14551s3.13379 3.44043 4.14746 6.01074c1.01367 2.57617 1.52051 5.34082 1.52051 8.2998
|
189 |
c0 2.65723 -0.583984 4.72559 -1.76172 6.2207c-1.17676 1.49512 -2.7998 2.24316 -4.87402 2.24316c-2.70801 0 -5.20215 -1.51074 -7.48047 -4.52637h-0.194336l0.456055 4.0957h-4.00391l-7.35254 -34.7598h5.06934l2.08887 10.0713
|
190 |
c0.260742 1.28027 0.439453 2.62109 0.541992 4.0293h0.21582c1.27441 -2.55957 3.22559 -3.83008 5.85156 -3.83008zM239.544 7.85938c2.24805 0 3.36914 -1.45898 3.37402 -4.37305c0 -2.07812 -0.311523 -4.07031 -0.936523 -5.97949
|
191 |
-
c-0.625 -1.89941 -1.47461 -3.
|
192 |
c0.726562 1.90527 1.67383 3.43066 2.83594 4.58301c1.15723 1.15723 2.33008 1.73047 3.50195 1.73047zM267.279 12.042c-2.9541 0 -5.50879 -1.64355 -7.66504 -4.89453h-0.194336l0.456055 4.45996h-4.00391l-5.12988 -24.0596h5.12988l2.13477 10.1992
|
193 |
c0.645508 3.06152 1.64844 5.52441 3.00586 7.35742c1.35156 1.84375 2.82617 2.76465 4.42871 2.76465c1.68945 0 2.53906 -0.977539 2.53906 -2.93359c0 -0.655273 -0.117188 -1.57715 -0.368164 -2.76465l-3.10254 -14.6123h5.10938l2.20117 10.46
|
194 |
-
c0.620117 2.96973 1.
|
195 |
-
c0.327148 1.7002 0.481445 3.01074 0.481445 3.94238c0 2.0127 -0.501953 3.56836 -1.51074 4.67969c-1.00391 1.11621 -2.46777 1.66895 -4.40332 1.66895c-1.
|
196 |
-
h-0.173828c-0.496094 3.39941 -2.33496 5.10938 -5.52441 5.10938zM299.986 -12.8926c1.43359 0 2.
|
197 |
-
c-1.0293 -0.28125 -2.06836 -0.
|
198 |
-
c2.41602 1.
|
199 |
-
c-1.13184 -2.46289 -1.68945 -5.13574 -1.68945 -8.
|
200 |
-
c0.
|
201 |
-
c1.2334 1.24414 2.54395 1.86816 3.93164 1.86816zM327.056 -12.4619h0.00488281v0.015625h5.
|
202 |
c-1.49512 0 -2.88281 -0.393555 -4.16309 -1.16699c-1.26953 -0.773438 -2.52441 -2.0127 -3.72168 -3.73242h-0.195312l0.456055 4.45898h-3.99902l-5.12988 -24.0479h5.12988l2.12988 10.1982c0.410156 1.97168 1.01367 3.73242 1.82812 5.28906
|
203 |
-
c0.808594 1.55664 1.71484 2.75488 2.73926 3.5791s2.05273 1.23926 3.09277 1.23926c1.86816 0 2.81055 -0.952148 2.81055 -2.85156c0 -0.604492 -0.12793 -1.55176 -0.399414 -2.85742zM347.51 -8.76074c-0.737305 0 -1.29004 0.18457 -1.65332 0.
|
204 |
-
c-0.358398 0.
|
205 |
-
l-2.63184 -12.
|
206 |
-
c-1.21289 -0.
|
207 |
c4.73047 3.08789 8.40137 7.42383 11.0176 12.9951c2.61621 5.5752 3.92188 11.8115 3.92188 18.7129c0 6.90234 -1.86328 12.2119 -5.5957 15.9287c-3.73242 3.71191 -9.03223 5.57031 -15.9023 5.57031c-6.31348 0 -11.833 -1.54102 -16.5684 -4.63379
|
208 |
c-4.73145 -3.0918 -8.40723 -7.42383 -11.0186 -12.9941c-2.61621 -5.5752 -3.92188 -11.8115 -3.92188 -18.7139c0 -6.90137 1.86328 -12.2109 5.5957 -15.9277c3.73242 -3.71777 9.03223 -5.56543 15.9033 -5.56543zM171.96 230.508
|
209 |
c1.31641 0 2.35059 -0.547852 3.1084 -1.6543c0.757812 -1.10059 1.13672 -2.73926 1.13672 -4.9043c0 -5.9502 -0.988281 -11.208 -2.95996 -15.7803c-1.9707 -4.57227 -4.28516 -6.85547 -6.95312 -6.85547c-2.75879 0 -4.1416 2.18652 -4.1416 6.55859
|
@@ -212,31 +213,31 @@ c0 6.90234 -1.86426 12.2119 -5.59668 15.9287c-3.73242 3.71191 -9.03125 5.57031 -
|
|
212 |
c0 -6.90137 1.86328 -12.2109 5.5957 -15.9277c3.73242 -3.71777 9.03223 -5.56543 15.9033 -5.56543zM230.123 230.508c1.31152 0 2.35059 -0.547852 3.1084 -1.6543c0.757812 -1.10059 1.13672 -2.73926 1.13672 -4.9043c0 -5.9502 -0.988281 -11.208 -2.95996 -15.7803
|
213 |
c-1.9707 -4.57227 -4.28516 -6.85547 -6.95215 -6.85547c-2.75977 0 -4.14258 2.18652 -4.14258 6.55859c0 5.91895 0.958008 11.167 2.88281 15.7539c1.91992 4.58789 4.22852 6.88184 6.92676 6.88184zM275.072 188.001l16.2197 76.7236h-19.0869l-16.2207 -76.7236
|
214 |
h19.0879zM328.494 207.381c0 6.83496 -3.69141 12.0986 -11.0947 15.7744c-2.33496 1.15234 -4.01953 2.08887 -5.05371 2.81055c-1.03418 0.722656 -1.55176 1.56152 -1.55176 2.51465c0 2.2373 1.23926 3.35352 3.73828 3.35352
|
215 |
-
c1.67383 0 3.68066 -0.419922 5.99023 -1.25977c2.31934 -0.839844 4.55664 -1.96582 6.72754 -3.37891l5.96973 12.4258c-2.8623 1.77637 -5.80566 3.09277 -8.83203 3.94727c-3.03125 0.855469 -6.
|
216 |
c-7.33203 0 -12.9844 -1.53125 -16.9629 -4.58789c-3.96777 -3.05664 -5.96484 -7.41309 -5.96484 -13.0654c0 -3.54883 0.793945 -6.55371 2.3916 -9.02148c1.5918 -2.46777 4.13184 -4.6543 7.61816 -6.55957c3.41504 -1.94043 5.55566 -3.32715 6.41016 -4.16699
|
217 |
c0.855469 -0.839844 1.28027 -1.83301 1.28027 -2.98535c0 -1.08496 -0.552734 -1.92969 -1.6748 -2.53906c-1.11035 -0.609375 -2.78516 -0.912109 -5.02734 -0.912109c-2.66211 0 -5.28906 0.328125 -7.88965 0.988281
|
218 |
-
c-2.59082 0.655273 -5.40234 1.80762 -8.42773 3.45117v-15.334c4.4082 -2.
|
219 |
-
c4.17285 0 7.
|
220 |
v0.788086h2.9082c9.72852 0 17.1572 1.77148 22.3076 5.30469c5.14062 3.53223 7.71094 8.60645 7.71094 15.2109c0 4.70605 -1.79199 8.46875 -5.37109 11.2949c-3.57812 2.82617 -8.49902 4.23926 -14.7451 4.23926c-6.27246 0 -11.8018 -1.43359 -16.5938 -4.31055
|
221 |
c-4.78223 -2.87793 -8.54004 -7.10156 -11.29 -12.6719c-2.73926 -5.57617 -4.12109 -11.833 -4.12109 -18.7656c0 -6.9375 1.94043 -12.3486 5.82129 -16.2451s9.31348 -5.8418 16.2812 -5.8418zM366.142 231.936c1.44336 0 2.49316 -0.363281 3.15332 -1.08496
|
222 |
c0.65625 -0.72168 0.983398 -1.60742 0.983398 -2.66211c0 -2.2373 -1.0293 -4.03516 -3.06152 -5.40234c-2.0332 -1.36133 -4.84863 -2.04199 -8.42773 -2.04199h-1.42871c0.364258 2.89258 1.41309 5.4834 3.1543 7.7666c1.74609 2.2832 3.62012 3.4248 5.62695 3.4248z
|
223 |
-
M415.432 202.353c-2.08398 0 -3.11328 1.03418 -3.09277 3.11328c0 0.916016 0.
|
224 |
l-4.14746 -19.8242c-0.783203 -3.68164 -1.18262 -6.77441 -1.18262 -9.27246c0 -4.7666 1.25977 -8.19727 3.76855 -10.2812c2.51367 -2.08887 6.20508 -3.12793 11.0693 -3.12793c6.70703 0 12.2881 1.10059 16.7578 3.30176v14.3516
|
225 |
c-3.83984 -1.55078 -6.85059 -2.31934 -9.02148 -2.31934z" />
|
226 |
<glyph glyph-name="uniF11F" unicode=""
|
227 |
d="M290.016 164.817c-4.47461 68.7988 84.2891 87.7139 78.4258 156.87c-4.24707 50.1035 -80.2324 73.7275 -147.636 59.9795c-60.6689 -12.3672 -118.986 -67.501 -129.18 -133.805c-15.5576 -101.271 65.5107 -229.759 203.001 -198.386
|
228 |
c20.3506 4.65527 35.7539 23.7031 69.207 18.4502c52.8691 -8.29688 57.0664 -86.6475 13.835 -101.506c-18.0938 -6.21582 -50.876 -1.19043 -65.1006 14.79c-1.88574 1.00586 -3.59082 2.45898 -5.08398 4.2334c-5.67871 4.69043 -9.19727 13.6113 -8.53027 23.6025
|
229 |
-
c0.962891 14.2598 10.0381 25.2607 20.2705 24.
|
230 |
-
c-138.73 -59.6406 -268.003 29.2598 -281.441 143.039c-15.0859 127.
|
231 |
c-34.4258 -0.0498047 -66.7617 27.042 -69.2061 64.5918z" />
|
232 |
<glyph glyph-name="uniF129" unicode=""
|
233 |
d="M113.241 205.178v74.6494h283.559v-74.6494h-283.559zM201.299 12.877v174.188h195.501v-174.188h-195.501zM113.241 12.877v174.188h70.3359v-174.188h-70.3359zM311.29 57.4404c-5.86914 0 -11.2705 1.02344 -16.2051 3.11035
|
234 |
c-4.9541 2.06055 -9.22266 5.0752 -12.8262 9.02344c-3.58984 3.94922 -6.41895 8.79395 -8.4541 14.5342c-2.04785 5.72852 -3.05957 12.2949 -3.05957 19.6865c0 6.69434 0.921875 12.7686 2.77832 18.2148c1.84277 5.45898 4.47363 10.1377 7.87793 14.0098
|
235 |
-
c3.42383 3.88477 7.5332 6.88574 12.3779 9.03613c4.
|
236 |
-
c2.25879 -1.10059 4.66504 -2.43848 7.20605 -3.95508c2.06055 -1.27344 4.02539 -1.90723 5.92676 -1.90723c1.48438 0 2.82812 0.383789 4.07031 1.14551c1.24121 0.761719 2.
|
237 |
-
c-2.80273 2.69434 -5.9834 5.1709 -9.56152 7.46875c-3.
|
238 |
-
c-9.
|
239 |
-
c3.59668 -8.
|
240 |
c4.3584 1.21582 8.46094 2.75195 12.3203 4.63965c3.8584 1.88867 7.57715 4.12793 11.1484 6.73926v58.8037h-49.5293v-17.7793c0 -1.6582 0.588867 -3.02051 1.72754 -4.10254c1.13965 -1.08203 2.74609 -1.63184 4.77441 -1.63184h13.7734v-21.1455
|
241 |
c-3.05957 -1.28027 -6.30469 -2.29102 -9.75391 -3.04688c-3.44336 -0.774414 -7.39844 -1.15137 -11.8525 -1.15137z" />
|
242 |
<glyph glyph-name="uniF11E" unicode=""
|
@@ -244,42 +245,42 @@ d="M371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v7
|
|
244 |
c0 -28.7227 -23.2959 -52.0381 -52.0576 -52.0381c-28.7295 0 -52.0322 23.3154 -52.0322 52.0381c0 28.749 23.3027 52.0576 52.0322 52.0576zM257.594 117.453c18.957 0 34.3164 15.3594 34.3164 34.2969c0 18.957 -15.3594 34.3105 -34.3164 34.3105
|
245 |
c-18.9316 0 -34.2979 -15.3535 -34.2979 -34.3105c0 -18.9375 15.3662 -34.2969 34.2979 -34.2969z" />
|
246 |
<glyph glyph-name="uniF115" unicode=""
|
247 |
-
d="M371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v76.8008h76.7998v-76.8008zM342.624 49.6641l0.0126953 1.03027l-0.441406 50.0029l-0.0703125 -1.
|
248 |
-
l-0.
|
249 |
c-0.524414 -0.594727 -1.06836 -1.19629 -1.66406 -1.79785l-0.306641 -0.300781c-0.723633 -0.704102 -1.5293 -1.40234 -2.3877 -2.08691l-0.537109 -0.40332c-0.954102 -0.729492 -1.93945 -1.47168 -3.02734 -2.16309l-0.185547 -0.133789
|
250 |
-
c-1.33789 -0.864258 -2.77734 -1.70898 -4.30078 -2.51562c-0.889648 -0.480469 -1.84961 -0.954102 -2.
|
251 |
-
c-1.62598 -0.671875 -3.32812 -1.31152 -5.0752 -1.92578l-0.710938 -0.237305c-1.79199 -0.601562 -3.63477 -1.18359 -5.
|
252 |
c-2.38672 -0.511719 -4.83203 -0.998047 -7.36621 -1.41406l-0.774414 -0.134766c-2.04785 -0.332031 -4.12109 -0.626953 -6.2207 -0.889648l-1.08789 -0.133789c-2.125 -0.255859 -4.28809 -0.480469 -6.47656 -0.65918l-1.02441 -0.0966797
|
253 |
c-2.56641 -0.178711 -5.16504 -0.332031 -7.80176 -0.447266l-1.20898 -0.0449219c-2.1377 -0.0703125 -4.33984 -0.12207 -6.52832 -0.12207c-1.26758 0 -2.54102 0 -3.81445 0.0126953c-1.31836 0.0263672 -2.61719 0.0644531 -3.91016 0.109375
|
254 |
-
c-1.8623 0.0634766 -3.71875 0.140625 -5.54883 0.
|
255 |
c-1.44043 0.178711 -2.84766 0.383789 -4.25586 0.588867l-1.37598 0.198242c-1.72168 0.275391 -3.41797 0.563477 -5.08789 0.876953l-0.40332 0.0830078c-1.65137 0.313477 -3.27734 0.652344 -4.87695 1.01074l-1.1709 0.256836
|
256 |
-
c-1.79199 0.40918 -3.55273 0.857422 -5.28027 1.31152l-0.857422 0.237305c-2.02246 0.543945 -3.9873 1.12598 -5.
|
257 |
c-0.743164 0.275391 -1.47852 0.563477 -2.20215 0.851562l-1.26074 0.511719l-1.47168 0.633789l-1.4082 0.633789l-1.4209 0.665039l-1.33789 0.65918l-1.33105 0.691406l-1.26074 0.666016l-1.26074 0.729492l-1.17773 0.665039l-1.18359 0.761719l-1.08203 0.704102
|
258 |
-
l-1.08789 0.774414l-1.01074 0.729492l-1.00488 0.799805l-0.93457 0.749023l-0.915039 0.825195l-0.844727 0.761719l-0.813477 0.826172l-0.760742 0.787109l-0.691406 0.864258l-0.671875 0.8125l-0.601562 0.851562l-0.576172 0.837891l-0.
|
259 |
-
l-0.
|
260 |
l0.102539 -0.543945l0.25 -1.24805l0.210938 -0.665039l0.352539 -1.11426l0.300781 -0.697266l0.473633 -1.0498l0.40332 -0.722656l0.569336 -0.999023l0.518555 -0.729492l0.65918 -0.94043l0.607422 -0.736328l0.78125 -0.953125l0.697266 -0.729492l0.864258 -0.889648
|
261 |
-
l0.806641 -0.723633l0.
|
262 |
-
l1.51074 -0.666016l1.38281 -0.588867l0.459961 -0.198242l0.
|
263 |
-
c1.89453 -0.601562 3.85254 -1.17773 5.86914 -1.73438l0.
|
264 |
-
l0.0761719 -0.0126953c1.66406 -0.
|
265 |
-
c1.67676 -0.210938 3.37891 -0.396484 5.10059 -0.5625l0.53125 -0.0576172l0.959961 -0.0771484c1.37012 -0.134766 2.75195 -0.223633 4.14746 -0.333008l1.00488 -0.0761719l0.499023 -0.0263672c1.82422 -0.
|
266 |
l0.396484 -0.0126953c1.17188 -0.0449219 2.34277 -0.0644531 3.51367 -0.0839844c1.16504 -0.03125 2.29785 -0.03125 3.44336 -0.03125h0.383789c2.20215 0.0126953 4.37109 0.0576172 6.53418 0.133789l0.672852 0.0126953l0.517578 0.0263672
|
267 |
-
c2.65625 0.0957031 5.26074 0.249023 7.80859 0.454102l0.543945 0.0449219l0.486328 0.0380859c2.20117 0.198242 4.35156 0.416016 6.46387 0.65918l1.08789 0.134766c2.10547 0.
|
268 |
c2.48926 0.416016 4.92188 0.876953 7.27734 1.38867l0.844727 0.179688c2.34863 0.511719 4.60742 1.08105 6.80273 1.70898l0.441406 0.101562l0.300781 0.102539c1.88867 0.538086 3.73828 1.11426 5.49121 1.72168l0.761719 0.243164
|
269 |
c1.7666 0.621094 3.46875 1.28027 5.09473 1.95215l0.390625 0.134766l0.416016 0.191406c0.716797 0.300781 1.42676 0.614258 2.11816 0.941406l0.953125 0.43457c0.871094 0.40332 1.73438 0.838867 2.56055 1.26758l0.261719 0.134766l0.0517578 0.0253906
|
270 |
-
c1.48438 0.787109 2.86719 1.625 4.16016 2.45117l0.217773 0.12793l0.0703125 0.0634766c1.05566 0.678711 2.02832 1.40234 2.95605 2.125l0.358398 0.25l0.25 0.210938c0.
|
271 |
-
c0.588867 0.556641 1.13965 1.14551 1.63867 1.75293l0.275391 0.307617l0.160156 0.217773c0.
|
272 |
-
|
273 |
c-0.0771484 -0.787109 -0.210938 -1.57422 -0.396484 -2.3623l-0.0771484 -0.236328c-0.185547 -0.671875 -0.422852 -1.35059 -0.710938 -2.02246l-0.236328 -0.563477c-0.313477 -0.677734 -0.652344 -1.33691 -1.05566 -2.00293l-0.109375 -0.160156
|
274 |
-
c-0.43457 -0.68457 -0.972656 -1.40137 -1.49707 -2.07324l-0.441406 -0.518555c-0.525391 -0.601562 -1.06934 -1.20312 -1.66406 -1.79199l-0.307617 -0.313477c-0.723633 -0.
|
275 |
c-0.953125 -0.742188 -1.93945 -1.47852 -3.02734 -2.16992l-0.185547 -0.133789c-1.33789 -0.864258 -2.77734 -1.70898 -4.30078 -2.50879c-0.889648 -0.486328 -1.84961 -0.972656 -2.80273 -1.4209l-0.979492 -0.448242
|
276 |
c-0.671875 -0.293945 -1.33789 -0.614258 -2.03516 -0.915039l-0.876953 -0.352539c-1.62598 -0.677734 -3.32812 -1.31152 -5.0752 -1.91992l-0.709961 -0.243164c-1.79199 -0.614258 -3.63574 -1.19043 -5.54883 -1.72754l-0.698242 -0.192383
|
277 |
-
c-2.18848 -0.607422 -4.47363 -1.18359 -6.83496 -1.70898l-0.838867 -0.178711c-2.38672 -0.518555 -4.
|
278 |
-
c-2.125 -0.249023 -4.28809 -0.479492 -6.47656 -0.652344l-1.02441 -0.0898438c-2.56641 -0.198242 -5.
|
279 |
c-1.31836 0.0126953 -2.61719 0.0576172 -3.91016 0.0957031c-1.8623 0.0634766 -3.71875 0.15332 -5.54883 0.275391l-1.47852 0.0185547c-1.4209 0.102539 -2.82227 0.211914 -4.21777 0.339844l-1.43359 0.12793c-1.74023 0.160156 -3.44922 0.358398 -5.13867 0.549805
|
280 |
-
l-1.03711 0.134766c-1.44043 0.198242 -2.84766 0.396484 -4.25586 0.608398l-1.37598 0.204102c-1.72168 0.275391 -3.41797 0.550781 -5.08789 0.871094l-0.40332 0.0761719c-1.65137 0.
|
281 |
-
c-1.79199 0.416016 -3.55273 0.851562 -5.28027 1.3125l-0.857422 0.230469c-2.02246 0.549805 -3.9873 1.13867 -5.
|
282 |
-
c-0.743164 0.288086 -1.47852 0.582031 -2.20215 0.870117l-1.26074 0.511719l-1.47168 0.62793l-1.4082 0.626953l-1.4209 0.671875l-1.33789 0.652344l-1.33105 0.698242l-1.26074 0.665039l-1.26074 0.
|
283 |
l-1.08789 0.780273l-1.01074 0.710938l-1.00488 0.8125l-0.93457 0.736328l-0.915039 0.825195l-0.844727 0.761719l-0.813477 0.838867l-0.760742 0.787109l-0.691406 0.850586l-0.671875 0.813477l-0.601562 0.850586l-0.576172 0.844727l-0.511719 0.876953
|
284 |
l-0.5 0.857422l-0.383789 0.889648l-0.37793 0.864258l-0.293945 0.915039l-0.268555 0.864258l-0.198242 1.01074l-0.147461 0.774414c-0.0830078 0.601562 -0.12207 1.20996 -0.12207 1.81836l0.435547 -50.0039c0 -0.614258 0.0449219 -1.20312 0.121094 -1.81738
|
285 |
l0.102539 -0.556641l0.25 -1.23535l0.210938 -0.665039l0.352539 -1.11426l0.300781 -0.709961l0.473633 -1.04297l0.40332 -0.723633l0.569336 -0.992188l0.518555 -0.735352l0.65918 -0.947266l0.607422 -0.736328l0.787109 -0.927734l0.698242 -0.723633
|
@@ -289,94 +290,95 @@ l0.282227 -0.0761719c1.89453 -0.621094 3.85254 -1.20312 5.86816 -1.76074l0.50585
|
|
289 |
l0.300781 -0.0644531l0.0761719 -0.0126953c1.66406 -0.319336 3.35352 -0.607422 5.05664 -0.870117l0.652344 -0.121094l0.793945 -0.109375c1.37598 -0.210938 2.76465 -0.40332 4.17871 -0.588867l0.826172 -0.121094l0.268555 -0.0263672
|
290 |
c1.67676 -0.204102 3.37891 -0.396484 5.10059 -0.549805l0.53125 -0.0703125l0.959961 -0.0644531c1.37012 -0.12793 2.75195 -0.236328 4.14746 -0.326172l1.00488 -0.0771484l0.499023 -0.03125c1.82422 -0.109375 3.67383 -0.192383 5.53613 -0.256836
|
291 |
l0.396484 -0.0253906c1.17188 -0.0380859 2.34277 -0.0634766 3.51367 -0.0898438c1.16504 -0.0126953 2.29785 -0.0126953 3.44336 -0.0126953h0.383789c2.20215 0 4.37109 0.0644531 6.53418 0.12793l0.672852 0.0136719l0.517578 0.0380859
|
292 |
-
c2.65625 0.0957031 5.
|
293 |
c2.48926 0.428711 4.92188 0.889648 7.27734 1.40137l0.844727 0.178711c2.34863 0.518555 4.60742 1.08203 6.80273 1.69629l0.448242 0.0957031l0.300781 0.12207c1.8877 0.524414 3.7373 1.10059 5.49121 1.70898l0.761719 0.249023
|
294 |
-
c1.
|
295 |
-
c1.47852 0.787109 2.86035 1.61328 4.15332 2.45117l0.217773 0.12207l0.0771484 0.0703125c1.05566 0.671875 2.02832 1.38867 2.95605 2.1123l0.358398 0.243164l0.25 0.223633c0.
|
296 |
-
c0.588867 0.5625 1.13965 1.16406 1.63867 1.76562l0.275391 0.300781l0.160156 0.224609c0.
|
297 |
l0.115234 0.300781c0.275391 0.65918 0.537109 1.33789 0.691406 2.02246l0.0761719 0.192383v0.0439453c0.210938 0.78125 0.333008 1.5752 0.397461 2.3623zM342.624 192.947l0.0253906 0.998047l-0.43457 50.0166l-0.0771484 -1.2998
|
298 |
c-0.0576172 -0.607422 -0.172852 -1.21582 -0.300781 -1.81738c-3.66113 18.0225 -40.5762 32.7168 -85.5742 33.4082c-44.96 0.691406 -81.7344 -12.8262 -85.3701 -30.7012l-0.0898438 0.448242l-0.146484 0.774414
|
299 |
c-0.0830078 0.608398 -0.12207 1.21582 -0.12207 1.82422l0.0517578 -5.60059c-0.00683594 -0.133789 -0.0517578 -0.268555 -0.0517578 -0.40332c0 -0.15332 0.0517578 -0.293945 0.0576172 -0.441406l0.37793 -43.5645c0 -0.614258 0.0449219 -1.22266 0.121094 -1.81738
|
300 |
-
l0.102539 -0.550781l0.25 -1.24805l0.210938 -0.652344l0.352539 -1.12012l0.300781 -0.698242l0.473633 -1.04297l0.402344 -0.729492l0.570312 -0.998047l0.
|
301 |
-
l0.863281 -0.889648l0.806641 -0.736328l0.947266 -0.851562l0.
|
302 |
l1.40137 -0.677734l1.3252 -0.62793l1.50977 -0.671875l1.38281 -0.588867l0.460938 -0.191406l0.844727 -0.345703c0.723633 -0.275391 1.43359 -0.563477 2.17578 -0.838867l1.36328 -0.499023c0.78125 -0.275391 1.54883 -0.550781 2.34277 -0.8125l0.895508 -0.313477
|
303 |
-
l0.282227 -0.0839844c1.89355 -0.614258 3.85254 -1.19043 5.86816 -1.74023l0.505859 -0.
|
304 |
l0.300781 -0.0703125l0.0771484 -0.0126953c1.66406 -0.313477 3.35352 -0.601562 5.05566 -0.864258l0.65332 -0.121094l0.792969 -0.12207c1.37598 -0.198242 2.76465 -0.396484 4.17969 -0.576172l0.825195 -0.115234l0.268555 -0.0380859
|
305 |
-
c1.67773 -0.198242 3.37988 -0.37793 5.10156 -0.537109l0.53125 -0.0644531l0.959961 -0.0830078c1.36914 -0.12207 2.75195 -0.217773 4.14648 -0.326172l1.00488 -0.0712891l0.
|
306 |
-
|
307 |
-
c2.65625 0.0957031 5.26074 0.262695 7.80762 0.460938l0.543945 0.0253906l0.486328 0.0507812c2.20215 0.199219 4.35254 0.410156 6.46484 0.671875l1.08789 0.128906c2.10547 0.261719 4.19141 0.5625 6.2207 0.
|
308 |
c2.48926 0.421875 4.92188 0.895508 7.27734 1.40723l0.844727 0.154297c2.34863 0.524414 4.60742 1.10059 6.80273 1.71484l0.441406 0.115234l0.300781 0.102539c1.88867 0.537109 3.73828 1.11328 5.49121 1.71484l0.761719 0.25
|
309 |
-
c1.7666 0.626953 3.46875 1.27344 5.09473 1.93945l0.390625 0.133789l0.40918 0.192383c0.716797 0.293945 1.43359 0.607422 2.11816 0.93457l0.959961 0.421875c0.864258 0.422852 1.72852 0.851562 2.56055 1.
|
310 |
-
c1.47852 0.787109 2.86035 1.59961 4.15332 2.45117l0.217773 0.115234l0.0771484 0.0576172c1.05566 0.678711 2.02832 1.40137 2.95605 2.125l0.358398 0.249023l0.25 0.217773c0.
|
311 |
-
c0.588867 0.583008 1.13965 1.17188 1.63867 1.78613l0.275391 0.288086l0.160156 0.223633c0.
|
312 |
l0.115234 0.300781c0.275391 0.65918 0.537109 1.33105 0.691406 2.02148l0.0761719 0.186523v0.0439453c0.210938 0.78125 0.333008 1.5752 0.397461 2.375z" />
|
313 |
<glyph glyph-name="uniF114" unicode=""
|
314 |
-
d="M342.15 99.4111l0.0898438 1.29883l0.
|
315 |
-
l-0.115234 -0.293945l-0.134766 -0.
|
316 |
-
c-0.505859 -0.595703 -1.
|
317 |
-
l-0.0771484 -0.0634766l-0.217773 -0.12793c-1.
|
318 |
-
c-0.68457 -0.
|
319 |
-
l-0.435547 -0.108398c-2.18848 -0.614258 -4.4668 -1.19043 -6.80273 -1.70215l-0.851562 -0.185547c-2.36133 -0.512695 -4.78711 -0.979492 -7.27637 -1.
|
320 |
-
l-1.08789 -0.133789c-2.1123 -0.25 -4.2627 -0.473633 -6.46387 -0.65332l-0.486328 -0.0507812l-0.
|
321 |
-
c-2.15723 -0.0761719 -4.32715 -0.121094 -6.53516 -0.133789l-0.389648 -0.00683594c-1.13965 0 -2.27832 0.00683594 -3.4375 0.0322266c-1.1709 0.0195312 -2.3418 0.0380859 -3.
|
322 |
-
c-1.8623 0.0634766 -3.71191 0.140625 -5.53613 0.261719l-0.499023 0.0263672l-1.00488 0.0761719c-1.
|
323 |
l-0.268555 0.0263672l-0.825195 0.121094c-1.41504 0.185547 -2.80371 0.383789 -4.17969 0.588867l-0.793945 0.108398l-0.652344 0.115234c-1.70215 0.262695 -3.3916 0.550781 -5.05566 0.876953h-0.0771484l-0.300781 0.0771484
|
324 |
c-1.65723 0.313477 -3.26367 0.646484 -4.87012 0.998047l-0.716797 0.134766l-0.5 0.12793c-1.77832 0.421875 -3.53223 0.851562 -5.23438 1.31152l-0.40332 0.0898438l-0.505859 0.160156c-2.02246 0.543945 -3.98047 1.12012 -5.86914 1.73438l-0.28125 0.0957031
|
325 |
-
l-0.896484 0.307617c-0.792969 0.275391 -1.56152 0.537109 -2.3418 0.8125l-1.36328 0.505859c-0.736328 0.268555 -1.44629 0.556641 -2.17578 0.844727l-0.844727 0.326172l-0.460938 0.211914l-1.38281 0.
|
326 |
l-1.30566 0.678711l-1.29297 0.677734l-1.22852 0.704102l-1.20312 0.710938l-1.16504 0.722656l-1.10742 0.723633l-1.10742 0.774414l-0.998047 0.722656l-1.03711 0.826172l-0.895508 0.722656l-0.947266 0.851562l-0.806641 0.729492l-0.864258 0.882812
|
327 |
l-0.697266 0.736328l-0.787109 0.927734l-0.608398 0.736328l-0.65918 0.947266l-0.518555 0.736328l-0.569336 0.985352l-0.40332 0.729492l-0.473633 1.0498l-0.300781 0.697266l-0.351562 1.11328l-0.210938 0.666016l-0.25 1.24121l-0.102539 0.543945
|
328 |
c-0.0830078 0.615234 -0.121094 1.19727 -0.121094 1.81836l-0.435547 50.0029c0 -0.601562 0.0380859 -1.20312 0.12207 -1.81152l0.146484 -0.767578l0.198242 -1.02441l0.269531 -0.870117l0.293945 -0.902344l0.37793 -0.876953l0.383789 -0.889648l0.499023 -0.850586
|
329 |
-
l0.511719 -0.876953l0.576172 -0.832031l0.601562 -0.851562l0.671875 -0.8125l0.691406 -0.871094l0.761719 -0.787109l0.8125 -0.825195l0.845703 -0.754883l0.915039 -0.832031l0.
|
330 |
-
l1.08203 -0.697266l1.18359 -0.761719l1.17773 -0.671875l1.26074 -0.736328l1.26074 -0.665039l1.33105 -0.685547l1.33789 -0.65918l1.4209 -0.665039l1.
|
331 |
l1.35742 -0.505859c0.754883 -0.261719 1.5293 -0.537109 2.31641 -0.799805l1.20312 -0.40332c1.90137 -0.607422 3.86621 -1.19043 5.8877 -1.74023l0.858398 -0.237305c1.72168 -0.460938 3.4873 -0.902344 5.2793 -1.31152l1.17188 -0.262695
|
332 |
c1.59961 -0.345703 3.22559 -0.697266 4.87695 -1.01074l0.40918 -0.102539c1.66406 -0.313477 3.36621 -0.601562 5.08789 -0.876953l1.37598 -0.210938c1.4082 -0.199219 2.81641 -0.416016 4.25586 -0.588867l1.03711 -0.134766
|
333 |
c1.68945 -0.205078 3.39844 -0.390625 5.13867 -0.537109l1.43359 -0.134766c1.39551 -0.12793 2.79688 -0.223633 4.21777 -0.333008l1.46582 -0.0957031c1.83008 -0.115234 3.68652 -0.198242 5.54883 -0.262695c1.29297 -0.0380859 2.5918 -0.0761719 3.91016 -0.102539
|
334 |
-
c1.28027 -0.0126953 2.55371 -0.0126953 3.81445 -0.0126953c2.19531 0 4.38379 0.0517578 6.53418 0.115234l1.2041 0.0449219c2.63672 0.102539 5.
|
335 |
l1.10059 0.133789c2.09863 0.262695 4.17871 0.556641 6.21387 0.896484l0.774414 0.12793c2.53516 0.428711 4.98633 0.902344 7.37305 1.41406l0.826172 0.185547c2.36133 0.512695 4.63965 1.08203 6.83496 1.69629l0.704102 0.185547
|
336 |
-
c1.91309 0.550781 3.75684 1.13281 5.54199 1.73438l0.710938 0.237305c1.75293 0.614258 3.44922 1.26074 5.0752 1.92578l0.875977 0.37793c0.698242 0.293945 1.37012 0.588867 2.
|
337 |
-
c1.
|
338 |
l0.441406 0.524414c0.53125 0.678711 1.06836 1.37598 1.49121 2.06738l0.115234 0.15332c0.396484 0.666016 0.735352 1.33789 1.0625 2.00391l0.236328 0.575195c0.288086 0.65332 0.525391 1.33789 0.710938 2.02246l0.0761719 0.230469
|
339 |
-
c0.192383 0.78125 0.313477 1.57422 0.390625 2.36816zM342.15 171.053l0.0898438 1.33105l0.
|
340 |
-
c-0.
|
341 |
-
l-0.15332 -0.211914l-0.275391 -0.300781c-0.505859 -0.594727 -1.
|
342 |
-
c-0.93457 -0.723633 -1.90723 -1.44727 -2.96289 -2.125l-0.0771484 -0.0644531l-0.217773 -0.115234c-1.
|
343 |
-
l-0.
|
344 |
l-0.313477 -0.12207l-0.435547 -0.102539c-2.18848 -0.614258 -4.4668 -1.17676 -6.80273 -1.69531l-0.851562 -0.179688c-2.36133 -0.511719 -4.78711 -0.992188 -7.27637 -1.40137l-0.473633 -0.0898438l-0.410156 -0.0507812
|
345 |
-
c-2.03516 -0.
|
346 |
-
l-0.665039 -0.0126953c-2.15723 -0.0644531 -4.
|
347 |
-
c-1.8623 0.0634766 -3.71191 0.
|
348 |
l-0.268555 0.0322266l-0.825195 0.115234c-1.41504 0.185547 -2.80371 0.376953 -4.17969 0.587891l-0.793945 0.115234l-0.652344 0.115234c-1.70215 0.262695 -3.3916 0.557617 -5.05566 0.871094l-0.0771484 0.0126953l-0.300781 0.0703125
|
349 |
c-1.65723 0.313477 -3.26367 0.633789 -4.87012 1.00488l-0.716797 0.133789l-0.5 0.134766c-1.77832 0.40332 -3.53223 0.838867 -5.23438 1.29883l-0.40332 0.109375l-0.505859 0.140625c-2.02246 0.550781 -3.98047 1.12012 -5.86914 1.75391l-0.28125 0.0761719
|
350 |
-
l-0.
|
351 |
-
l-1.30566 0.665039l-1.29297 0.68457l-1.22852 0.710938l-1.20312 0.697266l-1.16504 0.736328l-1.10742 0.722656l-1.10742 0.761719l-0.998047 0.729492l-1.03711 0.819336l-0.895508 0.723633l-0.947266 0.850586l-0.806641 0.
|
352 |
-
l-0.697266 0.723633l-0.787109 0.927734l-0.608398 0.736328l-0.65918 0.947266l-0.518555 0.735352l-0.569336 0.992188l-0.40332 0.723633l-0.473633 1.04883l-0.300781 0.704102l-0.351562 1.11426l-0.210938 0.665039l-0.25 1.
|
353 |
-
|
354 |
-
l0.511719 -0.883789l0.576172 -0.837891l0.601562 -0.857422l0.671875 -0.813477l0.691406 -0.850586l0.761719 -0.787109l0.8125 -0.838867l0.845703 -0.761719l0.915039 -0.825195l0.93457 -0.736328l1.00391 -0.8125l1.01172 -0.
|
355 |
-
l1.08203 -0.704102l1.18359 -0.749023l1.17773 -0.678711l1.26074 -0.729492l1.26074 -0.665039l1.33105 -0.698242l1.33789 -0.652344l1.4209 -0.671875l1.
|
356 |
-
|
357 |
-
c1.
|
358 |
-
c1.
|
359 |
-
c1.
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
c-0.
|
366 |
-
l-0.
|
367 |
-
c-0.
|
368 |
-
l-0.
|
369 |
-
|
370 |
-
c-2.
|
371 |
-
|
372 |
-
c-1.
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
l-
|
377 |
-
l-0.
|
378 |
-
|
379 |
-
|
|
|
380 |
<glyph glyph-name="uniF121" unicode=""
|
381 |
d="M170.238 102.4l85.7617 68.4805l85.1191 -68.4805h-51.8389v-45.4375h-67.1992v45.4375h-51.8428zM371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v76.8008h76.7998v-76.8008zM383.357 37.1221v162.558l-49.2754 49.2793h-157.442
|
382 |
l-49.2783 -49.2793v-162.558c0 -7.68066 6.39746 -14.0781 14.0781 -14.0781h228.479c7.67676 0 14.082 6.39746 13.4395 14.0781zM184.959 224.641h142.721l21.123 -21.7617h-185.602z" />
|
@@ -385,19 +387,15 @@ d="M119.507 152.666c0 0 123.872 168.55 276.192 0c0 0 -123.872 -172.615 -276.192
|
|
385 |
c0 -28.7227 23.3027 -52.0381 52.0322 -52.0381zM257.594 117.453c-18.9316 0 -34.2979 15.3594 -34.2979 34.2969c0 18.957 15.3662 34.3105 34.2979 34.3105c18.957 0 34.3164 -15.3535 34.3164 -34.3105c0 -18.9375 -15.3594 -34.2969 -34.3164 -34.2969z
|
386 |
M257.594 186.061c18.957 0 34.3164 -15.3535 34.3164 -34.3105c0 -18.9375 -15.3594 -34.2969 -34.3164 -34.2969c-18.9316 0 -34.2979 15.3594 -34.2979 34.2969c0 18.957 15.3662 34.3105 34.2979 34.3105z" />
|
387 |
<glyph glyph-name="uniF134" unicode=""
|
388 |
-
d="M69.9062 -52.7617l-58.0127 58.0127l315.346 315.347l58.0137 -58.0127zM440.184 334.265c12.8906 -12.873 -2.03125 -18.8203 -14.8857 -31.6572c-12.8545 -12.8359 -18.7842 -27.7578 -31.
|
389 |
c-12.873 12.873 2.03027 18.8018 14.8857 31.6562c12.8545 12.8555 18.7832 27.7773 31.6562 14.9043zM512.218 379.737l18.4023 -24.6943l-30.7861 0.43457l-17.7686 -25.1113l-9.11914 29.3359l-29.3184 9.12012l25.0752 17.7861l-0.398438 30.75l24.6943 -18.4023
|
390 |
l29.0635 9.88086zM327.826 405.41l15.3203 -20.5244l-25.6191 0.327148l-14.8125 -20.9238l-7.5791 24.4775l-24.4766 7.57812l20.9229 14.8135l-0.326172 25.6191l20.5244 -15.3213l24.2588 8.23145zM476.463 268.322l9.33789 -12.5283l-15.6289 0.235352
|
391 |
l-8.95703 -12.6914l-4.58691 14.8311l-14.8672 4.62305l12.71 8.93848l-0.236328 15.6289l12.5293 -9.33691l14.7041 5.00391z" />
|
392 |
<glyph glyph-name="uniF137" unicode=""
|
393 |
-
d="M340.283 362.665h85.0703v-426.665h-425.354v426.665h85.0703v85.335h85.0713v-85.335h85.0703v85.335h85.0713v-85.335zM65.9414 104.803l65.2051 -65.4062v49.0303h114.185v32.752h-114.185v49.
|
394 |
l65.2051 65.4062l-65.2051 65.4053v-49.0293zM294.207 219.341z" />
|
395 |
<glyph glyph-name="uniF12C" unicode=""
|
396 |
d="M20.8887 280.548v149.814h564.48v-149.814h-564.48zM20.8887 114.135v88.8184h564.48v-88.8184h-564.48zM20.8887 -46.3623v88.8184h564.48v-88.8184h-564.48z" />
|
397 |
-
<glyph glyph-name="uniF139" unicode=""
|
398 |
-
d="M96 148.853v87.2725h203.637v-87.2725h-203.637zM78.5459 131.397h238.545v122.182h-238.545v-122.182zM421.818 148.853v87.2725h203.637v-87.2725h-203.637zM404.363 131.397h238.546v122.182h-238.546v-122.182zM421.818 314.182v87.2725h203.637v-87.2725h-203.637z
|
399 |
-
M404.363 296.728h238.546v122.182h-238.546v-122.182zM421.818 -14.5459v87.2734h203.637v-87.2734h-203.637zM404.363 -32h238.546v122.182h-238.546v-122.182zM308.363 201.216v-17.4541h104.728v17.4541h-104.728zM407.272 352.5v17.4541h-55.2725v-354.932h58.1816
|
400 |
-
v17.4551h-40.7275v320.022h37.8184z" />
|
401 |
<glyph glyph-name="uniF12A" unicode=""
|
402 |
d="M399.36 330.24h61.4395v-368.641h-399.359v368.641h61.4395v92.1602h92.1602v-92.1602h92.1602v92.1602h92.1602v-92.1602z" />
|
403 |
<glyph glyph-name="uniF120" unicode=""
|
@@ -405,7 +403,7 @@ d="M373.56 379.779l73.6641 -73.6553v-242.989c0.945312 -11.4707 -8.60645 -21.041
|
|
405 |
v-67.9395h100.396v67.9395zM118.291 310.896h277.263l-31.5557 32.5283h-213.188z" />
|
406 |
<glyph glyph-name="uniF113" unicode=""
|
407 |
d="M318.489 170.215v16.1211l30.0742 -30.0859l-30.0742 -30.0742v16.1094h-120.902v-16.1094l-30.0732 30.0742l30.0732 30.0859v-16.1211h120.902zM371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v76.8008h76.7998v-76.8008z
|
408 |
-
M388.448 76.8252v0v157.606c0 11.2256 -9.08789 20.
|
409 |
h50.4316h10.7461h50.4258v10.0479c-31.3984 0 -37.7471 20.9727 -39.002 28.666h94.4004c11.2256 0 20.3135 9.09375 20.3135 20.3193z" />
|
410 |
<glyph glyph-name="uniF136" unicode=""
|
411 |
d="M438.75 70.167c0 -33.5039 -27.4131 -60.917 -60.917 -60.917h-243.666c-33.5039 0 -60.917 27.4131 -60.917 60.917v243.666c0 33.5039 27.4121 60.917 60.917 60.917h243.667c33.5039 0 60.917 -27.4121 60.917 -60.917l-0.000976562 -243.666v0zM172.568 295.319
|
@@ -421,51 +419,43 @@ c1.65039 1.08203 3.1543 3.33496 4.49902 8.12793l1.52246 6.11914c1.01172 3.63477
|
|
421 |
c1.39453 -0.972656 2.64258 -4.63379 3.7373 -8.76172l1.5166 -5.59375c1.17773 -4.81836 2.70117 -7.25098 4.55664 -8.17285c1.85645 -0.94043 6.74609 -0.517578 14.6758 -0.517578h87.9355c6.33594 0 8.73633 -4.98633 8.73633 -11.4824v-14.1182h-146.534
|
422 |
c-9.19043 0 -14.8809 0.352539 -17.082 -0.927734z" />
|
423 |
<glyph glyph-name="uniF123" unicode=""
|
424 |
-
d="M56.5742 204.729c0
|
425 |
-
|
426 |
-
c-1.
|
427 |
-
c-5.
|
428 |
-
M221.348 324.758c-5.
|
429 |
-
c4.
|
430 |
-
c5.
|
431 |
-
|
432 |
-
|
433 |
-
c-3.
|
434 |
-
c-1.
|
435 |
-
c-2.
|
436 |
-
|
437 |
-
<glyph glyph-name="uniF13A" unicode=""
|
438 |
-
d="M101.818 142.546v87.2725h203.636v-87.2725h-203.636zM84.3633 125.091h238.546v122.182h-238.546v-122.182zM427.637 142.546v87.2725h203.636v-87.2725h-203.636zM410.182 125.091h238.546v122.182h-238.546v-122.182zM314.182 194.909v-17.4551h104.728v17.4551
|
439 |
-
h-104.728z" />
|
440 |
<glyph glyph-name="uniF131" unicode=""
|
441 |
d="M69.0908 161.909l-26.8906 26.9268c-4.00098 4.54297 -12.1611 8.22949 -18.2148 8.22949c-1.20996 0 -3.1582 -0.175781 -4.34863 -0.392578v231.618h231.69c-0.0351562 -0.0830078 -0.0996094 -0.212891 -0.145508 -0.291016
|
442 |
-
c-0.794922 -2.22363 -1.44043 -5.94531 -1.44043 -8.30664c0 -6.77344 4.38477 -15.5879 9.78613 -19.6748l21.1631 -21.1094h-211.6v-217zM487.637 186.
|
443 |
-
c0.0615234 0.0947266 0.142578 0.256836 0.181641 0.363281c0.808594 2.23633 1.
|
444 |
M163.272 10.5459l11.5459 -11.5459l26.1631 -26.1816c-39.291 -0.582031 -137.291 -2.14551 -162.545 -2.40039l-2.21875 161.818l25.6006 -25.6904l11.6182 -11.5459l11.5273 11.5459l122.818 122.891l1.34473 1.32715l0.491211 0.782227l128.854 128.836l11.582 11.582
|
445 |
-
l-11.582 11.5449l-26.1455 26.1641c39.3096 0.582031 137.455 2.14551 162.527 2.39941l2.21777 -161.817l-25.6904 25.6543l-11.5088 11.582l-11.
|
446 |
<glyph glyph-name="uniF124" unicode=""
|
447 |
d="M371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v76.8008h76.7998v-76.8008zM259.75 278.566c-47.3271 0 -85.8105 -38.502 -85.8174 -85.7539c0 -62.4385 72.5957 -135.73 75.6865 -138.848
|
448 |
c2.80957 -2.77734 6.43164 -4.16602 10.1309 -4.16602c3.6416 0 7.31543 1.38184 10.0674 4.16602c3.11719 3.11719 75.7119 76.4092 75.7119 138.848c0 47.252 -38.4766 85.7539 -85.7793 85.7539zM410.298 16.3457c1.93848 2.91211 2.28418 6.60449 0.915039 9.83008
|
449 |
l-33.4658 79.3604c-1.63184 3.86523 -5.4209 6.38086 -9.61914 6.38086h-34.7773v-20.8838h27.8467l24.665 -58.4824h-248.436l24.666 58.4824h25.0625v20.8838h-31.9941c-4.19824 0 -7.98633 -2.51562 -9.61914 -6.38086l-33.4717 -79.3604
|
450 |
-
c-1.35645 -3.22559 -1.01074 -6.91797 0.921875 -9.83008c1.93262 -2.
|
451 |
c-23.7119 0 -42.9121 19.1875 -42.9121 42.9053c0 23.7061 19.1943 42.8486 42.9121 42.8486c23.6738 0 42.8613 -19.1426 42.8613 -42.8486z" />
|
452 |
-
<glyph glyph-name="
|
453 |
-
d="
|
454 |
-
|
455 |
-
l30.0732 -30.0742v16.1152h120.902v-16.1152z" />
|
456 |
<glyph glyph-name="uniF12E" unicode=""
|
457 |
-
d="M335.712 419.215c1.96777 -1.02637 3.5791 -3.65918 3.59863 -5.87793v-101.349l-143.232 -113.104c-1.31152 -1.12598 -2.37598 -3.44141 -2.37598 -5.16992c0 -1.72754 1.06445 -4.04395 2.37598 -5.16895l143.16 -113.031v-101.
|
458 |
-
c0 -3.58789 -2.91211 -6.5 -6.50098 -6.5c-1.27539 0 -3.11328 0.65332 -4.10254 1.45801l-278.261 219.562c-1.31152 1.125 -2.37598 3.44141 -2.37598 5.
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
d="M474.182 147.397v87.2734h203.637v-87.2734h-203.637zM456.728 129.943h238.545v122.182h-238.545v-122.182zM474.182 312.728v87.2725h203.637v-87.2725h-203.637zM456.728 295.272h238.545v122.182h-238.545v-122.182zM474.182 -16v87.2725h203.637v-87.2725h-203.637z
|
464 |
-
M456.728 -33.4541h238.545v122.182h-238.545v-122.182zM459.637 351.046v17.4541h-55.2734v-354.932h58.1826v17.4541h-40.7275v320.023h37.8184zM247.276 234.662v-87.2725h-203.637v87.2725h203.637zM264.73 252.117h-238.545v-122.182h238.545v122.182zM247.276 400
|
465 |
-
v-87.2725h-203.637v87.2725h203.637zM264.73 417.454h-238.545v-122.182h238.545v122.182zM247.276 71.2725v-87.2725h-203.637v87.2725h203.637zM264.73 88.7275h-238.545v-122.182h238.545v122.182zM459.637 182.307v17.4551h-203.637v-17.4551h203.637zM261.818 368.5
|
466 |
-
v-17.4541h37.8184v-320.023h-40.7275v-17.4541h58.1816v354.932h-55.2725z" />
|
467 |
<glyph glyph-name="uniF133" unicode=""
|
468 |
-
d="M303.04 102.146l-102.51 -46.3584l46.2246 102.245l-0.
|
469 |
zM561.749 415.907c7.08301 -6.61035 12.832 -19.8389 12.832 -29.5273c0 -7.69043 -3.84766 -18.8457 -8.58887 -24.9004l-56.7393 56.209c6.15918 4.66113 17.4268 8.44434 25.1504 8.44434c8.60254 0 20.8535 -4.58105 27.3457 -10.2256zM438.684 12.4795v181.718
|
470 |
l57.3086 58.9941v-298h-473.618v473.617h454.389l-61.3809 -57.3076h-335.72v-359.021h359.021z" />
|
471 |
</font>
|
1 |
<?xml version="1.0" standalone="no"?>
|
2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3 |
<!--
|
4 |
+
2017-1-23: Created with FontForge (http://fontforge.org)
|
5 |
-->
|
6 |
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
|
7 |
<metadata>
|
8 |
+
Created by FontForge 20150302 at Mon Jan 23 11:13:46 2017
|
9 |
+
By Riccardo Strobbia
|
10 |
+
Copyright (c) 2017, Riccardo Strobbia
|
11 |
</metadata>
|
12 |
<defs>
|
13 |
<font id="onthegosystems-icons" horiz-adv-x="512" >
|
14 |
<font-face
|
15 |
font-family="onthegosystems-icons"
|
16 |
+
font-weight="400"
|
17 |
font-stretch="normal"
|
18 |
units-per-em="512"
|
19 |
+
panose-1="2 0 5 3 0 0 0 0 0 0"
|
20 |
ascent="448"
|
21 |
descent="-64"
|
22 |
bbox="0 -64 2082.65 448"
|
23 |
underline-thickness="25.6"
|
24 |
underline-position="-51.2"
|
25 |
+
unicode-range="U+0020-F137"
|
26 |
/>
|
27 |
<missing-glyph />
|
28 |
<glyph glyph-name="space" unicode=" " horiz-adv-x="200"
|
29 |
/>
|
30 |
+
<glyph glyph-name="uniF112" unicode=""
|
31 |
+
d="M368.135 254.745c11.2256 0 20.3135 -9.09375 20.3135 -20.3135v-157.606c0 -11.2256 -9.08789 -20.3193 -20.3008 -20.3193h-94.4131c1.27344 -7.69922 7.61621 -28.666 39.0078 -28.666v-10.0479h-50.4316h-10.7393h-50.4316v10.0479
|
32 |
+
c31.3984 0 37.7275 20.9727 39.001 28.666h-97.3691c-11.2197 0 -20.3076 9.09375 -20.3076 20.3193v157.606c0 11.2256 9.08789 20.3135 20.3076 20.3135h225.363zM318.489 126.176l30.0742 30.0742l-30.0742 30.0859v-16.1279h-120.902v16.1279l-30.0732 -30.0859
|
33 |
+
l30.0732 -30.0742v16.1152h120.902v-16.1152z" />
|
34 |
<glyph glyph-name="uniF122" unicode=""
|
35 |
d="M260.664 55.4453h-209.93l104.963 176.74l104.967 176.025l104.968 -176.378l104.962 -176.388h-209.93zM284.613 161.191l7.23633 129.573h-61.3564l7.24609 -129.573h46.874zM231.062 113.25c0 -8.2168 2.65039 -14.6348 7.95215 -19.2402
|
36 |
c5.30566 -4.61523 12.6455 -6.91797 22.0186 -6.91797c9.2793 0 16.4961 2.30762 21.6602 6.91797c5.16406 4.60547 7.74121 11.0234 7.74121 19.2402c0 8.31445 -2.48828 14.7725 -7.45703 19.3877c-4.96777 4.61523 -12.2832 6.91797 -21.9443 6.91797
|
37 |
c-9.75488 0 -17.1875 -2.30762 -22.2979 -6.91797c-5.11523 -4.62012 -7.67285 -11.0781 -7.67285 -19.3877z" />
|
38 |
<glyph glyph-name="uniF12F" unicode=""
|
39 |
+
d="M496.098 434.785l-8.42871 -196.118l-289.452 -289.452l-185.071 185.055l289.452 289.452zM431.707 369.39c-6.38672 6.38867 -18.9033 11.5742 -27.9375 11.5742s-21.5498 -5.18555 -27.9375 -11.5742c-6.39453 -6.39062 -11.584 -18.9141 -11.584 -27.9551
|
40 |
+
c0 -21.8164 17.7051 -39.5215 39.5215 -39.5215s39.5225 17.7051 39.5225 39.5215c0 9.04102 -5.19043 21.5645 -11.585 27.9551z" />
|
41 |
<glyph glyph-name="uniF111" unicode=""
|
42 |
d="M258.637 256.013c18.6494 0 33.8242 -15.1738 33.8242 -33.8242v-22.5342h-67.6484v22.5342c0 18.6504 15.1748 33.8242 33.8242 33.8242zM371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v76.8008h76.7998v-76.8008zM344.313 43.6348
|
43 |
v138.451c0 9.70312 -7.85938 17.5752 -17.5742 17.5752h-7.21289v22.5342c0 33.5684 -27.3154 60.877 -60.8896 60.877c-33.5615 0 -60.877 -27.3086 -60.877 -60.877v-22.5342h-9.47168c-9.69629 0 -17.5615 -7.87207 -17.5615 -17.5752v-138.451
|
53 |
c-1.64453 -1.10742 -5.29297 -0.774414 -10.9375 -0.774414h-7.85254c-4.05762 0 -8.29492 -1.49121 -9.60645 -2.70801c-1.31836 -1.24121 -3.5332 -4.69043 -3.5332 -8.65234zM409.715 175.731c1.8623 4.05762 2.78418 6.52148 2.79688 7.0459
|
54 |
c-0.255859 1.75391 -2.88574 2.82227 -7.8457 2.82227h-204.23c-4.90234 0 -8.26953 -0.742188 -10.125 -1.83008c-1.85645 -1.10059 -3.75684 -3.76953 -5.69629 -7.6416l-57.3242 -112.128h226.374z" />
|
55 |
<glyph glyph-name="uniF128" unicode=""
|
56 |
+
d="M371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v76.8008h76.7998v-76.8008zM121.99 155.591c0 -74.0117 59.998 -134.01 134.01 -134.01s134.01 59.998 134.01 134.01c0 74.0107 -59.998 134.009 -134.01 134.009
|
57 |
+
s-134.01 -59.998 -134.01 -134.009zM260.852 101.709c5.37598 0 10.1377 0.460938 14.2842 1.38867c4.14746 0.921875 8.06445 2.14355 11.751 3.67969v25.4658h-16.5889c-2.46387 0 -4.38379 0.65332 -5.75977 1.95801c-1.37695 1.30566 -2.07422 2.95703 -2.07422 4.9541
|
58 |
+
v21.4209h59.6738v-70.8486c-4.30078 -3.14844 -8.77441 -5.85547 -13.4277 -8.12109c-4.64551 -2.26562 -9.59961 -4.13477 -14.8535 -5.58691c-5.26172 -1.45996 -10.8672 -2.53516 -16.8193 -3.22559c-5.95215 -0.691406 -12.3525 -1.03711 -19.1807 -1.03711
|
59 |
+
c-12.2881 0 -23.6553 2.16992 -34.0996 6.50879c-10.4453 4.3457 -19.4883 10.3291 -27.1299 17.9775c-7.6416 7.63477 -13.6318 16.7041 -17.9707 27.1875c-4.33984 10.4834 -6.50879 21.8682 -6.50879 34.1562c0 12.5186 2.07324 24.0195 6.2207 34.5029
|
60 |
+
c4.14746 10.4893 10.0801 19.5322 17.7979 27.1289c7.71875 7.60352 17.0498 13.5176 27.9941 17.7412c10.9434 4.21777 23.1738 6.33008 36.6914 6.33008c6.98828 0 13.5547 -0.576172 19.6992 -1.72852c6.14355 -1.15234 11.8145 -2.72656 16.9912 -4.72266
|
61 |
+
c5.17773 -1.99707 9.92676 -4.37793 14.2275 -7.14258s8.14062 -5.75391 11.5205 -8.97949l-11.29 -17.1709c-1.0752 -1.61328 -2.36133 -2.87988 -3.86523 -3.80176c-1.49121 -0.921875 -3.12402 -1.38281 -4.89648 -1.38281
|
62 |
+
c-2.30371 0 -4.67871 0.768555 -7.14258 2.29785c-3.06543 1.84277 -5.9707 3.43652 -8.69043 4.78125c-2.7334 1.34375 -5.51074 2.4375 -8.3584 3.28906c-2.83594 0.844727 -5.83691 1.45898 -8.97949 1.84375c-3.14941 0.383789 -6.68164 0.575195 -10.5986 0.575195
|
63 |
+
c-7.2959 0 -13.8623 -1.28613 -19.6992 -3.86523s-10.8096 -6.20117 -14.918 -10.8799c-4.10938 -4.68457 -7.27734 -10.3105 -9.50391 -16.8838c-2.22754 -6.55957 -3.34082 -13.8809 -3.34082 -21.9453c0 -8.91504 1.22852 -16.8193 3.68555 -23.7314
|
64 |
+
c2.45801 -6.91113 5.85645 -12.748 10.1953 -17.5098c4.33984 -4.76172 9.48535 -8.39062 15.4375 -10.8867c5.95117 -2.48926 12.46 -3.7373 19.5264 -3.7373z" />
|
65 |
<glyph glyph-name="uniF130" unicode=""
|
66 |
d="M204.961 -49.2695v102.285h421.251v-102.285h-421.251zM204.961 330.962v102.331h421.251v-102.331h-421.251zM204.961 140.846v102.331h421.251v-102.331h-421.251zM18.5225 -49.2695v102.285h133.262v-102.285h-133.262zM18.5225 330.962v102.331h133.262v-102.331
|
67 |
h-133.262zM18.5225 140.846v102.331h133.262v-102.331h-133.262z" />
|
68 |
<glyph glyph-name="uniF125" unicode=""
|
69 |
d="M270.061 278.381c47.4307 0 85.7793 -38.4131 85.7793 -85.7471c0 -62.7969 -72.333 -135.693 -75.4814 -138.938c-2.5791 -2.5791 -6.49609 -4.49316 -10.2979 -4.49316c-3.82715 0 -7.01367 1.34375 -10.2139 4.49316
|
70 |
c-3.19434 3.23828 -75.5264 76.1406 -75.5264 138.938c0 47.3281 38.4062 85.7471 85.7402 85.7471zM420.448 16.5762c-1.90137 -3.16211 -5.05664 -4.49316 -8.9668 -4.49316h-279.642c-3.2002 0 -7.02051 1.90723 -8.97266 4.49316
|
71 |
+
c-1.90723 3.23828 -2.53418 6.38672 -0.614258 9.63184l33.3057 79.2959c1.90039 3.92285 5.10742 6.49609 9.58105 6.49609h31.9863v-21.1777h-24.9658l-24.96 -58.2275h248.346l-25.0049 58.2275h-28.1406v21.1777h34.5469c4.47363 0 7.73145 -2.56641 9.63184 -6.49609
|
72 |
+
l33.3125 -79.2959c3.14844 -3.24512 2.47656 -7.05273 0.556641 -9.63184zM233.6 195.2c0 -20.7656 16.835 -37.6006 37.6006 -37.6006s37.5996 16.835 37.5996 37.6006s-16.834 37.5996 -37.5996 37.5996s-37.6006 -16.834 -37.6006 -37.5996z" />
|
|
|
73 |
<glyph glyph-name="uniF135" unicode=""
|
74 |
d="M672.731 -44.9854v476.32h476.538v-476.32h-476.538zM60.1328 -44.9854v476.32h476.451v-476.32h-476.451zM1308.57 -44.9854v476.32h476.581v-476.32h-476.581zM264.289 263.99h-0.783203l-50.2998 -24.0186l-10.3555 46.4268l70.4014 32.5469h50.8652v-264.551
|
75 |
+
h-59.8281v209.596zM826.414 54.3945v37.4199l33.7646 30.458c58.1758 52.2139 86.2842 81.8018 86.6758 112.738c0.0332031 0.585938 0.0595703 1.53613 0.0595703 2.12207c0 20.584 -16.7051 37.2891 -37.2891 37.2891c-1.63574 0 -4.27539 -0.208984 -5.89062 -0.467773
|
76 |
+
c-17.5586 -0.943359 -42.9004 -10.6895 -56.5654 -21.7559l-17.4043 43.9463c20.9336 15.041 58.8438 27.248 84.6211 27.248c0.458984 0 1.20312 -0.00390625 1.66211 -0.00976562c2.99219 0.401367 7.87207 0.727539 10.8906 0.727539
|
77 |
+
c45.2266 0 81.9326 -36.7061 81.9326 -81.9326c0 -0.404297 -0.00585938 -1.06152 -0.0126953 -1.4668c-5.19824 -40.3438 -36.7969 -91.5332 -70.5322 -114.261l-24.584 -20.3633v-0.783203h100.076v-50.9092h-187.404zM1487.83 115.05
|
78 |
+
c15.9111 -8.44043 43.4346 -15.7305 61.4385 -16.2734c2.3418 -0.513672 6.19043 -0.930664 8.58887 -0.930664c19.8447 0 37.6934 16.0117 39.8389 35.7402c-2.9834 21.5537 -23.0645 39.0479 -44.8242 39.0479c-2.36133 0 -6.1582 -0.359375 -8.47754 -0.801758h-25.2363
|
79 |
+
v44.5566h24.4102c2.10547 -0.412109 5.55664 -0.74707 7.70312 -0.74707c17.666 0 35.1904 13.9795 39.1152 31.2051c-1.53809 15.79 -15.6621 28.6064 -31.5273 28.6064c-2.13867 0 -5.55762 -0.417969 -7.63281 -0.933594
|
80 |
+
c-16.2686 -0.576172 -40.8887 -7.69141 -54.9551 -15.8818l-12.5322 44.8604c20.2822 11.0186 55.4746 19.9609 78.5557 19.9609c0.896484 0 2.35059 -0.0146484 3.24609 -0.0322266c56.1738 0 87.502 -29.7188 87.502 -65.9199v-0.152344
|
81 |
+
c0 -27.4814 -21.6953 -54.957 -48.4287 -61.3301v-0.826172c31.5234 -4.01074 57.2939 -33.0557 57.5225 -64.832c0 -46.3838 -41.1182 -80.584 -108.257 -80.584c-1.05859 -0.0244141 -2.77832 -0.0449219 -3.83691 -0.0449219c-21.96 0 -55.5625 8.28516 -75.0059 18.4941
|
82 |
+
z" />
|
83 |
<glyph glyph-name="uniF110" unicode=""
|
84 |
d="M344.313 43.6348c0 -9.70215 -7.86523 -17.5742 -17.5742 -17.5742h-138.451c-9.70215 0 -17.5615 7.87207 -17.5615 17.5742v138.451c0 9.70312 7.86523 17.5752 17.5615 17.5752h138.451c9.71484 0 17.5742 -7.87207 17.5742 -17.5752v-138.451zM319.526 155.699
|
85 |
h-27.0654v66.4893c0 18.6504 -15.1748 33.8242 -33.8242 33.8242s-33.8242 -15.1738 -33.8242 -33.8242v-57.4717h-27.0527v57.4717c0 33.5684 27.3154 60.877 60.877 60.877c33.5742 0 60.8896 -27.3086 60.8896 -60.877v-66.4893z" />
|
88 |
M310.381 49.0107c4.81934 0 9.09473 0.40332 12.8125 1.24219c3.72461 0.819336 7.23242 1.91309 10.541 3.2959v22.8477h-14.8799c-2.20801 0 -3.93652 0.588867 -5.1709 1.75391c-1.23535 1.16504 -1.86328 2.64941 -1.86328 4.43555v19.2188h53.5303v-63.5586
|
89 |
c-3.85938 -2.81543 -7.87207 -5.24121 -12.0449 -7.2832c-4.16602 -2.02832 -8.61426 -3.70508 -13.3252 -5.01074c-4.72266 -1.30566 -9.74707 -2.26562 -15.084 -2.89258c-5.33789 -0.621094 -11.0791 -0.928711 -17.2041 -0.928711
|
90 |
c-11.0205 0 -21.209 1.94629 -30.5791 5.83105c-9.36914 3.90332 -17.4785 9.2666 -24.3389 16.1338c-6.86035 6.8418 -12.2305 14.9893 -16.1221 24.3906c-3.89062 9.40137 -5.84277 19.6162 -5.84277 30.6367c0 11.2256 1.8623 21.543 5.58105 30.9443
|
91 |
+
c3.71777 9.41406 9.04297 17.5234 15.9609 24.3389c6.93164 6.81641 15.29 12.1279 25.1143 15.917c9.80469 3.78223 20.7871 5.66992 32.9082 5.66992c6.26562 0 12.1602 -0.517578 17.6709 -1.54883c5.51074 -1.02344 10.5986 -2.4375 15.2451 -4.23633
|
92 |
c4.63965 -1.79199 8.90234 -3.92285 12.7549 -6.40039c3.86523 -2.48242 7.30859 -5.16406 10.3359 -8.06348l-10.1309 -15.3926c-0.959961 -1.45898 -2.1123 -2.58496 -3.46289 -3.41699c-1.33789 -0.819336 -2.80273 -1.22852 -4.39648 -1.22852
|
93 |
c-2.06055 0 -4.18555 0.677734 -6.40625 2.06055c-2.75195 1.64453 -5.35059 3.07812 -7.7959 4.28125c-2.44434 1.20312 -4.94043 2.18848 -7.49414 2.9502c-2.54102 0.755859 -5.23535 1.30566 -8.06348 1.6582c-2.81641 0.345703 -5.99121 0.518555 -9.50488 0.518555
|
94 |
c-6.53418 0 -12.4287 -1.15918 -17.6699 -3.46289c-5.23535 -2.32324 -9.68945 -5.56836 -13.3828 -9.7666c-3.67285 -4.19141 -6.52734 -9.24121 -8.51758 -15.1426c-1.99707 -5.88086 -3.00195 -12.4473 -3.00195 -19.6797c0 -8 1.10059 -15.085 3.31543 -21.2861
|
95 |
c2.20117 -6.20215 5.24805 -11.4365 9.13867 -15.7061c3.8916 -4.26855 8.50586 -7.52637 13.8496 -9.75293c5.35059 -2.25293 11.1875 -3.36719 17.5234 -3.36719z" />
|
96 |
<glyph glyph-name="uniF12B" unicode=""
|
97 |
+
d="M1462.46 195.143l-243.607 -223.575h-507.86l243.761 223.678l-243.557 217.136h507.605zM2082.65 195.143l-243.658 -223.575h-507.86l243.761 223.678l-243.506 217.136h507.605zM587.173 412.381l243.505 -217.136l-243.761 -223.678l-10.374 -9.55566h-464.935
|
98 |
v459.926h464.884z" />
|
99 |
<glyph glyph-name="uniF117" unicode=""
|
100 |
d="M371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v76.8008h76.7998v-76.8008zM183.577 12.877v174.188h-70.3359v-174.188h70.3359zM396.8 12.877v174.188h-195.501v-174.188h195.501zM396.8 205.178v74.6494h-283.559v-74.6494h283.559z
|
101 |
" />
|
102 |
<glyph glyph-name="uniF12D" unicode=""
|
103 |
+
d="M495.838 -44.7412v338.07h338.097v-338.07h-338.097zM496.021 124.517c0 93.1465 75.5098 168.655 168.655 168.655s168.655 -75.5088 168.655 -168.655c0 -93.1455 -75.5098 -168.654 -168.655 -168.654s-168.655 75.5088 -168.655 168.654zM513.076 124.517
|
104 |
+
c0 83.7275 67.873 151.601 151.601 151.601c83.7266 0 151.601 -67.873 151.601 -151.601c0 -83.7266 -67.874 -151.601 -151.601 -151.601c-83.7275 0 -151.601 67.874 -151.601 151.601zM530.13 124.517c0 74.3086 60.2383 134.547 134.547 134.547
|
105 |
+
c74.3076 0 134.546 -60.2383 134.546 -134.547c0 -74.3076 -60.2383 -134.546 -134.546 -134.546c-74.3086 0 -134.547 60.2383 -134.547 134.546zM548.969 124.517c0 63.9043 51.8037 115.708 115.708 115.708c63.9033 0 115.707 -51.8037 115.707 -115.708
|
106 |
+
c0 -63.9033 -51.8037 -115.707 -115.707 -115.707c-63.9043 0 -115.708 51.8037 -115.708 115.707zM1052.55 142.936h-184.293v43.1084h141.211v199.012h-923.904v-199.012h323.116v-43.1084h-366.198v285.202h1010.07v-285.202z" />
|
107 |
<glyph glyph-name="uniF11A" unicode=""
|
108 |
d="M399.36 330.24h61.4395v-368.641h-399.359v368.641h61.4395v92.1602h92.1602v-92.1602h92.1602v92.1602h92.1602v-92.1602zM116.173 121.979c0 2.90332 -0.839844 5.0791 -2.51953 6.54395c-1.68359 1.45898 -4.1875 2.19141 -7.50586 2.19141h-7.26465
|
109 |
+
l-6.72266 -31.8008h5.16113l2.49805 11.8887h2.3916c4.39258 0 7.81738 0.962891 10.2754 2.89258c2.45801 1.93066 3.68652 4.69043 3.68652 8.28418zM100.751 115.175l2.38672 11.1865h2.58984c1.75684 0 3.05176 -0.368164 3.90234 -1.0957
|
110 |
+
c0.849609 -0.726562 1.27441 -1.87402 1.27441 -3.45605c0 -2.11914 -0.706055 -3.74707 -2.12012 -4.9043c-1.40723 -1.15723 -3.40918 -1.73047 -5.99023 -1.73047h-2.04297zM121.841 98.8975l7.19824 33.8486h-5.10938l-7.17871 -33.8486h5.08984zM138.537 122.962
|
111 |
v-0.00488281h-5.14062l-2.67285 -12.6982c-0.173828 -0.895508 -0.347656 -1.78613 -0.522461 -2.6875c-0.173828 -0.885742 -0.260742 -1.78223 -0.260742 -2.69824c0 -2.06836 0.527344 -3.64062 1.58691 -4.74121c1.05469 -1.11133 2.55566 -1.65918 4.50098 -1.65918
|
112 |
c1.49023 0 2.88281 0.384766 4.17285 1.18262c1.29004 0.798828 2.53418 2.02832 3.72168 3.71777h0.174805l-0.456055 -4.45996h4.02441l5.06836 24.0488h-5.06836l-2.15039 -10.1992c-0.435547 -2.06348 -1.0498 -3.86035 -1.84863 -5.38086
|
113 |
+
c-0.798828 -1.52539 -1.70996 -2.70898 -2.73926 -3.53809c-1.0293 -0.819336 -2.06348 -1.2334 -3.10742 -1.2334c-1.84375 0 -2.76465 0.961914 -2.76465 2.89258c0 0.74707 0.224609 2.15039 0.675781 4.19336zM178.217 122.962h-8.33008
|
114 |
+
c-1.16211 0.291992 -2.31934 0.44043 -3.48145 0.44043c-2.91309 0 -5.25879 -0.870117 -7.03516 -2.61621c-1.78125 -1.74121 -2.66699 -4.02441 -2.66699 -6.87598c0 -2.46777 0.977539 -4.30664 2.93359 -5.47852
|
115 |
c-1.44922 -0.681641 -2.51367 -1.37793 -3.18457 -2.12012c-0.675781 -0.732422 -1.01367 -1.60254 -1.01367 -2.60059c0 -1.17773 0.552734 -2.10938 1.65332 -2.75977c-2.23242 -0.748047 -3.85059 -1.66895 -4.8584 -2.76465
|
116 |
c-1.00391 -1.08594 -1.51074 -2.37598 -1.51074 -3.87109c0 -1.89941 0.814453 -3.38965 2.42676 -4.47949c1.61816 -1.08594 3.89648 -1.62305 6.84082 -1.62305c4.03418 0 7.1416 0.767578 9.33301 2.31934c2.19141 1.56152 3.28223 3.74707 3.28223 6.58887
|
117 |
+
c0 1.77148 -0.552734 3.13379 -1.65332 4.08105c-1.10156 0.947266 -2.92383 1.58691 -5.47852 1.90918l-2.76562 0.337891c-0.870117 0.123047 -1.53516 0.277344 -1.99121 0.481445c-0.460938 0.200195 -0.686523 0.588867 -0.686523 1.13184
|
118 |
c0 0.926758 0.80957 1.67969 2.41699 2.25781c0.583984 -0.107422 1.24902 -0.168945 2.00195 -0.168945c2.89844 0 5.21191 0.814453 6.9375 2.46289s2.59082 3.87012 2.59082 6.6709c0 1.14746 -0.205078 2.13574 -0.609375 2.98047l4.17285 0.716797zM160.404 99.3027
|
119 |
l2.98047 -0.307617c1.6377 -0.168945 2.78516 -0.470703 3.43555 -0.890625c0.649414 -0.419922 0.977539 -0.999023 0.977539 -1.74121c0 -1.46387 -0.666016 -2.59082 -2.00195 -3.36914c-1.33105 -0.788086 -3.18457 -1.17188 -5.54492 -1.17188
|
120 |
+
c-1.6543 0 -2.88281 0.28125 -3.68652 0.829102c-0.803711 0.558594 -1.20801 1.30566 -1.20801 2.25293c0 1.13184 0.43457 2.08887 1.30566 2.84668c0.870117 0.77832 2.11914 1.28516 3.74219 1.55176zM166.277 119.982c1.92969 0 2.89258 -1.03418 2.89258 -3.08301
|
121 |
+
c0 -1.17676 -0.194336 -2.25781 -0.578125 -3.24609c-0.384766 -0.977539 -0.921875 -1.76074 -1.6084 -2.31934c-0.691406 -0.5625 -1.50488 -0.849609 -2.44727 -0.849609c-0.957031 0 -1.68945 0.276367 -2.20605 0.839844
|
122 |
+
c-0.517578 0.563477 -0.773438 1.35156 -0.773438 2.38086c0 1.13672 0.194336 2.20117 0.588867 3.16406c0.388672 0.962891 0.941406 1.72559 1.65332 2.2832c0.707031 0.547852 1.53613 0.830078 2.47852 0.830078zM182.277 98.8975l5.11426 24.0596h-5.11426
|
123 |
+
l-5.13086 -24.0596h5.13086zM183.296 128.876c0 -0.804688 0.255859 -1.4082 0.762695 -1.78711c0.506836 -0.374023 1.14746 -0.563477 1.91504 -0.563477c0.942383 0 1.70508 0.291992 2.2832 0.896484c0.579102 0.603516 0.871094 1.41309 0.871094 2.44141
|
124 |
+
c0 0.789062 -0.241211 1.36719 -0.722656 1.75098c-0.475586 0.378906 -1.10059 0.568359 -1.86816 0.568359c-1.0293 0 -1.82324 -0.301758 -2.3916 -0.911133s-0.849609 -1.41309 -0.849609 -2.39551zM203.188 98.8975v0.015625h5.14062l2.97949 14.208
|
125 |
+
c0.333008 1.62305 0.501953 2.93945 0.501953 3.93262c0 2.03223 -0.538086 3.59863 -1.60254 4.7002c-1.06543 1.10547 -2.57031 1.64844 -4.51074 1.64844c-1.49512 0 -2.87793 -0.394531 -4.1582 -1.16699c-1.27441 -0.773438 -2.51855 -2.0127 -3.72168 -3.7334
|
126 |
h-0.194336l0.455078 4.45996h-4.00391l-5.12988 -24.0488h5.12988l2.13574 10.1992c0.404297 1.97168 1.01367 3.73242 1.82227 5.28906c0.814453 1.55664 1.73047 2.75488 2.74414 3.5791s2.04297 1.23828 3.08789 1.23828c1.86816 0 2.80566 -0.952148 2.80566 -2.85156
|
127 |
+
c0 -0.603516 -0.12793 -1.55078 -0.389648 -2.85645zM230.753 106.302c0 0.936523 -0.163086 1.76562 -0.491211 2.46777c-0.333008 0.72168 -0.819336 1.38184 -1.45898 1.99121c-0.640625 0.609375 -1.7207 1.3418 -3.24121 2.20215
|
128 |
c-1.47949 0.798828 -2.45801 1.44824 -2.93359 1.96094c-0.481445 0.506836 -0.72168 1.08496 -0.72168 1.74023c0 0.855469 0.332031 1.52051 0.988281 2.00195c0.655273 0.481445 1.51465 0.72168 2.5752 0.72168c1.82715 0 3.75781 -0.547852 5.78516 -1.64844
|
129 |
l1.6543 3.83008c-2.17676 1.20801 -4.68555 1.81738 -7.52637 1.81738c-2.64258 0 -4.73633 -0.639648 -6.28809 -1.90918c-1.55078 -1.28027 -2.3291 -3.04199 -2.3291 -5.28906c0 -1.36719 0.374023 -2.57031 1.12109 -3.56934
|
130 |
c0.74707 -1.00781 2.02734 -2.00195 3.83984 -2.96875c1.55176 -0.886719 2.58105 -1.58789 3.07715 -2.12012c0.49707 -0.527344 0.748047 -1.15723 0.748047 -1.9043c0 -0.994141 -0.435547 -1.79785 -1.30566 -2.37109
|
131 |
c-0.871094 -0.573242 -2.00781 -0.870117 -3.41504 -0.870117c-2.30469 0 -4.56738 0.650391 -6.78418 1.95605v-4.4082c1.91504 -0.967773 4.24902 -1.45996 7.00391 -1.45996c3.04688 0 5.42773 0.675781 7.1377 2.0332c1.70996 1.35645 2.56445 3.28711 2.56445 5.7959z
|
132 |
M242.826 88.2129c2.12988 0 3.86035 0.639648 5.16602 1.90918c1.32129 1.29004 2.27344 3.3125 2.85156 6.05176l4.84863 22.9072h4.98242l0.803711 3.87598h-4.97656l0.394531 1.86328c0.317383 1.42871 0.777344 2.44727 1.38184 3.07715
|
133 |
+
c0.598633 0.620117 1.40332 0.9375 2.40137 0.9375c0.901367 0 1.88379 -0.205078 2.95898 -0.609375l1.32617 3.82422c-1.39746 0.625 -2.92871 0.942383 -4.58691 0.942383c-2.40625 0 -4.27051 -0.609375 -5.58105 -1.8125
|
134 |
+
c-1.31055 -1.20801 -2.2832 -3.24121 -2.92383 -6.11816l-0.455078 -2.00781l-4.21973 -1.64844l-0.455078 -2.29883h3.89062l-4.71973 -22.2363c-0.625 -2.96973 -1.90527 -4.45898 -3.85059 -4.45898c-0.727539 0 -1.55176 0.143555 -2.47852 0.43457v-4.13184
|
135 |
+
c0.855469 -0.342773 1.93555 -0.500977 3.24121 -0.500977zM282.772 113.956c0 2.89258 -0.798828 5.19141 -2.38086 6.87598c-1.60254 1.67969 -3.80957 2.51855 -6.64062 2.51855c-2.45215 0 -4.61328 -0.669922 -6.48145 -2.01172
|
136 |
c-1.88477 -1.3418 -3.33398 -3.2207 -4.37305 -5.62207c-1.0293 -2.41602 -1.55078 -5.06348 -1.55078 -7.94629c0 -2.85156 0.818359 -5.11426 2.45215 -6.77344c1.63867 -1.65918 3.85059 -2.4834 6.64062 -2.4834c2.40625 0 4.53613 0.640625 6.37988 1.92578
|
137 |
+
c1.85254 1.2793 3.30664 3.11719 4.36719 5.51855c1.05469 2.40723 1.58691 5.07422 1.58691 7.99805zM277.622 114.176c0 -2.13477 -0.296875 -4.08594 -0.871094 -5.8623c-0.588867 -1.77148 -1.39746 -3.15918 -2.43652 -4.1416
|
138 |
+
c-1.0498 -0.988281 -2.22266 -1.48047 -3.52246 -1.48047c-1.4082 0 -2.46289 0.430664 -3.19043 1.29102c-0.72168 0.849609 -1.06934 2.08887 -1.06934 3.69141c0 2.01172 0.291016 3.90625 0.879883 5.68848c0.579102 1.76562 1.4082 3.17871 2.47363 4.21289
|
139 |
+
c1.06445 1.04004 2.2627 1.55664 3.61914 1.55664c1.32129 0 2.33496 -0.429688 3.04688 -1.31055s1.07031 -2.08887 1.07031 -3.64551zM301.731 123.402c-1.35645 0 -2.63086 -0.394531 -3.84473 -1.14746c-1.19336 -0.762695 -2.40625 -2.01172 -3.60938 -3.75293
|
140 |
h-0.189453l0.450195 4.45996h-3.99316l-5.13574 -24.0488h5.13574l2.30371 10.8701c0.557617 2.66211 1.56641 4.80762 3 6.44629c1.43945 1.63281 3.07227 2.45215 4.88965 2.45215c0.702148 0 1.44434 -0.107422 2.22754 -0.3125l1.11621 4.7666
|
141 |
c-0.675781 0.174805 -1.44922 0.266602 -2.35059 0.266602zM119.286 43.2178l14.249 31.8008h-5.35059l-7.78809 -18.4014c-0.276367 -0.620117 -0.716797 -1.71582 -1.32617 -3.3125c-0.608398 -1.58789 -1.11621 -3.02637 -1.52051 -4.2959h-0.173828l0.0664062 4.09082
|
142 |
l-0.0664062 3.67578l-0.670898 18.2432h-4.89453l-8.41699 -18.2891c-0.855469 -1.94043 -1.88477 -4.52051 -3.08789 -7.7207h-0.12793c0.18457 3.0459 0.282227 5.5498 0.282227 7.52637l-0.415039 18.4834h-4.98145l1.15137 -31.8008h5.56543l8.37695 18.3193
|
144 |
c-2.44727 0 -4.6084 -0.670898 -6.48242 -2.01172c-1.87402 -1.3418 -3.32812 -3.2207 -4.3623 -5.62207c-1.03906 -2.41699 -1.55664 -5.06348 -1.55664 -7.94629c0 -2.85156 0.819336 -5.11523 2.45801 -6.77344c1.63281 -1.65918 3.85059 -2.4834 6.63086 -2.4834
|
145 |
c2.40625 0 4.53613 0.639648 6.38379 1.9248c1.84863 1.28027 3.30273 3.11816 4.3623 5.51953c1.06055 2.40625 1.58789 5.07422 1.58789 7.99707zM147.395 58.4961c0 -2.13477 -0.291992 -4.08594 -0.865234 -5.8623
|
146 |
c-0.583984 -1.77148 -1.39258 -3.15918 -2.4375 -4.14258c-1.04395 -0.988281 -2.2168 -1.47949 -3.52246 -1.47949c-1.4082 0 -2.47266 0.430664 -3.18945 1.29004c-0.716797 0.850586 -1.0752 2.08887 -1.0752 3.69141c0 2.0127 0.291992 3.90723 0.880859 5.68848
|
147 |
+
c0.583008 1.7666 1.41309 3.17969 2.47754 4.21387c1.06543 1.03906 2.27344 1.55664 3.62012 1.55664c1.32129 0 2.33496 -0.429688 3.04688 -1.31055c0.710938 -0.880859 1.06445 -2.08887 1.06445 -3.64551zM171.51 67.7227
|
148 |
c-1.35156 0 -2.62695 -0.394531 -3.82422 -1.14746c-1.20898 -0.762695 -2.41211 -2.01172 -3.61523 -3.75293h-0.194336l0.455078 4.45996h-4.00293l-5.13086 -24.0488h5.13086l2.30371 10.8701c0.563477 2.66211 1.56641 4.80762 3 6.44531
|
149 |
+
c1.43848 1.63379 3.07227 2.45312 4.89453 2.45312c0.702148 0 1.43945 -0.107422 2.22266 -0.3125l1.10547 4.7666c-0.660156 0.173828 -1.44922 0.266602 -2.34473 0.266602zM185.462 67.7227c-2.12012 0 -4.04492 -0.711914 -5.78027 -2.125
|
150 |
+
c-1.73633 -1.41309 -3.12891 -3.41992 -4.16309 -6.00098c-1.03906 -2.58594 -1.55664 -5.36035 -1.55664 -8.33008c0 -2.70312 0.588867 -4.78711 1.76172 -6.25684c1.17773 -1.47461 2.80078 -2.2168 4.87402 -2.2168c1.33105 0 2.5957 0.322266 3.78418 0.977539
|
151 |
+
c1.1875 0.650391 2.4209 1.75098 3.69629 3.29297h0.15332l-0.414062 -3.83008h3.99805l7.17871 33.8379h-5.06934l-1.65332 -7.78711c-0.348633 -1.50098 -0.614258 -3.32324 -0.803711 -5.43262h-0.174805c-1.29492 2.58008 -3.23535 3.87109 -5.83105 3.87109z
|
152 |
+
M182.543 46.9199c-2.27246 0 -3.41504 1.47461 -3.41504 4.41797c0 2.0127 0.323242 3.99902 0.958008 5.93945s1.49512 3.47168 2.56543 4.58789c1.06934 1.11621 2.22168 1.67383 3.45508 1.67383c1.29102 0 2.25293 -0.399414 2.88281 -1.1875
|
153 |
c0.629883 -0.798828 0.947266 -1.8584 0.947266 -3.17969c0 -1.96094 -0.347656 -3.89648 -1.05469 -5.81152c-0.701172 -1.91504 -1.63867 -3.46094 -2.80566 -4.64844c-1.16699 -1.20312 -2.34473 -1.79199 -3.5332 -1.79199zM223.053 66.2988
|
154 |
c0 2.90332 -0.839844 5.0791 -2.51367 6.54297c-1.68457 1.45996 -4.18848 2.19141 -7.50586 2.19141h-7.26562l-6.72266 -31.7998h5.15625l2.49805 11.8887h2.3916c4.39258 0 7.81836 0.962891 10.2754 2.89258c2.45801 1.93066 3.68652 4.69043 3.68652 8.28418z
|
155 |
+
M207.632 59.4941l2.38574 11.1875h2.59082c1.75586 0 3.05078 -0.369141 3.90137 -1.0957c0.849609 -0.727539 1.27441 -1.87402 1.27441 -3.45605c0 -2.12012 -0.706055 -3.74805 -2.11914 -4.90527c-1.4082 -1.15723 -3.41016 -1.73047 -5.99121 -1.73047h-2.04199z
|
156 |
+
M239.943 67.7227c-1.34668 0 -2.62109 -0.394531 -3.82422 -1.14746c-1.20801 -0.762695 -2.41113 -2.01172 -3.61523 -3.75293h-0.194336l0.456055 4.45996h-4.00391l-5.12988 -24.0488h5.12988l2.30371 10.8701c0.563477 2.66211 1.56641 4.80762 3.00098 6.44531
|
157 |
c1.43848 1.63379 3.07129 2.45312 4.89453 2.45312c0.701172 0 1.43848 -0.107422 2.22168 -0.3125l1.10645 4.7666c-0.661133 0.173828 -1.44922 0.266602 -2.3457 0.266602zM251.484 42.7881c1.43359 0 2.7334 0.137695 3.89062 0.378906
|
158 |
+
c1.16797 0.271484 2.44727 0.726562 3.84082 1.36133v4.07031c-1.4082 -0.665039 -2.62695 -1.13672 -3.65625 -1.40723c-1.0293 -0.282227 -2.06348 -0.419922 -3.10742 -0.419922c-1.62891 0 -2.84668 0.460938 -3.66602 1.37207s-1.22949 2.18066 -1.22949 3.78906
|
159 |
+
v0.628906l0.046875 0.670898h0.936523c4.46484 0 7.90527 0.75293 10.3271 2.2373c2.41699 1.48535 3.62012 3.54297 3.62012 6.19043c0 1.9248 -0.650391 3.41504 -1.94043 4.46973c-1.2959 1.0498 -3.11328 1.57715 -5.44824 1.57715
|
160 |
c-2.38086 0 -4.53125 -0.670898 -6.45117 -2.02246s-3.44531 -3.26172 -4.56641 -5.73438c-1.12207 -2.46289 -1.68457 -5.13574 -1.68457 -8.0127c0 -2.87793 0.798828 -5.11523 2.40137 -6.7334c1.60254 -1.61719 3.8291 -2.41602 6.68652 -2.41602zM254.792 63.8008
|
161 |
c0.911133 0 1.60254 -0.205078 2.07324 -0.609375c0.46582 -0.415039 0.696289 -0.983398 0.696289 -1.73047c0 -1.42871 -0.773438 -2.5293 -2.30859 -3.29785c-1.53613 -0.783203 -3.67188 -1.16699 -6.39551 -1.16699h-0.634766
|
162 |
c0.538086 2.04785 1.41797 3.69629 2.6416 4.93555c1.22363 1.24414 2.53516 1.86914 3.92773 1.86914zM280.289 50.6211c0 0.9375 -0.168945 1.7666 -0.496094 2.46777c-0.328125 0.722656 -0.819336 1.38281 -1.45996 1.99219
|
163 |
+
c-0.628906 0.609375 -1.70996 1.3418 -3.24023 2.20117c-1.47949 0.798828 -2.45312 1.44922 -2.92871 1.96094c-0.481445 0.506836 -0.72168 1.08594 -0.72168 1.74121c0 0.855469 0.322266 1.52051 0.982422 2.00195s1.52051 0.72168 2.58105 0.72168
|
164 |
c1.82715 0 3.75781 -0.547852 5.78516 -1.64844l1.64844 3.83008c-2.18066 1.20801 -4.67969 1.81738 -7.53125 1.81738c-2.6416 0 -4.73047 -0.640625 -6.28711 -1.91016c-1.55176 -1.2793 -2.3252 -3.04102 -2.3252 -5.28906
|
165 |
+
c0 -1.36621 0.374023 -2.57031 1.12207 -3.56836c0.74707 -1.00879 2.02734 -2.00195 3.83984 -2.96973c1.55664 -0.885742 2.58496 -1.5918 3.08203 -2.11914s0.74707 -1.15723 0.74707 -1.90527c0 -0.993164 -0.439453 -1.79688 -1.31055 -2.37012
|
166 |
c-0.870117 -0.573242 -2.01172 -0.870117 -3.40918 -0.870117c-2.30957 0 -4.5625 0.649414 -6.79004 1.95508v-4.4082c1.9209 -0.967773 4.25 -1.45898 7.00977 -1.45898c3.04102 0 5.42188 0.675781 7.13184 2.03223c1.71582 1.35742 2.57031 3.28711 2.57031 5.7959z
|
167 |
+
M299.898 50.6211c0 0.9375 -0.168945 1.7666 -0.496094 2.46777c-0.328125 0.722656 -0.819336 1.38281 -1.45898 1.99219c-0.629883 0.609375 -1.70996 1.3418 -3.24121 2.20117c-1.47949 0.798828 -2.45215 1.44922 -2.92871 1.96094
|
168 |
+
c-0.481445 0.506836 -0.72168 1.08594 -0.72168 1.74121c0 0.855469 0.322266 1.52051 0.982422 2.00195c0.661133 0.481445 1.52148 0.72168 2.58105 0.72168c1.82812 0 3.75781 -0.547852 5.78516 -1.64844l1.64844 3.83008
|
169 |
+
c-2.18066 1.20801 -4.67969 1.81738 -7.53125 1.81738c-2.6416 0 -4.73047 -0.640625 -6.28711 -1.91016c-1.55176 -1.2793 -2.32422 -3.04102 -2.32422 -5.28906c0 -1.36621 0.373047 -2.57031 1.12109 -3.56836c0.74707 -1.00879 2.02734 -2.00195 3.83984 -2.96973
|
170 |
c1.55176 -0.885742 2.58008 -1.58691 3.08203 -2.11914c0.492188 -0.527344 0.748047 -1.15723 0.748047 -1.90527c0 -0.993164 -0.44043 -1.79688 -1.31055 -2.37012c-0.871094 -0.573242 -2.0127 -0.870117 -3.41016 -0.870117
|
171 |
c-2.30957 0 -4.5625 0.649414 -6.78906 1.95508v-4.4082c1.91992 -0.967773 4.24902 -1.45898 7.00879 -1.45898c3.04102 0 5.42188 0.675781 7.13281 2.03223c1.71484 1.35742 2.56934 3.28711 2.56934 5.7959zM119.152 6.96875
|
172 |
c0 4.03906 -1.05957 7.11621 -3.17383 9.2207c-2.11523 2.09961 -5.14062 3.14844 -9.06738 3.14844h-8.02832l-6.72266 -31.7998h8.72461c3.7373 0 6.99316 0.798828 9.76367 2.37012c2.76953 1.57715 4.87891 3.83984 6.32812 6.76855s2.17578 6.35938 2.17578 10.292z
|
173 |
+
M101.146 -8.08496v0l-2.93848 -0.00976562l4.93555 23.0811h3.17969c2.43164 0 4.28516 -0.701172 5.56543 -2.09961c1.27441 -1.39258 1.91406 -3.4248 1.91406 -6.09277c0 -2.9082 -0.506836 -5.48828 -1.53027 -7.74609
|
174 |
+
c-1.01855 -2.25781 -2.48828 -4.01953 -4.40332 -5.26367s-4.15723 -1.86914 -6.72266 -1.86914zM131.216 -12.8926c1.43848 0 2.73828 0.138672 3.89551 0.378906c1.16797 0.271484 2.44727 0.727539 3.84082 1.3623v4.07031
|
175 |
+
c-1.4082 -0.665039 -2.62695 -1.13672 -3.65625 -1.4082c-1.0293 -0.28125 -2.06348 -0.419922 -3.10742 -0.419922c-1.62891 0 -2.84668 0.460938 -3.66602 1.37207c-0.819336 0.912109 -1.22949 2.18164 -1.22949 3.78906v0.629883l0.046875 0.670898h0.936523
|
176 |
+
c4.46484 0 7.90527 0.75293 10.3223 2.2373c2.41602 1.48438 3.625 3.54297 3.625 6.19043c0 1.9248 -0.650391 3.41504 -1.94629 4.46973c-1.29492 1.0498 -3.1123 1.57715 -5.44727 1.57715c-2.38086 0 -4.53125 -0.670898 -6.45117 -2.02246
|
177 |
+
c-1.91992 -1.35254 -3.44531 -3.26172 -4.56738 -5.73438c-1.12109 -2.46289 -1.68457 -5.13574 -1.68457 -8.01367c0 -2.87695 0.798828 -5.11426 2.40137 -6.73242s3.83008 -2.41699 6.6875 -2.41699zM134.522 8.12012c0.912109 0 1.60254 -0.205078 2.07422 -0.609375
|
178 |
c0.46582 -0.414062 0.696289 -0.982422 0.696289 -1.73047c0 -1.42871 -0.773438 -2.5293 -2.30957 -3.29688c-1.53613 -0.783203 -3.6709 -1.16797 -6.39453 -1.16797h-0.634766c0.537109 2.04883 1.41797 3.69727 2.6416 4.93652
|
179 |
+
c1.22852 1.24414 2.53418 1.86816 3.92676 1.86816zM148.04 -12.4619v0h5.97461l13.0098 24.0586h-5.4375l-6.76367 -13.0098c-0.332031 -0.604492 -0.803711 -1.55664 -1.41309 -2.87207c-0.608398 -1.32129 -1.11621 -2.51953 -1.52051 -3.58984h-0.15332
|
180 |
+
c0 2.00195 -0.102539 4.16309 -0.307617 6.46191l-1.19727 13.0098h-5.04395zM175.391 -12.8926c1.43848 0 2.73926 0.138672 3.90137 0.378906c1.16797 0.271484 2.44727 0.727539 3.83984 1.3623v4.07031c-1.40723 -0.665039 -2.62598 -1.13672 -3.65527 -1.4082
|
181 |
+
c-1.0293 -0.28125 -2.06348 -0.419922 -3.1084 -0.419922c-1.62793 0 -2.84668 0.460938 -3.66504 1.37207c-0.819336 0.912109 -1.22949 2.18164 -1.22949 3.78906v0.629883l0.0458984 0.670898h0.932617c4.46387 0 7.90527 0.75293 10.3213 2.2373
|
182 |
+
c2.41699 1.48438 3.625 3.54297 3.625 6.19043c0 1.9248 -0.650391 3.41504 -1.94531 4.46973c-1.29492 1.0498 -3.11328 1.57715 -5.44727 1.57715c-2.38086 0 -4.53125 -0.670898 -6.45117 -2.02246c-1.9209 -1.35254 -3.44629 -3.26172 -4.56738 -5.73438
|
183 |
+
c-1.12109 -2.46289 -1.68457 -5.13574 -1.68457 -8.01367c0 -2.87695 0.798828 -5.11426 2.40137 -6.73242s3.83008 -2.41699 6.68652 -2.41699zM178.698 8.12012c0.911133 0 1.60254 -0.205078 2.07324 -0.609375c0.46582 -0.414062 0.696289 -0.982422 0.696289 -1.73047
|
184 |
+
c0 -1.42871 -0.772461 -2.5293 -2.30859 -3.29688c-1.53613 -0.783203 -3.6709 -1.16797 -6.39551 -1.16797h-0.634766c0.538086 2.04883 1.41895 3.69727 2.64258 4.93652c1.22852 1.24414 2.53418 1.86816 3.92676 1.86816zM193.301 -12.4619l7.19824 33.8486h-5.10938
|
185 |
l-7.17871 -33.8486h5.08984zM222.459 2.5957c0 2.89258 -0.798828 5.19727 -2.3916 6.87598c-1.5918 1.67969 -3.80371 2.51953 -6.62988 2.51953c-2.44727 0 -4.6084 -0.670898 -6.48242 -2.0127c-1.87305 -1.34082 -3.32715 -3.21973 -4.36133 -5.62109
|
186 |
+
c-1.04004 -2.41699 -1.55664 -5.06445 -1.55664 -7.94629c0 -2.85254 0.819336 -5.11523 2.45703 -6.77441c1.63379 -1.6582 3.85059 -2.48242 6.63086 -2.48242c2.40625 0 4.53613 0.639648 6.38477 1.9248c1.84766 1.28027 3.30762 3.11816 4.3623 5.51953
|
187 |
c1.05469 2.40625 1.58691 5.07324 1.58691 7.99707zM217.303 2.81641c0 -2.13574 -0.291992 -4.08594 -0.865234 -5.86328c-0.583008 -1.77148 -1.39258 -3.1582 -2.43652 -4.1416c-1.04492 -0.988281 -2.21777 -1.47949 -3.52246 -1.47949
|
188 |
c-1.4082 0 -2.47363 0.429688 -3.19043 1.29004c-0.716797 0.849609 -1.0752 2.08887 -1.0752 3.69141c0 2.0127 0.291992 3.90625 0.880859 5.68848c0.583984 1.7666 1.41309 3.17969 2.47852 4.21387c1.06445 1.03906 2.27246 1.55664 3.61914 1.55664
|
189 |
c1.32129 0 2.33496 -0.430664 3.04688 -1.31055c0.711914 -0.880859 1.06445 -2.08984 1.06445 -3.64551zM236.651 -12.8926c2.09961 0 4.02441 0.716797 5.77539 2.14551s3.13379 3.44043 4.14746 6.01074c1.01367 2.57617 1.52051 5.34082 1.52051 8.2998
|
190 |
c0 2.65723 -0.583984 4.72559 -1.76172 6.2207c-1.17676 1.49512 -2.7998 2.24316 -4.87402 2.24316c-2.70801 0 -5.20215 -1.51074 -7.48047 -4.52637h-0.194336l0.456055 4.0957h-4.00391l-7.35254 -34.7598h5.06934l2.08887 10.0713
|
191 |
c0.260742 1.28027 0.439453 2.62109 0.541992 4.0293h0.21582c1.27441 -2.55957 3.22559 -3.83008 5.85156 -3.83008zM239.544 7.85938c2.24805 0 3.36914 -1.45898 3.37402 -4.37305c0 -2.07812 -0.311523 -4.07031 -0.936523 -5.97949
|
192 |
+
c-0.625 -1.89941 -1.47461 -3.4209 -2.54492 -4.56738c-1.06934 -1.14648 -2.22168 -1.70996 -3.45605 -1.70996c-1.2334 0 -2.18555 0.388672 -2.86133 1.16699c-0.675781 0.783203 -1.01465 1.86914 -1.01465 3.26172c0 2.02246 0.369141 3.98828 1.10156 5.8877
|
193 |
c0.726562 1.90527 1.67383 3.43066 2.83594 4.58301c1.15723 1.15723 2.33008 1.73047 3.50195 1.73047zM267.279 12.042c-2.9541 0 -5.50879 -1.64355 -7.66504 -4.89453h-0.194336l0.456055 4.45996h-4.00391l-5.12988 -24.0596h5.12988l2.13477 10.1992
|
194 |
c0.645508 3.06152 1.64844 5.52441 3.00586 7.35742c1.35156 1.84375 2.82617 2.76465 4.42871 2.76465c1.68945 0 2.53906 -0.977539 2.53906 -2.93359c0 -0.655273 -0.117188 -1.57715 -0.368164 -2.76465l-3.10254 -14.6123h5.10938l2.20117 10.46
|
195 |
+
c0.620117 2.96973 1.60352 5.3457 2.96484 7.14746c1.34668 1.79688 2.81641 2.69824 4.37793 2.69824c1.76074 0 2.63672 -0.942383 2.63672 -2.81055c0 -0.542969 -0.132812 -1.50586 -0.410156 -2.8877l-3.10254 -14.6123h5.11035l3.04102 14.1973
|
196 |
+
c0.327148 1.7002 0.481445 3.01074 0.481445 3.94238c0 2.0127 -0.501953 3.56836 -1.51074 4.67969c-1.00391 1.11621 -2.46777 1.66895 -4.40332 1.66895c-1.48926 0 -2.92871 -0.429688 -4.31641 -1.2998c-1.39258 -0.860352 -2.62109 -2.12988 -3.71191 -3.80957
|
197 |
+
h-0.173828c-0.496094 3.39941 -2.33496 5.10938 -5.52441 5.10938zM299.986 -12.8926c1.43359 0 2.73926 0.138672 3.88574 0.378906c1.17285 0.271484 2.45215 0.727539 3.83984 1.3623v4.07031c-1.4082 -0.665039 -2.62695 -1.13672 -3.65039 -1.4082
|
198 |
+
c-1.0293 -0.28125 -2.06836 -0.419922 -3.1084 -0.419922c-1.63281 0 -2.85156 0.460938 -3.6709 1.37207c-0.819336 0.912109 -1.22363 2.18164 -1.22363 3.78906v0.629883l0.0458984 0.670898h0.942383c4.45996 0 7.90039 0.75293 10.3223 2.2373
|
199 |
+
c2.41602 1.48438 3.62012 3.54297 3.62012 6.19043c0 1.9248 -0.650391 3.41504 -1.95117 4.46973c-1.28516 1.0498 -3.10742 1.57715 -5.44238 1.57715c-2.37598 0 -4.52637 -0.670898 -6.44629 -2.02246c-1.9248 -1.35254 -3.45117 -3.26172 -4.57227 -5.73438
|
200 |
+
c-1.13184 -2.46289 -1.68945 -5.13574 -1.68945 -8.01367c0 -2.87695 0.808594 -5.12988 2.41113 -6.73242c1.60254 -1.61816 3.83008 -2.41699 6.6875 -2.41699zM303.288 8.12012c0.916992 0 1.6084 -0.205078 2.05371 -0.609375
|
201 |
+
c0.459961 -0.414062 0.701172 -0.982422 0.701172 -1.73047c0 -1.42871 -0.768555 -2.5293 -2.30371 -3.29688c-1.54688 -0.783203 -3.67676 -1.16797 -6.39551 -1.16797h-0.629883c0.542969 2.04883 1.41309 3.69727 2.64258 4.93652
|
202 |
+
c1.2334 1.24414 2.54395 1.86816 3.93164 1.86816zM327.056 -12.4619h0.00488281v0.015625h5.13574l2.97949 14.208c0.342773 1.62305 0.501953 2.93848 0.501953 3.93164c0 2.0332 -0.533203 3.59961 -1.59766 4.7002c-1.07031 1.10645 -2.57031 1.64844 -4.51562 1.64844
|
203 |
c-1.49512 0 -2.88281 -0.393555 -4.16309 -1.16699c-1.26953 -0.773438 -2.52441 -2.0127 -3.72168 -3.73242h-0.195312l0.456055 4.45898h-3.99902l-5.12988 -24.0479h5.12988l2.12988 10.1982c0.410156 1.97168 1.01367 3.73242 1.82812 5.28906
|
204 |
+
c0.808594 1.55664 1.71484 2.75488 2.73926 3.5791s2.05273 1.23926 3.09277 1.23926c1.86816 0 2.81055 -0.952148 2.81055 -2.85156c0 -0.604492 -0.12793 -1.55176 -0.399414 -2.85742zM347.51 -8.76074c-0.737305 0 -1.29004 0.18457 -1.65332 0.547852
|
205 |
+
c-0.358398 0.369141 -0.538086 0.871094 -0.538086 1.49023c0 0.547852 0.0976562 1.21387 0.28125 2.0127l2.66309 12.4414h6.02051l0.850586 3.87012h-6.07227l1.13086 5.35059h-3.16895l-2.81055 -5.03809l-4.13184 -1.79199l-0.460938 -2.39062h3.52246
|
206 |
+
l-2.63184 -12.4014c-0.235352 -1.06934 -0.348633 -2.02148 -0.348633 -2.85156c0 -3.5791 1.99219 -5.37109 5.95996 -5.37109c0.870117 0 1.74121 0.0976562 2.61133 0.287109c0.875977 0.18457 1.55664 0.404297 2.06836 0.650391v3.87012
|
207 |
+
c-1.21289 -0.450195 -2.31445 -0.675781 -3.29199 -0.675781zM116.858 188.001l11.6797 56.1611h15.6816l3.50293 15.9287h-50.6885l-3.4043 -15.9287h15.6309l-11.6836 -56.1611h19.2812zM164.168 187.019c6.3125 0 11.8369 1.54102 16.5684 4.62793
|
208 |
c4.73047 3.08789 8.40137 7.42383 11.0176 12.9951c2.61621 5.5752 3.92188 11.8115 3.92188 18.7129c0 6.90234 -1.86328 12.2119 -5.5957 15.9287c-3.73242 3.71191 -9.03223 5.57031 -15.9023 5.57031c-6.31348 0 -11.833 -1.54102 -16.5684 -4.63379
|
209 |
c-4.73145 -3.0918 -8.40723 -7.42383 -11.0186 -12.9941c-2.61621 -5.5752 -3.92188 -11.8115 -3.92188 -18.7139c0 -6.90137 1.86328 -12.2109 5.5957 -15.9277c3.73242 -3.71777 9.03223 -5.56543 15.9033 -5.56543zM171.96 230.508
|
210 |
c1.31641 0 2.35059 -0.547852 3.1084 -1.6543c0.757812 -1.10059 1.13672 -2.73926 1.13672 -4.9043c0 -5.9502 -0.988281 -11.208 -2.95996 -15.7803c-1.9707 -4.57227 -4.28516 -6.85547 -6.95312 -6.85547c-2.75879 0 -4.1416 2.18652 -4.1416 6.55859
|
213 |
c0 -6.90137 1.86328 -12.2109 5.5957 -15.9277c3.73242 -3.71777 9.03223 -5.56543 15.9033 -5.56543zM230.123 230.508c1.31152 0 2.35059 -0.547852 3.1084 -1.6543c0.757812 -1.10059 1.13672 -2.73926 1.13672 -4.9043c0 -5.9502 -0.988281 -11.208 -2.95996 -15.7803
|
214 |
c-1.9707 -4.57227 -4.28516 -6.85547 -6.95215 -6.85547c-2.75977 0 -4.14258 2.18652 -4.14258 6.55859c0 5.91895 0.958008 11.167 2.88281 15.7539c1.91992 4.58789 4.22852 6.88184 6.92676 6.88184zM275.072 188.001l16.2197 76.7236h-19.0869l-16.2207 -76.7236
|
215 |
h19.0879zM328.494 207.381c0 6.83496 -3.69141 12.0986 -11.0947 15.7744c-2.33496 1.15234 -4.01953 2.08887 -5.05371 2.81055c-1.03418 0.722656 -1.55176 1.56152 -1.55176 2.51465c0 2.2373 1.23926 3.35352 3.73828 3.35352
|
216 |
+
c1.67383 0 3.68066 -0.419922 5.99023 -1.25977c2.31934 -0.839844 4.55664 -1.96582 6.72754 -3.37891l5.96973 12.4258c-2.8623 1.77637 -5.80566 3.09277 -8.83203 3.94727c-3.03125 0.855469 -6.37891 1.28027 -10.0605 1.28027
|
217 |
c-7.33203 0 -12.9844 -1.53125 -16.9629 -4.58789c-3.96777 -3.05664 -5.96484 -7.41309 -5.96484 -13.0654c0 -3.54883 0.793945 -6.55371 2.3916 -9.02148c1.5918 -2.46777 4.13184 -4.6543 7.61816 -6.55957c3.41504 -1.94043 5.55566 -3.32715 6.41016 -4.16699
|
218 |
c0.855469 -0.839844 1.28027 -1.83301 1.28027 -2.98535c0 -1.08496 -0.552734 -1.92969 -1.6748 -2.53906c-1.11035 -0.609375 -2.78516 -0.912109 -5.02734 -0.912109c-2.66211 0 -5.28906 0.328125 -7.88965 0.988281
|
219 |
+
c-2.59082 0.655273 -5.40234 1.80762 -8.42773 3.45117v-15.334c4.4082 -2.06934 10.2549 -3.09766 17.5566 -3.09766c8.02832 0 14.1719 1.75586 18.4473 5.27344c4.26953 3.51758 6.41016 8.5498 6.41016 15.0889zM358.349 187.019
|
220 |
+
c4.17285 0 7.84961 0.373047 11.0391 1.10059c3.18945 0.742188 6.62012 2.04785 10.3115 3.92188v13.5117c-3.18945 -1.67969 -6.04199 -2.90332 -8.53027 -3.67578c-2.49805 -0.773438 -5.04785 -1.15723 -7.64355 -1.15723c-5.3916 0 -8.08496 2.43164 -8.08496 7.2959
|
221 |
v0.788086h2.9082c9.72852 0 17.1572 1.77148 22.3076 5.30469c5.14062 3.53223 7.71094 8.60645 7.71094 15.2109c0 4.70605 -1.79199 8.46875 -5.37109 11.2949c-3.57812 2.82617 -8.49902 4.23926 -14.7451 4.23926c-6.27246 0 -11.8018 -1.43359 -16.5938 -4.31055
|
222 |
c-4.78223 -2.87793 -8.54004 -7.10156 -11.29 -12.6719c-2.73926 -5.57617 -4.12109 -11.833 -4.12109 -18.7656c0 -6.9375 1.94043 -12.3486 5.82129 -16.2451s9.31348 -5.8418 16.2812 -5.8418zM366.142 231.936c1.44336 0 2.49316 -0.363281 3.15332 -1.08496
|
223 |
c0.65625 -0.72168 0.983398 -1.60742 0.983398 -2.66211c0 -2.2373 -1.0293 -4.03516 -3.06152 -5.40234c-2.0332 -1.36133 -4.84863 -2.04199 -8.42773 -2.04199h-1.42871c0.364258 2.89258 1.41309 5.4834 3.1543 7.7666c1.74609 2.2832 3.62012 3.4248 5.62695 3.4248z
|
224 |
+
M415.432 202.353c-2.08398 0 -3.11328 1.03418 -3.09277 3.11328c0 0.916016 0.255859 2.64648 0.789062 5.17578l4.14648 18.8828h14.2441l3.1084 14.3516h-14.1982l2.41699 11.1924h-12.7129l-6.75391 -11.832l-10.7568 -4.3418l-2.02734 -9.37012h7.59277
|
225 |
l-4.14746 -19.8242c-0.783203 -3.68164 -1.18262 -6.77441 -1.18262 -9.27246c0 -4.7666 1.25977 -8.19727 3.76855 -10.2812c2.51367 -2.08887 6.20508 -3.12793 11.0693 -3.12793c6.70703 0 12.2881 1.10059 16.7578 3.30176v14.3516
|
226 |
c-3.83984 -1.55078 -6.85059 -2.31934 -9.02148 -2.31934z" />
|
227 |
<glyph glyph-name="uniF11F" unicode=""
|
228 |
d="M290.016 164.817c-4.47461 68.7988 84.2891 87.7139 78.4258 156.87c-4.24707 50.1035 -80.2324 73.7275 -147.636 59.9795c-60.6689 -12.3672 -118.986 -67.501 -129.18 -133.805c-15.5576 -101.271 65.5107 -229.759 203.001 -198.386
|
229 |
c20.3506 4.65527 35.7539 23.7031 69.207 18.4502c52.8691 -8.29688 57.0664 -86.6475 13.835 -101.506c-18.0938 -6.21582 -50.876 -1.19043 -65.1006 14.79c-1.88574 1.00586 -3.59082 2.45898 -5.08398 4.2334c-5.67871 4.69043 -9.19727 13.6113 -8.53027 23.6025
|
230 |
+
c0.962891 14.2598 10.0381 25.2607 20.2705 24.5752c4.15039 -0.273438 7.83887 -2.45508 10.709 -5.86914c3.64551 -3.00781 6.39258 -7.75293 7.72363 -13.4102c6.13281 -13.9424 4.26855 -35.9004 16.9492 -43.3105c67.0361 3.93066 41.5225 113.459 -18.457 87.6562
|
231 |
+
c-138.73 -59.6406 -268.003 29.2598 -281.441 143.039c-15.0859 127.578 89.6006 208.035 161.485 216.851c132.461 16.2393 243.918 -94.3057 216.851 -239.923c-6.51562 -34.9307 -27.2803 -78.3857 -73.8223 -78.4297
|
232 |
c-34.4258 -0.0498047 -66.7617 27.042 -69.2061 64.5918z" />
|
233 |
<glyph glyph-name="uniF129" unicode=""
|
234 |
d="M113.241 205.178v74.6494h283.559v-74.6494h-283.559zM201.299 12.877v174.188h195.501v-174.188h-195.501zM113.241 12.877v174.188h70.3359v-174.188h-70.3359zM311.29 57.4404c-5.86914 0 -11.2705 1.02344 -16.2051 3.11035
|
235 |
c-4.9541 2.06055 -9.22266 5.0752 -12.8262 9.02344c-3.58984 3.94922 -6.41895 8.79395 -8.4541 14.5342c-2.04785 5.72852 -3.05957 12.2949 -3.05957 19.6865c0 6.69434 0.921875 12.7686 2.77832 18.2148c1.84277 5.45898 4.47363 10.1377 7.87793 14.0098
|
236 |
+
c3.42383 3.88477 7.5332 6.88574 12.3779 9.03613c4.85156 2.13184 10.3105 3.20703 16.3516 3.20703c3.26465 0 6.18945 -0.160156 8.79395 -0.480469c2.61719 -0.326172 5.10742 -0.832031 7.46191 -1.5293c2.3623 -0.710938 4.67285 -1.61328 6.93848 -2.73926
|
237 |
+
c2.25879 -1.10059 4.66504 -2.43848 7.20605 -3.95508c2.06055 -1.27344 4.02539 -1.90723 5.92676 -1.90723c1.48438 0 2.82812 0.383789 4.07031 1.14551c1.24121 0.761719 2.31055 1.81152 3.20605 3.16113l9.36914 14.2344
|
238 |
+
c-2.80273 2.69434 -5.9834 5.1709 -9.56152 7.46875c-3.57031 2.29688 -7.50684 4.26172 -11.8008 5.91992c-4.30078 1.66406 -9.00488 2.97559 -14.1064 3.92285c-5.09375 0.954102 -10.5469 1.43359 -16.3447 1.43359c-11.2197 0 -21.376 -1.74707 -30.4512 -5.24805
|
239 |
+
c-9.08887 -3.50098 -16.8262 -8.41602 -23.2393 -14.7197c-6.40625 -6.31055 -11.3271 -13.8174 -14.7705 -22.5283c-3.44336 -8.69727 -5.16504 -18.2461 -5.16504 -28.6338c0 -10.1943 1.79785 -19.6475 5.40137 -28.3457
|
240 |
+
c3.59668 -8.69043 8.56934 -16.2363 14.9121 -22.5654c6.34863 -6.34961 13.8564 -11.3096 22.5215 -14.9189c8.67188 -3.60352 18.0996 -5.40137 28.3008 -5.40137c5.6582 0 10.9766 0.28125 15.917 0.864258c4.94043 0.569336 9.58691 1.47168 13.9648 2.6748
|
241 |
c4.3584 1.21582 8.46094 2.75195 12.3203 4.63965c3.8584 1.88867 7.57715 4.12793 11.1484 6.73926v58.8037h-49.5293v-17.7793c0 -1.6582 0.588867 -3.02051 1.72754 -4.10254c1.13965 -1.08203 2.74609 -1.63184 4.77441 -1.63184h13.7734v-21.1455
|
242 |
c-3.05957 -1.28027 -6.30469 -2.29102 -9.75391 -3.04688c-3.44336 -0.774414 -7.39844 -1.15137 -11.8525 -1.15137z" />
|
243 |
<glyph glyph-name="uniF11E" unicode=""
|
245 |
c0 -28.7227 -23.2959 -52.0381 -52.0576 -52.0381c-28.7295 0 -52.0322 23.3154 -52.0322 52.0381c0 28.749 23.3027 52.0576 52.0322 52.0576zM257.594 117.453c18.957 0 34.3164 15.3594 34.3164 34.2969c0 18.957 -15.3594 34.3105 -34.3164 34.3105
|
246 |
c-18.9316 0 -34.2979 -15.3535 -34.2979 -34.3105c0 -18.9375 15.3662 -34.2969 34.2979 -34.2969z" />
|
247 |
<glyph glyph-name="uniF115" unicode=""
|
248 |
+
d="M371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v76.8008h76.7998v-76.8008zM342.624 49.6641l0.0126953 1.03027l-0.441406 50.0029l-0.0703125 -1.29199c-0.0830078 -0.793945 -0.210938 -1.58789 -0.397461 -2.36816
|
249 |
+
l-0.0761719 -0.230469c-0.185547 -0.678711 -0.422852 -1.36328 -0.710938 -2.0293l-0.236328 -0.5625c-0.313477 -0.672852 -0.65918 -1.33789 -1.0625 -2.00391l-0.102539 -0.15332c-0.435547 -0.697266 -0.972656 -1.38867 -1.49707 -2.07324l-0.442383 -0.525391
|
250 |
c-0.524414 -0.594727 -1.06836 -1.19629 -1.66406 -1.79785l-0.306641 -0.300781c-0.723633 -0.704102 -1.5293 -1.40234 -2.3877 -2.08691l-0.537109 -0.40332c-0.954102 -0.729492 -1.93945 -1.47168 -3.02734 -2.16309l-0.185547 -0.133789
|
251 |
+
c-1.33789 -0.864258 -2.77734 -1.70898 -4.30078 -2.51562c-0.889648 -0.480469 -1.84961 -0.954102 -2.80371 -1.41406l-0.978516 -0.448242c-0.671875 -0.307617 -1.33789 -0.601562 -2.03516 -0.896484l-0.876953 -0.371094
|
252 |
+
c-1.62598 -0.671875 -3.32812 -1.31152 -5.0752 -1.92578l-0.710938 -0.237305c-1.79199 -0.601562 -3.63477 -1.18359 -5.54883 -1.73438l-0.703125 -0.185547c-2.18262 -0.614258 -4.46777 -1.19043 -6.8291 -1.69629l-0.838867 -0.185547
|
253 |
c-2.38672 -0.511719 -4.83203 -0.998047 -7.36621 -1.41406l-0.774414 -0.134766c-2.04785 -0.332031 -4.12109 -0.626953 -6.2207 -0.889648l-1.08789 -0.133789c-2.125 -0.255859 -4.28809 -0.480469 -6.47656 -0.65918l-1.02441 -0.0966797
|
254 |
c-2.56641 -0.178711 -5.16504 -0.332031 -7.80176 -0.447266l-1.20898 -0.0449219c-2.1377 -0.0703125 -4.33984 -0.12207 -6.52832 -0.12207c-1.26758 0 -2.54102 0 -3.81445 0.0126953c-1.31836 0.0263672 -2.61719 0.0644531 -3.91016 0.109375
|
255 |
+
c-1.8623 0.0634766 -3.71875 0.140625 -5.54883 0.262695l-1.46582 0.0957031c-1.4209 0.115234 -2.82227 0.205078 -4.21777 0.338867l-1.43359 0.115234c-1.74023 0.15332 -3.44922 0.333008 -5.13867 0.538086l-1.03711 0.140625
|
256 |
c-1.44043 0.178711 -2.84766 0.383789 -4.25586 0.588867l-1.37598 0.198242c-1.72168 0.275391 -3.41797 0.563477 -5.08789 0.876953l-0.40332 0.0830078c-1.65137 0.313477 -3.27734 0.652344 -4.87695 1.01074l-1.1709 0.256836
|
257 |
+
c-1.79199 0.40918 -3.55273 0.857422 -5.28027 1.31152l-0.857422 0.237305c-2.02246 0.543945 -3.9873 1.12598 -5.8877 1.74707l-1.2041 0.40332c-0.780273 0.261719 -1.56152 0.537109 -2.31641 0.8125l-1.35645 0.499023
|
258 |
c-0.743164 0.275391 -1.47852 0.563477 -2.20215 0.851562l-1.26074 0.511719l-1.47168 0.633789l-1.4082 0.633789l-1.4209 0.665039l-1.33789 0.65918l-1.33105 0.691406l-1.26074 0.666016l-1.26074 0.729492l-1.17773 0.665039l-1.18359 0.761719l-1.08203 0.704102
|
259 |
+
l-1.08789 0.774414l-1.01074 0.729492l-1.00488 0.799805l-0.93457 0.749023l-0.915039 0.825195l-0.844727 0.761719l-0.813477 0.826172l-0.760742 0.787109l-0.691406 0.864258l-0.671875 0.8125l-0.601562 0.851562l-0.576172 0.837891l-0.511719 0.864258
|
260 |
+
l-0.5 0.850586l-0.383789 0.896484l-0.37793 0.870117l-0.293945 0.915039l-0.268555 0.864258l-0.198242 1.02441l-0.147461 0.761719c-0.0830078 0.614258 -0.12207 1.20898 -0.12207 1.82324l0.435547 -50.0098c0 -0.614258 0.0449219 -1.20898 0.121094 -1.81738
|
261 |
l0.102539 -0.543945l0.25 -1.24805l0.210938 -0.665039l0.352539 -1.11426l0.300781 -0.697266l0.473633 -1.0498l0.40332 -0.722656l0.569336 -0.999023l0.518555 -0.729492l0.65918 -0.94043l0.607422 -0.736328l0.78125 -0.953125l0.697266 -0.729492l0.864258 -0.889648
|
262 |
+
l0.806641 -0.723633l0.947266 -0.857422l0.895508 -0.729492l1.03711 -0.813477l0.998047 -0.722656l1.10742 -0.787109l1.10742 -0.716797l1.16406 -0.729492l1.20312 -0.698242l1.22949 -0.709961l1.29297 -0.68457l1.30566 -0.671875l1.40137 -0.672852
|
263 |
+
l1.32422 -0.632812l1.51074 -0.666016l1.38281 -0.588867l0.459961 -0.198242l0.845703 -0.326172c0.722656 -0.294922 1.43359 -0.583008 2.17578 -0.851562l1.36328 -0.505859c0.780273 -0.274414 1.54883 -0.537109 2.3418 -0.8125l0.896484 -0.307617l0.28125 -0.101562
|
264 |
+
c1.89453 -0.601562 3.85254 -1.17773 5.86914 -1.73438l0.505859 -0.154297l0.402344 -0.0957031c1.70312 -0.454102 3.45605 -0.889648 5.23535 -1.30566l0.499023 -0.134766l0.716797 -0.140625c1.60645 -0.333008 3.21289 -0.68457 4.87109 -0.998047
|
265 |
+
l0.300781 -0.0644531l0.0761719 -0.0126953c1.66406 -0.319336 3.35352 -0.607422 5.05664 -0.870117l0.652344 -0.12207l0.793945 -0.101562c1.37598 -0.211914 2.76465 -0.416016 4.17871 -0.588867l0.826172 -0.12793l0.268555 -0.0136719
|
266 |
+
c1.67676 -0.210938 3.37891 -0.396484 5.10059 -0.5625l0.53125 -0.0576172l0.959961 -0.0771484c1.37012 -0.134766 2.75195 -0.223633 4.14746 -0.333008l1.00488 -0.0761719l0.499023 -0.0263672c1.82422 -0.114258 3.67383 -0.198242 5.53613 -0.261719
|
267 |
l0.396484 -0.0126953c1.17188 -0.0449219 2.34277 -0.0644531 3.51367 -0.0839844c1.16504 -0.03125 2.29785 -0.03125 3.44336 -0.03125h0.383789c2.20215 0.0126953 4.37109 0.0576172 6.53418 0.133789l0.672852 0.0126953l0.517578 0.0263672
|
268 |
+
c2.65625 0.0957031 5.26074 0.249023 7.80859 0.454102l0.543945 0.0449219l0.486328 0.0380859c2.20117 0.198242 4.35156 0.416016 6.46387 0.65918l1.08789 0.134766c2.10547 0.261719 4.19238 0.563477 6.2207 0.889648l0.40332 0.0703125l0.473633 0.0957031
|
269 |
c2.48926 0.416016 4.92188 0.876953 7.27734 1.38867l0.844727 0.179688c2.34863 0.511719 4.60742 1.08105 6.80273 1.70898l0.441406 0.101562l0.300781 0.102539c1.88867 0.538086 3.73828 1.11426 5.49121 1.72168l0.761719 0.243164
|
270 |
c1.7666 0.621094 3.46875 1.28027 5.09473 1.95215l0.390625 0.134766l0.416016 0.191406c0.716797 0.300781 1.42676 0.614258 2.11816 0.941406l0.953125 0.43457c0.871094 0.40332 1.73438 0.838867 2.56055 1.26758l0.261719 0.134766l0.0517578 0.0253906
|
271 |
+
c1.48438 0.787109 2.86719 1.625 4.16016 2.45117l0.217773 0.12793l0.0703125 0.0634766c1.05566 0.678711 2.02832 1.40234 2.95605 2.125l0.358398 0.25l0.25 0.210938c0.838867 0.666016 1.62598 1.35059 2.34863 2.04199l0.102539 0.0830078l0.223633 0.275391
|
272 |
+
c0.588867 0.556641 1.13965 1.14551 1.63867 1.75293l0.275391 0.307617l0.160156 0.217773c0.563477 0.677734 1.0752 1.37598 1.50391 2.08008l0.0253906 0.03125l0.0703125 0.102539c0.410156 0.65332 0.755859 1.34473 1.0752 2.0166l0.134766 0.275391
|
273 |
+
l0.115234 0.293945c0.275391 0.652344 0.537109 1.35059 0.691406 2.02832l0.0761719 0.179688v0.0576172c0.210938 0.774414 0.333008 1.57422 0.397461 2.36133zM342.624 121.312l0.0253906 1.05664l-0.441406 50.0029l-0.0703125 -1.29883
|
274 |
c-0.0771484 -0.787109 -0.210938 -1.57422 -0.396484 -2.3623l-0.0771484 -0.236328c-0.185547 -0.671875 -0.422852 -1.35059 -0.710938 -2.02246l-0.236328 -0.563477c-0.313477 -0.677734 -0.652344 -1.33691 -1.05566 -2.00293l-0.109375 -0.160156
|
275 |
+
c-0.43457 -0.68457 -0.972656 -1.40137 -1.49707 -2.07324l-0.441406 -0.518555c-0.525391 -0.601562 -1.06934 -1.20312 -1.66406 -1.79199l-0.307617 -0.313477c-0.723633 -0.697266 -1.5293 -1.4082 -2.38086 -2.07422l-0.543945 -0.40918
|
276 |
c-0.953125 -0.742188 -1.93945 -1.47852 -3.02734 -2.16992l-0.185547 -0.133789c-1.33789 -0.864258 -2.77734 -1.70898 -4.30078 -2.50879c-0.889648 -0.486328 -1.84961 -0.972656 -2.80273 -1.4209l-0.979492 -0.448242
|
277 |
c-0.671875 -0.293945 -1.33789 -0.614258 -2.03516 -0.915039l-0.876953 -0.352539c-1.62598 -0.677734 -3.32812 -1.31152 -5.0752 -1.91992l-0.709961 -0.243164c-1.79199 -0.614258 -3.63574 -1.19043 -5.54883 -1.72754l-0.698242 -0.192383
|
278 |
+
c-2.18848 -0.607422 -4.47363 -1.18359 -6.83496 -1.70898l-0.838867 -0.178711c-2.38672 -0.518555 -4.83105 -0.992188 -7.36621 -1.4209l-0.774414 -0.134766c-2.04785 -0.326172 -4.12109 -0.620117 -6.2207 -0.882812l-1.08789 -0.134766
|
279 |
+
c-2.125 -0.249023 -4.28809 -0.479492 -6.47656 -0.652344l-1.02441 -0.0898438c-2.56641 -0.198242 -5.16406 -0.345703 -7.80176 -0.448242l-1.20898 -0.0634766c-2.1377 -0.0644531 -4.33984 -0.12207 -6.52832 -0.12207c-1.2666 0 -2.54102 0 -3.81445 0.0263672
|
280 |
c-1.31836 0.0126953 -2.61719 0.0576172 -3.91016 0.0957031c-1.8623 0.0634766 -3.71875 0.15332 -5.54883 0.275391l-1.47852 0.0185547c-1.4209 0.102539 -2.82227 0.211914 -4.21777 0.339844l-1.43359 0.12793c-1.74023 0.160156 -3.44922 0.358398 -5.13867 0.549805
|
281 |
+
l-1.03711 0.134766c-1.44043 0.198242 -2.84766 0.396484 -4.25586 0.608398l-1.37598 0.204102c-1.72168 0.275391 -3.41797 0.550781 -5.08789 0.871094l-0.40332 0.0761719c-1.65137 0.327148 -3.27734 0.65332 -4.87695 1.02441l-1.1709 0.249023
|
282 |
+
c-1.79199 0.416016 -3.55273 0.851562 -5.28027 1.3125l-0.857422 0.230469c-2.02246 0.549805 -3.9873 1.13867 -5.8877 1.75391l-1.2041 0.40918c-0.780273 0.262695 -1.56152 0.524414 -2.31641 0.8125l-1.35645 0.480469
|
283 |
+
c-0.743164 0.288086 -1.47852 0.582031 -2.20215 0.870117l-1.26074 0.511719l-1.47168 0.62793l-1.4082 0.626953l-1.4209 0.671875l-1.33789 0.652344l-1.33105 0.698242l-1.26074 0.665039l-1.26074 0.730469l-1.17773 0.677734l-1.18359 0.742188l-1.08203 0.710938
|
284 |
l-1.08789 0.780273l-1.01074 0.710938l-1.00488 0.8125l-0.93457 0.736328l-0.915039 0.825195l-0.844727 0.761719l-0.813477 0.838867l-0.760742 0.787109l-0.691406 0.850586l-0.671875 0.813477l-0.601562 0.850586l-0.576172 0.844727l-0.511719 0.876953
|
285 |
l-0.5 0.857422l-0.383789 0.889648l-0.37793 0.864258l-0.293945 0.915039l-0.268555 0.864258l-0.198242 1.01074l-0.147461 0.774414c-0.0830078 0.601562 -0.12207 1.20996 -0.12207 1.81836l0.435547 -50.0039c0 -0.614258 0.0449219 -1.20312 0.121094 -1.81738
|
286 |
l0.102539 -0.556641l0.25 -1.23535l0.210938 -0.665039l0.352539 -1.11426l0.300781 -0.709961l0.473633 -1.04297l0.40332 -0.723633l0.569336 -0.992188l0.518555 -0.735352l0.65918 -0.947266l0.607422 -0.736328l0.787109 -0.927734l0.698242 -0.723633
|
290 |
l0.300781 -0.0644531l0.0761719 -0.0126953c1.66406 -0.319336 3.35352 -0.607422 5.05664 -0.870117l0.652344 -0.121094l0.793945 -0.109375c1.37598 -0.210938 2.76465 -0.40332 4.17871 -0.588867l0.826172 -0.121094l0.268555 -0.0263672
|
291 |
c1.67676 -0.204102 3.37891 -0.396484 5.10059 -0.549805l0.53125 -0.0703125l0.959961 -0.0644531c1.37012 -0.12793 2.75195 -0.236328 4.14746 -0.326172l1.00488 -0.0771484l0.499023 -0.03125c1.82422 -0.109375 3.67383 -0.192383 5.53613 -0.256836
|
292 |
l0.396484 -0.0253906c1.17188 -0.0380859 2.34277 -0.0634766 3.51367 -0.0898438c1.16504 -0.0126953 2.29785 -0.0126953 3.44336 -0.0126953h0.383789c2.20215 0 4.37109 0.0644531 6.53418 0.12793l0.672852 0.0136719l0.517578 0.0380859
|
293 |
+
c2.65625 0.0957031 5.26074 0.249023 7.80859 0.454102l0.543945 0.0322266l0.486328 0.0507812c2.20117 0.192383 4.35156 0.40332 6.46387 0.65332l1.08789 0.133789c2.10547 0.269531 4.19238 0.557617 6.2207 0.90332l0.40332 0.0507812l0.473633 0.0898438
|
294 |
c2.48926 0.428711 4.92188 0.889648 7.27734 1.40137l0.844727 0.178711c2.34863 0.518555 4.60742 1.08203 6.80273 1.69629l0.448242 0.0957031l0.300781 0.12207c1.8877 0.524414 3.7373 1.10059 5.49121 1.70898l0.761719 0.249023
|
295 |
+
c1.7666 0.62793 3.46875 1.26758 5.09375 1.95215l0.390625 0.134766l0.40332 0.191406c0.716797 0.288086 1.43359 0.595703 2.11816 0.93457l0.959961 0.422852c0.864258 0.40918 1.72852 0.837891 2.56055 1.28027l0.261719 0.133789l0.0517578 0.0253906
|
296 |
+
c1.47852 0.787109 2.86035 1.61328 4.15332 2.45117l0.217773 0.12207l0.0771484 0.0703125c1.05566 0.671875 2.02832 1.38867 2.95605 2.1123l0.358398 0.243164l0.25 0.223633c0.838867 0.666016 1.62598 1.34375 2.34863 2.04199l0.102539 0.0888672l0.223633 0.256836
|
297 |
+
c0.588867 0.5625 1.13965 1.16406 1.63867 1.76562l0.275391 0.300781l0.160156 0.224609c0.563477 0.677734 1.0752 1.37598 1.50391 2.08594l0.0253906 0.0126953l0.0703125 0.12207c0.410156 0.652344 0.755859 1.33789 1.0752 2.01562l0.134766 0.262695
|
298 |
l0.115234 0.300781c0.275391 0.65918 0.537109 1.33789 0.691406 2.02246l0.0761719 0.192383v0.0439453c0.210938 0.78125 0.333008 1.5752 0.397461 2.3623zM342.624 192.947l0.0253906 0.998047l-0.43457 50.0166l-0.0771484 -1.2998
|
299 |
c-0.0576172 -0.607422 -0.172852 -1.21582 -0.300781 -1.81738c-3.66113 18.0225 -40.5762 32.7168 -85.5742 33.4082c-44.96 0.691406 -81.7344 -12.8262 -85.3701 -30.7012l-0.0898438 0.448242l-0.146484 0.774414
|
300 |
c-0.0830078 0.608398 -0.12207 1.21582 -0.12207 1.82422l0.0517578 -5.60059c-0.00683594 -0.133789 -0.0517578 -0.268555 -0.0517578 -0.40332c0 -0.15332 0.0517578 -0.293945 0.0576172 -0.441406l0.37793 -43.5645c0 -0.614258 0.0449219 -1.22266 0.121094 -1.81738
|
301 |
+
l0.102539 -0.550781l0.25 -1.24805l0.210938 -0.652344l0.352539 -1.12012l0.300781 -0.698242l0.473633 -1.04297l0.402344 -0.729492l0.570312 -0.998047l0.518555 -0.736328l0.65918 -0.93457l0.607422 -0.742188l0.787109 -0.93457l0.698242 -0.722656
|
302 |
+
l0.863281 -0.889648l0.806641 -0.736328l0.947266 -0.851562l0.896484 -0.722656l1.03613 -0.826172l0.999023 -0.716797l1.10645 -0.774414l1.10742 -0.716797l1.16504 -0.735352l1.20312 -0.704102l1.22852 -0.704102l1.29297 -0.68457l1.30566 -0.666016
|
303 |
l1.40137 -0.677734l1.3252 -0.62793l1.50977 -0.671875l1.38281 -0.588867l0.460938 -0.191406l0.844727 -0.345703c0.723633 -0.275391 1.43359 -0.563477 2.17578 -0.838867l1.36328 -0.499023c0.78125 -0.275391 1.54883 -0.550781 2.34277 -0.8125l0.895508 -0.313477
|
304 |
+
l0.282227 -0.0839844c1.89355 -0.614258 3.85254 -1.19043 5.86816 -1.74023l0.505859 -0.154297l0.40332 -0.0957031c1.70215 -0.473633 3.45605 -0.908203 5.23535 -1.31152l0.499023 -0.12207l0.716797 -0.140625c1.60645 -0.345703 3.21289 -0.68457 4.87012 -1.00488
|
305 |
l0.300781 -0.0703125l0.0771484 -0.0126953c1.66406 -0.313477 3.35352 -0.601562 5.05566 -0.864258l0.65332 -0.121094l0.792969 -0.12207c1.37598 -0.198242 2.76465 -0.396484 4.17969 -0.576172l0.825195 -0.115234l0.268555 -0.0380859
|
306 |
+
c1.67773 -0.198242 3.37988 -0.37793 5.10156 -0.537109l0.53125 -0.0644531l0.959961 -0.0830078c1.36914 -0.12207 2.75195 -0.217773 4.14648 -0.326172l1.00488 -0.0712891l0.499023 -0.0253906c1.82422 -0.12793 3.67383 -0.198242 5.53613 -0.261719
|
307 |
+
l0.397461 -0.0263672c1.1709 -0.0380859 2.3418 -0.0761719 3.51367 -0.0830078c1.16406 -0.0195312 2.29688 -0.0253906 3.44238 -0.0253906l0.384766 0.00585938c2.20117 0.00683594 4.37109 0.0517578 6.53418 0.128906h0.671875l0.518555 0.0380859
|
308 |
+
c2.65625 0.0957031 5.26074 0.262695 7.80762 0.460938l0.543945 0.0253906l0.486328 0.0507812c2.20215 0.199219 4.35254 0.410156 6.46484 0.671875l1.08789 0.128906c2.10547 0.261719 4.19141 0.5625 6.2207 0.889648l0.40918 0.0380859l0.473633 0.102539
|
309 |
c2.48926 0.421875 4.92188 0.895508 7.27734 1.40723l0.844727 0.154297c2.34863 0.524414 4.60742 1.10059 6.80273 1.71484l0.441406 0.115234l0.300781 0.102539c1.88867 0.537109 3.73828 1.11328 5.49121 1.71484l0.761719 0.25
|
310 |
+
c1.7666 0.626953 3.46875 1.27344 5.09473 1.93945l0.390625 0.133789l0.40918 0.192383c0.716797 0.293945 1.43359 0.607422 2.11816 0.93457l0.959961 0.421875c0.864258 0.422852 1.72852 0.851562 2.56055 1.28711l0.261719 0.12793l0.0517578 0.0380859
|
311 |
+
c1.47852 0.787109 2.86035 1.59961 4.15332 2.45117l0.217773 0.115234l0.0771484 0.0576172c1.05566 0.678711 2.02832 1.40137 2.95605 2.125l0.358398 0.249023l0.25 0.217773c0.838867 0.65918 1.62598 1.35059 2.34863 2.03516l0.102539 0.0898438l0.223633 0.249023
|
312 |
+
c0.588867 0.583008 1.13965 1.17188 1.63867 1.78613l0.275391 0.288086l0.160156 0.223633c0.563477 0.68457 1.0752 1.38867 1.50391 2.08691l0.0253906 0.0253906l0.0703125 0.102539c0.410156 0.671875 0.755859 1.35059 1.0752 2.02246l0.134766 0.275391
|
313 |
l0.115234 0.300781c0.275391 0.65918 0.537109 1.33105 0.691406 2.02148l0.0761719 0.186523v0.0439453c0.210938 0.78125 0.333008 1.5752 0.397461 2.375z" />
|
314 |
<glyph glyph-name="uniF114" unicode=""
|
315 |
+
d="M342.15 99.4111l0.0898438 1.29883l0.43457 -50.0029l-0.0380859 -1.03027l-0.0507812 -0.262695c-0.0644531 -0.799805 -0.199219 -1.58691 -0.397461 -2.37402v-0.0322266l-0.0761719 -0.172852c-0.154297 -0.68457 -0.416016 -1.36914 -0.691406 -2.03516
|
316 |
+
l-0.115234 -0.293945l-0.134766 -0.269531c-0.319336 -0.671875 -0.671875 -1.35645 -1.0752 -2.02148l-0.0703125 -0.102539l-0.0253906 -0.0263672c-0.428711 -0.709961 -0.94043 -1.40137 -1.50391 -2.08594l-0.15332 -0.217773l-0.275391 -0.306641
|
317 |
+
c-0.505859 -0.595703 -1.05664 -1.18457 -1.64453 -1.76074l-0.224609 -0.261719l-0.102539 -0.0898438c-0.722656 -0.68457 -1.50977 -1.37598 -2.34863 -2.04785l-0.249023 -0.211914l-0.352539 -0.249023c-0.93457 -0.716797 -1.90723 -1.44043 -2.96289 -2.1123
|
318 |
+
l-0.0771484 -0.0634766l-0.217773 -0.12793c-1.29297 -0.826172 -2.6748 -1.66406 -4.15332 -2.44531l-0.0507812 -0.0322266l-0.262695 -0.133789c-0.826172 -0.428711 -1.68359 -0.864258 -2.56055 -1.26758l-0.959961 -0.435547
|
319 |
+
c-0.68457 -0.306641 -1.40137 -0.620117 -2.11816 -0.933594l-0.40332 -0.185547l-0.383789 -0.134766c-1.62598 -0.68457 -3.32129 -1.33105 -5.09473 -1.94531l-0.760742 -0.25c-1.76074 -0.601562 -3.59082 -1.19043 -5.48535 -1.71484l-0.313477 -0.109375
|
320 |
+
l-0.435547 -0.108398c-2.18848 -0.614258 -4.4668 -1.19043 -6.80273 -1.70215l-0.851562 -0.185547c-2.36133 -0.512695 -4.78711 -0.979492 -7.27637 -1.38965l-0.473633 -0.0888672l-0.410156 -0.0644531c-2.03516 -0.338867 -4.1084 -0.626953 -6.21387 -0.889648
|
321 |
+
l-1.08789 -0.133789c-2.1123 -0.25 -4.2627 -0.473633 -6.46387 -0.65332l-0.486328 -0.0507812l-0.544922 -0.0390625c-2.55957 -0.198242 -5.15137 -0.345703 -7.80762 -0.447266l-0.518555 -0.0263672l-0.665039 -0.0126953
|
322 |
+
c-2.15723 -0.0761719 -4.32715 -0.121094 -6.53516 -0.133789l-0.389648 -0.00683594c-1.13965 0 -2.27832 0.00683594 -3.4375 0.0322266c-1.1709 0.0195312 -2.3418 0.0380859 -3.51367 0.0898438l-0.396484 0.0126953
|
323 |
+
c-1.8623 0.0634766 -3.71191 0.140625 -5.53613 0.261719l-0.499023 0.0263672l-1.00488 0.0761719c-1.39551 0.102539 -2.77734 0.198242 -4.14746 0.327148l-0.959961 0.0761719l-0.53125 0.0644531c-1.7207 0.160156 -3.41699 0.338867 -5.10059 0.549805
|
324 |
l-0.268555 0.0263672l-0.825195 0.121094c-1.41504 0.185547 -2.80371 0.383789 -4.17969 0.588867l-0.793945 0.108398l-0.652344 0.115234c-1.70215 0.262695 -3.3916 0.550781 -5.05566 0.876953h-0.0771484l-0.300781 0.0771484
|
325 |
c-1.65723 0.313477 -3.26367 0.646484 -4.87012 0.998047l-0.716797 0.134766l-0.5 0.12793c-1.77832 0.421875 -3.53223 0.851562 -5.23438 1.31152l-0.40332 0.0898438l-0.505859 0.160156c-2.02246 0.543945 -3.98047 1.12012 -5.86914 1.73438l-0.28125 0.0957031
|
326 |
+
l-0.896484 0.307617c-0.792969 0.275391 -1.56152 0.537109 -2.3418 0.8125l-1.36328 0.505859c-0.736328 0.268555 -1.44629 0.556641 -2.17578 0.844727l-0.844727 0.326172l-0.460938 0.211914l-1.38281 0.587891l-1.50977 0.666016l-1.3252 0.639648l-1.40137 0.666016
|
327 |
l-1.30566 0.678711l-1.29297 0.677734l-1.22852 0.704102l-1.20312 0.710938l-1.16504 0.722656l-1.10742 0.723633l-1.10742 0.774414l-0.998047 0.722656l-1.03711 0.826172l-0.895508 0.722656l-0.947266 0.851562l-0.806641 0.729492l-0.864258 0.882812
|
328 |
l-0.697266 0.736328l-0.787109 0.927734l-0.608398 0.736328l-0.65918 0.947266l-0.518555 0.736328l-0.569336 0.985352l-0.40332 0.729492l-0.473633 1.0498l-0.300781 0.697266l-0.351562 1.11328l-0.210938 0.666016l-0.25 1.24121l-0.102539 0.543945
|
329 |
c-0.0830078 0.615234 -0.121094 1.19727 -0.121094 1.81836l-0.435547 50.0029c0 -0.601562 0.0380859 -1.20312 0.12207 -1.81152l0.146484 -0.767578l0.198242 -1.02441l0.269531 -0.870117l0.293945 -0.902344l0.37793 -0.876953l0.383789 -0.889648l0.499023 -0.850586
|
330 |
+
l0.511719 -0.876953l0.576172 -0.832031l0.601562 -0.851562l0.671875 -0.8125l0.691406 -0.871094l0.761719 -0.787109l0.8125 -0.825195l0.845703 -0.754883l0.915039 -0.832031l0.93457 -0.743164l1.00391 -0.799805l1.01172 -0.729492l1.08789 -0.774414
|
331 |
+
l1.08203 -0.697266l1.18359 -0.761719l1.17773 -0.671875l1.26074 -0.736328l1.26074 -0.665039l1.33105 -0.685547l1.33789 -0.65918l1.4209 -0.665039l1.40723 -0.640625l1.47266 -0.639648l1.26074 -0.499023c0.722656 -0.300781 1.45312 -0.588867 2.20117 -0.864258
|
332 |
l1.35742 -0.505859c0.754883 -0.261719 1.5293 -0.537109 2.31641 -0.799805l1.20312 -0.40332c1.90137 -0.607422 3.86621 -1.19043 5.8877 -1.74023l0.858398 -0.237305c1.72168 -0.460938 3.4873 -0.902344 5.2793 -1.31152l1.17188 -0.262695
|
333 |
c1.59961 -0.345703 3.22559 -0.697266 4.87695 -1.01074l0.40918 -0.102539c1.66406 -0.313477 3.36621 -0.601562 5.08789 -0.876953l1.37598 -0.210938c1.4082 -0.199219 2.81641 -0.416016 4.25586 -0.588867l1.03711 -0.134766
|
334 |
c1.68945 -0.205078 3.39844 -0.390625 5.13867 -0.537109l1.43359 -0.134766c1.39551 -0.12793 2.79688 -0.223633 4.21777 -0.333008l1.46582 -0.0957031c1.83008 -0.115234 3.68652 -0.198242 5.54883 -0.262695c1.29297 -0.0380859 2.5918 -0.0761719 3.91016 -0.102539
|
335 |
+
c1.28027 -0.0126953 2.55371 -0.0126953 3.81445 -0.0126953c2.19531 0 4.38379 0.0517578 6.53418 0.115234l1.2041 0.0449219c2.63672 0.102539 5.24707 0.268555 7.80762 0.454102l1.02441 0.0898438c2.18848 0.192383 4.33887 0.40332 6.46387 0.666016
|
336 |
l1.10059 0.133789c2.09863 0.262695 4.17871 0.556641 6.21387 0.896484l0.774414 0.12793c2.53516 0.428711 4.98633 0.902344 7.37305 1.41406l0.826172 0.185547c2.36133 0.512695 4.63965 1.08203 6.83496 1.69629l0.704102 0.185547
|
337 |
+
c1.91309 0.550781 3.75684 1.13281 5.54199 1.73438l0.710938 0.237305c1.75293 0.614258 3.44922 1.26074 5.0752 1.92578l0.875977 0.37793c0.698242 0.293945 1.37012 0.588867 2.03516 0.895508l0.986328 0.448242c0.959961 0.473633 1.90039 0.93457 2.80957 1.41406
|
338 |
+
c1.52246 0.806641 2.96289 1.6582 4.28809 2.52246l0.198242 0.12793c1.08789 0.697266 2.08008 1.42676 3.02734 2.16309l0.537109 0.416016c0.851562 0.68457 1.6582 1.37598 2.3877 2.08594l0.300781 0.300781c0.594727 0.595703 1.13867 1.19043 1.66406 1.79883
|
339 |
l0.441406 0.524414c0.53125 0.678711 1.06836 1.37598 1.49121 2.06738l0.115234 0.15332c0.396484 0.666016 0.735352 1.33789 1.0625 2.00391l0.236328 0.575195c0.288086 0.65332 0.525391 1.33789 0.710938 2.02246l0.0761719 0.230469
|
340 |
+
c0.192383 0.78125 0.313477 1.57422 0.390625 2.36816zM342.15 171.053l0.0898438 1.33105l0.43457 -50.0029l-0.0380859 -1.03027l-0.0507812 -0.275391c-0.0644531 -0.787109 -0.199219 -1.58105 -0.397461 -2.36133v-0.0449219l-0.0761719 -0.185547
|
341 |
+
c-0.154297 -0.68457 -0.416016 -1.35742 -0.691406 -2.02246l-0.115234 -0.300781l-0.134766 -0.262695c-0.319336 -0.68457 -0.671875 -1.35645 -1.0752 -2.02246l-0.0703125 -0.115234l-0.0253906 -0.0253906c-0.428711 -0.697266 -0.94043 -1.40137 -1.50391 -2.08594
|
342 |
+
l-0.15332 -0.211914l-0.275391 -0.300781c-0.505859 -0.594727 -1.05664 -1.19629 -1.64453 -1.77246l-0.224609 -0.255859l-0.102539 -0.0830078c-0.722656 -0.704102 -1.50977 -1.37598 -2.34863 -2.04883l-0.249023 -0.223633l-0.352539 -0.236328
|
343 |
+
c-0.93457 -0.723633 -1.90723 -1.44727 -2.96289 -2.125l-0.0771484 -0.0644531l-0.217773 -0.115234c-1.29297 -0.837891 -2.6748 -1.66406 -4.15332 -2.45117l-0.0507812 -0.0380859l-0.262695 -0.12793c-0.826172 -0.435547 -1.68359 -0.864258 -2.56055 -1.28027
|
344 |
+
l-0.959961 -0.428711c-0.68457 -0.326172 -1.40137 -0.633789 -2.11816 -0.93457l-0.40332 -0.178711l-0.383789 -0.134766c-1.62598 -0.697266 -3.32129 -1.3252 -5.09473 -1.95215l-0.760742 -0.249023c-1.76074 -0.601562 -3.59082 -1.18457 -5.48535 -1.70898
|
345 |
l-0.313477 -0.12207l-0.435547 -0.102539c-2.18848 -0.614258 -4.4668 -1.17676 -6.80273 -1.69531l-0.851562 -0.179688c-2.36133 -0.511719 -4.78711 -0.992188 -7.27637 -1.40137l-0.473633 -0.0898438l-0.410156 -0.0507812
|
346 |
+
c-2.03516 -0.339844 -4.1084 -0.633789 -6.21387 -0.902344l-1.08789 -0.134766c-2.1123 -0.249023 -4.2627 -0.473633 -6.46387 -0.652344l-0.486328 -0.0517578l-0.544922 -0.0322266c-2.55957 -0.204102 -5.15137 -0.351562 -7.80762 -0.454102l-0.518555 -0.0380859
|
347 |
+
l-0.665039 -0.0126953c-2.15723 -0.0644531 -4.32715 -0.12793 -6.53516 -0.12793h-0.389648c-1.13965 0 -2.27832 0 -3.4375 0.0126953c-1.1709 0.0253906 -2.3418 0.0576172 -3.51367 0.0898438l-0.396484 0.0253906
|
348 |
+
c-1.8623 0.0634766 -3.71191 0.146484 -5.53613 0.255859l-0.499023 0.0322266l-1.00488 0.0761719c-1.39551 0.0898438 -2.77734 0.198242 -4.14746 0.327148l-0.959961 0.0703125l-0.53125 0.0634766c-1.7207 0.15332 -3.41699 0.345703 -5.10059 0.550781
|
349 |
l-0.268555 0.0322266l-0.825195 0.115234c-1.41504 0.185547 -2.80371 0.376953 -4.17969 0.587891l-0.793945 0.115234l-0.652344 0.115234c-1.70215 0.262695 -3.3916 0.557617 -5.05566 0.871094l-0.0771484 0.0126953l-0.300781 0.0703125
|
350 |
c-1.65723 0.313477 -3.26367 0.633789 -4.87012 1.00488l-0.716797 0.133789l-0.5 0.134766c-1.77832 0.40332 -3.53223 0.838867 -5.23438 1.29883l-0.40332 0.109375l-0.505859 0.140625c-2.02246 0.550781 -3.98047 1.12012 -5.86914 1.75391l-0.28125 0.0761719
|
351 |
+
l-0.896484 0.307617c-0.792969 0.275391 -1.56152 0.543945 -2.3418 0.825195l-1.36328 0.499023c-0.736328 0.275391 -1.44629 0.557617 -2.17578 0.838867l-0.844727 0.345703l-0.460938 0.192383l-1.38281 0.587891l-1.50977 0.666016l-1.3252 0.639648
|
352 |
+
l-1.40137 0.685547l-1.30566 0.665039l-1.29297 0.68457l-1.22852 0.710938l-1.20312 0.697266l-1.16504 0.736328l-1.10742 0.722656l-1.10742 0.761719l-0.998047 0.729492l-1.03711 0.819336l-0.895508 0.723633l-0.947266 0.850586l-0.806641 0.736328
|
353 |
+
l-0.864258 0.889648l-0.697266 0.723633l-0.787109 0.927734l-0.608398 0.736328l-0.65918 0.947266l-0.518555 0.735352l-0.569336 0.992188l-0.40332 0.723633l-0.473633 1.04883l-0.300781 0.704102l-0.351562 1.11426l-0.210938 0.665039l-0.25 1.24219
|
354 |
+
l-0.102539 0.549805c-0.0830078 0.614258 -0.121094 1.20312 -0.121094 1.81738l-0.435547 50.0098c0 -0.614258 0.0380859 -1.22266 0.12207 -1.82422l0.146484 -0.774414l0.198242 -1.01074l0.269531 -0.864258l0.293945 -0.915039l0.37793 -0.864258l0.383789 -0.889648
|
355 |
+
l0.499023 -0.850586l0.511719 -0.883789l0.576172 -0.837891l0.601562 -0.857422l0.671875 -0.813477l0.691406 -0.850586l0.761719 -0.787109l0.8125 -0.838867l0.845703 -0.761719l0.915039 -0.825195l0.93457 -0.736328l1.00391 -0.8125l1.01172 -0.710938
|
356 |
+
l1.08789 -0.780273l1.08203 -0.704102l1.18359 -0.749023l1.17773 -0.678711l1.26074 -0.729492l1.26074 -0.665039l1.33105 -0.698242l1.33789 -0.652344l1.4209 -0.671875l1.40723 -0.621094l1.47266 -0.633789l1.26074 -0.511719
|
357 |
+
c0.722656 -0.288086 1.45312 -0.576172 2.20117 -0.864258l1.36328 -0.492188c0.755859 -0.288086 1.53027 -0.550781 2.31738 -0.813477l1.20312 -0.402344c1.90039 -0.602539 3.86523 -1.2041 5.8877 -1.75391l0.857422 -0.237305
|
358 |
+
c1.72168 -0.459961 3.48828 -0.895508 5.28027 -1.31152l1.1709 -0.25c1.60059 -0.358398 3.22559 -0.697266 4.87695 -1.02344l0.40332 -0.0771484c1.66406 -0.320312 3.36621 -0.594727 5.08789 -0.870117l1.37598 -0.205078
|
359 |
+
c1.4082 -0.210938 2.81641 -0.421875 4.25586 -0.608398l1.03711 -0.133789c1.68945 -0.192383 3.39844 -0.390625 5.13867 -0.550781l1.43359 -0.12793c1.39551 -0.12793 2.79688 -0.236328 4.21777 -0.338867l1.46582 -0.0898438
|
360 |
+
c1.83008 -0.121094 3.68652 -0.210938 5.54883 -0.275391c1.29297 -0.0380859 2.5918 -0.0830078 3.91016 -0.0957031c1.28027 -0.0253906 2.55371 -0.0253906 3.81445 -0.0253906c2.19531 0 4.38379 0.0507812 6.53418 0.121094l1.2041 0.0644531
|
361 |
+
c2.63672 0.0898438 5.24707 0.249023 7.80762 0.448242l1.02441 0.0888672c2.18848 0.192383 4.33887 0.40332 6.46387 0.65332l1.10059 0.133789c2.09863 0.262695 4.17871 0.550781 6.21387 0.883789l0.774414 0.133789c2.53516 0.442383 4.98633 0.902344 7.37305 1.4209
|
362 |
+
l0.826172 0.179688c2.36133 0.524414 4.63965 1.10059 6.83496 1.70898l0.704102 0.191406c1.91309 0.538086 3.75684 1.11426 5.54199 1.72852l0.710938 0.243164c1.75293 0.607422 3.44922 1.24805 5.0752 1.91992l0.875977 0.351562
|
363 |
+
c0.698242 0.300781 1.37012 0.621094 2.03516 0.915039l0.986328 0.448242c0.959961 0.467773 1.90039 0.93457 2.80957 1.4209c1.52246 0.799805 2.96289 1.64453 4.28809 2.50879l0.198242 0.134766c1.08789 0.704102 2.08008 1.42676 3.02734 2.16895l0.537109 0.410156
|
364 |
+
c0.851562 0.665039 1.6582 1.37598 2.3877 2.07324l0.300781 0.313477c0.594727 0.588867 1.13867 1.17773 1.66406 1.79199l0.441406 0.518555c0.53125 0.671875 1.06836 1.38867 1.49121 2.07422l0.115234 0.15918c0.396484 0.666016 0.735352 1.33203 1.0625 2.00391
|
365 |
+
l0.236328 0.5625c0.288086 0.671875 0.525391 1.35059 0.710938 2.02246l0.0761719 0.237305c0.192383 0.787109 0.313477 1.57422 0.390625 2.36133zM342.15 242.694l0.0703125 1.31836l0.441406 -50.0156l-0.0380859 -1.03027l-0.0576172 -0.256836
|
366 |
+
c-0.0644531 -0.805664 -0.192383 -1.59277 -0.390625 -2.37402v-0.0253906l-0.0761719 -0.185547c-0.160156 -0.68457 -0.410156 -1.35059 -0.698242 -2.0166l-0.108398 -0.306641l-0.140625 -0.275391c-0.313477 -0.678711 -0.671875 -1.35059 -1.0752 -2.01562
|
367 |
+
l-0.0644531 -0.109375l-0.0253906 -0.0253906c-0.435547 -0.704102 -0.947266 -1.40137 -1.51074 -2.08008l-0.146484 -0.223633l-0.275391 -0.288086c-0.505859 -0.608398 -1.0625 -1.19727 -1.63867 -1.78613l-0.236328 -0.249023l-0.102539 -0.0898438
|
368 |
+
c-0.723633 -0.691406 -1.51074 -1.36914 -2.34961 -2.03516l-0.249023 -0.223633l-0.352539 -0.25c-0.927734 -0.723633 -1.90039 -1.44043 -2.95605 -2.125l-0.0771484 -0.0507812l-0.217773 -0.12793c-1.29297 -0.844727 -2.6748 -1.6582 -4.16016 -2.44531
|
369 |
+
l-0.0507812 -0.0380859l-0.262695 -0.134766c-0.825195 -0.428711 -1.67676 -0.850586 -2.55957 -1.28613l-0.954102 -0.416016c-0.69043 -0.320312 -1.40137 -0.633789 -2.11816 -0.93457l-0.40332 -0.185547l-0.390625 -0.133789
|
370 |
+
c-1.625 -0.678711 -3.32715 -1.3125 -5.09375 -1.93945l-0.761719 -0.25c-1.75391 -0.601562 -3.59082 -1.17773 -5.49121 -1.71484l-0.300781 -0.102539l-0.441406 -0.115234c-2.18945 -0.614258 -4.46094 -1.19043 -6.80371 -1.71484l-0.844727 -0.154297
|
371 |
+
c-2.35547 -0.511719 -4.78711 -0.998047 -7.27637 -1.40137l-0.473633 -0.108398l-0.40332 -0.0517578c-2.04199 -0.326172 -4.11523 -0.620117 -6.2207 -0.889648l-1.08789 -0.12793c-2.1123 -0.261719 -4.2627 -0.486328 -6.46484 -0.665039l-0.486328 -0.0576172
|
372 |
+
l-0.543945 -0.0263672c-2.56641 -0.191406 -5.15137 -0.344727 -7.80762 -0.454102l-0.518555 -0.0449219h-0.671875c-2.15723 -0.0761719 -4.32617 -0.115234 -6.53418 -0.12793l-0.383789 -0.00585938c-1.14648 0 -2.28516 0.00585938 -3.44336 0.03125
|
373 |
+
c-1.17188 0 -2.34277 0.0390625 -3.51367 0.0771484l-0.397461 0.0253906c-1.8623 0.0644531 -3.71191 0.134766 -5.53516 0.262695l-0.5 0.0253906l-1.00391 0.0703125c-1.39551 0.109375 -2.77832 0.205078 -4.14746 0.333008l-0.959961 0.0771484l-0.53125 0.0634766
|
374 |
+
c-1.72168 0.160156 -3.41797 0.339844 -5.10059 0.538086l-0.269531 0.0380859l-0.825195 0.115234c-1.41406 0.179688 -2.80371 0.383789 -4.17969 0.576172l-0.792969 0.121094l-0.65332 0.12207c-1.70215 0.262695 -3.3916 0.550781 -5.05566 0.864258
|
375 |
+
l-0.0771484 0.0126953l-0.300781 0.0703125c-1.65723 0.320312 -3.26367 0.652344 -4.87012 1.00488l-0.716797 0.147461l-0.499023 0.114258c-1.7793 0.410156 -3.5332 0.845703 -5.23535 1.3125l-0.40332 0.0957031l-0.505859 0.154297
|
376 |
+
c-2.02246 0.537109 -3.98047 1.11328 -5.86816 1.74023l-0.282227 0.0830078l-0.895508 0.313477c-0.793945 0.262695 -1.56152 0.538086 -2.34277 0.813477l-1.36328 0.499023c-0.735352 0.275391 -1.44629 0.563477 -2.17578 0.837891l-0.844727 0.345703
|
377 |
+
l-0.460938 0.192383l-1.38184 0.588867l-1.51074 0.671875l-1.3252 0.633789l-1.40137 0.678711l-1.30566 0.665039l-1.29297 0.678711l-1.22852 0.704102l-1.20312 0.704102l-1.16504 0.735352l-1.10742 0.716797l-1.10645 0.774414l-0.999023 0.716797l-1.03613 0.832031
|
378 |
+
l-0.896484 0.716797l-0.947266 0.851562l-0.806641 0.735352l-0.863281 0.896484l-0.698242 0.716797l-0.787109 0.93457l-0.607422 0.742188l-0.65918 0.93457l-0.518555 0.736328l-0.569336 0.998047l-0.40332 0.729492l-0.473633 1.04297l-0.300781 0.698242
|
379 |
+
l-0.352539 1.11914l-0.210938 0.65332l-0.25 1.24805l-0.102539 0.549805c-0.0830078 0.602539 -0.121094 1.2041 -0.121094 1.81836l-0.37793 43.5645c-0.00585938 0.147461 -0.0576172 0.294922 -0.0576172 0.441406c0 0.134766 0.0517578 0.269531 0.0517578 0.40332
|
380 |
+
l-0.0517578 5.60059c0 -0.608398 0.0390625 -1.2168 0.12207 -1.82422l0.147461 -0.774414l0.0888672 -0.448242c3.63574 17.875 40.4102 31.3916 85.3701 30.7012c44.998 -0.691406 81.9131 -15.3857 85.5742 -33.4082c0.12793 0.607422 0.243164 1.20898 0.300781 1.81738
|
381 |
+
z" />
|
382 |
<glyph glyph-name="uniF121" unicode=""
|
383 |
d="M170.238 102.4l85.7617 68.4805l85.1191 -68.4805h-51.8389v-45.4375h-67.1992v45.4375h-51.8428zM371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v76.8008h76.7998v-76.8008zM383.357 37.1221v162.558l-49.2754 49.2793h-157.442
|
384 |
l-49.2783 -49.2793v-162.558c0 -7.68066 6.39746 -14.0781 14.0781 -14.0781h228.479c7.67676 0 14.082 6.39746 13.4395 14.0781zM184.959 224.641h142.721l21.123 -21.7617h-185.602z" />
|
387 |
c0 -28.7227 23.3027 -52.0381 52.0322 -52.0381zM257.594 117.453c-18.9316 0 -34.2979 15.3594 -34.2979 34.2969c0 18.957 15.3662 34.3105 34.2979 34.3105c18.957 0 34.3164 -15.3535 34.3164 -34.3105c0 -18.9375 -15.3594 -34.2969 -34.3164 -34.2969z
|
388 |
M257.594 186.061c18.957 0 34.3164 -15.3535 34.3164 -34.3105c0 -18.9375 -15.3594 -34.2969 -34.3164 -34.2969c-18.9316 0 -34.2979 15.3594 -34.2979 34.2969c0 18.957 15.3662 34.3105 34.2979 34.3105z" />
|
389 |
<glyph glyph-name="uniF134" unicode=""
|
390 |
+
d="M69.9062 -52.7617l-58.0127 58.0127l315.346 315.347l58.0137 -58.0127zM440.184 334.265c12.8906 -12.873 -2.03125 -18.8203 -14.8857 -31.6572c-12.8545 -12.8359 -18.7842 -27.7578 -31.6562 -14.8848l-41.3027 41.1934
|
391 |
c-12.873 12.873 2.03027 18.8018 14.8857 31.6562c12.8545 12.8555 18.7832 27.7773 31.6562 14.9043zM512.218 379.737l18.4023 -24.6943l-30.7861 0.43457l-17.7686 -25.1113l-9.11914 29.3359l-29.3184 9.12012l25.0752 17.7861l-0.398438 30.75l24.6943 -18.4023
|
392 |
l29.0635 9.88086zM327.826 405.41l15.3203 -20.5244l-25.6191 0.327148l-14.8125 -20.9238l-7.5791 24.4775l-24.4766 7.57812l20.9229 14.8135l-0.326172 25.6191l20.5244 -15.3213l24.2588 8.23145zM476.463 268.322l9.33789 -12.5283l-15.6289 0.235352
|
393 |
l-8.95703 -12.6914l-4.58691 14.8311l-14.8672 4.62305l12.71 8.93848l-0.236328 15.6289l12.5293 -9.33691l14.7041 5.00391z" />
|
394 |
<glyph glyph-name="uniF137" unicode=""
|
395 |
+
d="M340.283 362.665h85.0703v-426.665h-425.354v426.665h85.0703v85.335h85.0713v-85.335h85.0703v85.335h85.0713v-85.335zM65.9414 104.803l65.2051 -65.4062v49.0303h114.185v32.752h-114.185v49.0293zM294.207 206.789h-114.081v-32.752h114.081v-49.0303
|
396 |
l65.2051 65.4062l-65.2051 65.4053v-49.0293zM294.207 219.341z" />
|
397 |
<glyph glyph-name="uniF12C" unicode=""
|
398 |
d="M20.8887 280.548v149.814h564.48v-149.814h-564.48zM20.8887 114.135v88.8184h564.48v-88.8184h-564.48zM20.8887 -46.3623v88.8184h564.48v-88.8184h-564.48z" />
|
|
|
|
|
|
|
|
|
399 |
<glyph glyph-name="uniF12A" unicode=""
|
400 |
d="M399.36 330.24h61.4395v-368.641h-399.359v368.641h61.4395v92.1602h92.1602v-92.1602h92.1602v92.1602h92.1602v-92.1602z" />
|
401 |
<glyph glyph-name="uniF120" unicode=""
|
403 |
v-67.9395h100.396v67.9395zM118.291 310.896h277.263l-31.5557 32.5283h-213.188z" />
|
404 |
<glyph glyph-name="uniF113" unicode=""
|
405 |
d="M318.489 170.215v16.1211l30.0742 -30.0859l-30.0742 -30.0742v16.1094h-120.902v-16.1094l-30.0732 30.0742l30.0732 30.0859v-16.1211h120.902zM371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v76.8008h76.7998v-76.8008z
|
406 |
+
M388.448 76.8252v0v157.606c0 11.2256 -9.08789 20.3135 -20.3008 20.3135h-225.376c-11.2197 0 -20.3076 -9.09375 -20.3076 -20.3135v-157.606c0 -11.2256 9.08789 -20.3193 20.3076 -20.3193h97.3633c-1.27441 -7.69922 -7.61035 -28.666 -39.002 -28.666v-10.0479
|
407 |
h50.4316h10.7461h50.4258v10.0479c-31.3984 0 -37.7471 20.9727 -39.002 28.666h94.4004c11.2256 0 20.3135 9.09375 20.3135 20.3193z" />
|
408 |
<glyph glyph-name="uniF136" unicode=""
|
409 |
d="M438.75 70.167c0 -33.5039 -27.4131 -60.917 -60.917 -60.917h-243.666c-33.5039 0 -60.917 27.4131 -60.917 60.917v243.666c0 33.5039 27.4121 60.917 60.917 60.917h243.667c33.5039 0 60.917 -27.4121 60.917 -60.917l-0.000976562 -243.666v0zM172.568 295.319
|
419 |
c1.39453 -0.972656 2.64258 -4.63379 3.7373 -8.76172l1.5166 -5.59375c1.17773 -4.81836 2.70117 -7.25098 4.55664 -8.17285c1.85645 -0.94043 6.74609 -0.517578 14.6758 -0.517578h87.9355c6.33594 0 8.73633 -4.98633 8.73633 -11.4824v-14.1182h-146.534
|
420 |
c-9.19043 0 -14.8809 0.352539 -17.082 -0.927734z" />
|
421 |
<glyph glyph-name="uniF123" unicode=""
|
422 |
+
d="M56.5742 204.729c0 112.482 91.1855 203.668 203.669 203.668s203.668 -91.1855 203.668 -203.668c0 -112.483 -91.1846 -203.669 -203.668 -203.669s-203.669 91.1855 -203.669 203.669zM230.004 260.54v0l-8.29395 -0.00585938l-47.2627 -7.61426l-1.73047 -5.53906
|
423 |
+
c1.84375 0.113281 3.51855 0.175781 5.01758 0.175781c2.99902 0 5.39746 -0.81543 7.18555 -2.42773c1.78711 -1.61816 2.68164 -3.46191 2.68164 -5.53809c0 -3.23047 -0.922852 -8.02246 -2.7666 -14.3643l-19.3887 -66.6455
|
424 |
+
c-1.62305 -5.30078 -2.42676 -9.69043 -2.42676 -13.1533c0 -5.19922 1.78809 -9.49316 5.36328 -12.8936c3.5752 -3.40527 8.3623 -5.1084 14.3643 -5.1084c15.8125 0 30.7598 12.2314 44.8359 36.7002l-4.84277 2.7666
|
425 |
+
c-5.77148 -9.00098 -10.7949 -15.2305 -15.0605 -18.6924c-1.49316 -1.38672 -3.06055 -2.07617 -4.67285 -2.07617c-0.922852 0 -1.78809 0.458008 -2.59668 1.38574c-0.80957 0.921875 -1.21094 1.84473 -1.21094 2.77246c0 1.84375 0.741211 5.59473 2.24609 11.252z
|
426 |
+
M221.348 324.758c-5.65723 0 -10.4375 -2.01953 -14.3584 -6.05859c-3.9209 -4.04004 -5.88379 -8.88867 -5.88379 -14.54c0 -5.65723 1.99121 -10.4717 5.96875 -14.4551c3.9834 -3.97656 8.74121 -5.96875 14.2793 -5.96875c5.65234 0 10.5 1.99219 14.54 5.96875
|
427 |
+
c4.03906 3.9834 6.05371 8.79785 6.05371 14.4551c0 5.65137 -1.99219 10.5 -5.97461 14.54c-3.97754 4.03906 -8.84863 6.05859 -14.625 6.05859zM311.183 240.462v0.00585938h19.7451l4.83691 16.2705h-20.2539c5.77051 23.4219 13.3857 40.6152 22.8506 51.5791
|
428 |
+
c5.76465 6.6875 11.4219 10.0361 16.9609 10.0361c1.1543 0 2.08203 -0.316406 2.77246 -0.950195c0.695312 -0.639648 1.04688 -1.4707 1.04688 -2.51172c0 -0.922852 -0.787109 -2.6875 -2.33691 -5.27832c-1.55566 -2.5918 -2.33691 -5.04688 -2.33691 -7.35547
|
429 |
+
c0 -3.23047 1.20508 -5.99609 3.63281 -8.30469c2.42676 -2.30859 5.48145 -3.46289 9.17578 -3.46289c4.02832 0 7.37207 1.41504 10.0361 4.24316c2.64844 2.8291 3.97754 6.6084 3.97754 11.3379c0 5.54395 -2.02539 10.042 -6.05957 13.5049
|
430 |
+
c-4.03906 3.46191 -10.5059 5.19336 -19.3936 5.19336c-13.9619 0 -26.5898 -4.09668 -37.8994 -12.2881c-11.3145 -8.19238 -22.1094 -21.7529 -32.377 -40.6777c-3.45703 -6.46582 -6.77246 -10.6182 -9.95215 -12.4629
|
431 |
+
c-3.17383 -1.84961 -8.21973 -2.71582 -15.1445 -2.59668l-4.67285 -16.2715h19.3877l-28.3887 -111.469c-4.73047 -18.2393 -7.95996 -29.4805 -9.69141 -33.7578c-2.42188 -6.22852 -6.06543 -11.5352 -10.9082 -15.9199
|
432 |
+
c-1.96289 -1.73145 -4.32715 -2.59668 -7.09961 -2.59668c-0.797852 0 -1.49316 0.231445 -2.07031 0.69043l-0.69043 0.865234c0 0.463867 0.69043 1.41406 2.07031 2.85742c1.38574 1.44238 2.07617 3.66602 2.07617 6.66406c0 3.23047 -1.08594 5.91797 -3.28711 8.05078
|
433 |
+
c-2.18945 2.13867 -5.36816 3.20215 -9.52148 3.20215c-5.07422 0 -9.14258 -1.38672 -12.2031 -4.1582c-3.05469 -2.77246 -4.58789 -6.05957 -4.58789 -9.86719c0 -4.03906 1.84961 -7.58594 5.53906 -10.6475c3.69434 -3.05469 9.52637 -4.58789 17.4814 -4.58789
|
434 |
+
c12.4629 0 23.5684 3.28125 33.3281 9.86133c9.74707 6.5791 18.2275 16.6719 25.4414 30.29c7.21289 13.6172 14.6299 35.6533 22.2451 66.124z" />
|
|
|
|
|
|
|
435 |
<glyph glyph-name="uniF131" unicode=""
|
436 |
d="M69.0908 161.909l-26.8906 26.9268c-4.00098 4.54297 -12.1611 8.22949 -18.2148 8.22949c-1.20996 0 -3.1582 -0.175781 -4.34863 -0.392578v231.618h231.69c-0.0351562 -0.0830078 -0.0996094 -0.212891 -0.145508 -0.291016
|
437 |
+
c-0.794922 -2.22363 -1.44043 -5.94531 -1.44043 -8.30664c0 -6.77344 4.38477 -15.5879 9.78613 -19.6748l21.1631 -21.1094h-211.6v-217zM487.637 186.69c1.32617 0.101562 3.42773 0.524414 4.69043 0.946289v-232h-231.745
|
438 |
+
c0.0615234 0.0947266 0.142578 0.256836 0.181641 0.363281c0.808594 2.23633 1.46387 5.98242 1.46387 8.36035c0 6.77734 -4.39453 15.584 -9.80957 19.6582l-21.1455 21.1631h211.546v216.945l26.9453 -26.9268c3.91797 -4.48047 11.9248 -8.29297 17.873 -8.50977z
|
439 |
M163.272 10.5459l11.5459 -11.5459l26.1631 -26.1816c-39.291 -0.582031 -137.291 -2.14551 -162.545 -2.40039l-2.21875 161.818l25.6006 -25.6904l11.6182 -11.5459l11.5273 11.5459l122.818 122.891l1.34473 1.32715l0.491211 0.782227l128.854 128.836l11.582 11.582
|
440 |
+
l-11.582 11.5449l-26.1455 26.1641c39.3096 0.582031 137.455 2.14551 162.527 2.39941l2.21777 -161.817l-25.6904 25.6543l-11.5088 11.582l-11.5635 -11.582l-122.782 -122.782l-1.25488 -1.27246l-0.527344 -0.818359l-128.927 -128.909z" />
|
441 |
<glyph glyph-name="uniF124" unicode=""
|
442 |
d="M371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v76.8008h76.7998v-76.8008zM259.75 278.566c-47.3271 0 -85.8105 -38.502 -85.8174 -85.7539c0 -62.4385 72.5957 -135.73 75.6865 -138.848
|
443 |
c2.80957 -2.77734 6.43164 -4.16602 10.1309 -4.16602c3.6416 0 7.31543 1.38184 10.0674 4.16602c3.11719 3.11719 75.7119 76.4092 75.7119 138.848c0 47.252 -38.4766 85.7539 -85.7793 85.7539zM410.298 16.3457c1.93848 2.91211 2.28418 6.60449 0.915039 9.83008
|
444 |
l-33.4658 79.3604c-1.63184 3.86523 -5.4209 6.38086 -9.61914 6.38086h-34.7773v-20.8838h27.8467l24.665 -58.4824h-248.436l24.666 58.4824h25.0625v20.8838h-31.9941c-4.19824 0 -7.98633 -2.51562 -9.61914 -6.38086l-33.4717 -79.3604
|
445 |
+
c-1.35645 -3.22559 -1.01074 -6.91797 0.921875 -9.83008c1.93262 -2.91895 5.19629 -4.66602 8.69727 -4.66602h279.91c3.50098 0 6.76562 1.74707 8.69824 4.66602zM305.293 192.025c0 -23.7119 -19.1875 -42.8994 -42.8613 -42.9053
|
446 |
c-23.7119 0 -42.9121 19.1875 -42.9121 42.9053c0 23.7061 19.1943 42.8486 42.9121 42.8486c23.6738 0 42.8613 -19.1426 42.8613 -42.8486z" />
|
447 |
+
<glyph glyph-name="uniF119" unicode=""
|
448 |
+
d="M371.2 345.6h76.7998v-384h-384v384h76.7998v76.8008h76.7998v-76.8008h76.8008v76.8008h76.7998v-76.8008zM243.782 3.33398v122.164l-117.459 69.5742v-123.917zM384.007 71.1553v121.439l-116.979 -70.0088v-118.977zM384.007 219.667v0.268555l-128.846 74.3877
|
449 |
+
l-127.008 -73.3311l129.689 -76.8193z" />
|
|
|
450 |
<glyph glyph-name="uniF12E" unicode=""
|
451 |
+
d="M335.712 419.215c1.96777 -1.02637 3.5791 -3.65918 3.59863 -5.87793v-101.349l-143.232 -113.104c-1.31152 -1.12598 -2.37598 -3.44141 -2.37598 -5.16992c0 -1.72754 1.06445 -4.04395 2.37598 -5.16895l143.16 -113.031v-101.374
|
452 |
+
c0.000976562 -0.03125 0.000976562 -0.0830078 0.000976562 -0.115234c0 -3.58789 -2.91211 -6.5 -6.50098 -6.5c-1.27539 0 -3.11328 0.65332 -4.10254 1.45801l-278.261 219.562c-1.31152 1.125 -2.37598 3.44141 -2.37598 5.16895
|
453 |
+
c0 1.72852 1.06445 4.04395 2.37598 5.16992l278.356 219.538c1.00293 0.790039 2.85254 1.43164 4.12891 1.43164c0.827148 0 2.10449 -0.286133 2.85156 -0.639648zM824.66 195.431c1.35645 -1.12012 2.45801 -3.45801 2.45801 -5.21777
|
454 |
+
s-1.10156 -4.09766 -2.45801 -5.21777l-278.262 -219.562c-1.00391 -0.775391 -2.84863 -1.4043 -4.11816 -1.4043c-0.844727 0 -2.14844 0.295898 -2.91016 0.660156c-1.95996 1.00977 -3.55078 3.61816 -3.55078 5.82324c0 0.0341797 0 0.0908203 0.000976562 0.125977
|
455 |
+
v101.421l143.232 113.032c1.31055 1.125 2.375 3.44141 2.375 5.16895c0 1.72852 -1.06445 4.04395 -2.375 5.16992l-143.232 113.055v101.374v0.0585938c0 2.21289 1.58984 4.83984 3.5498 5.86621c0.753906 0.356445 2.04199 0.646484 2.875 0.646484
|
456 |
+
c1.28418 0 3.14453 -0.644531 4.15332 -1.43848z" />
|
|
|
|
|
|
|
|
|
457 |
<glyph glyph-name="uniF133" unicode=""
|
458 |
+
d="M303.04 102.146l-102.51 -46.3584l46.2246 102.245l-0.169922 0.227539zM303.077 102.146h-0.0371094l0.226562 -0.208984zM493.604 404.844l23.4727 -23.3584l-234.289 -232.547l-23.4727 23.3018zM295.329 136.454l234.289 232.642l23.4922 -23.3594l-234.309 -232.546
|
459 |
zM561.749 415.907c7.08301 -6.61035 12.832 -19.8389 12.832 -29.5273c0 -7.69043 -3.84766 -18.8457 -8.58887 -24.9004l-56.7393 56.209c6.15918 4.66113 17.4268 8.44434 25.1504 8.44434c8.60254 0 20.8535 -4.58105 27.3457 -10.2256zM438.684 12.4795v181.718
|
460 |
l57.3086 58.9941v-298h-473.618v473.617h454.389l-61.3809 -57.3076h-335.72v-359.021h359.021z" />
|
461 |
</font>
|
library/toolset/onthego-resources/onthegosystems-icons/fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.ttf
ADDED
Binary file
|
library/toolset/onthego-resources/onthegosystems-icons/fonts/onthegosystems-icons_c2bf5434fb5ba6db313a98fb4e1bf347.woff
ADDED
Binary file
|
library/toolset/onthego-resources/onthegosystems-icons/vectors/many-to-many.svg
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="utf-8"?>
|
2 |
-
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
-
<svg version="1.1" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
4 |
-
x="0px" y="0px" viewBox="0 0 62 44" xml:space="preserve">
|
5 |
-
<g>
|
6 |
-
<g>
|
7 |
-
<rect x="40" y="17.583" fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" width="19" height="9"/>
|
8 |
-
<rect x="40" y="3.375" fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" width="19" height="9"/>
|
9 |
-
<rect x="40" y="31.625" fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" width="19" height="9"/>
|
10 |
-
<polyline fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" points="39.5,7.582 35.5,7.582 35.5,36.584
|
11 |
-
39.75,36.584 "/>
|
12 |
-
</g>
|
13 |
-
<g>
|
14 |
-
|
15 |
-
<rect x="3" y="17.583" transform="matrix(-1 4.499589e-11 -4.499589e-11 -1 25.0003 44.1667)" fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" width="19" height="9"/>
|
16 |
-
|
17 |
-
<rect x="3" y="3.375" transform="matrix(-1 4.480448e-11 -4.480448e-11 -1 25.0003 15.75)" fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" width="19" height="9"/>
|
18 |
-
|
19 |
-
<rect x="3" y="31.625" transform="matrix(-1 4.480448e-11 -4.480448e-11 -1 25.0003 72.25)" fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" width="19" height="9"/>
|
20 |
-
<line fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" x1="39.5" y1="22.083" x2="22" y2="22.083"/>
|
21 |
-
<polyline fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" points="22.5,7.582 26.5,7.582 26.5,36.584
|
22 |
-
22.25,36.584 "/>
|
23 |
-
</g>
|
24 |
-
</g>
|
25 |
-
</svg>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
library/toolset/onthego-resources/onthegosystems-icons/vectors/one-to-many.svg
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="utf-8"?>
|
2 |
-
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
-
<svg version="1.1" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
4 |
-
x="0px" y="0px" viewBox="0 0 62 44" xml:space="preserve">
|
5 |
-
<g>
|
6 |
-
<rect x="7.5" y="17.458" fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" width="19" height="9"/>
|
7 |
-
<rect x="35.5" y="17.458" fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" width="19" height="9"/>
|
8 |
-
<rect x="35.5" y="3.25" fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" width="19" height="9"/>
|
9 |
-
<rect x="35.5" y="31.5" fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" width="19" height="9"/>
|
10 |
-
<line fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" x1="26.5" y1="21.958" x2="35.5" y2="21.958"/>
|
11 |
-
<polyline fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" points="35,7.457 31,7.457 31,36.459
|
12 |
-
35.25,36.459 "/>
|
13 |
-
</g>
|
14 |
-
</svg>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
library/toolset/onthego-resources/onthegosystems-icons/vectors/one-to-one.svg
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="utf-8"?>
|
2 |
-
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
-
<svg version="1.1" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
4 |
-
x="0px" y="0px" viewBox="0 0 62 44" xml:space="preserve">
|
5 |
-
<g>
|
6 |
-
<rect x="8" y="18" fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" width="19" height="9"/>
|
7 |
-
<rect x="36" y="18" fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" width="19" height="9"/>
|
8 |
-
<line fill="none" stroke="#868686" stroke-width="1.5" stroke-miterlimit="10" x1="27" y1="22.5" x2="36" y2="22.5"/>
|
9 |
-
</g>
|
10 |
-
</svg>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
library/toolset/toolset-common/autoload_classmap.php
CHANGED
@@ -5,7 +5,12 @@ return array(
|
|
5 |
'Toolset_Result' => TOOLSET_COMMON_PATH . '/inc/autoloaded/result.php',
|
6 |
'Toolset_Result_Set' => TOOLSET_COMMON_PATH . '/inc/autoloaded/result_set.php',
|
7 |
'Toolset_Result_Updated' => TOOLSET_COMMON_PATH . '/inc/autoloaded/result_updated.php',
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
9 |
'Toolset_Admin_Notice_Error' => TOOLSET_COMMON_PATH . '/utility/admin/notice/error.php',
|
10 |
'Toolset_Admin_Notice_Interface' => TOOLSET_COMMON_PATH . '/utility/admin/notice/interface.php',
|
11 |
'Toolset_Admin_Notice_Required_Action' => TOOLSET_COMMON_PATH . '/utility/admin/notice/required/action.php',
|
5 |
'Toolset_Result' => TOOLSET_COMMON_PATH . '/inc/autoloaded/result.php',
|
6 |
'Toolset_Result_Set' => TOOLSET_COMMON_PATH . '/inc/autoloaded/result_set.php',
|
7 |
'Toolset_Result_Updated' => TOOLSET_COMMON_PATH . '/inc/autoloaded/result_updated.php',
|
8 |
+
'Toolset_Compatibility_Loader' => TOOLSET_COMMON_PATH . '/inc/autoloaded/compatibility-loader/toolset.compatibility.loader.class.php',
|
9 |
+
'Toolset_Compatibility_Handler_Interface' => TOOLSET_COMMON_PATH . '/inc/autoloaded/compatibility-loader/toolset.compatibility.loader.interface.class.php',
|
10 |
+
'Toolset_Compatibility_Theme_Handler_Factory' => TOOLSET_COMMON_PATH . '/inc/autoloaded/compatibility-loader/toolset.layouts-themes-factory.class.php',
|
11 |
+
'Toolset_Compatibility_Theme_Handler' => TOOLSET_COMMON_PATH . '/inc/autoloaded/compatibility-loader/toolset.layouts-theme.class.php',
|
12 |
+
'Toolset_Compatibility_Handler_Factory' => TOOLSET_COMMON_PATH . '/inc/autoloaded/compatibility-loader/compatibility_handler_factory.php',
|
13 |
+
'Toolset_Admin_Notice_Abstract' => TOOLSET_COMMON_PATH . '/utility/admin/notice/abstract.php',
|
14 |
'Toolset_Admin_Notice_Error' => TOOLSET_COMMON_PATH . '/utility/admin/notice/error.php',
|
15 |
'Toolset_Admin_Notice_Interface' => TOOLSET_COMMON_PATH . '/utility/admin/notice/interface.php',
|
16 |
'Toolset_Admin_Notice_Required_Action' => TOOLSET_COMMON_PATH . '/utility/admin/notice/required/action.php',
|
library/toolset/toolset-common/bootstrap.php
CHANGED
@@ -324,12 +324,24 @@ class Toolset_Common_Bootstrap {
|
|
324 |
Toolset_Admin_Notices_Manager::init();
|
325 |
}
|
326 |
|
327 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
if( ! class_exists( 'Toolset_Controller_Admin_Notices', false ) ) {
|
329 |
require_once( TOOLSET_COMMON_PATH . '/inc/controller/admin/notices.php' );
|
330 |
new Toolset_Controller_Admin_Notices();
|
331 |
}
|
332 |
|
|
|
|
|
|
|
333 |
require_once( TOOLSET_COMMON_PATH . '/inc/toolset.compatibility.php' );
|
334 |
require_once( TOOLSET_COMMON_PATH . '/inc/toolset.function.helpers.php' );
|
335 |
require_once( TOOLSET_COMMON_PATH . '/deprecated.php' );
|
324 |
Toolset_Admin_Notices_Manager::init();
|
325 |
}
|
326 |
|
327 |
+
// Load Theme Integration Class
|
328 |
+
// Wait until Toolset Common 2.5
|
329 |
+
/*
|
330 |
+
if ( ! class_exists( 'Toolset_Theme_Integration', false ) ) {
|
331 |
+
require_once( TOOLSET_COMMON_PATH . '/inc/toolset.theme.integration.php' );
|
332 |
+
Toolset_Theme_Integration::get_instance();
|
333 |
+
}
|
334 |
+
*/
|
335 |
+
|
336 |
+
// Load Admin Notices Controller (user of our Toolset_Admin_Notices_Manager)
|
337 |
if( ! class_exists( 'Toolset_Controller_Admin_Notices', false ) ) {
|
338 |
require_once( TOOLSET_COMMON_PATH . '/inc/controller/admin/notices.php' );
|
339 |
new Toolset_Controller_Admin_Notices();
|
340 |
}
|
341 |
|
342 |
+
// Get compatibility loader class instance
|
343 |
+
Toolset_Compatibility_Loader::get_instance();
|
344 |
+
|
345 |
require_once( TOOLSET_COMMON_PATH . '/inc/toolset.compatibility.php' );
|
346 |
require_once( TOOLSET_COMMON_PATH . '/inc/toolset.function.helpers.php' );
|
347 |
require_once( TOOLSET_COMMON_PATH . '/deprecated.php' );
|
library/toolset/toolset-common/changelog.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
# Toolset Common Library
|
2 |
|
|
|
|
|
|
|
3 |
## 2.4.2
|
4 |
- Removed notices, which leads to documentation of integration between Layouts and 3rd party themes
|
5 |
|
1 |
# Toolset Common Library
|
2 |
|
3 |
+
## 2.4.3
|
4 |
+
- Compatibility with Types 2.2.14, Vies 2.4.1, CRED 1.9.1, Access 2.4.2 and Layouts 2.0.2
|
5 |
+
|
6 |
## 2.4.2
|
7 |
- Removed notices, which leads to documentation of integration between Layouts and 3rd party themes
|
8 |
|
library/toolset/toolset-common/inc/autoloaded/compatibility-loader/compatibility_handler_factory.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Toolset_Compatibility_Handler_Factory {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @param string $class_name
|
7 |
+
*
|
8 |
+
* @return Toolset_Compatibility_Handler_Interface
|
9 |
+
*/
|
10 |
+
public function create( $class_name ) {
|
11 |
+
if( ! class_exists( $class_name ) ) {
|
12 |
+
throw new InvalidArgumentException( 'Non-existent compatibility handler name.' );
|
13 |
+
}
|
14 |
+
|
15 |
+
if( ! is_subclass_of( $class_name, 'Toolset_Compatibility_Handler_Interface', true ) ) {
|
16 |
+
throw new InvalidArgumentException( 'The provided classname is not a compatibility handler.' );
|
17 |
+
}
|
18 |
+
|
19 |
+
return new $class_name;
|
20 |
+
}
|
21 |
+
|
22 |
+
}
|
library/toolset/toolset-common/inc/autoloaded/compatibility-loader/toolset.compatibility.loader.class.php
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* This class will load compatibility classes only in case when specific 3rd party plugin is active.
|
5 |
+
*
|
6 |
+
* @since Layouts 2.0.2
|
7 |
+
*/
|
8 |
+
class Toolset_Compatibility_Loader {
|
9 |
+
|
10 |
+
private static $instance;
|
11 |
+
|
12 |
+
public static function get_instance() {
|
13 |
+
if ( ! self::$instance ) {
|
14 |
+
self::$instance = new Toolset_Compatibility_Loader( new Toolset_Compatibility_Handler_Factory() );
|
15 |
+
}
|
16 |
+
|
17 |
+
return self::$instance;
|
18 |
+
}
|
19 |
+
|
20 |
+
/** @var Toolset_Compatibility_Handler_Factory */
|
21 |
+
private $handler_factory;
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Toolset_Compatibility_Loader constructor.
|
26 |
+
*
|
27 |
+
* @param Toolset_Compatibility_Handler_Factory $handler_factory
|
28 |
+
*/
|
29 |
+
public function __construct( Toolset_Compatibility_Handler_Factory $handler_factory ) {
|
30 |
+
|
31 |
+
$this->handler_factory = $handler_factory;
|
32 |
+
$this->initialize();
|
33 |
+
}
|
34 |
+
|
35 |
+
public function initialize(){
|
36 |
+
add_action( 'init', array( $this, 'initialize_interop_handlers' ), 10 );
|
37 |
+
}
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Load and initialize compatibility handlers if the relevant plugin/theme is active.
|
43 |
+
*
|
44 |
+
* @since Layouts 2.0.2
|
45 |
+
*/
|
46 |
+
public function initialize_interop_handlers() {
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Use filter to register compatibility classes that needs to be loaded here
|
50 |
+
*
|
51 |
+
* Example:
|
52 |
+
*
|
53 |
+
* add_filter( 'toolset_register_compatibility_classes', 'register_compatibility_classes' , 99, 1 );
|
54 |
+
* function register_compatibility_classes($classes_to_load){
|
55 |
+
* $classes_to_load[] = array(
|
56 |
+
* 'name' => 'Easy Digital Downloads',
|
57 |
+
* 'class_name' => 'Layouts_Compatibility_Easy_Digital_Downloads'
|
58 |
+
* );
|
59 |
+
* return $classes_to_load;
|
60 |
+
* }
|
61 |
+
*
|
62 |
+
*/
|
63 |
+
$classes_to_load = apply_filters( 'toolset_register_compatibility_classes', array() );
|
64 |
+
|
65 |
+
if ( is_array( $classes_to_load ) ) {
|
66 |
+
foreach ( $classes_to_load as $handler_definition ) {
|
67 |
+
$handler_class_name = $handler_definition['class_name'];
|
68 |
+
if ( class_exists( $handler_class_name ) ) {
|
69 |
+
$handler = $this->handler_factory->create( $handler_class_name );
|
70 |
+
$handler->initialize();
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
$this->run_theme_handler_factory();
|
76 |
+
|
77 |
+
}
|
78 |
+
|
79 |
+
public function run_theme_handler_factory(){
|
80 |
+
// create instance of Toolset Compatibility Themes Factory if Layouts or Views are active
|
81 |
+
$layouts_active = new Toolset_Condition_Plugin_Layouts_Active();
|
82 |
+
$views_active = new Toolset_Condition_Plugin_Views_Active();
|
83 |
+
|
84 |
+
if ( $layouts_active->is_met() || $views_active->is_met() ) {
|
85 |
+
new Toolset_Compatibility_Theme_Handler_Factory();
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
}
|
library/toolset/toolset-common/inc/autoloaded/compatibility-loader/toolset.compatibility.loader.interface.class.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Interface Toolset_Compatibility_Handler_Interface
|
5 |
+
*
|
6 |
+
* @since Layouts 2.0.2
|
7 |
+
*/
|
8 |
+
interface Toolset_Compatibility_Handler_Interface {
|
9 |
+
|
10 |
+
public function initialize();
|
11 |
+
|
12 |
+
}
|
library/toolset/toolset-common/inc/autoloaded/compatibility-loader/toolset.layouts-theme.class.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @since Layouts 2.0.2
|
5 |
+
* Class Toolset_Compatibility_Theme_Handler
|
6 |
+
*
|
7 |
+
* This is only abstract class and it is here to be extended by compatibility classes for themes
|
8 |
+
*/
|
9 |
+
abstract class Toolset_Compatibility_Theme_Handler {
|
10 |
+
protected $name;
|
11 |
+
protected $slug;
|
12 |
+
|
13 |
+
public function __construct( $name, $slug ) {
|
14 |
+
$this->name = $name;
|
15 |
+
$this->slug = $slug;
|
16 |
+
add_action( 'init', array( $this, 'run' ), 11 );
|
17 |
+
}
|
18 |
+
|
19 |
+
public function run() {
|
20 |
+
$this->run_hooks();
|
21 |
+
}
|
22 |
+
|
23 |
+
protected abstract function run_hooks();
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @return bool
|
27 |
+
* check if Woocommerce is actice
|
28 |
+
* by checking active plugins in options table
|
29 |
+
* using build in filter
|
30 |
+
*/
|
31 |
+
public function is_woocommerce_active(){
|
32 |
+
return in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) );
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @param $title
|
37 |
+
*
|
38 |
+
* @return string
|
39 |
+
* adjust Woocommerce page title depending if it's a product category or the shop page
|
40 |
+
* this is generic and used by any theme which needs this adjustment
|
41 |
+
* must be implemented using "get_the_archive_title" filter to override the title
|
42 |
+
*/
|
43 |
+
public function toolset_woocommerce_show_page_title( $title ) {
|
44 |
+
if ( $this->is_woocommerce_active() && is_woocommerce() ) {
|
45 |
+
if ( is_shop() ) {
|
46 |
+
|
47 |
+
// WooCommerce shop plays dual; as a shop page and an archive. By default, Views short code for archive title output different stuff, while, theme shows Shop Page title. Here, the title is modified to return the title of Shop Page.
|
48 |
+
$shop_page_id = get_option( 'woocommerce_shop_page_id' );
|
49 |
+
$title = sprintf( __( '%s', 'ddl-layouts' ), get_the_title( $shop_page_id ) );
|
50 |
+
} else if ( is_product_category() ) {
|
51 |
+
|
52 |
+
// Just like the above, we need to strip-off the stuff other than the category name, from the title
|
53 |
+
$title = sprintf( __( '%s', 'ddl-layouts' ), single_cat_title( '', false ) );
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
return $title;
|
58 |
+
|
59 |
+
}
|
60 |
+
}
|
library/toolset/toolset-common/inc/autoloaded/compatibility-loader/toolset.layouts-themes-factory.class.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @since Layouts 2.0.2
|
5 |
+
* Class Toolset_Compatibility_Theme_Handler_Factory
|
6 |
+
*
|
7 |
+
* Factory class with some generic functions to check is integration plugin active, get theme name and etc...
|
8 |
+
* This class will load compatibility class for specific theme if class exists
|
9 |
+
*/
|
10 |
+
class Toolset_Compatibility_Theme_Handler_Factory{
|
11 |
+
private $theme_name;
|
12 |
+
private $theme_slug;
|
13 |
+
protected $running_instance = null;
|
14 |
+
|
15 |
+
public function __construct() {
|
16 |
+
$this->theme_name = $this->get_theme_name();
|
17 |
+
$this->theme_slug = $this->get_theme_slug();
|
18 |
+
$this->running_instance = $this->load_class();
|
19 |
+
}
|
20 |
+
|
21 |
+
private function get_theme_name( ){
|
22 |
+
$theme = wp_get_theme();
|
23 |
+
if( is_child_theme() ){
|
24 |
+
return $theme->parent()->get('Name');
|
25 |
+
} else {
|
26 |
+
return $theme->get('Name');
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
|
31 |
+
private function get_theme_slug( ){
|
32 |
+
$slug = str_replace('-', '_', sanitize_title( $this->theme_name ) );
|
33 |
+
return $slug;
|
34 |
+
}
|
35 |
+
|
36 |
+
private function is_theme_integration_active(){
|
37 |
+
if( defined( 'TOOLSET_INTEGRATION_PLUGIN_THEME_NAME' ) && TOOLSET_INTEGRATION_PLUGIN_THEME_NAME === $this->theme_name ){
|
38 |
+
return true;
|
39 |
+
} else {
|
40 |
+
return false;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
private function load_class(){
|
45 |
+
|
46 |
+
$class = $this->get_class_name_string();
|
47 |
+
|
48 |
+
if( class_exists( $class ) && !$this->is_theme_integration_active() ){
|
49 |
+
$instance = new $class( $this->theme_name, $this->theme_slug );
|
50 |
+
return $instance;
|
51 |
+
}
|
52 |
+
|
53 |
+
return null;
|
54 |
+
}
|
55 |
+
|
56 |
+
private function get_class_name_string(){
|
57 |
+
return 'Toolset_Compatibility_Theme_' . $this->theme_slug;
|
58 |
+
}
|
59 |
+
}
|
library/toolset/toolset-common/inc/toolset.admin.bar.menu.class.php
CHANGED
@@ -65,9 +65,13 @@ if ( ! class_exists( 'Toolset_Admin_Bar_Menu', false ) ) {
|
|
65 |
|
66 |
// Mmmm check the dependencies here, and maybe even register the icons somehow
|
67 |
// We should be registering the style sitewide, not just on the admin side, on the right dependency
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
}
|
73 |
|
65 |
|
66 |
// Mmmm check the dependencies here, and maybe even register the icons somehow
|
67 |
// We should be registering the style sitewide, not just on the admin side, on the right dependency
|
68 |
+
$asset_manager = Toolset_Assets_Manager::getInstance();
|
69 |
+
$asset_manager->enqueue_styles(
|
70 |
+
array(
|
71 |
+
Toolset_Assets_Manager::STYLE_TOOLSET_COMMON,
|
72 |
+
Toolset_Assets_Manager::STYLE_ONTHEGOSYSTEMS_ICONS,
|
73 |
+
)
|
74 |
+
);
|
75 |
}
|
76 |
}
|
77 |
|
library/toolset/toolset-common/inc/toolset.assets.manager.class.php
CHANGED
@@ -230,6 +230,7 @@ class Toolset_Assets_Manager {
|
|
230 |
const STYLE_TOOLSET_PROMOTION = 'toolset-promotion';
|
231 |
|
232 |
|
|
|
233 |
// chosen lib
|
234 |
const STYLE_TOOLSET_CHOSEN = 'toolset-chosen-styles';
|
235 |
|
@@ -238,6 +239,8 @@ class Toolset_Assets_Manager {
|
|
238 |
//
|
239 |
const STYLE_JQUERY_UI_DIALOG = 'wp-jquery-ui-dialog';
|
240 |
|
|
|
|
|
241 |
|
242 |
/**
|
243 |
* assets_url
|
@@ -479,6 +482,13 @@ class Toolset_Assets_Manager {
|
|
479 |
TOOLSET_COMMON_VERSION
|
480 |
);
|
481 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
482 |
return apply_filters( 'toolset_add_registered_styles', $this->styles );
|
483 |
}
|
484 |
|
230 |
const STYLE_TOOLSET_PROMOTION = 'toolset-promotion';
|
231 |
|
232 |
|
233 |
+
|
234 |
// chosen lib
|
235 |
const STYLE_TOOLSET_CHOSEN = 'toolset-chosen-styles';
|
236 |
|
239 |
//
|
240 |
const STYLE_JQUERY_UI_DIALOG = 'wp-jquery-ui-dialog';
|
241 |
|
242 |
+
const STYLE_ONTHEGOSYSTEMS_ICONS = 'onthegosystems-icons';
|
243 |
+
|
244 |
|
245 |
/**
|
246 |
* assets_url
|
482 |
TOOLSET_COMMON_VERSION
|
483 |
);
|
484 |
|
485 |
+
$this->register_style(
|
486 |
+
self::STYLE_ONTHEGOSYSTEMS_ICONS,
|
487 |
+
ON_THE_GO_SYSTEMS_BRANDING_REL_PATH . 'onthegosystems-icons/css/onthegosystems-icons.css',
|
488 |
+
array( self::STYLE_TOOLSET_COMMON ),
|
489 |
+
TOOLSET_COMMON_VERSION
|
490 |
+
);
|
491 |
+
|
492 |
return apply_filters( 'toolset_add_registered_styles', $this->styles );
|
493 |
}
|
494 |
|
library/toolset/toolset-common/inc/toolset.css.component.class.php
CHANGED
@@ -66,7 +66,7 @@ if ( ! class_exists( 'Toolset_CssComponent' ) ) {
|
|
66 |
}
|
67 |
|
68 |
foreach($get_components['other'] as $key=>$value){
|
69 |
-
array_push( $buttons, '
|
70 |
}
|
71 |
|
72 |
return $buttons;
|
@@ -174,21 +174,21 @@ if ( ! class_exists( 'Toolset_CssComponent' ) ) {
|
|
174 |
'hide_editor_pop_msg' => (get_option( 'toolset_bs_component_hide_pop_msg' )) ? get_option( 'toolset_bs_component_hide_pop_msg' ) : "no",
|
175 |
'show_bs_buttons_cm_status' => (get_option( 'toolset_bs_component_show_buttons_cm_status' )) ? get_option( 'toolset_bs_component_show_buttons_cm_status' ) : "no",
|
176 |
'show_bs_buttons_tinymce_status' => (get_option( 'toolset_bs_component_show_buttons_tinymce_status' )) ? get_option( 'toolset_bs_component_show_buttons_tinymce_status' ) : "no",
|
177 |
-
'toggle_button_label_toggle' => __('Toggle Bootstrap Components', "
|
178 |
-
'toggle_button_tooltip' => __('Bootstrap Components Toggle', "
|
179 |
),
|
180 |
)
|
181 |
);
|
182 |
|
183 |
do_action('toolset_localize_script', 'toolset-css-component-grids', 'Toolset_CssComponent_Grids', array(
|
184 |
'button' => array(
|
185 |
-
'label' => __( 'Grid', '
|
186 |
),
|
187 |
'dialog' => array(
|
188 |
-
'title' => __( 'Bootstrap Grid', '
|
189 |
'content' => $this->get_grid_dialog_content(),
|
190 |
-
'insert' => __( 'Insert grid', '
|
191 |
-
'cancel' => __( 'Cancel', '
|
192 |
)
|
193 |
)
|
194 |
);
|
@@ -211,62 +211,62 @@ if ( ! class_exists( 'Toolset_CssComponent' ) ) {
|
|
211 |
<ul class="toolset-bootstrap-grid-types js-toolset-bootstrap-grid-type">
|
212 |
<li>
|
213 |
<figure class="grid-type selected">
|
214 |
-
<img class="item-preview" data-name="grid-type-two-even" src="<?php echo TOOLSET_COMMON_URL; ?>/res/images/toolset.bs-component/two-even.png" alt="<?php echo esc_html( __( '2 even columns', '
|
215 |
-
<span><?php echo esc_html( __( '2 even columns', '
|
216 |
</figure>
|
217 |
<label class="radio" data-target="grid-type-two-even" for="grid-type-two-even" style="display:none">
|
218 |
<input type="radio" name="grid_type" id="grid-type-two-even" value="two-even" checked="checked">
|
219 |
-
<?php echo esc_html( __( '2 even columns', '
|
220 |
</label>
|
221 |
</li>
|
222 |
<li>
|
223 |
<figure class="grid-type">
|
224 |
-
<img class="item-preview" data-name="grid-type-two-uneven" src="<?php echo TOOLSET_COMMON_URL; ?>/res/images/toolset.bs-component/two-uneven-wide-narrow.png" alt="<?php echo esc_html( __( '2 columns (wide and narrow)', '
|
225 |
-
<span><?php echo esc_html( __( '2 columns (wide and narrow)', '
|
226 |
</figure>
|
227 |
<label class="radio" data-target="grid-type-two-uneven" for="grid-type-two-uneven" style="display:none">
|
228 |
<input type="radio" name="grid_type" id="grid-type-two-uneven" value="two-uneven">
|
229 |
-
<?php echo esc_html( __( '2 columns (wide and narrow)', '
|
230 |
</label>
|
231 |
</li>
|
232 |
<li>
|
233 |
<figure class="grid-type">
|
234 |
-
<img class="item-preview" data-name="grid-type-three-even" src="<?php echo TOOLSET_COMMON_URL; ?>/res/images/toolset.bs-component/three-even.png" alt="<?php echo esc_html( __( '3 even columns', '
|
235 |
-
<span><?php echo esc_html( __( '3 even columns', '
|
236 |
</figure>
|
237 |
<label class="radio" data-target="grid-type-three-even" for="grid-type-three-even" style="display:none">
|
238 |
<input type="radio" name="grid_type" id="grid-type-three-even" value="three-even">
|
239 |
-
<?php echo esc_html( __( '3 even columns', '
|
240 |
</label>
|
241 |
</li>
|
242 |
<li>
|
243 |
<figure class="grid-type">
|
244 |
-
<img class="item-preview" data-name="grid-type-three-uneven" src="<?php echo TOOLSET_COMMON_URL; ?>/res/images/toolset.bs-component/three-uneven-narrow-wide-narrow.png" alt="<?php echo esc_html( __( '3 columns (1 wide and 2 narrow)', '
|
245 |
-
<span><?php echo esc_html( __( '3 columns (1 wide and 2 narrow)', '
|
246 |
</figure>
|
247 |
<label class="radio" data-target="grid-type-three-uneven" for="grid-type-three-uneven" style="display:none">
|
248 |
<input type="radio" name="grid_type" id="grid-type-three-uneven" value="three-uneven">
|
249 |
-
<?php echo esc_html( __( '3 columns (1 wide and 2 narrow)', '
|
250 |
</label>
|
251 |
</li>
|
252 |
<li>
|
253 |
<figure class="grid-type">
|
254 |
-
<img class="item-preview" data-name="grid-type-four-even" src="<?php echo TOOLSET_COMMON_URL; ?>/res/images/toolset.bs-component/four-even.png" alt="<?php echo esc_html( __( '4 even columns', '
|
255 |
-
<span><?php echo esc_html( __( '4 even columns', '
|
256 |
</figure>
|
257 |
<label class="radio" data-target="grid-type-four-even" for="grid-type-four-even" style="display:none">
|
258 |
<input type="radio" name="grid_type" id="grid-type-four-even" value="four-even">
|
259 |
-
<?php echo esc_html( __( '4 even columns', '
|
260 |
</label>
|
261 |
</li>
|
262 |
<li>
|
263 |
<figure class="grid-type">
|
264 |
-
<img class="item-preview" data-name="grid-type-six-even" src="<?php echo TOOLSET_COMMON_URL; ?>/res/images/toolset.bs-component/six-even.png" alt="<?php echo esc_html( __( '6 even columns', '
|
265 |
-
<span><?php echo esc_html( __( '6 even columns', '
|
266 |
</figure>
|
267 |
<label class="radio" data-target="grid-type-six-even" for="grid-type-six-even" style="display:none">
|
268 |
<input type="radio" name="grid_type" id="grid-type-six-even" value="six-even">
|
269 |
-
<?php echo esc_html( __( '6 even columns', '
|
270 |
</label>
|
271 |
</li>
|
272 |
</ul>
|
@@ -277,7 +277,7 @@ if ( ! class_exists( 'Toolset_CssComponent' ) ) {
|
|
277 |
$doc_link = '<a href="%s" target="_blank">%s</a>';
|
278 |
$doc_link .= '<span style="margin-left: 3px;"></span><a style="text-decoration: none;" target="_blank" href="%s"><i class="icon-external-link fa fa-external-link icon-small"></i></a>';
|
279 |
|
280 |
-
printf( $doc_link, $url, esc_html( __( 'Bootstrap Grid documentation', '
|
281 |
?>
|
282 |
</div>
|
283 |
</div>
|
66 |
}
|
67 |
|
68 |
foreach($get_components['other'] as $key=>$value){
|
69 |
+
array_push( $buttons, 'other_'.$key.'_button' );
|
70 |
}
|
71 |
|
72 |
return $buttons;
|
174 |
'hide_editor_pop_msg' => (get_option( 'toolset_bs_component_hide_pop_msg' )) ? get_option( 'toolset_bs_component_hide_pop_msg' ) : "no",
|
175 |
'show_bs_buttons_cm_status' => (get_option( 'toolset_bs_component_show_buttons_cm_status' )) ? get_option( 'toolset_bs_component_show_buttons_cm_status' ) : "no",
|
176 |
'show_bs_buttons_tinymce_status' => (get_option( 'toolset_bs_component_show_buttons_tinymce_status' )) ? get_option( 'toolset_bs_component_show_buttons_tinymce_status' ) : "no",
|
177 |
+
'toggle_button_label_toggle' => __('Toggle Bootstrap Components', "wpv-views"),
|
178 |
+
'toggle_button_tooltip' => __('Bootstrap Components Toggle', "wpv-views"),
|
179 |
),
|
180 |
)
|
181 |
);
|
182 |
|
183 |
do_action('toolset_localize_script', 'toolset-css-component-grids', 'Toolset_CssComponent_Grids', array(
|
184 |
'button' => array(
|
185 |
+
'label' => __( 'Grid', 'wpv-views' )
|
186 |
),
|
187 |
'dialog' => array(
|
188 |
+
'title' => __( 'Bootstrap Grid', 'wpv-views' ),
|
189 |
'content' => $this->get_grid_dialog_content(),
|
190 |
+
'insert' => __( 'Insert grid', 'wpv-views' ),
|
191 |
+
'cancel' => __( 'Cancel', 'wpv-views' ),
|
192 |
)
|
193 |
)
|
194 |
);
|
211 |
<ul class="toolset-bootstrap-grid-types js-toolset-bootstrap-grid-type">
|
212 |
<li>
|
213 |
<figure class="grid-type selected">
|
214 |
+
<img class="item-preview" data-name="grid-type-two-even" src="<?php echo TOOLSET_COMMON_URL; ?>/res/images/toolset.bs-component/two-even.png" alt="<?php echo esc_html( __( '2 even columns', 'wpv-views' ) ); ?>">
|
215 |
+
<span><?php echo esc_html( __( '2 even columns', 'wpv-views' ) ); ?></span>
|
216 |
</figure>
|
217 |
<label class="radio" data-target="grid-type-two-even" for="grid-type-two-even" style="display:none">
|
218 |
<input type="radio" name="grid_type" id="grid-type-two-even" value="two-even" checked="checked">
|
219 |
+
<?php echo esc_html( __( '2 even columns', 'wpv-views' ) ); ?>
|
220 |
</label>
|
221 |
</li>
|
222 |
<li>
|
223 |
<figure class="grid-type">
|
224 |
+
<img class="item-preview" data-name="grid-type-two-uneven" src="<?php echo TOOLSET_COMMON_URL; ?>/res/images/toolset.bs-component/two-uneven-wide-narrow.png" alt="<?php echo esc_html( __( '2 columns (wide and narrow)', 'wpv-views' ) ); ?>">
|
225 |
+
<span><?php echo esc_html( __( '2 columns (wide and narrow)', 'wpv-views' ) ); ?></span>
|
226 |
</figure>
|
227 |
<label class="radio" data-target="grid-type-two-uneven" for="grid-type-two-uneven" style="display:none">
|
228 |
<input type="radio" name="grid_type" id="grid-type-two-uneven" value="two-uneven">
|
229 |
+
<?php echo esc_html( __( '2 columns (wide and narrow)', 'wpv-views' ) ); ?>
|
230 |
</label>
|
231 |
</li>
|
232 |
<li>
|
233 |
<figure class="grid-type">
|
234 |
+
<img class="item-preview" data-name="grid-type-three-even" src="<?php echo TOOLSET_COMMON_URL; ?>/res/images/toolset.bs-component/three-even.png" alt="<?php echo esc_html( __( '3 even columns', 'wpv-views' ) ); ?>">
|
235 |
+
<span><?php echo esc_html( __( '3 even columns', 'wpv-views' ) ); ?></span>
|
236 |
</figure>
|
237 |
<label class="radio" data-target="grid-type-three-even" for="grid-type-three-even" style="display:none">
|
238 |
<input type="radio" name="grid_type" id="grid-type-three-even" value="three-even">
|
239 |
+
<?php echo esc_html( __( '3 even columns', 'wpv-views' ) ); ?>
|
240 |
</label>
|
241 |
</li>
|
242 |
<li>
|
243 |
<figure class="grid-type">
|
244 |
+
<img class="item-preview" data-name="grid-type-three-uneven" src="<?php echo TOOLSET_COMMON_URL; ?>/res/images/toolset.bs-component/three-uneven-narrow-wide-narrow.png" alt="<?php echo esc_html( __( '3 columns (1 wide and 2 narrow)', 'wpv-views' ) ); ?>">
|
245 |
+
<span><?php echo esc_html( __( '3 columns (1 wide and 2 narrow)', 'wpv-views' ) ); ?></span>
|
246 |
</figure>
|
247 |
<label class="radio" data-target="grid-type-three-uneven" for="grid-type-three-uneven" style="display:none">
|
248 |
<input type="radio" name="grid_type" id="grid-type-three-uneven" value="three-uneven">
|
249 |
+
<?php echo esc_html( __( '3 columns (1 wide and 2 narrow)', 'wpv-views' ) ); ?>
|
250 |
</label>
|
251 |
</li>
|
252 |
<li>
|
253 |
<figure class="grid-type">
|
254 |
+
<img class="item-preview" data-name="grid-type-four-even" src="<?php echo TOOLSET_COMMON_URL; ?>/res/images/toolset.bs-component/four-even.png" alt="<?php echo esc_html( __( '4 even columns', 'wpv-views' ) ); ?>">
|
255 |
+
<span><?php echo esc_html( __( '4 even columns', 'wpv-views' ) ); ?></span>
|
256 |
</figure>
|
257 |
<label class="radio" data-target="grid-type-four-even" for="grid-type-four-even" style="display:none">
|
258 |
<input type="radio" name="grid_type" id="grid-type-four-even" value="four-even">
|
259 |
+
<?php echo esc_html( __( '4 even columns', 'wpv-views' ) ); ?>
|
260 |
</label>
|
261 |
</li>
|
262 |
<li>
|
263 |
<figure class="grid-type">
|
264 |
+
<img class="item-preview" data-name="grid-type-six-even" src="<?php echo TOOLSET_COMMON_URL; ?>/res/images/toolset.bs-component/six-even.png" alt="<?php echo esc_html( __( '6 even columns', 'wpv-views' ) ); ?>">
|
265 |
+
<span><?php echo esc_html( __( '6 even columns', 'wpv-views' ) ); ?></span>
|
266 |
</figure>
|
267 |
<label class="radio" data-target="grid-type-six-even" for="grid-type-six-even" style="display:none">
|
268 |
<input type="radio" name="grid_type" id="grid-type-six-even" value="six-even">
|
269 |
+
<?php echo esc_html( __( '6 even columns', 'wpv-views' ) ); ?>
|
270 |
</label>
|
271 |
</li>
|
272 |
</ul>
|
277 |
$doc_link = '<a href="%s" target="_blank">%s</a>';
|
278 |
$doc_link .= '<span style="margin-left: 3px;"></span><a style="text-decoration: none;" target="_blank" href="%s"><i class="icon-external-link fa fa-external-link icon-small"></i></a>';
|
279 |
|
280 |
+
printf( $doc_link, $url, esc_html( __( 'Bootstrap Grid documentation', 'wpv-views' ) ), $url );
|
281 |
?>
|
282 |
</div>
|
283 |
</div>
|
library/toolset/toolset-common/inc/toolset.theme.integration.php
ADDED
@@ -0,0 +1,1366 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Manages dynamic third-party theme integrations
|
5 |
+
* @since 2.5
|
6 |
+
*/
|
7 |
+
class Toolset_Theme_Integration {
|
8 |
+
|
9 |
+
const TOOLSET_THEME_CONFIG_FILE = 'toolset-config.json';
|
10 |
+
const TOOLSET_GLOBAL_SETTING_PREFIX = 'toolset_global_';
|
11 |
+
const TOOLSET_THEME_NO_DEFAULT = 'toolset_no_default';
|
12 |
+
|
13 |
+
public $has_toolset_config = false;
|
14 |
+
/**
|
15 |
+
* @var string
|
16 |
+
* holds active theme object.
|
17 |
+
*/
|
18 |
+
public $active_theme;
|
19 |
+
/**
|
20 |
+
* @var string
|
21 |
+
* hold the global store type, array, single or customizer.
|
22 |
+
*/
|
23 |
+
public $theme_global_store_type;
|
24 |
+
|
25 |
+
private $script_pages = array( 'dd_layouts_edit', 'ct-editor', 'view-archives-editor' );
|
26 |
+
private $object_id;
|
27 |
+
private $is_views_active;
|
28 |
+
private $is_layouts_active;
|
29 |
+
private static $instance;
|
30 |
+
/**
|
31 |
+
* @var string
|
32 |
+
* holds the paths for the current active theme.
|
33 |
+
*/
|
34 |
+
public $current_theme_path;
|
35 |
+
/**
|
36 |
+
* @var string
|
37 |
+
* holds the paths for the current active child theme, if any.
|
38 |
+
*/
|
39 |
+
private $child_theme_path = null;
|
40 |
+
/**
|
41 |
+
* @var object
|
42 |
+
* holds the decoded config file JSON object if valid.
|
43 |
+
*/
|
44 |
+
private $toolset_config;
|
45 |
+
/**
|
46 |
+
* @var object
|
47 |
+
* holds the complete settings object for either Views CT, WPA or a Layout and can be used to access saved theme options.
|
48 |
+
*/
|
49 |
+
private $current_settings_object;
|
50 |
+
/**
|
51 |
+
* @var string[]
|
52 |
+
* holds all the option names present in the config file.
|
53 |
+
*/
|
54 |
+
private $theme_option_names = array();
|
55 |
+
/**
|
56 |
+
* @var string[]
|
57 |
+
* holds only the names for the global options present in the config file.
|
58 |
+
*/
|
59 |
+
private $global_options = array();
|
60 |
+
/**
|
61 |
+
* @var object[]
|
62 |
+
* holds the call data for the theme global option injection process.
|
63 |
+
*/
|
64 |
+
private $global_options_hooks = array();
|
65 |
+
/**
|
66 |
+
* @var object[]
|
67 |
+
* holds all options objects, with their GUI properties.
|
68 |
+
*/
|
69 |
+
private $toolset_config_options = array();
|
70 |
+
/**
|
71 |
+
* @var string[]
|
72 |
+
* holds names for all post related options.
|
73 |
+
*/
|
74 |
+
private $single_options = array();
|
75 |
+
/**
|
76 |
+
* @var string
|
77 |
+
* holds one of three values view, view-template, or dd_layouts and indicates from where do we load the saved settings.
|
78 |
+
*/
|
79 |
+
private $current_object_type = null;
|
80 |
+
/**
|
81 |
+
* @var object
|
82 |
+
* holds the layout object if the current object type is a layout.
|
83 |
+
*/
|
84 |
+
private $layouts_settings_object = null;
|
85 |
+
|
86 |
+
public static function get_instance() {
|
87 |
+
if ( null == Toolset_Theme_Integration::$instance ) {
|
88 |
+
Toolset_Theme_Integration::$instance = new Toolset_Theme_Integration();
|
89 |
+
}
|
90 |
+
|
91 |
+
return Toolset_Theme_Integration::$instance;
|
92 |
+
}
|
93 |
+
|
94 |
+
public function __construct() {
|
95 |
+
$views_condition = new Toolset_Condition_Plugin_Views_Active();
|
96 |
+
$this->is_views_active = $views_condition->is_met();
|
97 |
+
|
98 |
+
$layouts_condition = new Toolset_Condition_Plugin_Layouts_Active();
|
99 |
+
$this->is_layouts_active = $layouts_condition->is_met();
|
100 |
+
|
101 |
+
$this->current_theme_path = get_template_directory() . '/';
|
102 |
+
|
103 |
+
if ( get_stylesheet_directory() != get_template_directory() ) {
|
104 |
+
$this->child_theme_path = get_stylesheet_directory() . '/';
|
105 |
+
}
|
106 |
+
|
107 |
+
add_action( 'admin_init', array( $this, 'admin_init' ) );
|
108 |
+
add_action( 'wp', array( $this, 'execute_global_option_hooks' ), 10 );
|
109 |
+
add_filter( 'toolset_theme_integration_get_setting', array( $this, 'filter_get_setting' ), 10, 2 );
|
110 |
+
$this->init();
|
111 |
+
}
|
112 |
+
|
113 |
+
public function register_assets() {
|
114 |
+
wp_register_script( 'toolset_theme_integration_admin_script', TOOLSET_COMMON_URL . '/res/js/toolset-theme-integration.js', array(
|
115 |
+
'jquery',
|
116 |
+
'wp-pointer'
|
117 |
+
) );
|
118 |
+
|
119 |
+
wp_localize_script( 'toolset_theme_integration_admin_script', 'Toolset_Theme_Integrations_Settings', array(
|
120 |
+
'strings' => array(
|
121 |
+
'close' => __( 'Close', 'wpv-views' )
|
122 |
+
)
|
123 |
+
) );
|
124 |
+
}
|
125 |
+
|
126 |
+
public function enqueue_scripts() {
|
127 |
+
if ( ! isset ( $_GET['page'] ) ) {
|
128 |
+
return;
|
129 |
+
}
|
130 |
+
|
131 |
+
if ( in_array( $_GET['page'], $this->script_pages ) ) {
|
132 |
+
wp_enqueue_script( 'toolset_theme_integration_admin_script' );
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
public function enqueue_styles() {
|
137 |
+
if ( ! isset ( $_GET['page'] ) ) {
|
138 |
+
return;
|
139 |
+
}
|
140 |
+
|
141 |
+
if ( in_array( $_GET['page'], $this->script_pages ) ) {
|
142 |
+
wp_enqueue_style( 'wp-pointer' );
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* @since 2.5
|
148 |
+
* runs on constructs and call the config loading function and the filter for global options
|
149 |
+
*/
|
150 |
+
public function init() {
|
151 |
+
$this->load_toolset_config();
|
152 |
+
$this->filter_global_option_objects();
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* @since 2.5
|
157 |
+
* adds required actions and filter if the toolset config file is loaded correctly.
|
158 |
+
*/
|
159 |
+
public function admin_init() {
|
160 |
+
$this->register_assets();
|
161 |
+
$this->load_toolset_config();
|
162 |
+
$this->active_theme = wp_get_theme();
|
163 |
+
|
164 |
+
if ( $this->has_toolset_config ) {
|
165 |
+
add_filter( 'ddl_layout_settings_save', array( $this, 'layout_save_theme_settings' ), 10, 3 );
|
166 |
+
add_filter( 'assign_layout_to_post_object', array( $this, 'handle_layout_assignment_change' ), 99, 5 );
|
167 |
+
|
168 |
+
add_action( 'wp_ajax_toolset_theme_integration_save_wpa_settings', array(
|
169 |
+
$this,
|
170 |
+
'views_wpa_save_theme_settings'
|
171 |
+
) );
|
172 |
+
|
173 |
+
add_action( 'wp_ajax_toolset_theme_integration_save_ct_settings', array(
|
174 |
+
$this,
|
175 |
+
'views_ct_save_theme_settings'
|
176 |
+
) );
|
177 |
+
|
178 |
+
add_action( 'wp_ajax_toolset_theme_integration_get_section_display_type', array(
|
179 |
+
$this,
|
180 |
+
'ajax_get_layout_assignment_type'
|
181 |
+
) );
|
182 |
+
|
183 |
+
add_action( 'wpddl_after_render_editor', array( $this, 'render_layouts_settings_section' ) );
|
184 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
185 |
+
add_action( 'admin_print_styles', array( $this, 'enqueue_styles' ) );
|
186 |
+
|
187 |
+
add_action( 'ddl_action_layout_has_been_saved', array(
|
188 |
+
$this,
|
189 |
+
'update_post_meta_after_layout_update'
|
190 |
+
), 99, 3 );
|
191 |
+
add_action( "save_post", array( $this, 'update_post_theme_settings_meta' ), 99, 1 );
|
192 |
+
//Render the GUI in CT page when layout is deactivated
|
193 |
+
if ( ! $this->is_layouts_active && $this->is_views_active ) {
|
194 |
+
add_action( 'wpv_ct_editor_sections', array( $this, 'render_views_ct_settings_section' ), 40 );
|
195 |
+
add_action( 'wpv_action_wpa_editor_section_extra', array(
|
196 |
+
$this,
|
197 |
+
'render_views_wpa_settings_section'
|
198 |
+
), 40 );
|
199 |
+
}
|
200 |
+
$this->load_current_settings_object();
|
201 |
+
}
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* @since 2.5
|
206 |
+
* filters the global options present in the config file.
|
207 |
+
*/
|
208 |
+
public function filter_global_option_objects() {
|
209 |
+
if ( $this->has_toolset_config ) {
|
210 |
+
foreach ( $this->toolset_config->sections as $section ) {
|
211 |
+
foreach ( $section->options as $option ) {
|
212 |
+
$this->toolset_config_options[ $option->name ] = $option;
|
213 |
+
|
214 |
+
if ( isset( $option->store_type ) && $option->store_type == "global" ) {
|
215 |
+
$this->global_options[] = $option->name;
|
216 |
+
if ( $this->theme_global_store_type == 'single' ) {
|
217 |
+
add_filter( "option_{$option->name}", array( $this, "pre_global_option_save" ), 99, 2 );
|
218 |
+
} else if ( $this->theme_global_store_type == 'customizer' ) {
|
219 |
+
add_filter( "theme_mod_{$option->name}", array(
|
220 |
+
$this,
|
221 |
+
"pre_customizer_option_value"
|
222 |
+
), 99 );
|
223 |
+
}
|
224 |
+
} else {
|
225 |
+
$this->single_options[] = $option->name;
|
226 |
+
}
|
227 |
+
}
|
228 |
+
}
|
229 |
+
}
|
230 |
+
|
231 |
+
if ( $this->theme_global_store_type == 'array' && property_exists( $this->toolset_config, 'global_store_name' ) ) {
|
232 |
+
add_filter( "option_{$this->toolset_config->global_store_name}", array(
|
233 |
+
$this,
|
234 |
+
"pre_global_option_save"
|
235 |
+
), 99, 2 );
|
236 |
+
}
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* returned the parsed toolset config object or null
|
241 |
+
* @return object|null
|
242 |
+
*/
|
243 |
+
public function get_toolset_config_object() {
|
244 |
+
return $this->toolset_config;
|
245 |
+
}
|
246 |
+
|
247 |
+
/**
|
248 |
+
* @param null $post_id
|
249 |
+
* @param int|null $object_id
|
250 |
+
* loads the saved settings for either CT, WPA or Layout and can figure out settings even if no params are passed, but requires $_GET['page'] to be present with valid object ID
|
251 |
+
*
|
252 |
+
* @return $this
|
253 |
+
*/
|
254 |
+
public function load_current_settings_object( $post_id = null, $object_id = null ) {
|
255 |
+
$object_type = null;
|
256 |
+
|
257 |
+
if ( empty( $object_id ) ) {
|
258 |
+
if ( isset( $_GET['layout_id'] ) ) {
|
259 |
+
$object_id = (int) $_GET['layout_id'];
|
260 |
+
$object_type = 'dd_layouts';
|
261 |
+
}
|
262 |
+
}
|
263 |
+
|
264 |
+
if ( ! empty( $object_id ) ) {
|
265 |
+
$object_type = get_post_type( $object_id );
|
266 |
+
}
|
267 |
+
|
268 |
+
if ( empty( $object_id ) ) {
|
269 |
+
if ( empty( $post_id ) ) {
|
270 |
+
if ( isset( $_GET['post'] ) ) {
|
271 |
+
$post_id = (int) $_GET['post'];
|
272 |
+
}
|
273 |
+
}
|
274 |
+
|
275 |
+
if ( empty( $post_id ) && ( is_single() || is_page() ) ) {
|
276 |
+
global $post;
|
277 |
+
if ( isset( $post->ID ) ) {
|
278 |
+
$post_id = (int) $post->ID;
|
279 |
+
}
|
280 |
+
}
|
281 |
+
|
282 |
+
if ( ! empty( $post_id ) ) {
|
283 |
+
if ( $this->is_layouts_active ) {
|
284 |
+
$object_type = 'dd_layouts';
|
285 |
+
$layout_slug = get_post_meta( (int) $post_id, WPDDL_LAYOUTS_META_KEY, true );
|
286 |
+
$object_id = apply_filters( 'ddl-get_layout_id_by_slug', null, $layout_slug );
|
287 |
+
} else {
|
288 |
+
if ( $this->is_views_active ) {
|
289 |
+
$object_id = get_post_meta( $post_id, '_views_template', true );
|
290 |
+
$object_type = 'view-template';
|
291 |
+
}
|
292 |
+
}
|
293 |
+
}
|
294 |
+
|
295 |
+
if ( isset( $_GET['page'] ) ) {
|
296 |
+
switch ( $_GET['page'] ) {
|
297 |
+
case 'view-archives-editor':
|
298 |
+
$object_id = (int) $_GET['view_id'];
|
299 |
+
$object_type = 'view';
|
300 |
+
break;
|
301 |
+
case 'ct-editor':
|
302 |
+
$object_id = (int) $_GET['ct_id'];
|
303 |
+
$object_type = 'view-template';
|
304 |
+
break;
|
305 |
+
case 'dd_layouts_edit':
|
306 |
+
$object_id = (int) $_GET['layout_id'];
|
307 |
+
$object_type = 'dd_layouts';
|
308 |
+
break;
|
309 |
+
}
|
310 |
+
}
|
311 |
+
|
312 |
+
if ( empty( $object_id ) ) {
|
313 |
+
$object_id = $this->fetch_queried_object_id();
|
314 |
+
$object_type = $this->fetch_queried_object_type( $object_id );
|
315 |
+
}
|
316 |
+
}
|
317 |
+
|
318 |
+
if ( ! empty( $object_type ) ) {
|
319 |
+
switch ( $object_type ) {
|
320 |
+
case 'view':
|
321 |
+
$this->current_settings_object = apply_filters( 'wpv_filter_wpv_get_view_settings', array(), $object_id );
|
322 |
+
break;
|
323 |
+
case 'view-template':
|
324 |
+
$this->current_settings_object = get_post_meta( $object_id, '_views_template_theme_settings', true );
|
325 |
+
break;
|
326 |
+
case 'dd_layouts':
|
327 |
+
$this->current_settings_object = apply_filters( 'ddl-get_layout_settings', $object_id, true );
|
328 |
+
$this->layouts_settings_object = apply_filters( 'ddl-get_layout_as_php_object', $object_id, true );
|
329 |
+
|
330 |
+
if ( is_object( $this->current_settings_object ) === false ) {
|
331 |
+
$this->current_settings_object = null;
|
332 |
+
}
|
333 |
+
break;
|
334 |
+
}
|
335 |
+
}
|
336 |
+
|
337 |
+
$this->current_object_type = $object_type;
|
338 |
+
$this->object_id = $object_id;
|
339 |
+
if ( ! empty( $this->current_settings_object ) && is_object( $this->current_settings_object ) ) {
|
340 |
+
$this->current_settings_object = get_object_vars( $this->current_settings_object );
|
341 |
+
|
342 |
+
if ( array_key_exists( 'toolset_theme_settings', $this->current_settings_object ) && is_object( $this->current_settings_object['toolset_theme_settings'] ) ) {
|
343 |
+
$this->current_settings_object['toolset_theme_settings'] = get_object_vars( $this->current_settings_object['toolset_theme_settings'] );
|
344 |
+
}
|
345 |
+
}
|
346 |
+
|
347 |
+
return $this;
|
348 |
+
}
|
349 |
+
|
350 |
+
/**
|
351 |
+
* @since 2.5
|
352 |
+
*
|
353 |
+
* @param $file_path
|
354 |
+
* returns the config file json
|
355 |
+
*
|
356 |
+
* @return bool|string
|
357 |
+
*/
|
358 |
+
public function load_config_file_json( $file_path ) {
|
359 |
+
//open and read the config file and parse its json to stdClass object
|
360 |
+
$open_config_file = fopen( $file_path, 'r' );
|
361 |
+
$config_json = fread( $open_config_file, filesize( $file_path ) );
|
362 |
+
fclose( $open_config_file );
|
363 |
+
|
364 |
+
return $config_json;
|
365 |
+
}
|
366 |
+
|
367 |
+
/**
|
368 |
+
* @since 2.5
|
369 |
+
* loads the config file and parse into object
|
370 |
+
*/
|
371 |
+
public function load_toolset_config() {
|
372 |
+
$config_file_path = $this->current_theme_path . self::TOOLSET_THEME_CONFIG_FILE;
|
373 |
+
if ( file_exists( $config_file_path ) ) {
|
374 |
+
try {
|
375 |
+
//open and read the config file and parse its json to stdClass object
|
376 |
+
$config_json = $this->load_config_file_json( $config_file_path );
|
377 |
+
$config_decoded_json = json_decode( $config_json );
|
378 |
+
|
379 |
+
if ( $this->validate_config_file_structure( $config_decoded_json ) ) {
|
380 |
+
$this->toolset_config = $config_decoded_json;
|
381 |
+
$this->has_toolset_config = true;
|
382 |
+
|
383 |
+
if ( $this->child_theme_path != null && file_exists( $this->child_theme_path . self::TOOLSET_THEME_CONFIG_FILE ) ) {
|
384 |
+
$child_config_json = $this->load_config_file_json( $this->child_theme_path . self::TOOLSET_THEME_CONFIG_FILE );
|
385 |
+
$child_config_decoded_json = json_decode( $child_config_json );
|
386 |
+
|
387 |
+
if ( $this->validate_config_file_structure( $child_config_decoded_json ) ) {
|
388 |
+
array_merge( $child_config_decoded_json['sections'], $this->toolset_config->sections );
|
389 |
+
}
|
390 |
+
}
|
391 |
+
|
392 |
+
foreach ( $this->toolset_config->sections as $section ) {
|
393 |
+
foreach ( $section->options as $option ) {
|
394 |
+
$this->theme_option_names[] = $option->name;
|
395 |
+
}
|
396 |
+
}
|
397 |
+
|
398 |
+
if ( property_exists( $this->toolset_config, "global_store_type" ) ) {
|
399 |
+
$this->theme_global_store_type = $this->toolset_config->global_store_type;
|
400 |
+
}
|
401 |
+
|
402 |
+
} else {
|
403 |
+
throw new Exception( 'Invalid Toolset config file structure' );
|
404 |
+
}
|
405 |
+
} catch ( Exception $exception ) {
|
406 |
+
do_action( 'toolset_parsing_theme_config_failed', $exception );
|
407 |
+
}
|
408 |
+
}
|
409 |
+
}
|
410 |
+
|
411 |
+
/**
|
412 |
+
* @since 2.5
|
413 |
+
*
|
414 |
+
* @param $content
|
415 |
+
* validates the config-toolset.json file structure.
|
416 |
+
*
|
417 |
+
* @return bool
|
418 |
+
*/
|
419 |
+
public function validate_config_file_structure( $content ) {
|
420 |
+
if ( ! is_object( $content ) ) {
|
421 |
+
return false;
|
422 |
+
}
|
423 |
+
|
424 |
+
if ( ! property_exists( $content, 'sections' ) ) {
|
425 |
+
return false;
|
426 |
+
}
|
427 |
+
|
428 |
+
if ( is_array( $content->sections ) && count( $content->sections ) != 0 ) {
|
429 |
+
foreach ( $content->sections as $section ) {
|
430 |
+
if ( ! is_array( $section->options ) ) {
|
431 |
+
return false;
|
432 |
+
} else {
|
433 |
+
foreach ( $section->options as $option ) {
|
434 |
+
return ( property_exists( $option, 'name' ) && property_exists( $option, 'gui' ) );
|
435 |
+
}
|
436 |
+
}
|
437 |
+
}
|
438 |
+
}
|
439 |
+
|
440 |
+
return true;
|
441 |
+
}
|
442 |
+
|
443 |
+
public function get_section_name( $title, $type ) {
|
444 |
+
$title = str_replace( ' ', '_', $title . '_' . $type );
|
445 |
+
$title = strtolower( $title );
|
446 |
+
$title = esc_attr( $title );
|
447 |
+
|
448 |
+
return $title;
|
449 |
+
}
|
450 |
+
|
451 |
+
/**
|
452 |
+
* @since 2.5
|
453 |
+
*
|
454 |
+
* @param $input_name
|
455 |
+
* @param null $default
|
456 |
+
* returns a sanitized input value for a specific option
|
457 |
+
*
|
458 |
+
* @return null
|
459 |
+
*/
|
460 |
+
public function get_input_value( $input_name, $default = null ) {
|
461 |
+
return esc_attr( $this->get_theme_setting( $input_name ) );
|
462 |
+
}
|
463 |
+
|
464 |
+
/**
|
465 |
+
* @since 2.5
|
466 |
+
*
|
467 |
+
* @param $json
|
468 |
+
* @param $post
|
469 |
+
* @param $raw
|
470 |
+
* hooks to layouts to save the custom theme settings to the Layout object
|
471 |
+
*
|
472 |
+
* @return mixed
|
473 |
+
*/
|
474 |
+
public function layout_save_theme_settings( $json, $post, $raw ) {
|
475 |
+
if ( isset( $_POST['theme_settings'] ) ) {
|
476 |
+
parse_str( $_POST['theme_settings'], $theme_settings );
|
477 |
+
|
478 |
+
if ( is_string( $theme_settings ) ) {
|
479 |
+
$settings_array = array( $theme_settings );
|
480 |
+
$theme_settings = $settings_array;
|
481 |
+
}
|
482 |
+
|
483 |
+
if ( is_array( $theme_settings ) && count( $theme_settings ) ) {
|
484 |
+
$json['toolset_theme_settings'] = $theme_settings;
|
485 |
+
}
|
486 |
+
}
|
487 |
+
|
488 |
+
return $json;
|
489 |
+
}
|
490 |
+
|
491 |
+
/**
|
492 |
+
* @since 2.5
|
493 |
+
* AJAX callback for toolset_theme_integration_save_ct_settings action, responsible for saving theme settings into Views CT
|
494 |
+
*/
|
495 |
+
public function views_ct_save_theme_settings() {
|
496 |
+
$uid = get_current_user_id();
|
497 |
+
|
498 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
499 |
+
$data = array(
|
500 |
+
'type' => 'capability',
|
501 |
+
'message' => __( 'You do not have permissions for that.', 'wpv-views' )
|
502 |
+
);
|
503 |
+
wp_send_json_error( $data );
|
504 |
+
}
|
505 |
+
|
506 |
+
if (
|
507 |
+
! isset( $_POST['id'] )
|
508 |
+
|| ! is_numeric( $_POST['id'] )
|
509 |
+
|| intval( $_POST['id'] ) < 1
|
510 |
+
) {
|
511 |
+
$data = array(
|
512 |
+
'type' => 'id',
|
513 |
+
'message' => __( 'Wrong or missing ID.', 'wpv-views' )
|
514 |
+
);
|
515 |
+
wp_send_json_error( $data );
|
516 |
+
} else {
|
517 |
+
$ct_id = (int) $_POST['id'];
|
518 |
+
}
|
519 |
+
|
520 |
+
if (
|
521 |
+
! isset( $_POST['wpnonce'] )
|
522 |
+
|| ! wp_verify_nonce( $_POST['wpnonce'], "wpv_ct_{$ct_id}_update_properties_by_{$uid}" )
|
523 |
+
) {
|
524 |
+
$data = array(
|
525 |
+
'type' => 'nonce',
|
526 |
+
'message' => __( 'Your security credentials have expired. Please reload the page to get new ones.', 'wpv-views' )
|
527 |
+
);
|
528 |
+
wp_send_json_error( $data );
|
529 |
+
}
|
530 |
+
|
531 |
+
if ( empty( $_POST['theme_settings'] ) ) {
|
532 |
+
$data = array(
|
533 |
+
'type' => 'data_missing',
|
534 |
+
'message' => __( 'Wrong or missing data.', 'wpv-views' )
|
535 |
+
);
|
536 |
+
wp_send_json_error( $data );
|
537 |
+
}
|
538 |
+
|
539 |
+
parse_str( $_POST['theme_settings'], $theme_settings );
|
540 |
+
$theme_settings_array = array();
|
541 |
+
$theme_settings_array['toolset_theme_settings'] = $theme_settings;
|
542 |
+
|
543 |
+
update_post_meta( $ct_id, '_views_template_theme_settings', $theme_settings_array );
|
544 |
+
|
545 |
+
$data = array(
|
546 |
+
'id' => $ct_id,
|
547 |
+
'message' => __( 'Theme settings saved', 'wpv-views' ),
|
548 |
+
);
|
549 |
+
|
550 |
+
$this->update_post_meta_after_views_update( $ct_id );
|
551 |
+
|
552 |
+
wp_send_json_success( $data );
|
553 |
+
}
|
554 |
+
|
555 |
+
/**
|
556 |
+
* @since 2.5
|
557 |
+
* AJAX callback for toolset_theme_integration_save_wpa_settings action, responsible for saving theme settings into Views WPA
|
558 |
+
*/
|
559 |
+
public function views_wpa_save_theme_settings() {
|
560 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
561 |
+
$data = array(
|
562 |
+
'type' => 'capability',
|
563 |
+
'message' => __( 'You do not have permissions for that.', 'wpv-views' )
|
564 |
+
);
|
565 |
+
wp_send_json_error( $data );
|
566 |
+
}
|
567 |
+
if (
|
568 |
+
! isset( $_POST['wpnonce'] )
|
569 |
+
|| ! wp_verify_nonce( $_POST['wpnonce'], 'wpv_nonce_editor_nonce' )
|
570 |
+
) {
|
571 |
+
$data = array(
|
572 |
+
'type' => 'nonce',
|
573 |
+
'message' => __( 'Your security credentials have expired. Please reload the page to get new ones.', 'wpv-views' )
|
574 |
+
);
|
575 |
+
wp_send_json_error( $data );
|
576 |
+
}
|
577 |
+
if (
|
578 |
+
! isset( $_POST['id'] )
|
579 |
+
|| ! is_numeric( $_POST['id'] )
|
580 |
+
|| intval( $_POST['id'] ) < 1
|
581 |
+
) {
|
582 |
+
$data = array(
|
583 |
+
'type' => 'id',
|
584 |
+
'message' => __( 'Wrong or missing ID.', 'wpv-views' )
|
585 |
+
);
|
586 |
+
wp_send_json_error( $data );
|
587 |
+
}
|
588 |
+
if ( empty( $_POST['theme_settings'] ) ) {
|
589 |
+
$data = array(
|
590 |
+
'type' => 'data_missing',
|
591 |
+
'message' => __( 'Wrong or missing data.', 'wpv-views' )
|
592 |
+
);
|
593 |
+
wp_send_json_error( $data );
|
594 |
+
}
|
595 |
+
$view_id = intval( $_POST['id'] );
|
596 |
+
parse_str( $_POST['theme_settings'], $theme_settings );
|
597 |
+
$view_array = get_post_meta( $view_id, '_wpv_settings', true );
|
598 |
+
|
599 |
+
$view_array['toolset_theme_settings'] = $theme_settings;
|
600 |
+
update_post_meta( $view_id, '_wpv_settings', $view_array );
|
601 |
+
|
602 |
+
do_action( 'wpv_action_wpv_save_item', $view_id );
|
603 |
+
|
604 |
+
$data = array(
|
605 |
+
'id' => $view_id,
|
606 |
+
'message' => __( 'Theme settings saved', 'wpv-views' ),
|
607 |
+
);
|
608 |
+
|
609 |
+
wp_send_json_success( $data );
|
610 |
+
}
|
611 |
+
|
612 |
+
/**
|
613 |
+
* @since 2.5
|
614 |
+
*
|
615 |
+
* @param $post_id
|
616 |
+
* Updates single post meta with single options values when the theme settings is saved in CT or Layout.
|
617 |
+
*/
|
618 |
+
public function update_post_theme_settings_meta( $post_id ) {
|
619 |
+
if ( $post_id ) {
|
620 |
+
$this->load_current_settings_object( $post_id );
|
621 |
+
if ( $this->has_theme_settings() ) {
|
622 |
+
$theme_settings = $this->current_settings_object['toolset_theme_settings'];
|
623 |
+
if ( $this->has_theme_settings() ) {
|
624 |
+
foreach ( $this->theme_option_names as $option ) {
|
625 |
+
if ( array_key_exists( $option, $theme_settings ) ) {
|
626 |
+
update_post_meta( $post_id, $option, $this->get_theme_setting( $option ) );
|
627 |
+
} else {
|
628 |
+
delete_post_meta( $post_id, $option );
|
629 |
+
}
|
630 |
+
}
|
631 |
+
}
|
632 |
+
}
|
633 |
+
}
|
634 |
+
}
|
635 |
+
|
636 |
+
|
637 |
+
/**
|
638 |
+
* @since 2.5
|
639 |
+
*
|
640 |
+
* @param $ret
|
641 |
+
* @param $post_id
|
642 |
+
* @param $layout_slug
|
643 |
+
* @param $template
|
644 |
+
* @param $meta
|
645 |
+
* updates post meta when layout assignment changes.
|
646 |
+
*/
|
647 |
+
public function handle_layout_assignment_change( $ret, $post_id, $layout_slug, $template, $meta ) {
|
648 |
+
$this->update_post_theme_settings_meta( $post_id );
|
649 |
+
}
|
650 |
+
|
651 |
+
/**
|
652 |
+
* @since 2.5
|
653 |
+
*
|
654 |
+
* @param $update
|
655 |
+
* @param $layout_id
|
656 |
+
* @param $json
|
657 |
+
* updates the post meta for posts associated with the updated layout.
|
658 |
+
*/
|
659 |
+
public function update_post_meta_after_layout_update( $update, $layout_id, $json ) {
|
660 |
+
|
661 |
+
$layout_post_ids = apply_filters( 'ddl-get_layout_posts_ids', $layout_id );
|
662 |
+
|
663 |
+
if ( ! count( $layout_post_ids ) ) {
|
664 |
+
return;
|
665 |
+
}
|
666 |
+
|
667 |
+
$where_used = implode( ',', array_filter( $layout_post_ids, array( $this, 'filter_int_ids' ) ) );
|
668 |
+
|
669 |
+
$this->load_current_settings_object( null, $layout_id );
|
670 |
+
$this->update_posts_meta_after_settings_update( $where_used );
|
671 |
+
}
|
672 |
+
|
673 |
+
public function filter_int_ids( $item ) {
|
674 |
+
return (int) $item;
|
675 |
+
}
|
676 |
+
|
677 |
+
/**
|
678 |
+
* @since 2.5
|
679 |
+
*
|
680 |
+
* @param $view_id
|
681 |
+
* updates the post meta for posts associated with the updated CT.
|
682 |
+
*/
|
683 |
+
public function update_post_meta_after_views_update( $view_id ) {
|
684 |
+
|
685 |
+
$view_post_ids = apply_filters( 'wpv_get_posts_by_content_template', array(), $view_id );
|
686 |
+
|
687 |
+
if ( ! count( $view_post_ids ) ) {
|
688 |
+
return;
|
689 |
+
}
|
690 |
+
|
691 |
+
$where_used = implode( ',', array_filter( $view_post_ids, array( $this, 'filter_int_ids' ) ) );
|
692 |
+
|
693 |
+
$this->load_current_settings_object( null, $view_id );
|
694 |
+
$this->update_posts_meta_after_settings_update( $where_used );
|
695 |
+
}
|
696 |
+
|
697 |
+
/**
|
698 |
+
* @since 2.5
|
699 |
+
*
|
700 |
+
* @param $posts_ids string[]
|
701 |
+
* Updates multiple posts meta with single options values when the theme settings is saved in CT or Layout.
|
702 |
+
*/
|
703 |
+
public function update_posts_meta_after_settings_update( $posts_ids ) {
|
704 |
+
global $wpdb;
|
705 |
+
$posts_ids_array = explode( ',', $posts_ids );
|
706 |
+
if ( $this->has_theme_settings() ) {
|
707 |
+
foreach ( $this->single_options as $option ) {
|
708 |
+
$meta_key = esc_sql( $option );
|
709 |
+
$meta_value = esc_sql( $this->get_theme_setting( $meta_key ) );
|
710 |
+
|
711 |
+
$wpdb->query( "UPDATE {$wpdb->postmeta} set meta_value='{$meta_value}' WHERE post_id IN ({$posts_ids}) AND meta_key='{$meta_key}'" );
|
712 |
+
|
713 |
+
$posts_with_key = $wpdb->get_results( "SELECT DISTINCT post_id FROM {$wpdb->postmeta} WHERE meta_key = '{$meta_key}' AND post_id IN ({$posts_ids})" );
|
714 |
+
$posts_with_key_ids = array_map( create_function( '$o', 'return $o->post_id;' ), $posts_with_key );
|
715 |
+
$posts_with_no_keys = array_diff( $posts_ids_array, $posts_with_key_ids );
|
716 |
+
|
717 |
+
foreach ( $posts_with_no_keys as $post ) {
|
718 |
+
$this->update_post_theme_settings_meta( $post );
|
719 |
+
}
|
720 |
+
|
721 |
+
}
|
722 |
+
}
|
723 |
+
}
|
724 |
+
|
725 |
+
/**
|
726 |
+
* @since 2.5
|
727 |
+
* Returns the section types to be displayed based on the layout assignment
|
728 |
+
*/
|
729 |
+
public function get_layout_assignment_type( $layout_id ) {
|
730 |
+
$archives = apply_filters( 'ddl-get_layout_loops', $layout_id );
|
731 |
+
$single = WPDD_Utils::layout_assigned_count( $layout_id );
|
732 |
+
$section_type = null;
|
733 |
+
$this->load_current_settings_object( null, $layout_id );
|
734 |
+
if ( $this->has_theme_setting_by_key( 'toolset_layout_to_cred_form' ) ) {
|
735 |
+
$section_type = 'posts-cred';
|
736 |
+
}
|
737 |
+
|
738 |
+
if ( count( $archives ) > 0 ) {
|
739 |
+
$section_type = 'archive';
|
740 |
+
}
|
741 |
+
|
742 |
+
if ( $single ) {
|
743 |
+
$section_type = ( $section_type == 'archive' ) ? 'shared' : 'posts';
|
744 |
+
}
|
745 |
+
|
746 |
+
return $section_type;
|
747 |
+
}
|
748 |
+
|
749 |
+
/**
|
750 |
+
* @since 2.5
|
751 |
+
* Fetches the layout assignment for a given layout
|
752 |
+
*/
|
753 |
+
public function ajax_get_layout_assignment_type() {
|
754 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
755 |
+
$data = array(
|
756 |
+
'type' => 'capability',
|
757 |
+
'message' => __( 'You do not have permissions for that.', 'wpv-views' )
|
758 |
+
);
|
759 |
+
wp_send_json_error( $data );
|
760 |
+
}
|
761 |
+
|
762 |
+
if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'toolset_theme_display_type' ) ) {
|
763 |
+
$data = array(
|
764 |
+
'type' => 'nonce',
|
765 |
+
'message' => __( 'Your security credentials have expired. Please reload the page to get new ones.', 'wpv-views' )
|
766 |
+
);
|
767 |
+
wp_send_json_error( $data );
|
768 |
+
}
|
769 |
+
|
770 |
+
if (
|
771 |
+
! isset( $_POST['id'] )
|
772 |
+
|| ! is_numeric( $_POST['id'] )
|
773 |
+
|| intval( $_POST['id'] ) < 1
|
774 |
+
) {
|
775 |
+
$data = array(
|
776 |
+
'type' => 'id',
|
777 |
+
'message' => __( 'Wrong or missing ID.', 'wpv-views' )
|
778 |
+
);
|
779 |
+
wp_send_json_error( $data );
|
780 |
+
} else {
|
781 |
+
$layout_id = (int) $_POST['id'];
|
782 |
+
}
|
783 |
+
|
784 |
+
$assignment_type = $this->get_layout_assignment_type( $layout_id );
|
785 |
+
$data = array(
|
786 |
+
'display_type' => $assignment_type,
|
787 |
+
'tooltip_message' => $this->get_layouts_tip_message( $assignment_type )
|
788 |
+
);
|
789 |
+
|
790 |
+
wp_send_json_success( $data );
|
791 |
+
}
|
792 |
+
|
793 |
+
/**
|
794 |
+
* @since 2.5
|
795 |
+
* Runs the stored global option injection hooks on WP action.
|
796 |
+
*/
|
797 |
+
public function execute_global_option_hooks() {
|
798 |
+
try {
|
799 |
+
//Turn of error reporting when executing third-party methods to prevent unexpected runtime errors
|
800 |
+
error_reporting( 0 );
|
801 |
+
foreach ( $this->global_options_hooks as $caller_object ) {
|
802 |
+
if ( isset( $caller_object['type'] ) ) {
|
803 |
+
switch ( $caller_object['type'] ) {
|
804 |
+
case "->":
|
805 |
+
call_user_func_array( array(
|
806 |
+
$caller_object['object'],
|
807 |
+
$caller_object['function']
|
808 |
+
), array_values( $caller_object['args'] ) );
|
809 |
+
break;
|
810 |
+
case "::":
|
811 |
+
call_user_func_array( array(
|
812 |
+
$caller_object['class'],
|
813 |
+
$caller_object['function']
|
814 |
+
), array_values( $caller_object['args'] ) );
|
815 |
+
break;
|
816 |
+
}
|
817 |
+
} else {
|
818 |
+
call_user_func_array( $caller_object['function'], array_values( $caller_object['args'] ) );
|
819 |
+
}
|
820 |
+
}
|
821 |
+
} catch ( Exception $e ) {
|
822 |
+
error_log( 'Toolset failed to overwrite theme options ' . $e->getMessage() );
|
823 |
+
}
|
824 |
+
|
825 |
+
}
|
826 |
+
|
827 |
+
/**
|
828 |
+
* @since 2.5
|
829 |
+
* Returns the ID for the queried object either a Layout or CT.
|
830 |
+
*/
|
831 |
+
public function fetch_queried_object_id() {
|
832 |
+
$object_id = null;
|
833 |
+
if ( $this->is_layouts_active ) {
|
834 |
+
if ( class_exists( 'WPDD_Layouts' ) ) {
|
835 |
+
$object_id = WPDD_Layouts::getInstance()->get_rendered_layout_id();
|
836 |
+
}
|
837 |
+
} else {
|
838 |
+
if ( $this->is_views_active ) {
|
839 |
+
if ( is_archive() || is_search() || is_home() || is_tax() ) {
|
840 |
+
$object_id = apply_filters( 'wpv_filter_wpv_get_current_archive', null );
|
841 |
+
}
|
842 |
+
|
843 |
+
if ( is_single() ) {
|
844 |
+
global $post;
|
845 |
+
$object_id = get_post_meta( $post->ID, '_views_template', true );
|
846 |
+
}
|
847 |
+
}
|
848 |
+
}
|
849 |
+
|
850 |
+
return $object_id;
|
851 |
+
}
|
852 |
+
|
853 |
+
/**
|
854 |
+
* @since 2.5
|
855 |
+
* @var $object_id - Layout, CT or WPA ID to fetch its type
|
856 |
+
* @return null|string
|
857 |
+
* Returns the post type for the queried object.
|
858 |
+
*/
|
859 |
+
public function fetch_queried_object_type( $object_id ) {
|
860 |
+
if ( ! empty( $object_id ) ) {
|
861 |
+
return get_post_type( $object_id );
|
862 |
+
}
|
863 |
+
|
864 |
+
return null;
|
865 |
+
}
|
866 |
+
|
867 |
+
/**
|
868 |
+
* @since 2.5
|
869 |
+
* @return bool
|
870 |
+
* checks whether the settings object has a toolset_theme_settings property
|
871 |
+
*/
|
872 |
+
public function has_theme_settings() {
|
873 |
+
return ( is_array( $this->current_settings_object ) && isset( $this->current_settings_object['toolset_theme_settings'] ) );
|
874 |
+
}
|
875 |
+
|
876 |
+
/**
|
877 |
+
* @since 2.5
|
878 |
+
* @return bool
|
879 |
+
* checks whether the settings object has a specific settings key
|
880 |
+
*/
|
881 |
+
public function has_theme_setting_by_key( $key ) {
|
882 |
+
return ( $this->has_theme_settings() && array_key_exists( $key, $this->current_settings_object['toolset_theme_settings'] ) );
|
883 |
+
}
|
884 |
+
|
885 |
+
/**
|
886 |
+
* @since 2.5
|
887 |
+
*
|
888 |
+
* @param $value - null value to be populated with fetched settings value
|
889 |
+
* @@param $setting_key - name of the setting to be retrieved
|
890 |
+
*
|
891 |
+
* @return mixed
|
892 |
+
* returns the value for a specific setting, and used in a filter
|
893 |
+
*/
|
894 |
+
public function filter_get_setting( $value, $setting_key ) {
|
895 |
+
if ( ! empty( $setting_key ) ) {
|
896 |
+
$this->load_current_settings_object();
|
897 |
+
|
898 |
+
return $this->get_theme_setting( $setting_key );
|
899 |
+
}
|
900 |
+
|
901 |
+
return $value;
|
902 |
+
}
|
903 |
+
|
904 |
+
/**
|
905 |
+
* @since 2.5
|
906 |
+
*
|
907 |
+
* @param $key - the setting name
|
908 |
+
* @param $default - default, which will be returned if no value is found in the settings object
|
909 |
+
*
|
910 |
+
* @return mixed
|
911 |
+
* returns the value to be used or rendered, it decides whether to load saved or default
|
912 |
+
*/
|
913 |
+
public function get_theme_setting( $key, $default = self::TOOLSET_THEME_NO_DEFAULT ) {
|
914 |
+
if ( $this->has_theme_setting_by_key( $key ) ) {
|
915 |
+
return $this->current_settings_object['toolset_theme_settings'][ $key ];
|
916 |
+
}
|
917 |
+
|
918 |
+
if ( $default !== self::TOOLSET_THEME_NO_DEFAULT ) {
|
919 |
+
return $default;
|
920 |
+
}
|
921 |
+
|
922 |
+
return $this->get_setting_default( $key );
|
923 |
+
}
|
924 |
+
|
925 |
+
/**
|
926 |
+
* @since 2.5
|
927 |
+
*
|
928 |
+
* @param $key - the setting name
|
929 |
+
*
|
930 |
+
* @return mixed
|
931 |
+
* returns the default value for a specific theme defined in the JSON file
|
932 |
+
*/
|
933 |
+
public function get_setting_default( $key ) {
|
934 |
+
$key = str_replace( self::TOOLSET_GLOBAL_SETTING_PREFIX, '', $key );
|
935 |
+
if ( array_key_exists( $key, $this->toolset_config_options ) ) {
|
936 |
+
$option = $this->toolset_config_options[ $key ];
|
937 |
+
if ( property_exists( $option, 'default_value' ) ) {
|
938 |
+
return $option->default_value;
|
939 |
+
}
|
940 |
+
}
|
941 |
+
}
|
942 |
+
|
943 |
+
/**
|
944 |
+
* @since 2.5
|
945 |
+
*
|
946 |
+
* @param $theme_setting
|
947 |
+
* @param $option_key
|
948 |
+
* This solves the issue with options that are being loaded way before Layouts or Views are initialised so we cannot apply our settings
|
949 |
+
* on those, so to solves this we store the information of the function that called the get_option function with a specific option_name
|
950 |
+
* and recall this function again on wp action, which at the time our plugins are ready and override the settings successfully.
|
951 |
+
*
|
952 |
+
* This is not the most proper fix in the world, but why we cannot provide an alternative fix is we don't have our code base initialised that early
|
953 |
+
* so this seems like the only possible fix now.
|
954 |
+
*
|
955 |
+
* @return array|mixed
|
956 |
+
*/
|
957 |
+
public function pre_global_option_save( $theme_setting, $option_key ) {
|
958 |
+
$object_id = null;
|
959 |
+
|
960 |
+
//Check is WP is initialised, if not, trace the call and add an action to refresh the options again
|
961 |
+
if ( ! did_action( 'wp' ) ) {
|
962 |
+
$call_stack = debug_backtrace();
|
963 |
+
$is_next_call = false;
|
964 |
+
$caller_object = null;
|
965 |
+
foreach ( $call_stack as $call ) {
|
966 |
+
if ( $is_next_call ) {
|
967 |
+
$caller_object = $call;
|
968 |
+
break;
|
969 |
+
}
|
970 |
+
if ( $call['function'] == 'get_option' && count( $call['args'] ) > 0 && $call['args'][0] == $option_key ) {
|
971 |
+
$is_next_call = true;
|
972 |
+
}
|
973 |
+
}
|
974 |
+
if ( ! empty( $caller_object ) ) {
|
975 |
+
$this->global_options_hooks[] = $caller_object;
|
976 |
+
}
|
977 |
+
} else {
|
978 |
+
$object_id = $this->fetch_queried_object_id();
|
979 |
+
|
980 |
+
$this->load_current_settings_object( null, $object_id );
|
981 |
+
}
|
982 |
+
|
983 |
+
if ( $this->toolset_config->global_store_type == 'array' && is_array( $theme_setting ) && $this->has_theme_settings() ) {
|
984 |
+
$global_settings_array = array();
|
985 |
+
foreach ( $this->global_options as $option ) {
|
986 |
+
$option_name = self::TOOLSET_GLOBAL_SETTING_PREFIX . $option;
|
987 |
+
if ( $this->has_theme_setting_by_key( $option_name ) ) {
|
988 |
+
$global_settings_array[ $option ] = $this->get_theme_setting( $option_name, $theme_setting );
|
989 |
+
}
|
990 |
+
}
|
991 |
+
$theme_setting = array_merge( $theme_setting, $global_settings_array );
|
992 |
+
}
|
993 |
+
|
994 |
+
if ( in_array( $option_key, $this->global_options ) && $this->toolset_config->global_store_type == 'string' && ! is_array( $theme_setting ) ) {
|
995 |
+
$theme_setting = $this->global_options[ $option_key ];
|
996 |
+
}
|
997 |
+
|
998 |
+
return $theme_setting;
|
999 |
+
}
|
1000 |
+
|
1001 |
+
/**
|
1002 |
+
* @since 2.5
|
1003 |
+
*
|
1004 |
+
* @param $default - the filter value
|
1005 |
+
*
|
1006 |
+
* @return mixed
|
1007 |
+
* Hooks to Customizer theme_mod_{option_name} to override the Customizer saved settings.
|
1008 |
+
*/
|
1009 |
+
public function pre_customizer_option_value( $default ) {
|
1010 |
+
$mod_name = str_replace( 'theme_mod_', '', current_filter() );
|
1011 |
+
if ( in_array( $mod_name, $this->global_options ) ) {
|
1012 |
+
$object_id = $this->fetch_queried_object_id();
|
1013 |
+
$this->load_current_settings_object( null, $object_id );
|
1014 |
+
|
1015 |
+
return $this->get_theme_setting( self::TOOLSET_GLOBAL_SETTING_PREFIX . $mod_name, $default );
|
1016 |
+
}
|
1017 |
+
|
1018 |
+
return $default;
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
/**
|
1022 |
+
* @since 2.5
|
1023 |
+
*
|
1024 |
+
* @param $layouts_section bool
|
1025 |
+
* @param $section_type bool
|
1026 |
+
* renders the settings area with all the sections and options
|
1027 |
+
*/
|
1028 |
+
public function render_theme_settings_area( $layouts_section = true, $section_type = null ) {
|
1029 |
+
?>
|
1030 |
+
<?php if ( $layouts_section ) {
|
1031 |
+
$assignment_type = $this->get_layout_assignment_type( $this->object_id );
|
1032 |
+
?>
|
1033 |
+
<div class="dd-layouts-wrap">
|
1034 |
+
<?php } ?>
|
1035 |
+
<div class="theme-settings-wrap">
|
1036 |
+
<?php if ( $layouts_section ) { ?>
|
1037 |
+
<span role="button" tabindex="0" class="theme-settings-toggle js-theme-settings-toggle">
|
1038 |
+
<i class="fa fa-caret-up" aria-hidden="true"></i>
|
1039 |
+
</span>
|
1040 |
+
<h2 class="theme-settings-title"><?php _e( 'Theme Options', 'wpv-views' );
|
1041 |
+
echo $this->render_help_tip(); ?></h2>
|
1042 |
+
<?php } ?>
|
1043 |
+
<form id="toolset_theme_settings_form">
|
1044 |
+
<?php if ( $layouts_section ) {
|
1045 |
+
$this->render_non_assigned_layout_message( $this->get_theme_setting( 'toolset_layout_to_cred_form' ), ( $assignment_type == null || $assignment_type == 'posts-cred' ) );
|
1046 |
+
} ?>
|
1047 |
+
<?php
|
1048 |
+
|
1049 |
+
foreach ( $this->toolset_config->sections as $index => $settings_section ) {
|
1050 |
+
$display_section = false;
|
1051 |
+
$display_section_type = null;
|
1052 |
+
if ( property_exists( $settings_section, 'section_type' ) ) {
|
1053 |
+
if ( $layouts_section ) {
|
1054 |
+
if ( $assignment_type == null || $assignment_type == 'posts-cred' ) {
|
1055 |
+
if ( $this->has_theme_setting_by_key( 'toolset_layout_to_cred_form' ) ) {
|
1056 |
+
if ( ( $settings_section->section_type == 'shared' || $settings_section->section_type == 'posts' ) ) {
|
1057 |
+
$display_section = true;
|
1058 |
+
$display_section_type = $settings_section->section_type;
|
1059 |
+
}
|
1060 |
+
} else {
|
1061 |
+
$display_section = false;
|
1062 |
+
$display_section_type = $settings_section->section_type;
|
1063 |
+
}
|
1064 |
+
} else {
|
1065 |
+
if ( $settings_section->section_type == null || $settings_section->section_type == $section_type || $section_type == 'shared' ) {
|
1066 |
+
$display_section = true;
|
1067 |
+
$display_section_type = $settings_section->section_type;
|
1068 |
+
}
|
1069 |
+
}
|
1070 |
+
} else {
|
1071 |
+
if ( $settings_section->section_type == null || $settings_section->section_type == $section_type || $section_type == 'shared' ) {
|
1072 |
+
$display_section = true;
|
1073 |
+
$display_section_type = $settings_section->section_type;
|
1074 |
+
}
|
1075 |
+
}
|
1076 |
+
} else {
|
1077 |
+
if($layouts_section) {
|
1078 |
+
if($assignment_type) {
|
1079 |
+
$display_section = true;
|
1080 |
+
$display_section_type = 'shared';
|
1081 |
+
}
|
1082 |
+
} else {
|
1083 |
+
$display_section = true;
|
1084 |
+
$display_section_type = 'shared';
|
1085 |
+
}
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
$this->render_settings_section( $settings_section, $display_section_type, $display_section );
|
1089 |
+
}
|
1090 |
+
?>
|
1091 |
+
<input type="hidden" id="toolset-theme-display-type" name="toolset_display_type_nonce"
|
1092 |
+
value="<?php echo wp_create_nonce( 'toolset_theme_display_type' ); ?>"
|
1093 |
+
</form>
|
1094 |
+
</div>
|
1095 |
+
<?php if ( $layouts_section ) { ?>
|
1096 |
+
</div>
|
1097 |
+
<?php } ?>
|
1098 |
+
|
1099 |
+
<?php
|
1100 |
+
}
|
1101 |
+
|
1102 |
+
/**
|
1103 |
+
* @since 2.5
|
1104 |
+
*
|
1105 |
+
* @param $option object
|
1106 |
+
* renders individual options
|
1107 |
+
*/
|
1108 |
+
public function render_section_option( $option ) {
|
1109 |
+
?>
|
1110 |
+
<div class="theme-settings-option">
|
1111 |
+
<?php
|
1112 |
+
switch ( $option->gui->type ) {
|
1113 |
+
case 'checkbox':
|
1114 |
+
case 'radio':
|
1115 |
+
$option_ui = $this->render_option_input( $option );
|
1116 |
+
break;
|
1117 |
+
default:
|
1118 |
+
$option_ui = '<label class="theme-option-label" for="' . esc_attr( $option->name ) . '">' . $option->gui->display_name . '</label>' . $this->render_option_input( $option );
|
1119 |
+
break;
|
1120 |
+
}
|
1121 |
+
echo $option_ui;
|
1122 |
+
?>
|
1123 |
+
</div>
|
1124 |
+
<?php
|
1125 |
+
}
|
1126 |
+
|
1127 |
+
|
1128 |
+
/**
|
1129 |
+
* @since 2.5
|
1130 |
+
*
|
1131 |
+
* @param $option object
|
1132 |
+
* renders individual option and returns its html.
|
1133 |
+
*
|
1134 |
+
* @return string
|
1135 |
+
*/
|
1136 |
+
public function render_option_input( $option ) {
|
1137 |
+
$input_ui = '';
|
1138 |
+
$global_prefix = ( property_exists( $option, 'store_type' ) && $option->store_type == "global" ? self::TOOLSET_GLOBAL_SETTING_PREFIX : "" );
|
1139 |
+
$option_name = $global_prefix . $option->name;
|
1140 |
+
switch ( $option->gui->type ) {
|
1141 |
+
case 'text':
|
1142 |
+
$input_ui = '<input type="text" name="' . esc_attr( $option_name ) . '" id="' . esc_attr( $option_name ) . '" value="' . $this->get_input_value( $option_name, $option->default_value ) . '" />';
|
1143 |
+
break;
|
1144 |
+
case 'checkbox':
|
1145 |
+
foreach ( $option->gui->values as $checkbox_value ) {
|
1146 |
+
$input_ui .= '<label class="theme-option-label checkbox" for="' . esc_attr( $option_name ) . '-' . esc_attr( $checkbox_value->value ) . '">';
|
1147 |
+
$input_ui .= '<input type="checkbox" name="' . esc_attr( $option_name ) . '" id="' . esc_attr( $option_name ) . '-' . esc_attr( $checkbox_value->value ) . '" value="' . esc_attr( $checkbox_value->value ) . '"' . checked( $this->get_input_value( $option_name, null ), $checkbox_value->value, false ) . ' />';
|
1148 |
+
$input_ui .= '<span>' . $checkbox_value->text . '</span>';
|
1149 |
+
$input_ui .= '</label>';
|
1150 |
+
}
|
1151 |
+
break;
|
1152 |
+
case 'radio':
|
1153 |
+
foreach ( $option->gui->values as $radio_value ) {
|
1154 |
+
$input_ui .= '<label class="theme-option-label radio" for="' . esc_attr( $option_name ) . '-' . esc_attr( $radio_value->value ) . '">';
|
1155 |
+
$input_ui .= '<input type="radio" name="' . esc_attr( $option_name ) . '" id="' . esc_attr( $option_name ) . '-' . esc_attr( $radio_value->value ) . '" value="' . esc_attr( $radio_value->value ) . '"' . checked( $this->get_input_value( $option_name, null ), $radio_value->value, false ) . ' />';
|
1156 |
+
$input_ui .= '<span>' . $radio_value->text . '</span>';
|
1157 |
+
$input_ui .= '</label>';
|
1158 |
+
}
|
1159 |
+
break;
|
1160 |
+
case 'select':
|
1161 |
+
$input_ui = '<select name="' . esc_attr( $option_name ) . '" id="' . esc_attr( $option_name ) . '">';
|
1162 |
+
if ( property_exists( $option->gui, 'values' ) ) {
|
1163 |
+
foreach ( $option->gui->values as $option_value ) {
|
1164 |
+
if ( property_exists( $option_value, 'value' ) && property_exists( $option_value, 'text' ) ) {
|
1165 |
+
$input_ui .= '<option value="' . esc_attr( $option_value->value ) . '" ' . selected( $this->get_input_value( $option_name, null ), $option_value->value, false ) . '>' . $option_value->text . '</option>';
|
1166 |
+
}
|
1167 |
+
}
|
1168 |
+
}
|
1169 |
+
$input_ui .= '</select>';
|
1170 |
+
break;
|
1171 |
+
case 'password':
|
1172 |
+
$input_ui = '<input type="password" name="' . esc_attr( $option_name ) . '" id="' . esc_attr( $option_name ) . '" value="' . $this->get_input_value( $option_name, null ) . '" />';
|
1173 |
+
break;
|
1174 |
+
}
|
1175 |
+
|
1176 |
+
return $input_ui;
|
1177 |
+
}
|
1178 |
+
|
1179 |
+
/**
|
1180 |
+
* @since 2.5
|
1181 |
+
*
|
1182 |
+
* @param $section object
|
1183 |
+
* @param $section_type string
|
1184 |
+
* renders individual sections
|
1185 |
+
*/
|
1186 |
+
public function render_settings_section( $section, $section_type, $display_section ) {
|
1187 |
+
$theme_domain = ( ! empty( $this->active_theme->TextDomain ) ? $this->active_theme->TextDomain : "" );
|
1188 |
+
$section_name = $this->get_section_name( $section->section_title, $section_type );
|
1189 |
+
$disable_section = ( $this->has_theme_setting_by_key( $section_name ) ? false : true );
|
1190 |
+
$section_type_string = '';
|
1191 |
+
|
1192 |
+
if(property_exists($section, 'section_type') ) {
|
1193 |
+
if ( $section->section_type != null ) {
|
1194 |
+
$section_type_string = $section->section_type;
|
1195 |
+
} else {
|
1196 |
+
$section_type_string = 'shared';
|
1197 |
+
}
|
1198 |
+
} else {
|
1199 |
+
$section_type_string = 'shared';
|
1200 |
+
}
|
1201 |
+
|
1202 |
+
?>
|
1203 |
+
<fieldset
|
1204 |
+
class="theme-settings-section <?php echo "{$section_type_string}-section"; ?> <?php echo ! $display_section ? 'hidden' : ''; ?>">
|
1205 |
+
<h3 class="theme-settings-section-title"><input type="checkbox" class="theme-integration-section-disable"
|
1206 |
+
id="<?php echo $section_name; ?>"
|
1207 |
+
name="<?php echo $section_name; ?>"
|
1208 |
+
value="enable" <?php checked( $disable_section, false ); ?>>
|
1209 |
+
- <?php _e( $section->section_title, $theme_domain ); ?></h3>
|
1210 |
+
<?php if ( isset( $section->section_summary ) ) { ?>
|
1211 |
+
<p class="theme-settings-section-summary">
|
1212 |
+
<?php _e( $section->section_summary, $theme_domain ); ?>
|
1213 |
+
</p>
|
1214 |
+
<?php } ?>
|
1215 |
+
<div class="theme-settings-section-content">
|
1216 |
+
<?php
|
1217 |
+
foreach ( $section->options as $option ) {
|
1218 |
+
$this->render_section_option( $option );
|
1219 |
+
}
|
1220 |
+
?>
|
1221 |
+
</div>
|
1222 |
+
</fieldset>
|
1223 |
+
|
1224 |
+
<?php
|
1225 |
+
}
|
1226 |
+
|
1227 |
+
/**
|
1228 |
+
* @since 2.5
|
1229 |
+
* Renders relevant sections in Layout Edit Page
|
1230 |
+
*/
|
1231 |
+
public function render_layouts_settings_section() {
|
1232 |
+
$is_private = apply_filters( 'ddl-is_layout_private', false, $this->object_id );
|
1233 |
+
if ( ! $is_private ) {
|
1234 |
+
$section_type = $this->get_layout_assignment_type( $this->object_id );
|
1235 |
+
$this->render_theme_settings_area( true, $section_type );
|
1236 |
+
}
|
1237 |
+
}
|
1238 |
+
|
1239 |
+
/**
|
1240 |
+
* @since 2.5
|
1241 |
+
* Renders relevant sections in Views WPA Edit Page
|
1242 |
+
*/
|
1243 |
+
public function render_views_wpa_settings_section() {
|
1244 |
+
ob_start();
|
1245 |
+
$this->render_theme_settings_area( false, 'archive' );
|
1246 |
+
?>
|
1247 |
+
<p>
|
1248 |
+
<span class="update-action-wrap auto-update">
|
1249 |
+
<span class="js-wpv-message-container"></span>
|
1250 |
+
<span class="spinner ajax-loader toolset-theme-settings-spinner"></span>
|
1251 |
+
</span>
|
1252 |
+
</p>
|
1253 |
+
<?php
|
1254 |
+
$content = ob_get_clean();
|
1255 |
+
?>
|
1256 |
+
<div class="wpv-setting-container wpv-settings-complete-output js-wpv-settings-content">
|
1257 |
+
|
1258 |
+
<div class="wpv-settings-header">
|
1259 |
+
<h2>
|
1260 |
+
<?php _e( 'Theme Options', 'wpv-views' ) ?>
|
1261 |
+
<?php echo $this->render_help_tip(); ?>
|
1262 |
+
</h2>
|
1263 |
+
</div>
|
1264 |
+
<div class="wpv-setting">
|
1265 |
+
<?php
|
1266 |
+
echo $content;
|
1267 |
+
?>
|
1268 |
+
</div>
|
1269 |
+
</div>
|
1270 |
+
<?php
|
1271 |
+
}
|
1272 |
+
|
1273 |
+
/**
|
1274 |
+
* @since 2.5
|
1275 |
+
* Renders relevant sections in Views CT Edit Page
|
1276 |
+
*/
|
1277 |
+
public function render_views_ct_settings_section() {
|
1278 |
+
ob_start();
|
1279 |
+
$this->render_theme_settings_area( false, 'posts' );
|
1280 |
+
?>
|
1281 |
+
<p>
|
1282 |
+
<span class="update-action-wrap auto-update">
|
1283 |
+
<span class="js-wpv-message-container"></span>
|
1284 |
+
<span class="spinner ajax-loader toolset-theme-settings-spinner"></span>
|
1285 |
+
</span>
|
1286 |
+
</p>
|
1287 |
+
<?php
|
1288 |
+
$content = ob_get_clean();
|
1289 |
+
wpv_ct_editor_render_section( __( 'Theme Options ', 'wpv-views' ) . $this->render_help_tip(), 'js-wpv-theme-options-section', $content );
|
1290 |
+
}
|
1291 |
+
|
1292 |
+
/**
|
1293 |
+
* @since 2.5
|
1294 |
+
*
|
1295 |
+
* @param $layout_assignment string
|
1296 |
+
*
|
1297 |
+
* @return string
|
1298 |
+
* returns the help tip message for layouts based on assignment
|
1299 |
+
*/
|
1300 |
+
public function get_layouts_tip_message( $layout_assignment ) {
|
1301 |
+
if ( $layout_assignment == 'archive' ) {
|
1302 |
+
return __( 'This section lets you control the settings of the theme for the archive that uses this layout.', 'wp-views' );
|
1303 |
+
} elseif ( $layout_assignment == 'posts' ) {
|
1304 |
+
return __( 'This section lets you control the settings of the theme for all the pages that use this layout.', 'wp-views' );
|
1305 |
+
} else {
|
1306 |
+
return __( 'This section lets you control the settings of the theme for content that uses this layout.', 'wp-views' );
|
1307 |
+
}
|
1308 |
+
}
|
1309 |
+
|
1310 |
+
/**
|
1311 |
+
* @since 2.5
|
1312 |
+
* renders the tooltip pointer
|
1313 |
+
*/
|
1314 |
+
public function render_help_tip() {
|
1315 |
+
$pointer_classes = "";
|
1316 |
+
$pointer_title = "";
|
1317 |
+
$pointer_content = "";
|
1318 |
+
|
1319 |
+
if ( $this->current_object_type == 'dd_layouts' ) {
|
1320 |
+
$layout_assignment = $this->get_layout_assignment_type( $this->object_id );
|
1321 |
+
$pointer_classes = 'wp-toolset-pointer wp-toolset-layouts-pointer';
|
1322 |
+
$pointer_title = __( "{$this->active_theme->Name} settings for this layout", 'wp-views' );
|
1323 |
+
$pointer_content = $this->get_layouts_tip_message( $layout_assignment );
|
1324 |
+
}
|
1325 |
+
|
1326 |
+
if ( $this->current_object_type == 'view' ) {
|
1327 |
+
$pointer_classes = 'wp-toolset-pointer wp-toolset-views-pointer wp-pointer-left';
|
1328 |
+
$pointer_title = __( "{$this->active_theme->Name} settings for this archive", 'wp-views' );
|
1329 |
+
$pointer_content = __( 'This section lets you control the settings of the theme for this archive page.', 'wp-views' );
|
1330 |
+
}
|
1331 |
+
|
1332 |
+
if ( $this->current_object_type == 'view-template' ) {
|
1333 |
+
$pointer_classes = 'wp-toolset-pointer wp-toolset-views-pointer wp-pointer-left';
|
1334 |
+
$pointer_title = __( "{$this->active_theme->Name} settings for this template", 'wp-views' );
|
1335 |
+
$pointer_content = __( 'This section lets you control the settings of the theme for all the pages that use this Content Template.', 'wp-views' );
|
1336 |
+
}
|
1337 |
+
|
1338 |
+
return "<i class='icon-question-sign fa fa-question-circle toolset-theme-options-hint js-theme-options-hint' data-header='{$pointer_title}' data-content='{$pointer_content}' data-classes='{$pointer_classes}'></i>";
|
1339 |
+
}
|
1340 |
+
|
1341 |
+
/**
|
1342 |
+
* @since 2.5
|
1343 |
+
* renders the message for non-assigned layouts
|
1344 |
+
*/
|
1345 |
+
|
1346 |
+
public function render_non_assigned_layout_message( $saved_choice = null, $visible = true ) {
|
1347 |
+
?>
|
1348 |
+
<div class="js-toolset-non-assigned-message toolset-non-assigned-message <?php echo ! $visible ? 'hidden' : ''; ?>">
|
1349 |
+
<p><?php _e( 'The layout is not assigned to content, so you cannot control the theme settings. Once you assign this layout to content, you will see the theme options that are relevant for that kind of content.', 'wp-views' ); ?></p>
|
1350 |
+
<div class="theme-options-box-visibility-controls-wrap"><label><input type="radio" name="toolset_layout_to_cred_form" class="js-layout-used-for-cred"
|
1351 |
+
value="" <?php checked( null, $saved_choice ); ?> > <?php _e( " I will assign this layout to content later", 'wp-views' ); ?>
|
1352 |
+
</label></div>
|
1353 |
+
|
1354 |
+
<div class="theme-options-box-visibility-controls-wrap"><label><input type="radio" name="toolset_layout_to_cred_form" class="js-layout-used-for-cred"
|
1355 |
+
value="assigned" <?php checked( 'assigned', $saved_choice ); ?> > <?php _e( " I'm using this layout to display 'single' pages", 'wp-views' ); ?>
|
1356 |
+
</label></div>
|
1357 |
+
|
1358 |
+
<div class="theme-options-box-visibility-controls-wrap"><label><input type="radio" name="toolset_layout_to_cred_form" class="js-layout-used-for-cred"
|
1359 |
+
value="archive" <?php checked( 'archive', $saved_choice ); ?> > <?php _e( " I'm using this layout to display an archive", 'wp-views' ); ?>
|
1360 |
+
</label></div>
|
1361 |
+
</div>
|
1362 |
+
<?php
|
1363 |
+
}
|
1364 |
+
}
|
1365 |
+
|
1366 |
+
?>
|
library/toolset/toolset-common/languages/views-ar.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-de_DE.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-el.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-es_ES.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-fr_FR.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-he_IL.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-it_IT.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-ja.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-ko_KR.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-nl_NL.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-pl_PL.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-pt_BR.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-pt_PT.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-ru_RU.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-sv_SE.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-uk_UA.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-vi.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-zh_CN.mo
CHANGED
Binary file
|
library/toolset/toolset-common/languages/views-zh_TW.mo
CHANGED
Binary file
|
library/toolset/toolset-common/loader.php
CHANGED
@@ -30,7 +30,7 @@
|
|
30 |
* Now that we have a unique version for all plugins
|
31 |
* we define the version here
|
32 |
*/
|
33 |
-
$toolset_common_version =
|
34 |
|
35 |
|
36 |
// ----------------------------------------------------------------------//
|
30 |
* Now that we have a unique version for all plugins
|
31 |
* we define the version here
|
32 |
*/
|
33 |
+
$toolset_common_version = 243001;
|
34 |
|
35 |
|
36 |
// ----------------------------------------------------------------------//
|
library/toolset/toolset-common/phpcs.xml
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<ruleset name="Toolset">
|
3 |
-
<description>Toolset Coding Standards</description>
|
4 |
-
|
5 |
-
<rule ref="WordPress-Core"/>
|
6 |
-
<rule ref="WordPress-Docs"/>
|
7 |
-
<rule ref="WordPress-Extra"/>
|
8 |
-
|
9 |
-
<exclude-pattern>*/vendor/*</exclude-pattern>
|
10 |
-
<exclude-pattern>*.js</exclude-pattern>
|
11 |
-
<exclude-pattern>*.mo</exclude-pattern>
|
12 |
-
<exclude-pattern>*.po</exclude-pattern>
|
13 |
-
<exclude-pattern>*.twig</exclude-pattern>
|
14 |
-
<exclude-pattern>*.css</exclude-pattern>
|
15 |
-
<exclude-pattern>*.scss</exclude-pattern>
|
16 |
-
</ruleset>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
library/toolset/toolset-common/phpunit.xml
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<phpunit
|
2 |
-
bootstrap="./tests/phpunit/bootstrap.php"
|
3 |
-
backupGlobals="false"
|
4 |
-
colors="true"
|
5 |
-
convertErrorsToExceptions="true"
|
6 |
-
convertNoticesToExceptions="true"
|
7 |
-
convertWarningsToExceptions="true"
|
8 |
-
>
|
9 |
-
<testsuites>
|
10 |
-
<testsuite name="toolset-common">
|
11 |
-
<directory suffix=".php">./tests/phpunit/tests/</directory>
|
12 |
-
</testsuite>
|
13 |
-
</testsuites>
|
14 |
-
<filter>
|
15 |
-
<whitelist>
|
16 |
-
<directory suffix=".php">./</directory>
|
17 |
-
<exclude>
|
18 |
-
<directory>./build</directory>
|
19 |
-
<directory>./embedded</directory>
|
20 |
-
<directory>./docs</directory>
|
21 |
-
<directory>./languages</directory>
|
22 |
-
<directory>./tests</directory>
|
23 |
-
</exclude>
|
24 |
-
</whitelist>
|
25 |
-
</filter>
|
26 |
-
</phpunit>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
library/toolset/toolset-common/res/css/toolset-common.css
CHANGED
@@ -327,4 +327,100 @@ Overlay
|
|
327 |
padding: 5px 15px;
|
328 |
color: #c09853;
|
329 |
background: #fcf8e3;
|
330 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
padding: 5px 15px;
|
328 |
color: #c09853;
|
329 |
background: #fcf8e3;
|
330 |
+
}
|
331 |
+
|
332 |
+
/* ----------------------------------------------------------------------------
|
333 |
+
Theme settings
|
334 |
+
---------------------------------------------------------------------------- */
|
335 |
+
|
336 |
+
.dd-layouts-wrap .theme-settings-wrap {
|
337 |
+
/*copied from: .dd-layouts-where-used */
|
338 |
+
padding: 16px 16px;
|
339 |
+
background: #fff;
|
340 |
+
border: 1px solid #dfdfdf;
|
341 |
+
font-size: 13px;
|
342 |
+
}
|
343 |
+
.dd-layouts-wrap .theme-settings-wrap-collapsed {
|
344 |
+
padding-bottom: 0;
|
345 |
+
}
|
346 |
+
|
347 |
+
.dd-layouts-wrap .theme-settings-title {
|
348 |
+
font-size: 14px;
|
349 |
+
margin: -6px -16px 0;
|
350 |
+
padding: 0 15px 10px;
|
351 |
+
border-bottom: 1px solid #dfdfdf;
|
352 |
+
}
|
353 |
+
.dd-layouts-wrap .theme-settings-toggle{
|
354 |
+
float: right;
|
355 |
+
width: 20px;
|
356 |
+
height: 20px;
|
357 |
+
border-radius: 50%;
|
358 |
+
text-align: center;
|
359 |
+
line-height: 20px;
|
360 |
+
margin-top: -9px;
|
361 |
+
margin-right: -9px;
|
362 |
+
cursor: pointer;
|
363 |
+
}
|
364 |
+
.dd-layouts-wrap .theme-settings-toggle:focus {
|
365 |
+
outline: none;
|
366 |
+
-webkit-box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, .8);
|
367 |
+
box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, .8);
|
368 |
+
}
|
369 |
+
|
370 |
+
|
371 |
+
.dd-layouts-wrap .theme-settings-section-title {
|
372 |
+
font-size: 1.1em;
|
373 |
+
float: left;
|
374 |
+
width: 70%;
|
375 |
+
}
|
376 |
+
|
377 |
+
.theme-settings-section + .theme-settings-section {
|
378 |
+
margin-top: 1.1em;
|
379 |
+
}
|
380 |
+
|
381 |
+
.theme-option-label + select,
|
382 |
+
.theme-option-label + input,
|
383 |
+
.theme-option-label span {
|
384 |
+
margin-start: 5px;
|
385 |
+
-webkit-margin-start: 5px;
|
386 |
+
}
|
387 |
+
|
388 |
+
.theme-option-label + .theme-option-label {
|
389 |
+
margin-start: 15px;
|
390 |
+
-webkit-margin-start: 15px;
|
391 |
+
}
|
392 |
+
|
393 |
+
.theme-settings-option {
|
394 |
+
margin: 1em 0;
|
395 |
+
}
|
396 |
+
|
397 |
+
.toolset-theme-options-hint {
|
398 |
+
color: #CCC;
|
399 |
+
cursor: pointer;
|
400 |
+
vertical-align: 0.2em!important; /* Important for overwriting: [class^="icon-"]{} */
|
401 |
+
font-size: 12px;
|
402 |
+
margin-left: 4px;
|
403 |
+
}
|
404 |
+
|
405 |
+
.toolset-theme-options-hint:hover {
|
406 |
+
color: #348BB6;
|
407 |
+
}
|
408 |
+
|
409 |
+
.theme-settings-section-content{
|
410 |
+
clear:both;
|
411 |
+
}
|
412 |
+
|
413 |
+
.theme-settings-section-summary{
|
414 |
+
float:left;
|
415 |
+
}
|
416 |
+
|
417 |
+
.disabled-section{
|
418 |
+
color: #CCC;
|
419 |
+
}
|
420 |
+
|
421 |
+
.toolset-non-assigned-message {
|
422 |
+
padding: 1px 10px 10px 20px;
|
423 |
+
background: #f6f6f6;
|
424 |
+
border-left: solid 3px #cdcdcd;
|
425 |
+
}
|
426 |
+
.theme-options-box-visibility-controls-wrap{padding-bottom: 4px;}
|
library/toolset/toolset-common/res/js/toolset-bs-component-buttons.js
CHANGED
@@ -19,20 +19,8 @@ ToolsetCommon.BootstrapCssComponentsQuickTags = function($){
|
|
19 |
if(get_instance){
|
20 |
$instance = get_instance;
|
21 |
self.add_bootstrap_components_buttons($instance);
|
22 |
-
|
23 |
-
var $my_buttons = self.generate_codemirror_bs_buttons($instance);
|
24 |
-
self.wrap_codemirror_buttons($instance,$my_buttons);
|
25 |
}
|
26 |
});
|
27 |
-
|
28 |
-
Toolset.hooks.addAction( 'toolset_text_editor_CodeMirror_init_only_buttons', function( get_instance ) {
|
29 |
-
if(get_instance){
|
30 |
-
$instance = get_instance;
|
31 |
-
self.add_bootstrap_components_buttons($instance);
|
32 |
-
}
|
33 |
-
});
|
34 |
-
|
35 |
-
|
36 |
};
|
37 |
|
38 |
self.wrap_codemirror_buttons = function($instance,$buttons){
|
@@ -111,44 +99,40 @@ ToolsetCommon.BootstrapCssComponentsQuickTags = function($){
|
|
111 |
return codemirror_buttons;
|
112 |
|
113 |
};
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
self.add_bootstrap_components_buttons = function(instance){
|
118 |
|
119 |
-
|
|
|
120 |
return;
|
121 |
}
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
if(toggle_toolbar_div.length === 0){
|
137 |
-
|
138 |
-
var views_toolbar = jQuery("#qt_"+$instance+"_toolbar");
|
139 |
-
if(views_toolbar !== 0){
|
140 |
-
toggle_toolbar_div = views_toolbar;
|
141 |
-
}
|
142 |
-
}
|
143 |
|
144 |
-
|
|
|
|
|
|
|
|
|
|
|
145 |
|
146 |
-
|
147 |
-
|
148 |
-
|
|
|
|
|
149 |
}
|
150 |
-
|
151 |
-
};
|
152 |
|
153 |
|
154 |
self.init();
|
19 |
if(get_instance){
|
20 |
$instance = get_instance;
|
21 |
self.add_bootstrap_components_buttons($instance);
|
|
|
|
|
|
|
22 |
}
|
23 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
};
|
25 |
|
26 |
self.wrap_codemirror_buttons = function($instance,$buttons){
|
99 |
return codemirror_buttons;
|
100 |
|
101 |
};
|
|
|
|
|
|
|
|
|
102 |
|
103 |
+
self.add_bootstrap_components_buttons = function( instance ) {
|
104 |
+
if( typeof $bootstrap_components !== 'object' ){
|
105 |
return;
|
106 |
}
|
107 |
|
108 |
+
if ( typeof( QTags.getInstance( instance ).getButton( 'bs_component_show_hide_button' ) ) === 'undefined' ) {
|
109 |
+
QTags.addButton(
|
110 |
+
'bs_component_show_hide_button',
|
111 |
+
Toolset_CssComponent.DDL_CSS_JS.button_toggle_show,
|
112 |
+
self.bs_components_toggle_buttons,
|
113 |
+
'',
|
114 |
+
'b',
|
115 |
+
Toolset_CssComponent.DDL_CSS_JS.button_toggle_show,
|
116 |
+
140,
|
117 |
+
instance
|
118 |
+
);
|
119 |
+
}
|
120 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
+
self.bs_components_toggle_buttons = function( instance ) {
|
123 |
+
var button_id = instance.id;
|
124 |
+
var regex = /qt_(.*)_bs_component_show_hide_button/i;
|
125 |
+
var matches = button_id.match(regex);
|
126 |
+
Toolset.hooks.doAction( 'bs_components_toggle_buttons', matches[1] );
|
127 |
+
};
|
128 |
|
129 |
+
jQuery( document ).on( 'quicktags-init', function( event, editor ) {
|
130 |
+
if ( typeof( editor.getButton( 'bs_component_show_hide_button' ) ) !== 'undefined' ) {
|
131 |
+
$instance = editor.id;
|
132 |
+
var $my_buttons = self.generate_codemirror_bs_buttons( $instance );
|
133 |
+
self.wrap_codemirror_buttons( $instance, $my_buttons );
|
134 |
}
|
135 |
+
});
|
|
|
136 |
|
137 |
|
138 |
self.init();
|
library/toolset/toolset-common/res/js/toolset-theme-integration.js
ADDED
@@ -0,0 +1,267 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var ToolsetCommon = ToolsetCommon || {};
|
2 |
+
|
3 |
+
ToolsetCommon.ThemeIntegration = function ($) {
|
4 |
+
var self = this;
|
5 |
+
|
6 |
+
self.hintPointer = null;
|
7 |
+
|
8 |
+
self.makeAjaxCall = function (data, successCallback, errorCallback) {
|
9 |
+
$.ajax({
|
10 |
+
async: true,
|
11 |
+
type: 'POST',
|
12 |
+
url: ajaxurl,
|
13 |
+
data: data,
|
14 |
+
success: successCallback,
|
15 |
+
error: errorCallback
|
16 |
+
});
|
17 |
+
};
|
18 |
+
|
19 |
+
|
20 |
+
self.renderVisibleSections = function (display_type, keep_cred_message) {
|
21 |
+
if (display_type === null) {
|
22 |
+
$('.theme-settings-section').hide();
|
23 |
+
$('.js-toolset-non-assigned-message').show();
|
24 |
+
$('.shared-section').hide();
|
25 |
+
} else if (display_type == 'archive') {
|
26 |
+
$('.archive-section').show();
|
27 |
+
$('.posts-section').hide();
|
28 |
+
$('.shared-section').show();
|
29 |
+
$('.js-toolset-non-assigned-message').hide();
|
30 |
+
} else if (display_type == 'archive-cred') {
|
31 |
+
$('.archive-section').show();
|
32 |
+
$('.posts-section').hide();
|
33 |
+
$('.shared-section').show();
|
34 |
+
$('.js-toolset-non-assigned-message').show();
|
35 |
+
} else if(display_type == 'posts-cred'){
|
36 |
+
$('.archive-section').hide();
|
37 |
+
$('.posts-section').show();
|
38 |
+
$('.shared-section').show();
|
39 |
+
$('.js-toolset-non-assigned-message').show();
|
40 |
+
}else if (display_type == 'posts') {
|
41 |
+
$('.archive-section').hide();
|
42 |
+
$('.posts-section').show();
|
43 |
+
$('.shared-section').show();
|
44 |
+
if(!keep_cred_message) {
|
45 |
+
$('.js-toolset-non-assigned-message').hide();
|
46 |
+
}
|
47 |
+
}
|
48 |
+
};
|
49 |
+
|
50 |
+
self.disableSections = function() {
|
51 |
+
jQuery('.theme-integration-section-disable').each(function(){
|
52 |
+
var $section_labels = jQuery(this).parent().siblings('.theme-settings-section-content').find('label, p');
|
53 |
+
var $section_summary = jQuery(this).parent().siblings('.theme-settings-section-summary');
|
54 |
+
var $section_heading = jQuery(this).parent();
|
55 |
+
|
56 |
+
jQuery(this).parent().siblings('.theme-settings-section-content').find(':input').prop('disabled', !$(this).is(":checked"));
|
57 |
+
if(!$(this).is(":checked")){
|
58 |
+
$section_labels.addClass('disabled-section');
|
59 |
+
$section_heading.addClass('disabled-section');
|
60 |
+
$section_summary.addClass('disabled-section');
|
61 |
+
} else {
|
62 |
+
$section_labels.removeClass('disabled-section');
|
63 |
+
$section_heading.removeClass('disabled-section');
|
64 |
+
$section_summary.removeClass('disabled-section');
|
65 |
+
}
|
66 |
+
});
|
67 |
+
};
|
68 |
+
|
69 |
+
self.init = function () {
|
70 |
+
self.initHints();
|
71 |
+
self.eventsOn();
|
72 |
+
self.disableSections();
|
73 |
+
self.add_layouts_edit_page_hooks();
|
74 |
+
self.toggle_theme_options_box_visibility();
|
75 |
+
}
|
76 |
+
|
77 |
+
self.removeHints = function() {
|
78 |
+
$('.js-theme-options-hint').each(function () {
|
79 |
+
$(this).pointer('destroy');
|
80 |
+
});
|
81 |
+
}
|
82 |
+
|
83 |
+
self.initHints = function(hintMessage) {
|
84 |
+
$('.js-theme-options-hint').each(function () {
|
85 |
+
var hintContent = "";
|
86 |
+
|
87 |
+
if(typeof hintMessage == 'undefined') {
|
88 |
+
hintContent = jQuery(this).data('content');
|
89 |
+
} else {
|
90 |
+
hintContent = hintMessage;
|
91 |
+
}
|
92 |
+
|
93 |
+
var hint = this;
|
94 |
+
self.hintPointer = $(this).pointer({
|
95 |
+
pointerClass: jQuery(this).data('classes'),
|
96 |
+
content: '<h3>' + jQuery(this).data('header') + '</h3> <p>' + hintContent + '</p>',
|
97 |
+
position: {
|
98 |
+
edge: ( $('html[dir="rtl"]').length > 0 ) ? 'right' : 'left',
|
99 |
+
align: 'center',
|
100 |
+
offset: '15 0'
|
101 |
+
},
|
102 |
+
buttons: function( event, t ) {
|
103 |
+
var button_close = $('<button class="button button-primary-toolset alignright js-wpv-close-this">'+Toolset_Theme_Integrations_Settings.strings.close+'</button>');
|
104 |
+
button_close.bind( 'click.pointer', function( e ) {
|
105 |
+
jQuery(hint).pointer('close');
|
106 |
+
|
107 |
+
});
|
108 |
+
return button_close;
|
109 |
+
}
|
110 |
+
});
|
111 |
+
});
|
112 |
+
};
|
113 |
+
|
114 |
+
self.eventsOn = function () {
|
115 |
+
$(document).on('change', '.toolset_page_ct-editor #toolset_theme_settings_form', function () {
|
116 |
+
$('.toolset-theme-settings-spinner').addClass('is-active');
|
117 |
+
var data = {
|
118 |
+
action: 'toolset_theme_integration_save_ct_settings',
|
119 |
+
id: WPViews.ct_edit_screen.ct_data.id,
|
120 |
+
wpnonce: WPViews.ct_edit_screen.update_nonce,
|
121 |
+
theme_settings: $('#toolset_theme_settings_form').serialize()
|
122 |
+
};
|
123 |
+
|
124 |
+
self.makeAjaxCall(data,
|
125 |
+
function (originalResponse) {
|
126 |
+
$('.toolset-theme-settings-spinner').removeClass('is-active');
|
127 |
+
WPViews.ct_edit_screen.showSuccessMessage(WPViews.ct_edit_screen.action_bar_message_container.selector, WPViews.ct_edit_screen.l10n.editor.saved);
|
128 |
+
WPViews.ct_edit_screen.highlight_action_bar('success');
|
129 |
+
jQuery(document).trigger('ct_saved');
|
130 |
+
}, function (ajaxContext) {
|
131 |
+
$('.toolset-theme-settings-spinner').removeClass('is-active');
|
132 |
+
console.log('Error:', ajaxContext.responseText);
|
133 |
+
}
|
134 |
+
);
|
135 |
+
});
|
136 |
+
|
137 |
+
$(document).on('change', '.toolset_page_view-archives-editor #toolset_theme_settings_form', function () {
|
138 |
+
$('.toolset-theme-settings-spinner').addClass('is-active');
|
139 |
+
|
140 |
+
var data = {
|
141 |
+
action: 'toolset_theme_integration_save_wpa_settings',
|
142 |
+
id: WPViews.wpa_edit_screen.view_id,
|
143 |
+
wpnonce: wpv_editor_strings.editor_nonce,
|
144 |
+
theme_settings: $('#toolset_theme_settings_form').serialize()
|
145 |
+
};
|
146 |
+
|
147 |
+
self.makeAjaxCall(data,
|
148 |
+
function (originalResponse) {
|
149 |
+
WPViews.wpa_edit_screen.manage_action_bar_success(originalResponse.data);
|
150 |
+
|
151 |
+
$('.js-wpv-general-actions-bar').addClass('wpv-action-success');
|
152 |
+
setTimeout(function () {
|
153 |
+
$('.js-wpv-general-actions-bar').removeClass('wpv-action-success');
|
154 |
+
}, 1000);
|
155 |
+
|
156 |
+
$('.toolset-theme-settings-spinner').removeClass('is-active');
|
157 |
+
$(document).trigger('js_event_wpv_screen_options_saved');
|
158 |
+
}, function (ajaxContext) {
|
159 |
+
$('.toolset-theme-settings-spinner').removeClass('is-active');
|
160 |
+
console.log('Error:', ajaxContext.responseText);
|
161 |
+
}
|
162 |
+
);
|
163 |
+
});
|
164 |
+
|
165 |
+
$(document).on('change', '.toolset_page_dd_layouts_edit #toolset_theme_settings_form', function (evt) {
|
166 |
+
$('input[name="save_layout"]').prop('disabled', false);
|
167 |
+
});
|
168 |
+
|
169 |
+
$('.js-theme-options-hint').on('click', function () {
|
170 |
+
$(this).pointer('open');
|
171 |
+
});
|
172 |
+
|
173 |
+
jQuery('.theme-integration-section-disable').on('change', function(){
|
174 |
+
self.disableSections();
|
175 |
+
});
|
176 |
+
|
177 |
+
jQuery(document).on('change', '.js-layout-used-for-cred', function() {
|
178 |
+
if( $(this).val() === 'assigned' ) {
|
179 |
+
self.renderVisibleSections( 'posts-cred', true );
|
180 |
+
} else if( $(this).val() === 'archive' ) {
|
181 |
+
self.renderVisibleSections( 'archive-cred', true );
|
182 |
+
} else {
|
183 |
+
self.renderVisibleSections( null );
|
184 |
+
}
|
185 |
+
});
|
186 |
+
}
|
187 |
+
|
188 |
+
self.self_through_layouts_ajax_call = function(){
|
189 |
+
Toolset.hooks.addFilter('ddl_save_layout_params', function (save_params) {
|
190 |
+
if ($('#toolset_theme_settings_form')) {
|
191 |
+
save_params.theme_settings = $('#toolset_theme_settings_form').serialize();
|
192 |
+
}
|
193 |
+
return save_params;
|
194 |
+
});
|
195 |
+
};
|
196 |
+
|
197 |
+
self.hook_into_layout_assignment_dialog_close = function(){
|
198 |
+
jQuery(document).on('DLLayout.admin.ready', function () {
|
199 |
+
DDLayout.changeLayoutUseHelper.eventDispatcher.listenTo(
|
200 |
+
DDLayout.changeLayoutUseHelper.eventDispatcher,
|
201 |
+
'assignment_dialog_close',
|
202 |
+
function () {
|
203 |
+
var data = {
|
204 |
+
action: 'toolset_theme_integration_get_section_display_type',
|
205 |
+
nonce: jQuery('#toolset-theme-display-type').val(),
|
206 |
+
id: DDLayout.individual_assignment_manager._current_layout
|
207 |
+
};
|
208 |
+
|
209 |
+
self.makeAjaxCall(data,
|
210 |
+
function (originalResponse) {
|
211 |
+
if (originalResponse.data.hasOwnProperty('display_type')) {
|
212 |
+
self.renderVisibleSections(originalResponse.data.display_type);
|
213 |
+
}
|
214 |
+
|
215 |
+
if(originalResponse.data.hasOwnProperty('tooltip_message')) {
|
216 |
+
self.removeHints();
|
217 |
+
self.initHints(originalResponse.data.tooltip_message)
|
218 |
+
}
|
219 |
+
}
|
220 |
+
);
|
221 |
+
}
|
222 |
+
);
|
223 |
+
});
|
224 |
+
};
|
225 |
+
|
226 |
+
self.add_layouts_edit_page_hooks = function(){
|
227 |
+
if (jQuery('.toolset_page_dd_layouts_edit')[0]) {
|
228 |
+
/**
|
229 |
+
* Hooks to Layouts saving action and adds the theme settings object to the Layout object.
|
230 |
+
*/
|
231 |
+
self.self_through_layouts_ajax_call();
|
232 |
+
self.hook_into_layout_assignment_dialog_close();
|
233 |
+
}
|
234 |
+
};
|
235 |
+
|
236 |
+
self.toggle_theme_options_box_visibility = function(){
|
237 |
+
var $caret = jQuery( '.js-theme-settings-toggle' );
|
238 |
+
|
239 |
+
$caret.on( 'click', function( event ){
|
240 |
+
var $me = jQuery( this ),
|
241 |
+
closed = $me.data( 'closed' ),
|
242 |
+
$target = jQuery( '#toolset_theme_settings_form' );
|
243 |
+
|
244 |
+
if( !closed ){
|
245 |
+
$target.slideUp( 'fast', function(event){
|
246 |
+
$me.data( 'closed', true );
|
247 |
+
$me.find('.fa').removeClass( 'fa-caret-up' ).addClass( 'fa-caret-down' );
|
248 |
+
$me.parent('.theme-settings-wrap').addClass('theme-settings-wrap-collapsed');
|
249 |
+
});
|
250 |
+
} else {
|
251 |
+
$target.slideDown( 'fast', function(event){
|
252 |
+
$me.data( 'closed', false );
|
253 |
+
$me.find('.fa').removeClass( 'fa-caret-down' ).addClass( 'fa-caret-up' );
|
254 |
+
$me.parent('.theme-settings-wrap').removeClass('theme-settings-wrap-collapsed')
|
255 |
+
});
|
256 |
+
}
|
257 |
+
});
|
258 |
+
};
|
259 |
+
|
260 |
+
self.init();
|
261 |
+
|
262 |
+
return self;
|
263 |
+
};
|
264 |
+
|
265 |
+
jQuery(document).ready(function ($) {
|
266 |
+
ToolsetCommon.theme_integration = new ToolsetCommon.ThemeIntegration($);
|
267 |
+
});
|
library/toolset/toolset-common/toolset-common-loader.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
if( !defined('TOOLSET_VERSION') ){
|
4 |
-
define('TOOLSET_VERSION', '2.4.
|
5 |
}
|
6 |
|
7 |
if ( ! defined('TOOLSET_COMMON_VERSION' ) ) {
|
8 |
-
define( 'TOOLSET_COMMON_VERSION', '2.4.
|
9 |
}
|
10 |
|
11 |
if ( ! defined('TOOLSET_COMMON_PATH' ) ) {
|
1 |
<?php
|
2 |
|
3 |
if( !defined('TOOLSET_VERSION') ){
|
4 |
+
define('TOOLSET_VERSION', '2.4.3');
|
5 |
}
|
6 |
|
7 |
if ( ! defined('TOOLSET_COMMON_VERSION' ) ) {
|
8 |
+
define( 'TOOLSET_COMMON_VERSION', '2.4.3' );
|
9 |
}
|
10 |
|
11 |
if ( ! defined('TOOLSET_COMMON_PATH' ) ) {
|
library/toolset/toolset-common/toolset-forms/autoload_classmap.php
CHANGED
@@ -15,7 +15,8 @@ return array(
|
|
15 |
'WPToolset_Field_Embed' => dirname( __FILE__ ) . '/classes/class.embed.php',
|
16 |
'WPToolset_Field_Colorpicker' => dirname( __FILE__ ) . '/classes/class.colorpicker.php',
|
17 |
'FormAbstract' => dirname( __FILE__ ) . '/classes/abstract.form.php',
|
18 |
-
'WPToolset_Field_Recaptcha' => dirname( __FILE__ ) . '/classes/class.recaptcha
|
|
|
19 |
'FieldConfig' => dirname( __FILE__ ) . '/classes/class.fieldconfig.php',
|
20 |
'WPToolset_Field_Audio' => dirname( __FILE__ ) . '/classes/class.audio.php',
|
21 |
'WPToolset_Field_Submit' => dirname( __FILE__ ) . '/classes/class.submit.php',
|
15 |
'WPToolset_Field_Embed' => dirname( __FILE__ ) . '/classes/class.embed.php',
|
16 |
'WPToolset_Field_Colorpicker' => dirname( __FILE__ ) . '/classes/class.colorpicker.php',
|
17 |
'FormAbstract' => dirname( __FILE__ ) . '/classes/abstract.form.php',
|
18 |
+
'WPToolset_Field_Recaptcha' => dirname( __FILE__ ) . '/classes/class.recaptcha.php',
|
19 |
+
'WPToolset_Field_Recaptcha_v1' => dirname( __FILE__ ) . '/classes/class.recaptcha-v1.php',
|
20 |
'FieldConfig' => dirname( __FILE__ ) . '/classes/class.fieldconfig.php',
|
21 |
'WPToolset_Field_Audio' => dirname( __FILE__ ) . '/classes/class.audio.php',
|
22 |
'WPToolset_Field_Submit' => dirname( __FILE__ ) . '/classes/class.submit.php',
|
library/toolset/toolset-common/toolset-forms/classes/class.colorpicker.php
CHANGED
@@ -69,11 +69,19 @@ class WPToolset_Field_Colorpicker extends FieldFactory
|
|
69 |
|
70 |
public function metaform()
|
71 |
{
|
|
|
72 |
$validation = $this->getValidationData();
|
73 |
-
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
-
$attributes = $this->getAttr();
|
77 |
$shortcode_class = array_key_exists( 'class', $attributes ) ? $attributes['class'] : "";
|
78 |
$attributes['class'] = "js-wpt-colorpicker {$shortcode_class}"; // What is this js-wpt-cond-trigger classname for?
|
79 |
|
69 |
|
70 |
public function metaform()
|
71 |
{
|
72 |
+
$field_data = $this->getData();
|
73 |
$validation = $this->getValidationData();
|
74 |
+
//CRED Colorpicker Generic fields has now the hexadecimal validation rule
|
75 |
+
//so avoiding the force of validation for cred_generic field
|
76 |
+
//TODO: once will be present this feature to Types we can remove this condition completely
|
77 |
+
if ( ! isset( $field_data['attribute']['cred_generic'] ) ) {
|
78 |
+
//We are forcing the hexadecimal validation to this colorpicker field
|
79 |
+
//because in Types is still not present in the field settings popup the input of the validation field
|
80 |
+
$validation = $this->addTypeValidation( $validation );
|
81 |
+
$this->setValidationData( $validation );
|
82 |
+
}
|
83 |
|
84 |
+
$attributes = $this->getAttr();
|
85 |
$shortcode_class = array_key_exists( 'class', $attributes ) ? $attributes['class'] : "";
|
86 |
$attributes['class'] = "js-wpt-colorpicker {$shortcode_class}"; // What is this js-wpt-cond-trigger classname for?
|
87 |
|
library/toolset/toolset-common/toolset-forms/classes/class.date.php
CHANGED
@@ -201,6 +201,12 @@ class WPToolset_Field_Date extends FieldFactory
|
|
201 |
if ( $readonly ) {
|
202 |
$attributes_hour_minute[ 'disabled' ] = 'disabled';
|
203 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
|
205 |
// Hour
|
206 |
$hours = 24;
|
@@ -214,7 +220,7 @@ class WPToolset_Field_Date extends FieldFactory
|
|
214 |
}
|
215 |
if ( $readonly ) {
|
216 |
|
217 |
-
if (
|
218 |
$form[] = array(
|
219 |
'#type' => 'hidden',
|
220 |
'#value' => $hour,
|
@@ -240,22 +246,31 @@ class WPToolset_Field_Date extends FieldFactory
|
|
240 |
)
|
241 |
);
|
242 |
} else {
|
243 |
-
$
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
}
|
260 |
|
261 |
if ( !empty($attributes_hour_minute) ) {
|
@@ -274,7 +289,7 @@ class WPToolset_Field_Date extends FieldFactory
|
|
274 |
}
|
275 |
if ( $readonly ) {
|
276 |
|
277 |
-
if (
|
278 |
$form[] = array(
|
279 |
'#type' => 'hidden',
|
280 |
'#value' => $minute,
|
@@ -301,22 +316,31 @@ class WPToolset_Field_Date extends FieldFactory
|
|
301 |
)
|
302 |
);
|
303 |
} else {
|
304 |
-
$
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
}
|
321 |
|
322 |
if ( !empty($attributes_hour_minute) ) {
|
201 |
if ( $readonly ) {
|
202 |
$attributes_hour_minute[ 'disabled' ] = 'disabled';
|
203 |
}
|
204 |
+
|
205 |
+
if ( array_key_exists( 'use_bootstrap', $this->_data ) && $this->_data['use_bootstrap']
|
206 |
+
&& $output != 'bootstrap'
|
207 |
+
) {
|
208 |
+
$attributes_hour_minute['style'] = 'display:inline;width:auto;';
|
209 |
+
}
|
210 |
|
211 |
// Hour
|
212 |
$hours = 24;
|
220 |
}
|
221 |
if ( $readonly ) {
|
222 |
|
223 |
+
if ( $output == 'bootstrap' ) {
|
224 |
$form[] = array(
|
225 |
'#type' => 'hidden',
|
226 |
'#value' => $hour,
|
246 |
)
|
247 |
);
|
248 |
} else {
|
249 |
+
if ( $output == 'bootstrap' ) {
|
250 |
+
$hour_element = array(
|
251 |
+
'#type' => 'select',
|
252 |
+
'#before' => '<span class="wpt-form-label">' . __( 'Hour', 'wpv-views' ) . '</span>',
|
253 |
+
'#options' => $options,
|
254 |
+
'#default_value' => $hour,
|
255 |
+
'#name' => $this->getName() . '[hour]',
|
256 |
+
'#attributes' => array(
|
257 |
+
'title' => esc_attr( __( 'Select', 'wpv-views' ) ) . " Date",
|
258 |
+
'class' => 'form-control',
|
259 |
+
),
|
260 |
+
);
|
261 |
+
} else {
|
262 |
+
$hour_element = array(
|
263 |
+
'#type' => 'select',
|
264 |
+
'#before' => '<span class="wpt-form-label">' . __( 'Hour', 'wpv-views' ) . '</span>',
|
265 |
+
'#options' => $options,
|
266 |
+
'#default_value' => $hour,
|
267 |
+
'#name' => $this->getName() . '[hour]',
|
268 |
+
'#inline' => true,
|
269 |
+
'#attributes' => array(
|
270 |
+
'title' => esc_attr( __( 'Select', 'wpv-views' ) ) . " Date",
|
271 |
+
),
|
272 |
+
);
|
273 |
+
}
|
274 |
}
|
275 |
|
276 |
if ( !empty($attributes_hour_minute) ) {
|
289 |
}
|
290 |
if ( $readonly ) {
|
291 |
|
292 |
+
if ( $output == 'bootstrap' ) {
|
293 |
$form[] = array(
|
294 |
'#type' => 'hidden',
|
295 |
'#value' => $minute,
|
316 |
)
|
317 |
);
|
318 |
} else {
|
319 |
+
if ( $output == 'bootstrap' ) {
|
320 |
+
$minute_element = array(
|
321 |
+
'#type' => 'select',
|
322 |
+
'#before' => '<span class="wpt-form-label">' . __( 'Minute', 'wpv-views' ) . '</span>',
|
323 |
+
'#options' => $options,
|
324 |
+
'#default_value' => $minute,
|
325 |
+
'#name' => $this->getName() . '[minute]',
|
326 |
+
'#attributes' => array(
|
327 |
+
'title' => esc_attr( __( 'Select minute', 'wpv-views' ) ),
|
328 |
+
'class' => 'form-control',
|
329 |
+
),
|
330 |
+
);
|
331 |
+
} else {
|
332 |
+
$minute_element = array(
|
333 |
+
'#type' => 'select',
|
334 |
+
'#before' => '<span class="wpt-form-label">' . __( 'Minute', 'wpv-views' ) . '</span>',
|
335 |
+
'#options' => $options,
|
336 |
+
'#default_value' => $minute,
|
337 |
+
'#name' => $this->getName() . '[minute]',
|
338 |
+
'#inline' => true,
|
339 |
+
'#attributes' => array(
|
340 |
+
'title' => esc_attr( __( 'Select minute', 'wpv-views' ) ),
|
341 |
+
),
|
342 |
+
);
|
343 |
+
}
|
344 |
}
|
345 |
|
346 |
if ( !empty($attributes_hour_minute) ) {
|
library/toolset/toolset-common/toolset-forms/classes/class.eforms.php
CHANGED
@@ -81,6 +81,7 @@ class Enlimbo_Forms {
|
|
81 |
*/
|
82 |
$this->form_settings = array(
|
83 |
'has_media_button' => true,
|
|
|
84 |
);
|
85 |
$this->_id = $id;
|
86 |
if ( ! Toolset_Utils::is_real_admin() ) {
|
@@ -91,6 +92,13 @@ class Enlimbo_Forms {
|
|
91 |
$this->form_settings = $form_settings->form;
|
92 |
}
|
93 |
unset( $form_settings );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
}
|
95 |
}
|
96 |
|
@@ -427,6 +435,26 @@ class Enlimbo_Forms {
|
|
427 |
$classes = array();
|
428 |
$classes[] = $this->css_class . '-' . $element['#type'];
|
429 |
$classes[] = 'form-' . $element['#type'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
430 |
|
431 |
if ( 'hidden' != $element['#type'] ) {
|
432 |
$classes[] = $element['#type'];
|
@@ -542,7 +570,9 @@ class Enlimbo_Forms {
|
|
542 |
$classes[] = 'form-item-' . $element['#type'];
|
543 |
$classes[] = $this->css_class . '-item';
|
544 |
$classes[] = $this->css_class . '-item-' . $element['#type'];
|
545 |
-
|
|
|
|
|
546 |
if ( preg_match( '/_hidden$/', $element['#id'] ) && ! is_admin() ) {
|
547 |
$classes[] = 'wpt-form-hide-container';
|
548 |
}
|
81 |
*/
|
82 |
$this->form_settings = array(
|
83 |
'has_media_button' => true,
|
84 |
+
'use_bootstrap' => false,
|
85 |
);
|
86 |
$this->_id = $id;
|
87 |
if ( ! Toolset_Utils::is_real_admin() ) {
|
92 |
$this->form_settings = $form_settings->form;
|
93 |
}
|
94 |
unset( $form_settings );
|
95 |
+
/**
|
96 |
+
* check CRED setting for bootstrap: only on frontend
|
97 |
+
*/
|
98 |
+
$cred_cred_settings = get_option('cred_cred_settings');
|
99 |
+
if (is_array($cred_cred_settings)) {
|
100 |
+
$this->form_settings['use_bootstrap'] = array_key_exists('use_bootstrap', $cred_cred_settings) && $cred_cred_settings['use_bootstrap'];
|
101 |
+
}
|
102 |
}
|
103 |
}
|
104 |
|
435 |
$classes = array();
|
436 |
$classes[] = $this->css_class . '-' . $element['#type'];
|
437 |
$classes[] = 'form-' . $element['#type'];
|
438 |
+
|
439 |
+
if ($this->form_settings['use_bootstrap']) {
|
440 |
+
switch ($element['#type']) {
|
441 |
+
case 'hidden':
|
442 |
+
case 'button':
|
443 |
+
case 'submit':
|
444 |
+
case 'radio':
|
445 |
+
case 'checkbox':
|
446 |
+
case 'file':
|
447 |
+
//cred-162
|
448 |
+
case 'option':
|
449 |
+
break;
|
450 |
+
default:
|
451 |
+
$classes[] = 'form-control';
|
452 |
+
}
|
453 |
+
} else {
|
454 |
+
if ('hidden' != $element['#type']) {
|
455 |
+
$classes[] = $element['#type'];
|
456 |
+
}
|
457 |
+
}
|
458 |
|
459 |
if ( 'hidden' != $element['#type'] ) {
|
460 |
$classes[] = $element['#type'];
|
570 |
$classes[] = 'form-item-' . $element['#type'];
|
571 |
$classes[] = $this->css_class . '-item';
|
572 |
$classes[] = $this->css_class . '-item-' . $element['#type'];
|
573 |
+
if ($this->form_settings['use_bootstrap']) {
|
574 |
+
$classes[] = 'form-group';
|
575 |
+
}
|
576 |
if ( preg_match( '/_hidden$/', $element['#id'] ) && ! is_admin() ) {
|
577 |
$classes[] = 'wpt-form-hide-container';
|
578 |
}
|
library/toolset/toolset-common/toolset-forms/classes/class.field_factory.php
CHANGED
@@ -9,7 +9,7 @@ require 'abstract.field.php';
|
|
9 |
|
10 |
abstract class FieldFactory extends FieldAbstract
|
11 |
{
|
12 |
-
protected $_nameField, $_data, $_value;
|
13 |
|
14 |
function __construct($data, $global_name_field, $value)
|
15 |
{
|
@@ -22,7 +22,10 @@ abstract class FieldFactory extends FieldAbstract
|
|
22 |
|
23 |
public function init()
|
24 |
{
|
25 |
-
$
|
|
|
|
|
|
|
26 |
}
|
27 |
|
28 |
public function set_placeholder_as_attribute()
|
9 |
|
10 |
abstract class FieldFactory extends FieldAbstract
|
11 |
{
|
12 |
+
protected $_nameField, $_data, $_value, $_use_bootstrap;
|
13 |
|
14 |
function __construct($data, $global_name_field, $value)
|
15 |
{
|
22 |
|
23 |
public function init()
|
24 |
{
|
25 |
+
$cred_cred_settings = get_option( 'cred_cred_settings' );
|
26 |
+
$this->_use_bootstrap = is_array($cred_cred_settings) && array_key_exists( 'use_bootstrap', $cred_cred_settings ) && $cred_cred_settings['use_bootstrap'];
|
27 |
+
|
28 |
+
$this->set_placeholder_as_attribute();
|
29 |
}
|
30 |
|
31 |
public function set_placeholder_as_attribute()
|
library/toolset/toolset-common/toolset-forms/classes/class.file.php
CHANGED
@@ -34,7 +34,13 @@ class WPToolset_Field_File extends WPToolset_Field_Textfield {
|
|
34 |
wp_enqueue_script( 'wptoolset-field-file' );
|
35 |
}
|
36 |
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
$screen = get_current_screen();
|
39 |
if ( isset( $screen->parent_base ) && 'users' == $screen->parent_base ) {
|
40 |
wp_enqueue_media();
|
34 |
wp_enqueue_script( 'wptoolset-field-file' );
|
35 |
}
|
36 |
|
37 |
+
// Note: we check whether the current_screen action has been fired because sometimes
|
38 |
+
// some plugins might perform somethign that loads this field before get_current_screen() is defined.
|
39 |
+
// This happens with an image widget module of Jetpack, for example.
|
40 |
+
if (
|
41 |
+
Toolset_Utils::is_real_admin()
|
42 |
+
&& did_action( 'current_screen' ) > 0
|
43 |
+
) {
|
44 |
$screen = get_current_screen();
|
45 |
if ( isset( $screen->parent_base ) && 'users' == $screen->parent_base ) {
|
46 |
wp_enqueue_media();
|
library/toolset/toolset-common/toolset-forms/classes/class.form_factory.php
CHANGED
@@ -20,7 +20,7 @@ class FormFactory extends FormAbstract {
|
|
20 |
private $form = array();
|
21 |
private $nameForm;
|
22 |
private $theForm;
|
23 |
-
protected $_validation, $_conditional, $_repetitive;
|
24 |
|
25 |
public function __construct( $nameForm = 'default' )
|
26 |
{
|
@@ -31,6 +31,7 @@ class FormFactory extends FormAbstract {
|
|
31 |
$this->nameForm = $nameForm;
|
32 |
$this->field_count = 0;
|
33 |
$this->theForm = new Enlimbo_Forms($nameForm);
|
|
|
34 |
|
35 |
wp_register_script( 'wptoolset-forms', WPTOOLSET_FORMS_RELPATH . '/js/main.js', array('jquery', 'underscore', 'suggest'), WPTOOLSET_FORMS_VERSION, true );
|
36 |
wp_enqueue_script( 'wptoolset-forms' );
|
@@ -69,6 +70,12 @@ class FormFactory extends FormAbstract {
|
|
69 |
) {
|
70 |
$load_cred_bootstrap_css = false;
|
71 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
}
|
73 |
|
74 |
/**
|
@@ -201,6 +208,7 @@ class FormFactory extends FormAbstract {
|
|
201 |
/**
|
202 |
* add bootstrap config to every field
|
203 |
*/
|
|
|
204 |
$config[ 'has_media_button' ] = $this->theForm->form_settings[ 'has_media_button' ];
|
205 |
|
206 |
/**
|
20 |
private $form = array();
|
21 |
private $nameForm;
|
22 |
private $theForm;
|
23 |
+
protected $_validation, $_conditional, $_repetitive, $_use_bootstrap;
|
24 |
|
25 |
public function __construct( $nameForm = 'default' )
|
26 |
{
|
31 |
$this->nameForm = $nameForm;
|
32 |
$this->field_count = 0;
|
33 |
$this->theForm = new Enlimbo_Forms($nameForm);
|
34 |
+
$this->_use_bootstrap = false;
|
35 |
|
36 |
wp_register_script( 'wptoolset-forms', WPTOOLSET_FORMS_RELPATH . '/js/main.js', array('jquery', 'underscore', 'suggest'), WPTOOLSET_FORMS_VERSION, true );
|
37 |
wp_enqueue_script( 'wptoolset-forms' );
|
70 |
) {
|
71 |
$load_cred_bootstrap_css = false;
|
72 |
}
|
73 |
+
if (
|
74 |
+
array_key_exists( 'use_bootstrap', $cred_cred_settings )
|
75 |
+
&& $cred_cred_settings['use_bootstrap']
|
76 |
+
) {
|
77 |
+
$this->_use_bootstrap = true;
|
78 |
+
}
|
79 |
}
|
80 |
|
81 |
/**
|
208 |
/**
|
209 |
* add bootstrap config to every field
|
210 |
*/
|
211 |
+
$config['use_bootstrap'] = $this->theForm->form_settings['use_bootstrap'];
|
212 |
$config[ 'has_media_button' ] = $this->theForm->form_settings[ 'has_media_button' ];
|
213 |
|
214 |
/**
|
library/toolset/toolset-common/toolset-forms/classes/class.select.php
CHANGED
@@ -1,116 +1,139 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
/**
|
4 |
-
*
|
5 |
-
*
|
6 |
-
*/
|
7 |
require_once 'class.field_factory.php';
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
-
*
|
12 |
-
* @author Srdjan
|
13 |
*/
|
14 |
class WPToolset_Field_Select extends FieldFactory {
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
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 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|
116 |
}
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
3 |
require_once 'class.field_factory.php';
|
4 |
|
5 |
/**
|
6 |
+
* Class WPToolset_Field_Select
|
|
|
|
|
7 |
*/
|
8 |
class WPToolset_Field_Select extends FieldFactory {
|
9 |
|
10 |
+
/**
|
11 |
+
* @return array
|
12 |
+
*/
|
13 |
+
public function metaform() {
|
14 |
+
$value = $this->getValue();
|
15 |
+
$data = $this->getData();
|
16 |
+
$attributes = $this->getAttr();
|
17 |
+
$form = $options = array();
|
18 |
+
$is_multiselect = array_key_exists( 'multiple', $attributes ) && 'multiple' == $attributes['multiple'];
|
19 |
+
|
20 |
+
if ( ! $is_multiselect ) {
|
21 |
+
if ( ! isset( $data['default_value'] ) ) {
|
22 |
+
|
23 |
+
$option_title = __( '--- not set ---', 'wpv-views' );
|
24 |
+
|
25 |
+
// no_parent_text even if deprecated since 1.9.1
|
26 |
+
// Mantaining backward compatilibility
|
27 |
+
if ( isset( $attributes['no_parent_text'] ) ) {
|
28 |
+
$option_title = $attributes['no_parent_text'];
|
29 |
+
} else {
|
30 |
+
//If cred_field shortcode attribute select_text is present use it
|
31 |
+
if ( isset( $attributes['select_text'] ) ) {
|
32 |
+
$option_title = $attributes['select_text'];
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
$not_set_value = array(
|
37 |
+
'#value' => '',
|
38 |
+
'#title' => $option_title,
|
39 |
+
);
|
40 |
+
|
41 |
+
/**
|
42 |
+
* wpt_field_not_set_option
|
43 |
+
*
|
44 |
+
* Filter used to change empty option element $not_set_value array
|
45 |
+
*
|
46 |
+
* @since 1.9.1
|
47 |
+
*
|
48 |
+
* @param array selectbox attributes
|
49 |
+
* @param array all select field data elements
|
50 |
+
*/
|
51 |
+
$not_set_value = apply_filters( 'wpt_field_not_set_option', $not_set_value, $attributes, $data );
|
52 |
+
|
53 |
+
$options[] = $not_set_value;
|
54 |
+
}
|
55 |
+
|
56 |
+
// default_value
|
57 |
+
if ( ! empty( $value ) || $value == '0' ) {
|
58 |
+
$data['default_value'] = $value;
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
if ( isset( $data['options'] ) ) {
|
63 |
+
if ( ! Toolset_Utils::is_real_admin() ) {
|
64 |
+
$new_options = array();
|
65 |
+
foreach ( $data['options'] as $key => $option ) {
|
66 |
+
if ( isset( $option['types-value'] ) ) {
|
67 |
+
$tmp = $option['value'];
|
68 |
+
$option['value'] = $option['types-value'];
|
69 |
+
$option['types-value'] = $tmp;
|
70 |
+
} else {
|
71 |
+
$option['types-value'] = $option['value'];
|
72 |
+
}
|
73 |
+
$new_options[ $key ] = $option;
|
74 |
+
unset( $tmp );
|
75 |
+
}
|
76 |
+
$data['options'] = $new_options;
|
77 |
+
}
|
78 |
+
|
79 |
+
foreach ( $data['options'] as $key => $option ) {
|
80 |
+
$one_option_data = array(
|
81 |
+
'#value' => $option['value'],
|
82 |
+
'#title' => stripslashes( $option['title'] ),
|
83 |
+
);
|
84 |
+
|
85 |
+
/**
|
86 |
+
* add default value if needed
|
87 |
+
* issue: frontend, multiforms CRED
|
88 |
+
*/
|
89 |
+
// if (array_key_exists('types-value', $option)) {
|
90 |
+
// $one_option_data['#types-value'] = $option['types-value'];
|
91 |
+
// }
|
92 |
+
|
93 |
+
$options[] = $one_option_data;
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* for user fields we reset title and description to avoid double
|
99 |
+
* display
|
100 |
+
*/
|
101 |
+
$title = $this->getTitle();
|
102 |
+
if ( empty( $title ) ) {
|
103 |
+
$title = $this->getTitle( true );
|
104 |
+
}
|
105 |
+
$options = apply_filters( 'wpt_field_options', $options, $title, 'select' );
|
106 |
+
$default_value = isset( $data['default_value'] ) ? $data['default_value'] : null;
|
107 |
+
|
108 |
+
//Fix https://icanlocalize.basecamphq.com/projects/7393061-toolset/todo_items/189219391/comments
|
109 |
+
if ( $is_multiselect && ! empty( $default_value ) ) {
|
110 |
+
$default_value = new RecursiveIteratorIterator( new RecursiveArrayIterator( $default_value ) );
|
111 |
+
$default_value = iterator_to_array( $default_value, false );
|
112 |
+
}
|
113 |
+
//##############################################################################################
|
114 |
+
|
115 |
+
/**
|
116 |
+
* metaform
|
117 |
+
*/
|
118 |
+
$form[] = array(
|
119 |
+
'#type' => 'select',
|
120 |
+
'#title' => $this->getTitle(),
|
121 |
+
'#description' => $this->getDescription(),
|
122 |
+
'#name' => $this->getName(),
|
123 |
+
'#options' => $options,
|
124 |
+
'#default_value' => $default_value,
|
125 |
+
'#multiple' => $is_multiselect,
|
126 |
+
'#validate' => $this->getValidationData(),
|
127 |
+
'#class' => 'form-inline',
|
128 |
+
'#repetitive' => $this->isRepetitive(),
|
129 |
+
/*
|
130 |
+
* class attribute was missed
|
131 |
+
*/
|
132 |
+
'#attributes' => $attributes,
|
133 |
+
'wpml_action' => $this->getWPMLAction(),
|
134 |
+
);
|
135 |
+
|
136 |
+
return $form;
|
137 |
+
}
|
138 |
|
139 |
}
|
library/toolset/toolset-common/toolset-forms/classes/class.submit.php
CHANGED
@@ -12,18 +12,33 @@ class WPToolset_Field_Submit extends WPToolset_Field_Textfield {
|
|
12 |
$attributes = $this->getAttr();
|
13 |
$shortcode_class = array_key_exists( 'class', $attributes ) ? $attributes['class'] : "";
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
return $metaform;
|
29 |
}
|
12 |
$attributes = $this->getAttr();
|
13 |
$shortcode_class = array_key_exists( 'class', $attributes ) ? $attributes['class'] : "";
|
14 |
|
15 |
+
if ( array_key_exists( 'use_bootstrap', $this->_data )
|
16 |
+
&& $this->_data['use_bootstrap']
|
17 |
+
) {
|
18 |
+
$metaform[] = array(
|
19 |
+
'#type' => 'submit',
|
20 |
+
'#title' => $this->getTitle(),
|
21 |
+
'#description' => $this->getDescription(),
|
22 |
+
'#name' => $this->getName(),
|
23 |
+
'#value' => esc_attr( __( $this->getValue(), 'wpv-views' ) ),
|
24 |
+
'#validate' => $this->getValidationData(),
|
25 |
+
'#attributes' => array(
|
26 |
+
'class' => "btn btn-primary {$shortcode_class}",
|
27 |
+
),
|
28 |
+
);
|
29 |
+
} else {
|
30 |
+
$metaform[] = array(
|
31 |
+
'#type' => 'submit',
|
32 |
+
'#title' => $this->getTitle(),
|
33 |
+
'#description' => $this->getDescription(),
|
34 |
+
'#name' => $this->getName(),
|
35 |
+
'#value' => esc_attr( __( $this->getValue(), 'wpv-views' ) ),
|
36 |
+
'#validate' => $this->getValidationData(),
|
37 |
+
'#attributes' => array(
|
38 |
+
'class' => $shortcode_class,
|
39 |
+
),
|
40 |
+
);
|
41 |
+
}
|
42 |
|
43 |
return $metaform;
|
44 |
}
|
library/toolset/toolset-common/toolset-forms/classes/class.taxonomy.php
CHANGED
@@ -41,15 +41,20 @@ class WPToolset_Field_Taxonomy extends WPToolset_Field_Textfield {
|
|
41 |
$wp_get_post_terms = wp_get_post_terms( $current_post_id, $this->getName(), array("fields" => "all") );
|
42 |
$terms = apply_filters( 'toolset_filter_taxonomy_terms', $wp_get_post_terms, $this->getName() );
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
|
51 |
-
|
52 |
-
|
|
|
53 |
|
54 |
|
55 |
$static_localization_script['instances'][] = array(
|
@@ -66,8 +71,6 @@ class WPToolset_Field_Taxonomy extends WPToolset_Field_Textfield {
|
|
66 |
wp_localize_script( 'wptoolset-taxonomy-field', 'wptoolset_taxonomy_settings', $script_localization );
|
67 |
|
68 |
wp_enqueue_script( 'wptoolset-taxonomy-field' );
|
69 |
-
|
70 |
-
//add_action('wp_footer', array($this, 'javascript_autocompleter'));
|
71 |
}
|
72 |
|
73 |
/**
|
@@ -91,6 +94,7 @@ class WPToolset_Field_Taxonomy extends WPToolset_Field_Textfield {
|
|
91 |
* @return type
|
92 |
*/
|
93 |
public function metaform() {
|
|
|
94 |
$attributes = $this->getAttr();
|
95 |
$taxonomy = $this->getName();
|
96 |
|
@@ -98,102 +102,174 @@ class WPToolset_Field_Taxonomy extends WPToolset_Field_Textfield {
|
|
98 |
$shortcode_class = array_key_exists( 'class', $attributes ) ? $attributes['class'] : "";
|
99 |
|
100 |
$metaform = array();
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
'
|
118 |
-
'
|
119 |
-
'
|
120 |
-
'
|
121 |
-
|
122 |
-
'
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
|
139 |
-
|
140 |
-
* add button
|
141 |
-
*/
|
142 |
-
$metaform[] = array(
|
143 |
-
'#type' => 'button',
|
144 |
-
'#title' => '',
|
145 |
-
'#description' => '',
|
146 |
-
'#name' => "new_tax_button_" . $taxonomy,
|
147 |
-
'#value' => apply_filters( 'toolset_button_add_text', esc_attr( $attributes['add_text'] ) ),
|
148 |
-
'#attributes' => array(
|
149 |
-
'class' => "wpt-taxonomy-add-new js-wpt-taxonomy-add-new {$bootstrap_class}",
|
150 |
-
'data-taxonomy' => $taxonomy,
|
151 |
-
),
|
152 |
-
'#validate' => $this->getValidationData(),
|
153 |
-
'#after' => $after
|
154 |
-
);
|
155 |
|
156 |
-
|
157 |
-
|
158 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
-
$show_hide_taxonomy = "";
|
161 |
-
if ( $this->output == 'bootstrap' ) {
|
162 |
-
$show_hide_taxonomy = "<a
|
163 |
-
style='display:none;'
|
164 |
-
data-taxonomy='" . $this->getName() . "'
|
165 |
-
data-after-selector='js-show-popular-after'
|
166 |
-
data-show-popular-text='" . apply_filters( 'toolset_button_show_popular_text', esc_attr( $attributes['show_popular_text'] ) ) . "'
|
167 |
-
data-hide-popular-text='" . apply_filters( 'toolset_button_hide_popular_text', esc_attr( $attributes['hide_popular_text'] ) ) . "'
|
168 |
-
class = 'popular wpt-taxonomy-popular-show-hide js-wpt-taxonomy-popular-show-hide dashicons-before dashicons-plus-alt'
|
169 |
-
data-output = '" . $this->output . "'
|
170 |
-
role = 'button'
|
171 |
-
name = 'sh_{$taxonomy}'
|
172 |
-
>" . apply_filters( 'toolset_button_show_popular_text', esc_attr( $attributes['show_popular_text'] ) ) . "</a>";
|
173 |
}
|
174 |
|
175 |
-
/**
|
176 |
-
* show popular button
|
177 |
-
*/
|
178 |
-
$metaform[] = array(
|
179 |
-
'#type' => 'button',
|
180 |
-
'#title' => '',
|
181 |
-
'#description' => '',
|
182 |
-
'#name' => "sh_" . $taxonomy,
|
183 |
-
'#value' => apply_filters( 'toolset_button_show_popular_text', esc_attr( $attributes['show_popular_text'] ) ),
|
184 |
-
'#attributes' => array(
|
185 |
-
'class' => "popular wpt-taxonomy-popular-show-hide js-wpt-taxonomy-popular-show-hide {$bootstrap_class}",
|
186 |
-
'data-taxonomy' => $this->getName(),
|
187 |
-
'data-show-popular-text' => apply_filters( 'toolset_button_show_popular_text', esc_attr( $attributes['show_popular_text'] ) ),
|
188 |
-
'data-hide-popular-text' => apply_filters( 'toolset_button_hide_popular_text', esc_attr( $attributes['hide_popular_text'] ) ),
|
189 |
-
'data-after-selector' => 'js-show-popular-after',
|
190 |
-
'style' => $show ? '' : 'display:none;',
|
191 |
-
'data-output' => $this->output
|
192 |
-
),
|
193 |
-
'#before' => $show_hide_taxonomy,
|
194 |
-
'#after' => $after . $this->initTaxonomyFunction(),
|
195 |
-
);
|
196 |
-
|
197 |
return $metaform;
|
198 |
}
|
199 |
|
@@ -229,16 +305,18 @@ class WPToolset_Field_Taxonomy extends WPToolset_Field_Textfield {
|
|
229 |
}
|
230 |
}
|
231 |
|
232 |
-
public function
|
233 |
$term_args = array(
|
234 |
'number' => 10,
|
235 |
'orderby' => 'count',
|
236 |
'order' => 'DESC'
|
237 |
);
|
238 |
$terms = get_terms( array($this->getName()), $term_args );
|
239 |
-
|
240 |
-
|
241 |
-
|
|
|
|
|
242 |
$max = -1;
|
243 |
$min = PHP_INT_MAX;
|
244 |
foreach ( $terms as $term ) {
|
@@ -251,10 +329,7 @@ class WPToolset_Field_Taxonomy extends WPToolset_Field_Textfield {
|
|
251 |
}
|
252 |
$add_sizes = $max > $min;
|
253 |
|
254 |
-
$bootstrap_class =
|
255 |
-
if ( $this->output == 'bootstrap' ) {
|
256 |
-
$bootstrap_class = 'well well-default';
|
257 |
-
}
|
258 |
|
259 |
$content = sprintf(
|
260 |
'<div class="shmpt-%s wpt-taxonomy-show-popular-list js-show-popular-after %s" style="display:none">', $this->getName(), $bootstrap_class
|
@@ -277,4 +352,55 @@ class WPToolset_Field_Taxonomy extends WPToolset_Field_Textfield {
|
|
277 |
return $content;
|
278 |
}
|
279 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
}
|
41 |
$wp_get_post_terms = wp_get_post_terms( $current_post_id, $this->getName(), array("fields" => "all") );
|
42 |
$terms = apply_filters( 'toolset_filter_taxonomy_terms', $wp_get_post_terms, $this->getName() );
|
43 |
|
44 |
+
if ( $terms
|
45 |
+
&& ! is_wp_error( $terms )
|
46 |
+
) {
|
47 |
+
$i = 0;
|
48 |
+
foreach ( $terms as $n => $term ) {
|
49 |
+
$this->values .= ( $i == 0 ) ? $term->name : "," . $term->name;
|
50 |
+
$this->objValues[ $term->slug ] = $term;
|
51 |
+
$i++;
|
52 |
+
}
|
53 |
}
|
54 |
|
55 |
+
if ( $static_localization_script === null ) {
|
56 |
+
$static_localization_script = array( 'ajaxurl' => admin_url( 'admin-ajax.php', null ), 'instances' => array() );
|
57 |
+
}
|
58 |
|
59 |
|
60 |
$static_localization_script['instances'][] = array(
|
71 |
wp_localize_script( 'wptoolset-taxonomy-field', 'wptoolset_taxonomy_settings', $script_localization );
|
72 |
|
73 |
wp_enqueue_script( 'wptoolset-taxonomy-field' );
|
|
|
|
|
74 |
}
|
75 |
|
76 |
/**
|
94 |
* @return type
|
95 |
*/
|
96 |
public function metaform() {
|
97 |
+
$use_bootstrap = array_key_exists('use_bootstrap', $this->_data) && $this->_data['use_bootstrap'];
|
98 |
$attributes = $this->getAttr();
|
99 |
$taxonomy = $this->getName();
|
100 |
|
102 |
$shortcode_class = array_key_exists( 'class', $attributes ) ? $attributes['class'] : "";
|
103 |
|
104 |
$metaform = array();
|
105 |
+
|
106 |
+
if ($this->output == 'bootstrap') {
|
107 |
+
|
108 |
+
$metaform[] = array(
|
109 |
+
'#type' => 'hidden',
|
110 |
+
'#title' => '',
|
111 |
+
'#description' => '',
|
112 |
+
'#name' => $taxonomy,
|
113 |
+
'#value' => $this->values,
|
114 |
+
'#attributes' => array( 'data-output' => $this->output ),
|
115 |
+
'#validate' => $this->getValidationData(),
|
116 |
+
);
|
117 |
+
|
118 |
+
|
119 |
+
$before = sprintf(
|
120 |
+
'<div class="tagchecklist tagchecklist-%s"></div>', $this->getName()
|
121 |
+
);
|
122 |
+
|
123 |
+
$metaform[] = array(
|
124 |
+
'#type' => 'textfield',
|
125 |
+
'#title' => '',
|
126 |
+
'#description' => '',
|
127 |
+
'#name' => "tmp_" . $taxonomy,
|
128 |
+
'#value' => $this->getValue(),
|
129 |
+
'#attributes' => array(
|
130 |
+
'data-taxonomy' => $taxonomy,
|
131 |
+
'data-taxtype' => 'flat',
|
132 |
+
'class' => "wpt-new-taxonomy-title js-wpt-new-taxonomy-title {$shortcode_class}"
|
133 |
+
),
|
134 |
+
'#validate' => $this->getValidationData(),
|
135 |
+
'#after' => '',
|
136 |
+
'#before' => $before
|
137 |
+
);
|
138 |
+
|
139 |
+
$after = $this->getMostPopularTermsAsBootstrap();
|
140 |
+
$bootstrap_class = "btn btn-primary";
|
141 |
+
|
142 |
+
/**
|
143 |
+
* add button
|
144 |
+
*/
|
145 |
+
$metaform[] = array(
|
146 |
+
'#type' => 'button',
|
147 |
+
'#title' => '',
|
148 |
+
'#description' => '',
|
149 |
+
'#name' => "new_tax_button_" . $taxonomy,
|
150 |
+
'#value' => apply_filters( 'toolset_button_add_text', esc_attr( $attributes['add_text'] ) ),
|
151 |
+
'#attributes' => array(
|
152 |
+
'class' => "wpt-taxonomy-add-new js-wpt-taxonomy-add-new {$bootstrap_class}",
|
153 |
+
'data-taxonomy' => $taxonomy,
|
154 |
+
),
|
155 |
+
'#validate' => $this->getValidationData(),
|
156 |
+
'#after' => $after
|
157 |
+
);
|
158 |
+
|
159 |
+
$after = "";
|
160 |
+
$before = "";
|
161 |
+
$show = isset( $attributes['show_popular'] ) && $attributes['show_popular'] == 'true';
|
162 |
|
163 |
+
$show_hide_taxonomy = "<a
|
164 |
+
style='display:none;'
|
165 |
+
data-taxonomy='" . $this->getName() . "'
|
166 |
+
data-after-selector='js-show-popular-after'
|
167 |
+
data-show-popular-text='" . apply_filters( 'toolset_button_show_popular_text', esc_attr( $attributes['show_popular_text'] ) ) . "'
|
168 |
+
data-hide-popular-text='" . apply_filters( 'toolset_button_hide_popular_text', esc_attr( $attributes['hide_popular_text'] ) ) . "'
|
169 |
+
class = 'popular wpt-taxonomy-popular-show-hide js-wpt-taxonomy-popular-show-hide dashicons-before dashicons-plus-alt'
|
170 |
+
data-output = '" . $this->output . "'
|
171 |
+
role = 'button'
|
172 |
+
name = 'sh_{$taxonomy}'
|
173 |
+
>" . apply_filters( 'toolset_button_show_popular_text', esc_attr( $attributes['show_popular_text'] ) ) . "</a>";
|
174 |
+
|
175 |
+
/**
|
176 |
+
* show popular button
|
177 |
+
*/
|
178 |
+
$metaform[] = array(
|
179 |
+
'#type' => 'button',
|
180 |
+
'#title' => '',
|
181 |
+
'#description' => '',
|
182 |
+
'#name' => "sh_" . $taxonomy,
|
183 |
+
'#value' => apply_filters( 'toolset_button_show_popular_text', esc_attr( $attributes['show_popular_text'] ) ),
|
184 |
+
'#attributes' => array(
|
185 |
+
'class' => "popular wpt-taxonomy-popular-show-hide js-wpt-taxonomy-popular-show-hide {$bootstrap_class}",
|
186 |
+
'data-taxonomy' => $this->getName(),
|
187 |
+
'data-show-popular-text' => apply_filters( 'toolset_button_show_popular_text', esc_attr( $attributes['show_popular_text'] ) ),
|
188 |
+
'data-hide-popular-text' => apply_filters( 'toolset_button_hide_popular_text', esc_attr( $attributes['hide_popular_text'] ) ),
|
189 |
+
'data-after-selector' => 'js-show-popular-after',
|
190 |
+
'style' => $show ? '' : 'display:none;',
|
191 |
+
'data-output' => $this->output
|
192 |
+
),
|
193 |
+
'#before' => $show_hide_taxonomy,
|
194 |
+
'#after' => $after . $this->initTaxonomyFunction(),
|
195 |
+
);
|
196 |
|
197 |
+
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
|
199 |
+
$metaform[] = array(
|
200 |
+
'#type' => 'hidden',
|
201 |
+
'#title' => '',
|
202 |
+
'#description' => '',
|
203 |
+
'#name' => $taxonomy,
|
204 |
+
'#value' => $this->values,
|
205 |
+
'#attributes' => array(
|
206 |
+
),
|
207 |
+
'#validate' => $this->getValidationData(),
|
208 |
+
);
|
209 |
+
$metaform[] = array(
|
210 |
+
'#type' => 'textfield',
|
211 |
+
'#title' => '',
|
212 |
+
'#description' => '',
|
213 |
+
'#name' => "tmp_" . $taxonomy,
|
214 |
+
'#value' => $this->getValue(),
|
215 |
+
'#attributes' => array(
|
216 |
+
'data-taxonomy' => $taxonomy,
|
217 |
+
'data-taxtype' => 'flat',
|
218 |
+
'class' => $use_bootstrap ? 'inline wpt-new-taxonomy-title js-wpt-new-taxonomy-title' : 'wpt-new-taxonomy-title js-wpt-new-taxonomy-title',
|
219 |
+
),
|
220 |
+
'#validate' => $this->getValidationData(),
|
221 |
+
'#before' => $use_bootstrap ? '<div class="form-group">' : '',
|
222 |
+
);
|
223 |
+
|
224 |
+
/**
|
225 |
+
* add button
|
226 |
+
*/
|
227 |
+
$metaform[] = array(
|
228 |
+
'#type' => 'button',
|
229 |
+
'#title' => '',
|
230 |
+
'#description' => '',
|
231 |
+
'#name' => "new_tax_button_" . $taxonomy,
|
232 |
+
'#value' => apply_filters('toolset_button_add_text', esc_attr($attributes['add_text'])),
|
233 |
+
'#attributes' => array(
|
234 |
+
'class' => $use_bootstrap ? 'btn btn-default wpt-taxonomy-add-new js-wpt-taxonomy-add-new' : 'wpt-taxonomy-add-new js-wpt-taxonomy-add-new',
|
235 |
+
'data-taxonomy' => $taxonomy,
|
236 |
+
),
|
237 |
+
'#validate' => $this->getValidationData(),
|
238 |
+
'#after' => $use_bootstrap ? '</div>' : '',
|
239 |
+
);
|
240 |
+
|
241 |
+
$before = sprintf(
|
242 |
+
'<div class="tagchecklist tagchecklist-%s"></div>', $this->getName()
|
243 |
+
);
|
244 |
+
$after = $this->getMostPopularTerms();
|
245 |
+
if ($use_bootstrap) {
|
246 |
+
$before = '<div class="form-group">' . $before;
|
247 |
+
$after .= '</div>';
|
248 |
+
}
|
249 |
+
$show = isset($attributes['show_popular']) && $attributes['show_popular'] == 'true';
|
250 |
+
/**
|
251 |
+
* show popular button
|
252 |
+
*/
|
253 |
+
$metaform[] = array(
|
254 |
+
'#type' => 'button',
|
255 |
+
'#title' => '',
|
256 |
+
'#description' => '',
|
257 |
+
'#name' => "sh_" . $taxonomy,
|
258 |
+
'#value' => apply_filters('toolset_button_show_popular_text', esc_attr($attributes['show_popular_text'])),
|
259 |
+
'#attributes' => array(
|
260 |
+
'class' => $use_bootstrap ? 'btn btn-default popular wpt-taxonomy-popular-show-hide js-wpt-taxonomy-popular-show-hide' : 'popular wpt-taxonomy-popular-show-hide js-wpt-taxonomy-popular-show-hide',
|
261 |
+
'data-taxonomy' => $this->getName(),
|
262 |
+
'data-show-popular-text' => apply_filters('toolset_button_show_popular_text', esc_attr($attributes['show_popular_text'])),
|
263 |
+
'data-hide-popular-text' => apply_filters('toolset_button_hide_popular_text', esc_attr($attributes['hide_popular_text'])),
|
264 |
+
'data-after-selector' => 'js-show-popular-after',
|
265 |
+
'style' => $show ? '' : 'display:none;'
|
266 |
+
),
|
267 |
+
'#before' => $before,
|
268 |
+
'#after' => $after . $this->initTaxonomyFunction(),
|
269 |
+
);
|
270 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
}
|
272 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
return $metaform;
|
274 |
}
|
275 |
|
305 |
}
|
306 |
}
|
307 |
|
308 |
+
public function getMostPopularTermsAsBootstrap() {
|
309 |
$term_args = array(
|
310 |
'number' => 10,
|
311 |
'orderby' => 'count',
|
312 |
'order' => 'DESC'
|
313 |
);
|
314 |
$terms = get_terms( array($this->getName()), $term_args );
|
315 |
+
if ( empty( $terms )
|
316 |
+
|| is_wp_error( $terms )
|
317 |
+
) {
|
318 |
+
return '';
|
319 |
+
}
|
320 |
$max = -1;
|
321 |
$min = PHP_INT_MAX;
|
322 |
foreach ( $terms as $term ) {
|
329 |
}
|
330 |
$add_sizes = $max > $min;
|
331 |
|
332 |
+
$bootstrap_class = 'well well-default';
|
|
|
|
|
|
|
333 |
|
334 |
$content = sprintf(
|
335 |
'<div class="shmpt-%s wpt-taxonomy-show-popular-list js-show-popular-after %s" style="display:none">', $this->getName(), $bootstrap_class
|
352 |
return $content;
|
353 |
}
|
354 |
|
355 |
+
public function getMostPopularTerms() {
|
356 |
+
$use_bootstrap = array_key_exists('use_bootstrap', $this->_data) && $this->_data['use_bootstrap'];
|
357 |
+
|
358 |
+
$term_args = array(
|
359 |
+
'number' => 10,
|
360 |
+
'orderby' => 'count',
|
361 |
+
'order' => 'DESC'
|
362 |
+
);
|
363 |
+
$terms = get_terms(array($this->getName()), $term_args);
|
364 |
+
if (empty($terms)) {
|
365 |
+
return '';
|
366 |
+
}
|
367 |
+
$max = -1;
|
368 |
+
$min = PHP_INT_MAX;
|
369 |
+
foreach ($terms as $term) {
|
370 |
+
if ($term->count < $min) {
|
371 |
+
$min = $term->count;
|
372 |
+
}
|
373 |
+
if ($term->count > $max) {
|
374 |
+
$max = $term->count;
|
375 |
+
}
|
376 |
+
}
|
377 |
+
$add_sizes = $max > $min;
|
378 |
+
|
379 |
+
if ($use_bootstrap) {
|
380 |
+
$content = sprintf(
|
381 |
+
'<div class="shmpt-%s form-group wpt-taxonomy-show-popular-list js-show-popular-after" style="display:none">', $this->getName()
|
382 |
+
);
|
383 |
+
} else {
|
384 |
+
$content = sprintf(
|
385 |
+
'<div class="shmpt-%s wpt-taxonomy-show-popular-list js-show-popular-after" style="display:none">', $this->getName()
|
386 |
+
);
|
387 |
+
}
|
388 |
+
|
389 |
+
foreach ($terms as $term) {
|
390 |
+
$style = '';
|
391 |
+
if ($add_sizes) {
|
392 |
+
$font_size = ( ( $term->count - $min ) * 10 ) / ( $max - $min ) + 8;
|
393 |
+
$style = sprintf(' style="font-size:%fem;"', $font_size / 10);
|
394 |
+
}
|
395 |
+
$clases = array('wpt-taxonomy-popular-add', 'js-wpt-taxonomy-popular-add');
|
396 |
+
$clases[] = 'tax-' . $term->slug;
|
397 |
+
$clases[] = 'taxonomy-' . $this->getName() . '-' . $term->term_id;
|
398 |
+
$content .= sprintf(
|
399 |
+
'<a href="#" class="%s" data-slug="%s" data-name="%s" data-taxonomy="%s"%s>%s</a> ', implode(' ', $clases), $term->slug, $term->name, $this->getName(), $style, $term->name
|
400 |
+
);
|
401 |
+
}
|
402 |
+
$content .= "</div>";
|
403 |
+
return $content;
|
404 |
+
}
|
405 |
+
|
406 |
}
|
library/toolset/toolset-common/toolset-forms/classes/class.taxonomyhierarchical.php
CHANGED
@@ -107,6 +107,7 @@ class WPToolset_Field_Taxonomyhierarchical extends WPToolset_Field_Textfield {
|
|
107 |
}
|
108 |
|
109 |
public function metaform() {
|
|
|
110 |
$attributes = $this->getAttr();
|
111 |
$this->output = ( isset( $attributes['output'] ) ) ? $attributes['output'] : "";
|
112 |
|
@@ -161,92 +162,88 @@ class WPToolset_Field_Taxonomyhierarchical extends WPToolset_Field_Textfield {
|
|
161 |
*/
|
162 |
$add_text_button_value = apply_filters( 'toolset_button_add_text', esc_attr( $attributes['add_text'] ) );
|
163 |
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
|
|
169 |
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
|
|
198 |
),
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
);
|
210 |
|
211 |
-
$bootstrap_class = "";
|
212 |
-
if ( $this->output == 'bootstrap' ) {
|
213 |
$bootstrap_class = "btn btn-default";
|
214 |
-
}
|
215 |
-
|
216 |
-
/**
|
217 |
-
* The add button
|
218 |
-
*/
|
219 |
-
$metaform[] = array(
|
220 |
-
'#type' => 'button',
|
221 |
-
'#title' => '',
|
222 |
-
'#description' => '',
|
223 |
-
'#name' => "new_tax_button_{$taxonomy_name}",
|
224 |
-
'#value' => $add_text_button_value,
|
225 |
-
'#attributes' => array(
|
226 |
-
'data-taxonomy' => $taxonomy_name,
|
227 |
-
'data-build_what' => $build_what,
|
228 |
-
'class' => "wpt-hierarchical-taxonomy-add-new js-wpt-hierarchical-taxonomy-add-new {$bootstrap_class}",
|
229 |
-
'data-output' => $this->output,
|
230 |
-
),
|
231 |
-
'#validate' => $this->getValidationData(),
|
232 |
-
'#after' => $close_container,
|
233 |
-
);
|
234 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
|
236 |
-
if ( $this->output == 'bootstrap' ) {
|
237 |
$class = 'wpt-hierarchical-taxonomy-add-new-show-hide js-wpt-hierarchical-taxonomy-add-new-show-hide dashicons-before dashicons-plus-alt';
|
238 |
|
239 |
$bootstrap_button = "<a
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
|
251 |
$metaform[] = array(
|
252 |
'#type' => 'markup',
|
@@ -254,28 +251,91 @@ class WPToolset_Field_Taxonomyhierarchical extends WPToolset_Field_Textfield {
|
|
254 |
);
|
255 |
|
256 |
} else {
|
257 |
-
$class = 'wpt-hierarchical-taxonomy-add-new-show-hide js-wpt-hierarchical-taxonomy-add-new-show-hide';
|
258 |
-
|
259 |
$metaform[] = array(
|
260 |
'#type' => 'button',
|
261 |
-
'#title' => '
|
262 |
'#description' => '',
|
263 |
'#name' => "btn_{$taxonomy_name}",
|
264 |
'#value' => $add_new_text_button_value,
|
265 |
'#attributes' => array(
|
266 |
-
'style' => 'display:none',
|
267 |
'data-taxonomy' => $taxonomy_name,
|
268 |
'data-build_what' => $build_what,
|
269 |
-
'data-after-selector' =>
|
270 |
'data-open' => $add_new_text_button_value,
|
271 |
-
'data-close' => $cancel_button_value,
|
272 |
-
'class' => $
|
273 |
-
'data-output' => $this->output,
|
274 |
),
|
275 |
'#validate' => $this->getValidationData(),
|
276 |
);
|
277 |
-
}
|
278 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
|
280 |
/**
|
281 |
* toolset_filter_taxonomyhierarchical_metaform
|
@@ -505,6 +565,7 @@ class WPToolset_Field_Taxonomyhierarchical extends WPToolset_Field_Textfield {
|
|
505 |
$is_checked_by_default = in_array( $term_id, $this->getValue() );
|
506 |
}
|
507 |
$classes = array();
|
|
|
508 |
$classes[] = 'tax-' . sanitize_title( $names[ $term_id ] );
|
509 |
$classes[] = 'tax-' . $this->_data['name'] . '-' . $term_id;
|
510 |
/**
|
107 |
}
|
108 |
|
109 |
public function metaform() {
|
110 |
+
$use_bootstrap = array_key_exists( 'use_bootstrap', $this->_data ) && $this->_data['use_bootstrap'];
|
111 |
$attributes = $this->getAttr();
|
112 |
$this->output = ( isset( $attributes['output'] ) ) ? $attributes['output'] : "";
|
113 |
|
162 |
*/
|
163 |
$add_text_button_value = apply_filters( 'toolset_button_add_text', esc_attr( $attributes['add_text'] ) );
|
164 |
|
165 |
+
if ( $this->output == 'bootstrap' ) {
|
166 |
+
/**
|
167 |
+
* Input Text/Selectbox Parent container
|
168 |
+
*/
|
169 |
+
$open_container = '<div style="display:none" class="form-group wpt-hierarchical-taxonomy-add-new js-wpt-hierarchical-taxonomy-add-new-container js-wpt-hierarchical-taxonomy-add-new-' . $taxonomy_name . '" data-taxonomy="' . $taxonomy_name . '">';
|
170 |
+
$close_container = '</div>';
|
171 |
|
172 |
+
/**
|
173 |
+
* The textfield input
|
174 |
+
*/
|
175 |
+
$metaform[] = array(
|
176 |
+
'#type' => 'textfield',
|
177 |
+
'#title' => '',
|
178 |
+
'#description' => '',
|
179 |
+
'#name' => "new_tax_text_" . $taxonomy_name,
|
180 |
+
'#value' => '',
|
181 |
+
'#attributes' => array(
|
182 |
+
'data-taxonomy' => $taxonomy_name,
|
183 |
+
'data-taxtype' => 'hierarchical',
|
184 |
+
'class' => "form-control wpt-new-taxonomy-title js-wpt-new-taxonomy-title {$shortcode_class}",
|
185 |
+
),
|
186 |
+
'#validate' => $this->getValidationData(),
|
187 |
+
'#before' => $open_container,
|
188 |
+
);
|
189 |
|
190 |
+
/**
|
191 |
+
* The select for parent
|
192 |
+
*/
|
193 |
+
$metaform[] = array(
|
194 |
+
'#type' => 'select',
|
195 |
+
'#title' => '',
|
196 |
+
'#options' => array(
|
197 |
+
array(
|
198 |
+
'#title' => $attributes['parent_text'],
|
199 |
+
'#value' => -1,
|
200 |
+
),
|
201 |
),
|
202 |
+
'#default_value' => 0,
|
203 |
+
'#description' => '',
|
204 |
+
'#name' => "new_tax_select_" . $taxonomy_name,
|
205 |
+
'#attributes' => array(
|
206 |
+
'data-parent-text' => $attributes['parent_text'],
|
207 |
+
'data-taxonomy' => $taxonomy_name,
|
208 |
+
'class' => "form-control js-taxonomy-parent wpt-taxonomy-parent {$shortcode_class}",
|
209 |
+
),
|
210 |
+
'#validate' => $this->getValidationData(),
|
211 |
+
);
|
|
|
212 |
|
|
|
|
|
213 |
$bootstrap_class = "btn btn-default";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
|
215 |
+
/**
|
216 |
+
* The add button
|
217 |
+
*/
|
218 |
+
$metaform[] = array(
|
219 |
+
'#type' => 'button',
|
220 |
+
'#title' => '',
|
221 |
+
'#description' => '',
|
222 |
+
'#name' => "new_tax_button_{$taxonomy_name}",
|
223 |
+
'#value' => $add_text_button_value,
|
224 |
+
'#attributes' => array(
|
225 |
+
'data-taxonomy' => $taxonomy_name,
|
226 |
+
'data-build_what' => $build_what,
|
227 |
+
'class' => "wpt-hierarchical-taxonomy-add-new js-wpt-hierarchical-taxonomy-add-new {$bootstrap_class}",
|
228 |
+
'data-output' => $this->output,
|
229 |
+
),
|
230 |
+
'#validate' => $this->getValidationData(),
|
231 |
+
'#after' => $close_container,
|
232 |
+
);
|
233 |
|
|
|
234 |
$class = 'wpt-hierarchical-taxonomy-add-new-show-hide js-wpt-hierarchical-taxonomy-add-new-show-hide dashicons-before dashicons-plus-alt';
|
235 |
|
236 |
$bootstrap_button = "<a
|
237 |
+
style='display:none;'
|
238 |
+
data-taxonomy='{$taxonomy_name}'
|
239 |
+
data-after-selector='js-wpt-hierarchical-taxonomy-add-new-{$taxonomy_name}'
|
240 |
+
data-open='" . $add_new_text_button_value . "'
|
241 |
+
data-close='" . $cancel_button_value . "'
|
242 |
+
data-output='" . $this->output . "'
|
243 |
+
class = '{$class}'
|
244 |
+
role = 'button'
|
245 |
+
name = 'btn_{$taxonomy_name}'
|
246 |
+
>{$add_new_text_button_value}</a>";
|
247 |
|
248 |
$metaform[] = array(
|
249 |
'#type' => 'markup',
|
251 |
);
|
252 |
|
253 |
} else {
|
|
|
|
|
254 |
$metaform[] = array(
|
255 |
'#type' => 'button',
|
256 |
+
'#title' => '',
|
257 |
'#description' => '',
|
258 |
'#name' => "btn_{$taxonomy_name}",
|
259 |
'#value' => $add_new_text_button_value,
|
260 |
'#attributes' => array(
|
261 |
+
'style' => 'display:none;',
|
262 |
'data-taxonomy' => $taxonomy_name,
|
263 |
'data-build_what' => $build_what,
|
264 |
+
'data-after-selector' => 'js-wpt-hierarchical-taxonomy-add-new-' . $taxonomy_name,
|
265 |
'data-open' => $add_new_text_button_value,
|
266 |
+
'data-close' => $cancel_button_value, // TODO adjust the button value depending on open/close action
|
267 |
+
'class' => $use_bootstrap ? 'btn btn-default wpt-hierarchical-taxonomy-add-new-show-hide js-wpt-hierarchical-taxonomy-add-new-show-hide' : 'wpt-hierarchical-taxonomy-add-new-show-hide js-wpt-hierarchical-taxonomy-add-new-show-hide',
|
|
|
268 |
),
|
269 |
'#validate' => $this->getValidationData(),
|
270 |
);
|
|
|
271 |
|
272 |
+
// Input for new taxonomy
|
273 |
+
|
274 |
+
if ( $use_bootstrap ) {
|
275 |
+
$container = '<div style="display:none" class="form-group wpt-hierarchical-taxonomy-add-new js-wpt-hierarchical-taxonomy-add-new-container js-wpt-hierarchical-taxonomy-add-new-' . $taxonomy_name . '" data-taxonomy="' . $taxonomy_name . '">';
|
276 |
+
} else {
|
277 |
+
$container = '<div style="display:none" class="wpt-hierarchical-taxonomy-add-new js-wpt-hierarchical-taxonomy-add-new-container js-wpt-hierarchical-taxonomy-add-new-' . $taxonomy_name . '" data-taxonomy="' . $taxonomy_name . '">';
|
278 |
+
}
|
279 |
+
|
280 |
+
/**
|
281 |
+
* The textfield input
|
282 |
+
*/
|
283 |
+
$metaform[] = array(
|
284 |
+
'#type' => 'textfield',
|
285 |
+
'#title' => '',
|
286 |
+
'#description' => '',
|
287 |
+
'#name' => "new_tax_text_{$taxonomy_name}",
|
288 |
+
'#value' => '',
|
289 |
+
'#attributes' => array(
|
290 |
+
'data-taxonomy' => $taxonomy_name,
|
291 |
+
'data-taxtype' => 'hierarchical',
|
292 |
+
'class' => $use_bootstrap ? 'inline wpt-new-taxonomy-title js-wpt-new-taxonomy-title' : 'wpt-new-taxonomy-title js-wpt-new-taxonomy-title',
|
293 |
+
),
|
294 |
+
'#validate' => $this->getValidationData(),
|
295 |
+
'#before' => $container,
|
296 |
+
);
|
297 |
+
|
298 |
+
/**
|
299 |
+
* The select for parent
|
300 |
+
*/
|
301 |
+
$metaform[] = array(
|
302 |
+
'#type' => 'select',
|
303 |
+
'#title' => '',
|
304 |
+
'#options' => array(
|
305 |
+
array(
|
306 |
+
'#title' => $attributes['parent_text'],
|
307 |
+
'#value' => -1,
|
308 |
+
),
|
309 |
+
),
|
310 |
+
'#default_value' => 0,
|
311 |
+
'#description' => '',
|
312 |
+
'#name' => "new_tax_select_{$taxonomy_name}",
|
313 |
+
'#attributes' => array(
|
314 |
+
'data-parent-text' => $attributes['parent_text'],
|
315 |
+
'data-taxonomy' => $taxonomy_name,
|
316 |
+
'class' => 'js-taxonomy-parent wpt-taxonomy-parent',
|
317 |
+
),
|
318 |
+
'#validate' => $this->getValidationData(),
|
319 |
+
);
|
320 |
+
|
321 |
+
/**
|
322 |
+
* The add button
|
323 |
+
*/
|
324 |
+
$metaform[] = array(
|
325 |
+
'#type' => 'button',
|
326 |
+
'#title' => '',
|
327 |
+
'#description' => '',
|
328 |
+
'#name' => "new_tax_button_" . $taxonomy_name,
|
329 |
+
'#value' => $add_text_button_value,
|
330 |
+
'#attributes' => array(
|
331 |
+
'data-taxonomy' => $taxonomy_name,
|
332 |
+
'data-build_what' => $build_what,
|
333 |
+
'class' => $use_bootstrap ? 'btn btn-default wpt-hierarchical-taxonomy-add-new js-wpt-hierarchical-taxonomy-add-new' : 'wpt-hierarchical-taxonomy-add-new js-wpt-hierarchical-taxonomy-add-new',
|
334 |
+
),
|
335 |
+
'#validate' => $this->getValidationData(),
|
336 |
+
'#after' => '</div>',
|
337 |
+
);
|
338 |
+
}
|
339 |
|
340 |
/**
|
341 |
* toolset_filter_taxonomyhierarchical_metaform
|
565 |
$is_checked_by_default = in_array( $term_id, $this->getValue() );
|
566 |
}
|
567 |
$classes = array();
|
568 |
+
$classes[] = 'checkbox';
|
569 |
$classes[] = 'tax-' . sanitize_title( $names[ $term_id ] );
|
570 |
$classes[] = 'tax-' . $this->_data['name'] . '-' . $term_id;
|
571 |
/**
|
library/toolset/toolset-common/toolset-forms/css/wpt-toolset-frontend-legacy.css
CHANGED
@@ -298,6 +298,23 @@ body.wpt-loading .wpt-modal {
|
|
298 |
margin-bottom: 5px;
|
299 |
}
|
300 |
|
301 |
-
.wpt-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
margin-top: 5px;
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
}
|
298 |
margin-bottom: 5px;
|
299 |
}
|
300 |
|
301 |
+
.wpt-repdrag
|
302 |
+
,.wpt-credfile-delete
|
303 |
+
,.wpt-credfile-undo {
|
304 |
+
margin: 0 5px 0 0;
|
305 |
+
}
|
306 |
+
.wpt-repdelete, .wpt-date-clear {
|
307 |
+
margin: 0 0 0 5px;
|
308 |
+
}
|
309 |
+
.wpt-repadd {
|
310 |
+
margin-top: 5px !important;
|
311 |
+
}
|
312 |
+
.wpt-repctl {
|
313 |
margin-top: 5px;
|
314 |
+
border-bottom: 1px solid #CCC;
|
315 |
+
padding-bottom: 10px;
|
316 |
+
}
|
317 |
+
|
318 |
+
.wpt-repctl:hover {
|
319 |
+
background-color: #ededed;
|
320 |
}
|
library/toolset/toolset-common/toolset-forms/js/conditional.js
CHANGED
@@ -39,38 +39,6 @@ var wptCond = (function ($) {
|
|
39 |
//_init_custom();
|
40 |
}
|
41 |
|
42 |
-
// hide / show effects
|
43 |
-
|
44 |
-
$.fn.condSlideFadeDown = function (speed, easing, callback) {
|
45 |
-
easing = easing || 'linear';
|
46 |
-
return this.each(function () {
|
47 |
-
$(this).fadeIn(speed, function () {
|
48 |
-
//$(this).css('height', 'auto');
|
49 |
-
if ($.browser.msie) {
|
50 |
-
this.style.removeAttribute('filter');
|
51 |
-
}
|
52 |
-
if ($.isFunction(callback)) {
|
53 |
-
callback.call(this);
|
54 |
-
}
|
55 |
-
});
|
56 |
-
});
|
57 |
-
};
|
58 |
-
|
59 |
-
$.fn.condSlideFadeUp = function (speed, easing, callback) {
|
60 |
-
easing = easing || 'linear';
|
61 |
-
return this.each(function () {
|
62 |
-
$(this).fadeOut(speed, function () {
|
63 |
-
//$(this).css('height', 'auto');
|
64 |
-
if ($.browser.msie) {
|
65 |
-
this.style.removeAttribute('filter');
|
66 |
-
}
|
67 |
-
if ($.isFunction(callback)) {
|
68 |
-
callback.call(this);
|
69 |
-
}
|
70 |
-
});
|
71 |
-
});
|
72 |
-
};
|
73 |
-
|
74 |
function _getTrigger(trigger, formID)
|
75 |
{
|
76 |
var $trigger = $('[data-wpt-name="' + trigger + '"]', formID);
|
@@ -746,24 +714,18 @@ var wptCond = (function ($) {
|
|
746 |
}
|
747 |
$el.addClass('wpt-conditional-visible').removeClass('wpt-conditional-hidden js-wpt-remove-on-submit js-wpt-validation-ignore');
|
748 |
switch (effectmode) {
|
749 |
-
case 'fade-slide':
|
750 |
-
setTimeout(function () {
|
751 |
-
$el.stop(true).condSlideFadeDown('linear', function () {
|
752 |
-
$(document).trigger('js_event_toolset_forms_conditional_field_toggled', data_for_events);
|
753 |
-
});
|
754 |
-
}, delay);
|
755 |
-
break;
|
756 |
case 'slide':
|
757 |
setTimeout(function () {
|
758 |
-
$el.
|
759 |
$el.css('height', 'auto');
|
760 |
$(document).trigger('js_event_toolset_forms_conditional_field_toggled', data_for_events);
|
761 |
});
|
762 |
}, delay);
|
763 |
break;
|
|
|
764 |
case 'fade':
|
765 |
setTimeout(function () {
|
766 |
-
$el.
|
767 |
$(document).trigger('js_event_toolset_forms_conditional_field_toggled', data_for_events);
|
768 |
});
|
769 |
}, delay);
|
@@ -781,24 +743,18 @@ var wptCond = (function ($) {
|
|
781 |
} else {
|
782 |
$el.addClass('wpt-conditional-hidden js-wpt-remove-on-submit js-wpt-validation-ignore').removeClass('wpt-conditional-visible');
|
783 |
switch (effectmode) {
|
784 |
-
case 'fade-slide':
|
785 |
-
setTimeout(function () {
|
786 |
-
$el.stop(true).condSlideFadeUp('linear', function () {
|
787 |
-
$(document).trigger('js_event_toolset_forms_conditional_field_toggled', data_for_events);
|
788 |
-
});
|
789 |
-
}, delay);
|
790 |
-
break;
|
791 |
case 'slide':
|
792 |
setTimeout(function () {
|
793 |
-
$el.
|
794 |
$el.css('height', 'auto');
|
795 |
$(document).trigger('js_event_toolset_forms_conditional_field_toggled', data_for_events);
|
796 |
});
|
797 |
}, delay);
|
798 |
break;
|
|
|
799 |
case 'fade':
|
800 |
setTimeout(function () {
|
801 |
-
$el.
|
802 |
$(document).trigger('js_event_toolset_forms_conditional_field_toggled', data_for_events);
|
803 |
});
|
804 |
}, delay);
|
@@ -816,6 +772,11 @@ var wptCond = (function ($) {
|
|
816 |
}
|
817 |
}
|
818 |
|
|
|
|
|
|
|
|
|
|
|
819 |
function ajaxCheck(formID, field, conditions)
|
820 |
{
|
821 |
var values = {};
|
@@ -892,11 +853,15 @@ var wptCond = (function ($) {
|
|
892 |
|
893 |
jQuery(document).on('cred_form_ready', function(evt, evt_data){
|
894 |
|
895 |
-
//Queue initialisation, init date fields first then the conditional groups to prevent jQuery validation errors
|
|
|
|
|
896 |
setTimeout(function(){
|
897 |
wptDate.init('#' + evt_data.form_id);
|
898 |
}, 1);
|
899 |
|
|
|
|
|
900 |
setTimeout(function(){
|
901 |
init();
|
902 |
}, 2);
|
@@ -909,4 +874,3 @@ var wptCond = (function ($) {
|
|
909 |
};
|
910 |
|
911 |
})(jQuery);
|
912 |
-
|
39 |
//_init_custom();
|
40 |
}
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
function _getTrigger(trigger, formID)
|
43 |
{
|
44 |
var $trigger = $('[data-wpt-name="' + trigger + '"]', formID);
|
714 |
}
|
715 |
$el.addClass('wpt-conditional-visible').removeClass('wpt-conditional-hidden js-wpt-remove-on-submit js-wpt-validation-ignore');
|
716 |
switch (effectmode) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
717 |
case 'slide':
|
718 |
setTimeout(function () {
|
719 |
+
$el.slideDown('fast', function () {
|
720 |
$el.css('height', 'auto');
|
721 |
$(document).trigger('js_event_toolset_forms_conditional_field_toggled', data_for_events);
|
722 |
});
|
723 |
}, delay);
|
724 |
break;
|
725 |
+
case 'fade-slide':
|
726 |
case 'fade':
|
727 |
setTimeout(function () {
|
728 |
+
$el.fadeIn('fast', function () {
|
729 |
$(document).trigger('js_event_toolset_forms_conditional_field_toggled', data_for_events);
|
730 |
});
|
731 |
}, delay);
|
743 |
} else {
|
744 |
$el.addClass('wpt-conditional-hidden js-wpt-remove-on-submit js-wpt-validation-ignore').removeClass('wpt-conditional-visible');
|
745 |
switch (effectmode) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
746 |
case 'slide':
|
747 |
setTimeout(function () {
|
748 |
+
$el.slideUp('fast', function () {
|
749 |
$el.css('height', 'auto');
|
750 |
$(document).trigger('js_event_toolset_forms_conditional_field_toggled', data_for_events);
|
751 |
});
|
752 |
}, delay);
|
753 |
break;
|
754 |
+
case 'fade-slide':
|
755 |
case 'fade':
|
756 |
setTimeout(function () {
|
757 |
+
$el.fadeOut('fast', function () {
|
758 |
$(document).trigger('js_event_toolset_forms_conditional_field_toggled', data_for_events);
|
759 |
});
|
760 |
}, delay);
|
772 |
}
|
773 |
}
|
774 |
|
775 |
+
// @bug This seems to be only used by date.js on its conditional_check_date method,
|
776 |
+
// which again gets only used by its ajaxConditional method,
|
777 |
+
// which seems hooked into a commented out JS action.
|
778 |
+
// The PHP side is in bootstrap.php :-/
|
779 |
+
// I do not think we have AJAX conditionals, not even for date fields :-//
|
780 |
function ajaxCheck(formID, field, conditions)
|
781 |
{
|
782 |
var values = {};
|
853 |
|
854 |
jQuery(document).on('cred_form_ready', function(evt, evt_data){
|
855 |
|
856 |
+
// Queue initialisation, init date fields first then the conditional groups to prevent jQuery validation errors
|
857 |
+
// @bug This does not init date fields as they are actually initialized on CRED forms in date.js
|
858 |
+
// and they require a flag source: 'cred_form_ready_init'
|
859 |
setTimeout(function(){
|
860 |
wptDate.init('#' + evt_data.form_id);
|
861 |
}, 1);
|
862 |
|
863 |
+
// @bug This is inid in main.js:18 and I can not even start wondering what side effects can have doing it twice
|
864 |
+
// For now, sjow/hide effects are binded twice and that might be causing some nasty visual :-(
|
865 |
setTimeout(function(){
|
866 |
init();
|
867 |
}, 2);
|
874 |
};
|
875 |
|
876 |
})(jQuery);
|
|
library/toolset/toolset-common/toolset-forms/js/date.js
CHANGED
@@ -187,8 +187,8 @@ jQuery(document).ready(function () {
|
|
187 |
});
|
188 |
|
189 |
//Init date fields after CRED form is ready
|
190 |
-
jQuery(document).on('cred_form_ready', function(){
|
191 |
-
wptDate.init(
|
192 |
source: 'cred_form_ready_init'
|
193 |
});
|
194 |
});
|
187 |
});
|
188 |
|
189 |
//Init date fields after CRED form is ready
|
190 |
+
jQuery(document).on('cred_form_ready', function( evt, form_data ){
|
191 |
+
wptDate.init("#" + form_data.form_id, {
|
192 |
source: 'cred_form_ready_init'
|
193 |
});
|
194 |
});
|
library/toolset/toolset-common/toolset-forms/js/main.js
CHANGED
@@ -33,15 +33,7 @@ jQuery(document).on('cred_form_ready', function (event, event_data) {
|
|
33 |
jQuery('input.wpt-taxonomy-add-new', $parent).click();
|
34 |
}, 50);
|
35 |
});
|
36 |
-
|
37 |
-
var $current_form = jQuery('#' + event_data.form_id);
|
38 |
-
if (jQuery(".wpt-hierarchical-taxonomy-add-new-show-hide", $current_form).is(":hidden")) {
|
39 |
-
setTimeout(
|
40 |
-
function () {
|
41 |
-
jQuery(".wpt-hierarchical-taxonomy-add-new-show-hide:hidden", $current_form).remove();
|
42 |
-
}
|
43 |
-
, 200);
|
44 |
-
}
|
45 |
});
|
46 |
|
47 |
var wptFilters = {};
|
@@ -116,7 +108,7 @@ function showHideMostPopularTaxonomy(el) {
|
|
116 |
var form = jQuery(el).closest('form');
|
117 |
jQuery('.shmpt-' + taxonomy, form).toggle();
|
118 |
|
119 |
-
if (data_type_output == '
|
120 |
var curr = jQuery(el).text();
|
121 |
if (curr == jQuery(el).data('show-popular-text')) {
|
122 |
jQuery(el).text(jQuery(el).data('hide-popular-text'), form);
|
@@ -270,6 +262,8 @@ function initTaxonomies(values, taxonomy, url, fieldId) {
|
|
270 |
}
|
271 |
}
|
272 |
|
|
|
|
|
273 |
toolsetForms.CRED_taxonomy = function () {
|
274 |
|
275 |
var self = this;
|
@@ -284,22 +278,49 @@ toolsetForms.CRED_taxonomy = function () {
|
|
284 |
self._initialize_hierachical();
|
285 |
};
|
286 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
self._initialize_hierachical = function () {
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
};
|
299 |
|
300 |
-
|
301 |
-
|
302 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
var $select = jQuery(this);
|
304 |
|
305 |
// remove all the options
|
@@ -388,21 +409,35 @@ toolsetForms.CRED_taxonomy = function () {
|
|
388 |
});
|
389 |
|
390 |
jQuery('.js-wpt-hierarchical-taxonomy-add-new-show-hide').on('click', function () {
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
});
|
407 |
};
|
408 |
|
@@ -485,9 +520,9 @@ toolsetForms.CRED_taxonomy = function () {
|
|
485 |
|
486 |
var new_checkbox = "";
|
487 |
if (isBootstrap) {
|
488 |
-
new_checkbox = '<li class="checkbox"><label><input data-parent="' + parent + '" class="wpt-form-checkbox form-checkbox" type="checkbox" name="' + taxonomy + '[]" data-value="' + new_taxonomy + '" checked="checked" value="' + new_taxonomy + '"></input>' + new_taxonomy + '</label></li>';
|
489 |
} else {
|
490 |
-
new_checkbox = '<li><input data-parent="' + parent + '" class="wpt-form-checkbox form-checkbox checkbox" type="checkbox" name="' + taxonomy + '[]" checked="checked" value="' + new_taxonomy + '"></input><label>' + new_taxonomy + '</label></li>';
|
491 |
}
|
492 |
// find the first checkbox sharing parent
|
493 |
var $first_checkbox = jQuery('input[name="' + taxonomy + '\[\]"][data-parent="' + parent + '"]:first', $form);
|
@@ -563,7 +598,7 @@ toolsetForms.CRED_taxonomy = function () {
|
|
563 |
|
564 |
jQuery('[name="new_tax_text_' + taxonomy + '"]', $form).val('');
|
565 |
|
566 |
-
self._fill_parent_drop_down();
|
567 |
};
|
568 |
|
569 |
self._update_hierachy = function (taxonomy, new_taxonomy, $form) {
|
33 |
jQuery('input.wpt-taxonomy-add-new', $parent).click();
|
34 |
}, 50);
|
35 |
});
|
36 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
});
|
38 |
|
39 |
var wptFilters = {};
|
108 |
var form = jQuery(el).closest('form');
|
109 |
jQuery('.shmpt-' + taxonomy, form).toggle();
|
110 |
|
111 |
+
if (data_type_output == 'bootstrap') {
|
112 |
var curr = jQuery(el).text();
|
113 |
if (curr == jQuery(el).data('show-popular-text')) {
|
114 |
jQuery(el).text(jQuery(el).data('hide-popular-text'), form);
|
262 |
}
|
263 |
}
|
264 |
|
265 |
+
// @bug This does not belong here: move to the CRED frontend script or write its own
|
266 |
+
// and make sure it includs the taxonomy initialization pseudo-mini-script around here
|
267 |
toolsetForms.CRED_taxonomy = function () {
|
268 |
|
269 |
var self = this;
|
278 |
self._initialize_hierachical();
|
279 |
};
|
280 |
|
281 |
+
/**
|
282 |
+
* Initialize hierarchical taxonomis on a form.
|
283 |
+
*
|
284 |
+
* The taxonomy field itself will add, hidden, the structure to add a new term, and the button to show/hide it.
|
285 |
+
* Here, we just take those structures and move them to the specific shortcode placeholder output, if any,
|
286 |
+
* or remove them otherwise.
|
287 |
+
*
|
288 |
+
* @since unknown
|
289 |
+
* @since 1.9.1 Make the structure be moved to the placeholder.
|
290 |
+
*/
|
291 |
self._initialize_hierachical = function () {
|
292 |
+
jQuery( '.js-wpt-hierarchical-taxonomy-add-new-container' ).each( function() {
|
293 |
+
|
294 |
+
var $addNewContainer = jQuery( this ),
|
295 |
+
$form = $addNewContainer.closest( 'form' ),
|
296 |
+
$taxonomy = $addNewContainer.data( 'taxonomy' ),
|
297 |
+
$addNewShowHide = jQuery( '.js-wpt-hierarchical-taxonomy-add-new-show-hide[data-taxonomy="' + $taxonomy + '"]', $form ),
|
298 |
+
$placeholder = jQuery( '.js-taxonomy-hierarchical-button-placeholder[data-taxonomy="' + $taxonomy + '"]', $form );
|
299 |
+
|
300 |
+
if ( $placeholder.length > 0 ) {
|
301 |
+
$addNewShowHide
|
302 |
+
.insertAfter( $placeholder )
|
303 |
+
.show();
|
304 |
+
$placeholder.replaceWith( $addNewContainer );
|
305 |
+
self._fill_parent_drop_down( $form );
|
306 |
+
} else {
|
307 |
+
$addNewContainer.remove();
|
308 |
+
$addNewShowHide.remove();
|
309 |
+
}
|
310 |
+
|
311 |
+
});
|
312 |
};
|
313 |
|
314 |
+
/**
|
315 |
+
* Fill hierarchical taxonomy parent select dropdown.
|
316 |
+
*
|
317 |
+
* @param object $form
|
318 |
+
*
|
319 |
+
* @since unknown
|
320 |
+
* @since 1.9.1 Add a $form paramete to only initialize parent selectors for hierarchical taxonomies on a given form.
|
321 |
+
*/
|
322 |
+
self._fill_parent_drop_down = function ( $form ) {
|
323 |
+
jQuery('select.js-taxonomy-parent', $form ).each(function () {
|
324 |
var $select = jQuery(this);
|
325 |
|
326 |
// remove all the options
|
409 |
});
|
410 |
|
411 |
jQuery('.js-wpt-hierarchical-taxonomy-add-new-show-hide').on('click', function () {
|
412 |
+
var $button = jQuery( this ),
|
413 |
+
$taxonomy = $button.data( 'taxonomy' ),
|
414 |
+
$output = $button.data( 'output' );
|
415 |
+
if ( $output == 'bootstrap' ) {
|
416 |
+
// Dealing with an anchor button
|
417 |
+
if ( $button.text() == $button.data( 'close' ) ) {
|
418 |
+
$button
|
419 |
+
.html( $button.data('open') )
|
420 |
+
.removeClass('dashicons-dismiss')
|
421 |
+
.addClass('dashicons-plus-alt');
|
422 |
+
} else {
|
423 |
+
$button
|
424 |
+
.html( $button.data('close') )
|
425 |
+
.removeClass('dashicons-plus-alt')
|
426 |
+
.addClass('dashicons-dismiss');
|
427 |
+
}
|
428 |
+
} else {
|
429 |
+
// Dealing with an input button
|
430 |
+
if ( $button.val() == $button.data( 'close' ) ) {
|
431 |
+
$button
|
432 |
+
.val( $button.data('open') )
|
433 |
+
.removeClass('btn-cancel');
|
434 |
+
} else {
|
435 |
+
$button
|
436 |
+
.val( $button.data('close') )
|
437 |
+
.addClass('btn-cancel');
|
438 |
+
}
|
439 |
+
}
|
440 |
+
self.add_new_show_hide( $taxonomy, this );
|
441 |
});
|
442 |
};
|
443 |
|
520 |
|
521 |
var new_checkbox = "";
|
522 |
if (isBootstrap) {
|
523 |
+
new_checkbox = '<li class="checkbox"><label class="wpt-form-label wpt-form-checkbox-label"><input data-parent="' + parent + '" class="wpt-form-checkbox form-checkbox checkbox" type="checkbox" name="' + taxonomy + '[]" data-value="' + new_taxonomy + '" checked="checked" value="' + new_taxonomy + '"></input>' + new_taxonomy + '</label></li>';
|
524 |
} else {
|
525 |
+
new_checkbox = '<li><input data-parent="' + parent + '" class="wpt-form-checkbox form-checkbox checkbox" type="checkbox" name="' + taxonomy + '[]" checked="checked" value="' + new_taxonomy + '"></input><label class="wpt-form-label wpt-form-checkbox-label">' + new_taxonomy + '</label></li>';
|
526 |
}
|
527 |
// find the first checkbox sharing parent
|
528 |
var $first_checkbox = jQuery('input[name="' + taxonomy + '\[\]"][data-parent="' + parent + '"]:first', $form);
|
598 |
|
599 |
jQuery('[name="new_tax_text_' + taxonomy + '"]', $form).val('');
|
600 |
|
601 |
+
self._fill_parent_drop_down( $form );
|
602 |
};
|
603 |
|
604 |
self._update_hierachy = function (taxonomy, new_taxonomy, $form) {
|
library/toolset/toolset-common/toolset-forms/js/validation.js
CHANGED
@@ -21,23 +21,34 @@ var wptValidation = (function ($) {
|
|
21 |
*/
|
22 |
$.validator.addMethod("extension", function (value, element, param) {
|
23 |
param = typeof param === "string" ? param.replace(/,/g, "|") : param;
|
24 |
-
if ($(element).attr('res') && $(element).attr('res') != "")
|
25 |
return true;
|
26 |
-
|
|
|
27 |
});
|
28 |
|
29 |
/**
|
30 |
* add hexadecimal to validator method
|
31 |
*/
|
32 |
$.validator.addMethod("hexadecimal", function (value, element, param) {
|
33 |
-
return value == "" || /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
});
|
35 |
|
36 |
/**
|
37 |
* add skype to validator method
|
38 |
*/
|
39 |
$.validator.addMethod("skype", function (value, element, param) {
|
40 |
-
return value == "" || /^([a-z0-9\.\_\,\-\#]+)$/i.test(value);
|
41 |
});
|
42 |
|
43 |
/**
|
@@ -48,8 +59,9 @@ var wptValidation = (function ($) {
|
|
48 |
var _value = $(element).val();
|
49 |
|
50 |
// check if dependency is met
|
51 |
-
if (!this.depend(param, element))
|
52 |
return "dependency-mismatch";
|
|
|
53 |
switch (element.nodeName.toLowerCase()) {
|
54 |
case 'select':
|
55 |
return _value && $.trim(_value).length > 0;
|
@@ -57,22 +69,27 @@ var wptValidation = (function ($) {
|
|
57 |
if (jQuery(element).hasClass("wpt-form-radio")) {
|
58 |
var val = jQuery('input[name="' + _name + '"]:checked').val();
|
59 |
|
60 |
-
if (wptValidationDebug)
|
61 |
console.log("radio " + (typeof val != 'undefined' && val && $.trim(val).length > 0));
|
|
|
62 |
|
63 |
-
return typeof val != 'undefined' && val && $.trim(val).length > 0;
|
64 |
}
|
65 |
|
66 |
var $element = jQuery(element).siblings('input[type="hidden"]').first();
|
67 |
var elementFieldType = $element.attr('data-wpt-type');
|
68 |
-
if ($element
|
69 |
-
!$element.prop("disabled")
|
70 |
-
( elementFieldType == 'file'
|
|
|
|
|
|
|
71 |
var val = $element.val();
|
72 |
-
if (wptValidationDebug)
|
73 |
console.log("hidden " + (val && $.trim(val).length > 0));
|
|
|
74 |
|
75 |
-
return val && $.trim(val).length > 0;
|
76 |
}
|
77 |
|
78 |
if (jQuery(element).attr('type') == "checkbox") {
|
@@ -83,23 +100,26 @@ var wptValidation = (function ($) {
|
|
83 |
}
|
84 |
|
85 |
if (jQuery(element).hasClass("hasDatepicker")) {
|
86 |
-
if (wptValidationDebug)
|
87 |
console.log("hasDatepicker");
|
|
|
88 |
return false;
|
89 |
}
|
90 |
|
91 |
if (this.checkable(element)) {
|
92 |
-
if (wptValidationDebug)
|
93 |
console.log("checkable " + (this.getLength(value, element) > 0));
|
94 |
-
|
|
|
95 |
}
|
96 |
|
97 |
-
if (wptValidationDebug)
|
98 |
console.log(_name + " default: " + value + " val: " + _value + " " + ($.trim(_value).length > 0));
|
|
|
99 |
|
100 |
-
return $.trim(_value).length > 0;
|
101 |
default:
|
102 |
-
return $.trim(value).length > 0;
|
103 |
}
|
104 |
});
|
105 |
|
@@ -180,8 +200,9 @@ var wptValidation = (function ($) {
|
|
180 |
|
181 |
// On some pages the form may not be ready yet at this point (e.g. Edit Term page).
|
182 |
jQuery(document).ready(function () {
|
183 |
-
if (wptValidationDebug)
|
184 |
console.log($form.selector);
|
|
|
185 |
|
186 |
jQuery(document).off('submit', $form.selector, null);
|
187 |
jQuery(document).on('submit', $form.selector, function () {
|
@@ -280,10 +301,12 @@ var wptValidation = (function ($) {
|
|
280 |
area_id = $area.prop('id');
|
281 |
if (typeof area_id !== 'undefined') {
|
282 |
if (typeof tinyMCE !== 'undefined') {
|
|
|
|
|
283 |
tinyMCE.get(area_id).remove();
|
284 |
}
|
285 |
tinyMCE.init(tinyMCEPreInit.mceInit[area_id]);
|
286 |
-
//
|
287 |
// since WPV_Toolset.add_qt_editor_buttons expects as second parameter a Codemirror editor instace
|
288 |
// and here we are passing just a textarea ID.
|
289 |
var quick = quicktags(tinyMCEPreInit.qtInit[area_id]);
|
@@ -295,6 +318,9 @@ var wptValidation = (function ($) {
|
|
295 |
jQuery("button.switch-tmce").click();
|
296 |
}
|
297 |
|
|
|
|
|
|
|
298 |
$(document).on('js_event_wpv_pagination_completed, js_event_wpv_parametric_search_results_updated', function (event, data) {
|
299 |
if (typeof wptValidation !== 'undefined') {
|
300 |
wptValidation.init();
|
@@ -400,8 +426,6 @@ jQuery(document).ready(function () {
|
|
400 |
wptValidation.applyRules(container);
|
401 |
});
|
402 |
wptCallbacks.conditionalCheck.add(function (container) {
|
403 |
-
|
404 |
-
wptValidation.applyRules(container);
|
405 |
-
}
|
406 |
});
|
407 |
});
|
21 |
*/
|
22 |
$.validator.addMethod("extension", function (value, element, param) {
|
23 |
param = typeof param === "string" ? param.replace(/,/g, "|") : param;
|
24 |
+
if ($(element).attr('res') && $(element).attr('res') != "") {
|
25 |
return true;
|
26 |
+
}
|
27 |
+
return ( this.optional(element) || value.match( new RegExp(".(" + param + ")$", "i") ) );
|
28 |
});
|
29 |
|
30 |
/**
|
31 |
* add hexadecimal to validator method
|
32 |
*/
|
33 |
$.validator.addMethod("hexadecimal", function (value, element, param) {
|
34 |
+
return ( value == "" || /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(value) );
|
35 |
+
});
|
36 |
+
|
37 |
+
/**
|
38 |
+
* add equalto method
|
39 |
+
*/
|
40 |
+
$.validator.addMethod("equalto", function (value, element, param) {
|
41 |
+
if (param[1]) {
|
42 |
+
return ( value == $("input[name='" + param[1] + "']").val() );
|
43 |
+
}
|
44 |
+
return false;
|
45 |
});
|
46 |
|
47 |
/**
|
48 |
* add skype to validator method
|
49 |
*/
|
50 |
$.validator.addMethod("skype", function (value, element, param) {
|
51 |
+
return ( value == "" || /^([a-z0-9\.\_\,\-\#]+)$/i.test(value) );
|
52 |
});
|
53 |
|
54 |
/**
|
59 |
var _value = $(element).val();
|
60 |
|
61 |
// check if dependency is met
|
62 |
+
if (!this.depend(param, element)) {
|
63 |
return "dependency-mismatch";
|
64 |
+
}
|
65 |
switch (element.nodeName.toLowerCase()) {
|
66 |
case 'select':
|
67 |
return _value && $.trim(_value).length > 0;
|
69 |
if (jQuery(element).hasClass("wpt-form-radio")) {
|
70 |
var val = jQuery('input[name="' + _name + '"]:checked').val();
|
71 |
|
72 |
+
if (wptValidationDebug) {
|
73 |
console.log("radio " + (typeof val != 'undefined' && val && $.trim(val).length > 0));
|
74 |
+
}
|
75 |
|
76 |
+
return ( typeof val != 'undefined' && val && $.trim(val).length > 0 );
|
77 |
}
|
78 |
|
79 |
var $element = jQuery(element).siblings('input[type="hidden"]').first();
|
80 |
var elementFieldType = $element.attr('data-wpt-type');
|
81 |
+
if ($element
|
82 |
+
&& !$element.prop("disabled")
|
83 |
+
&& ( elementFieldType == 'file'
|
84 |
+
|| elementFieldType == 'video'
|
85 |
+
|| elementFieldType == 'image' )
|
86 |
+
) {
|
87 |
var val = $element.val();
|
88 |
+
if (wptValidationDebug) {
|
89 |
console.log("hidden " + (val && $.trim(val).length > 0));
|
90 |
+
}
|
91 |
|
92 |
+
return ( val && $.trim(val).length > 0 );
|
93 |
}
|
94 |
|
95 |
if (jQuery(element).attr('type') == "checkbox") {
|
100 |
}
|
101 |
|
102 |
if (jQuery(element).hasClass("hasDatepicker")) {
|
103 |
+
if (wptValidationDebug) {
|
104 |
console.log("hasDatepicker");
|
105 |
+
}
|
106 |
return false;
|
107 |
}
|
108 |
|
109 |
if (this.checkable(element)) {
|
110 |
+
if (wptValidationDebug) {
|
111 |
console.log("checkable " + (this.getLength(value, element) > 0));
|
112 |
+
}
|
113 |
+
return ( this.getLength(value, element) > 0 );
|
114 |
}
|
115 |
|
116 |
+
if (wptValidationDebug) {
|
117 |
console.log(_name + " default: " + value + " val: " + _value + " " + ($.trim(_value).length > 0));
|
118 |
+
}
|
119 |
|
120 |
+
return ( $.trim(_value).length > 0 );
|
121 |
default:
|
122 |
+
return ( $.trim(value).length > 0 );
|
123 |
}
|
124 |
});
|
125 |
|
200 |
|
201 |
// On some pages the form may not be ready yet at this point (e.g. Edit Term page).
|
202 |
jQuery(document).ready(function () {
|
203 |
+
if (wptValidationDebug) {
|
204 |
console.log($form.selector);
|
205 |
+
}
|
206 |
|
207 |
jQuery(document).off('submit', $form.selector, null);
|
208 |
jQuery(document).on('submit', $form.selector, function () {
|
301 |
area_id = $area.prop('id');
|
302 |
if (typeof area_id !== 'undefined') {
|
303 |
if (typeof tinyMCE !== 'undefined') {
|
304 |
+
// @bug This is broken when AJAX subitting a CRED form that is set to keep displaying the form,
|
305 |
+
// when the WYSIWYG field was submitted in the Text mode
|
306 |
tinyMCE.get(area_id).remove();
|
307 |
}
|
308 |
tinyMCE.init(tinyMCEPreInit.mceInit[area_id]);
|
309 |
+
// @bug This Quicktags initialization is broken by design
|
310 |
// since WPV_Toolset.add_qt_editor_buttons expects as second parameter a Codemirror editor instace
|
311 |
// and here we are passing just a textarea ID.
|
312 |
var quick = quicktags(tinyMCEPreInit.qtInit[area_id]);
|
318 |
jQuery("button.switch-tmce").click();
|
319 |
}
|
320 |
|
321 |
+
// @bug This event callback is defined in a limbo never executed, hence the callback will never be fired
|
322 |
+
// @bug The event lists used here should be space-separated, otherwise it will get fired at an event with a name
|
323 |
+
// "js_event_wpv_pagination_completed," (mind the last comma), which obviously does not exist
|
324 |
$(document).on('js_event_wpv_pagination_completed, js_event_wpv_parametric_search_results_updated', function (event, data) {
|
325 |
if (typeof wptValidation !== 'undefined') {
|
326 |
wptValidation.init();
|
426 |
wptValidation.applyRules(container);
|
427 |
});
|
428 |
wptCallbacks.conditionalCheck.add(function (container) {
|
429 |
+
wptValidation.applyRules(container);
|
|
|
|
|
430 |
});
|
431 |
});
|
library/toolset/toolset-common/toolset-forms/lib/js/jquery-form-validation/jquery.validate.js
CHANGED
@@ -382,30 +382,38 @@
|
|
382 |
|
383 |
message = $('.wpt-form-error').data('message-single');
|
384 |
|
385 |
-
if (typeof message
|
386 |
|
387 |
$('.wpt-form-error').each(function () {
|
388 |
formId = $(this).closest("form").find('input[name=_cred_cred_prefix_form_id]').val();
|
389 |
-
|
|
|
|
|
|
|
|
|
390 |
total_errors += 1;
|
391 |
}
|
|
|
392 |
if (total_errors > 0) {
|
393 |
message = $(this).closest("form").find('.wpt-form-error').data('message-single');
|
394 |
if (total_errors > 1) {
|
395 |
message = $(this).closest("form").find('.wpt-form-error').data('message-plural');
|
396 |
}
|
397 |
-
|
398 |
message = message.replace('%NN', total_errors);
|
399 |
-
|
400 |
-
if (_form_submitted)
|
401 |
-
$(
|
|
|
|
|
402 |
} else {
|
403 |
-
$
|
404 |
-
if (_form_submitted)
|
405 |
-
$
|
|
|
406 |
}
|
407 |
});
|
408 |
}
|
|
|
409 |
total_errors = 0;
|
410 |
error_list = '';
|
411 |
},
|
382 |
|
383 |
message = $('.wpt-form-error').data('message-single');
|
384 |
|
385 |
+
if (typeof message !== 'undefined') {
|
386 |
|
387 |
$('.wpt-form-error').each(function () {
|
388 |
formId = $(this).closest("form").find('input[name=_cred_cred_prefix_form_id]').val();
|
389 |
+
var $wpt_form_message = $('#wpt-form-message-' + formId);
|
390 |
+
if ( $(this).css('display') == 'block'
|
391 |
+
&& $(this).attr('id') !== 'wpt-form-message-' + formId
|
392 |
+
&& $(this).attr('id') !== 'lbl_generic' )
|
393 |
+
{
|
394 |
total_errors += 1;
|
395 |
}
|
396 |
+
|
397 |
if (total_errors > 0) {
|
398 |
message = $(this).closest("form").find('.wpt-form-error').data('message-single');
|
399 |
if (total_errors > 1) {
|
400 |
message = $(this).closest("form").find('.wpt-form-error').data('message-plural');
|
401 |
}
|
|
|
402 |
message = message.replace('%NN', total_errors);
|
403 |
+
|
404 |
+
if (_form_submitted) {
|
405 |
+
$wpt_form_message.html(message);
|
406 |
+
$wpt_form_message.show();
|
407 |
+
}
|
408 |
} else {
|
409 |
+
$wpt_form_message.html('');
|
410 |
+
if (_form_submitted) {
|
411 |
+
$wpt_form_message.hide();
|
412 |
+
}
|
413 |
}
|
414 |
});
|
415 |
}
|
416 |
+
_form_submitted = false;
|
417 |
total_errors = 0;
|
418 |
error_list = '';
|
419 |
},
|
library/toolset/toolset-common/toolset-forms/templates/metaform-item.php
CHANGED
@@ -3,57 +3,56 @@
|
|
3 |
*
|
4 |
*
|
5 |
*/
|
|
|
|
|
6 |
if ( is_admin() ) {
|
7 |
-
|
8 |
<div class="js-wpt-field-item wpt-field-item">
|
9 |
-
|
10 |
-
|
11 |
<div class="wpt-repctl">
|
12 |
<div class="js-wpt-repdrag wpt-repdrag"> </div>
|
13 |
<a class="js-wpt-repdelete button button-small" data-wpt-type="<?php echo $cfg['type']; ?>" data-wpt-id="<?php echo $cfg['id']; ?>"><?php apply_filters( 'toolset_button_delete_repetition_text', printf( __( 'Delete %s', 'wpv-views' ), strtolower( $cfg['title'] ) ), $cfg ); ?></a>
|
14 |
</div>
|
15 |
-
|
16 |
</div>
|
17 |
-
|
18 |
} else {
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
echo '</div>';
|
57 |
-
}
|
58 |
-
}
|
59 |
}
|
3 |
*
|
4 |
*
|
5 |
*/
|
6 |
+
$has_output_bootstrap = (isset( $cfg['attribute']['output'] ) && $cfg['attribute']['output'] == 'bootstrap');
|
7 |
+
|
8 |
if ( is_admin() ) {
|
9 |
+
?>
|
10 |
<div class="js-wpt-field-item wpt-field-item">
|
11 |
+
<?php echo $out; ?>
|
12 |
+
<?php if ( @$cfg['repetitive'] ): ?>
|
13 |
<div class="wpt-repctl">
|
14 |
<div class="js-wpt-repdrag wpt-repdrag"> </div>
|
15 |
<a class="js-wpt-repdelete button button-small" data-wpt-type="<?php echo $cfg['type']; ?>" data-wpt-id="<?php echo $cfg['id']; ?>"><?php apply_filters( 'toolset_button_delete_repetition_text', printf( __( 'Delete %s', 'wpv-views' ), strtolower( $cfg['title'] ) ), $cfg ); ?></a>
|
16 |
</div>
|
17 |
+
<?php endif; ?>
|
18 |
</div>
|
19 |
+
<?php
|
20 |
} else {
|
21 |
+
$toolset_repdrag_image = '';
|
22 |
+
$button_extra_classnames = '';
|
23 |
+
if ( $has_output_bootstrap ) {
|
24 |
+
if ( $cfg['repetitive'] ) {
|
25 |
+
echo '<div class="wpt-repctl wpt-repctl-flex">';
|
26 |
+
echo '<div class="wpt-repetitive-controls">';
|
27 |
+
echo '<span role="button" class="js-wpt-repdrag wpt-repdrag dashicons dashicons-move"></span>';
|
28 |
+
$str = sprintf( __( '%s repetition', 'wpv-views' ), $cfg['title'] );
|
29 |
+
echo '<span role="button" class="js-wpt-repdelete wpt-repdelete dashicons-before dashicons-trash" title="';
|
30 |
+
echo apply_filters( 'toolset_button_delete_repetition_text', esc_attr( __( 'Delete', 'wpv-views' ) ) . " " . esc_attr( $str ), $cfg );
|
31 |
+
echo '"></span>';
|
32 |
+
echo '</div>';
|
33 |
+
echo '<div class="wpt-repetitive-field">';
|
34 |
+
}
|
35 |
+
echo $out;
|
36 |
+
if ( $cfg['repetitive'] ) {
|
37 |
+
echo '</div>';
|
38 |
+
echo '</div>';
|
39 |
+
}
|
40 |
+
} else {
|
41 |
+
if ( $cfg['repetitive'] ) {
|
42 |
+
$toolset_repdrag_image = apply_filters( 'wptoolset_filter_wptoolset_repdrag_image', $toolset_repdrag_image );
|
43 |
+
echo '<div class="wpt-repctl">';
|
44 |
+
echo '<span class="js-wpt-repdrag wpt-repdrag"><img class="wpv-repdrag-image" src="' . $toolset_repdrag_image . '" /></span>';
|
45 |
+
}
|
46 |
+
echo $out;
|
47 |
+
if ( $cfg['repetitive'] ) {
|
48 |
+
if ( ! $has_output_bootstrap && array_key_exists( 'use_bootstrap', $cfg ) && $cfg['use_bootstrap'] ) {
|
49 |
+
$button_extra_classnames = ' btn btn-default btn-sm';
|
50 |
+
}
|
51 |
+
$str = sprintf( __( '%s repetition', 'wpv-views' ), $cfg['title'] );
|
52 |
+
echo '<input type="button" href="#" class="js-wpt-repdelete wpt-repdelete' . $button_extra_classnames . '" value="';
|
53 |
+
echo apply_filters( 'toolset_button_delete_repetition_text', esc_attr( __( 'Delete', 'wpv-views' ) ) . " " . esc_attr( $str ), $cfg );
|
54 |
+
echo '" />';
|
55 |
+
echo '</div>';
|
56 |
+
}
|
57 |
+
}
|
|
|
|
|
|
|
58 |
}
|
library/toolset/toolset-common/toolset-forms/templates/metaform.php
CHANGED
@@ -3,25 +3,28 @@
|
|
3 |
*
|
4 |
*
|
5 |
*/
|
|
|
|
|
6 |
if ( is_admin() ) {
|
7 |
$child_div_classes = array('js-wpt-field-items');
|
|
|
|
|
|
|
8 |
$field_additional_classes = apply_filters('toolset_field_additional_classes', '', $cfg);
|
9 |
?><div class="js-wpt-field wpt-field js-wpt-<?php echo $cfg['type']; ?> wpt-<?php echo $cfg['type']; ?><?php if ( @$cfg['repetitive'] ) echo ' js-wpt-repetitive wpt-repetitive'; ?><?php echo $field_additional_classes; ?>" data-wpt-type="<?php echo $cfg['type']; ?>" data-wpt-id="<?php echo $cfg['id']; ?>">
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
</div>
|
21 |
-
|
22 |
} else {
|
23 |
-
$has_output_bootstrap = (isset( $cfg['attribute']['output'] ) && $cfg['attribute']['output'] == 'bootstrap');
|
24 |
-
|
25 |
// CHeck if we need a wrapper
|
26 |
$types_without_wrapper = array('submit', 'hidden');
|
27 |
$needs_wrapper = true;
|
@@ -54,6 +57,10 @@ if ( is_admin() ) {
|
|
54 |
// Adjust classnames for container and buttons
|
55 |
$button_extra_classnames = '';
|
56 |
$container_classes = '';
|
|
|
|
|
|
|
|
|
57 |
if ( array_key_exists( 'repetitive', $cfg ) ) {
|
58 |
$container_classes .= ' js-wpt-repetitive wpt-repetitive';
|
59 |
}
|
@@ -67,12 +74,12 @@ if ( is_admin() ) {
|
|
67 |
}
|
68 |
if ( $cfg['repetitive'] ) {
|
69 |
if ( $has_output_bootstrap ) {
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
}
|
77 |
if ( $needs_wrapper ) {
|
78 |
echo '</div>';
|
3 |
*
|
4 |
*
|
5 |
*/
|
6 |
+
$has_output_bootstrap = (isset( $cfg['attribute']['output'] ) && $cfg['attribute']['output'] == 'bootstrap');
|
7 |
+
|
8 |
if ( is_admin() ) {
|
9 |
$child_div_classes = array('js-wpt-field-items');
|
10 |
+
if ( ! $has_output_bootstrap && $cfg['use_bootstrap'] && in_array( $cfg['type'], array( 'date', 'select' ) ) ) {
|
11 |
+
$child_div_classes[] = 'form-inline';
|
12 |
+
}
|
13 |
$field_additional_classes = apply_filters('toolset_field_additional_classes', '', $cfg);
|
14 |
?><div class="js-wpt-field wpt-field js-wpt-<?php echo $cfg['type']; ?> wpt-<?php echo $cfg['type']; ?><?php if ( @$cfg['repetitive'] ) echo ' js-wpt-repetitive wpt-repetitive'; ?><?php echo $field_additional_classes; ?>" data-wpt-type="<?php echo $cfg['type']; ?>" data-wpt-id="<?php echo $cfg['id']; ?>">
|
15 |
+
<div class="<?php echo implode( ' ', $child_div_classes ); ?>">
|
16 |
+
<?php
|
17 |
+
foreach ( $html as $out ):
|
18 |
+
include 'metaform-item.php';
|
19 |
+
endforeach;
|
20 |
+
?>
|
21 |
+
<?php if ( @$cfg['repetitive'] ): ?>
|
22 |
+
<a href="#" class="js-wpt-repadd wpt-repadd button button-small button-primary-toolset" data-wpt-type="<?php echo $cfg['type']; ?>" data-wpt-id="<?php echo $cfg['id']; ?>"><?php echo apply_filters( 'toolset_button_add_repetition_text', __( 'Add new', 'wpv-views' ), $cfg ); ?></a>
|
23 |
+
<?php endif; ?>
|
24 |
+
</div>
|
25 |
</div>
|
26 |
+
<?php
|
27 |
} else {
|
|
|
|
|
28 |
// CHeck if we need a wrapper
|
29 |
$types_without_wrapper = array('submit', 'hidden');
|
30 |
$needs_wrapper = true;
|
57 |
// Adjust classnames for container and buttons
|
58 |
$button_extra_classnames = '';
|
59 |
$container_classes = '';
|
60 |
+
if ( ! $has_output_bootstrap && array_key_exists( 'use_bootstrap', $cfg ) && $cfg['use_bootstrap'] ) {
|
61 |
+
$button_extra_classnames .= ' btn btn-default btn-sm';
|
62 |
+
$container_classes .= ' form-group';
|
63 |
+
}
|
64 |
if ( array_key_exists( 'repetitive', $cfg ) ) {
|
65 |
$container_classes .= ' js-wpt-repetitive wpt-repetitive';
|
66 |
}
|
74 |
}
|
75 |
if ( $cfg['repetitive'] ) {
|
76 |
if ( $has_output_bootstrap ) {
|
77 |
+
echo '<a role="button" class="js-wpt-repadd wpt-repadd dashicons-before dashicons-plus-alt" data-wpt-type="' . $cfg['type'] . '" data-wpt-id="' . $cfg['id'] . '">' . apply_filters( 'toolset_button_add_repetition_text', esc_attr( __( 'Add new', 'wpv-views' ) ), $cfg ) . '</a>';
|
78 |
+
} else {
|
79 |
+
echo '<input type="button" class="js-wpt-repadd wpt-repadd' . $button_extra_classnames . '" data-wpt-type="' . $cfg['type'] . '" data-wpt-id="' . $cfg['id'] . '" value="';
|
80 |
+
echo apply_filters( 'toolset_button_add_repetition_text', esc_attr( sprintf( __( 'Add new %s', 'wpv-views' ), $cfg['title'] ) ), $cfg );
|
81 |
+
echo '" />';
|
82 |
+
}
|
83 |
}
|
84 |
if ( $needs_wrapper ) {
|
85 |
echo '</div>';
|
library/toolset/toolset-common/user-editors/editor/screen/basic/backend_layout_template.js
CHANGED
@@ -128,7 +128,7 @@ WPViews.ViewEditScreenUserEditorBasic = function( $ ) {
|
|
128 |
e.preventDefault();
|
129 |
|
130 |
var thiz = $( this ),
|
131 |
-
editor = thiz.data( 'editor' )
|
132 |
item = thiz.closest( self.selector ),
|
133 |
ctId = item.data( 'id' ),
|
134 |
data = {
|
128 |
e.preventDefault();
|
129 |
|
130 |
var thiz = $( this ),
|
131 |
+
editor = thiz.data( 'editor' ),
|
132 |
item = thiz.closest( self.selector ),
|
133 |
ctId = item.data( 'id' ),
|
134 |
data = {
|
library/toolset/toolset-common/utility/dialogs/toolset.dialog-boxes.class.php
CHANGED
@@ -35,7 +35,7 @@ if ( ! class_exists( 'Toolset_DialogBoxes', false ) ) {
|
|
35 |
}
|
36 |
|
37 |
function register_scripts( $scripts ) {
|
38 |
-
$scripts['ddl-abstract-dialog'] = new Toolset_Script( 'ddl-abstract-dialog', TOOLSET_COMMON_URL . '/utility/dialogs/js/views/abstract/ddl-abstract-dialog.js', array('jquery','wpdialogs'), '0.1', false );
|
39 |
$scripts['ddl-dialog-boxes'] = new Toolset_Script( 'ddl-dialog-boxes', TOOLSET_COMMON_URL . '/utility/dialogs/js/views/abstract/dialog-view.js', array('jquery','ddl-abstract-dialog', 'underscore', 'backbone'), '0.1', false );
|
40 |
|
41 |
return $scripts;
|
@@ -50,7 +50,8 @@ if ( ! class_exists( 'Toolset_DialogBoxes', false ) ) {
|
|
50 |
array(
|
51 |
'ddl-dialogs-css',
|
52 |
'ddl-dialogs-general-css',
|
53 |
-
'ddl-dialogs-forms-css'
|
|
|
54 |
)
|
55 |
);
|
56 |
|
35 |
}
|
36 |
|
37 |
function register_scripts( $scripts ) {
|
38 |
+
$scripts['ddl-abstract-dialog'] = new Toolset_Script( 'ddl-abstract-dialog', TOOLSET_COMMON_URL . '/utility/dialogs/js/views/abstract/ddl-abstract-dialog.js', array( 'jquery', 'wpdialogs', Toolset_Assets_Manager::SCRIPT_UTILS ), '0.1', false );
|
39 |
$scripts['ddl-dialog-boxes'] = new Toolset_Script( 'ddl-dialog-boxes', TOOLSET_COMMON_URL . '/utility/dialogs/js/views/abstract/dialog-view.js', array('jquery','ddl-abstract-dialog', 'underscore', 'backbone'), '0.1', false );
|
40 |
|
41 |
return $scripts;
|
50 |
array(
|
51 |
'ddl-dialogs-css',
|
52 |
'ddl-dialogs-general-css',
|
53 |
+
'ddl-dialogs-forms-css',
|
54 |
+
Toolset_Assets_Manager::STYLE_FONT_AWESOME,
|
55 |
)
|
56 |
);
|
57 |
|
library/toolset/types/embedded/classes/fields.php
CHANGED
@@ -41,7 +41,6 @@ class WPCF_Fields
|
|
41 |
'date' => WPCF_EMBEDDED_INC_ABSPATH . '/fields/date.php',
|
42 |
'email' => WPCF_EMBEDDED_INC_ABSPATH . '/fields/email.php',
|
43 |
'embed' => WPCF_EMBEDDED_INC_ABSPATH . '/fields/embed.php',
|
44 |
-
//'entry' => WPCF_EMBEDDED_INC_ABSPATH . '/fields/entry.php',
|
45 |
'file' => WPCF_EMBEDDED_INC_ABSPATH . '/fields/file.php',
|
46 |
'image' => WPCF_EMBEDDED_INC_ABSPATH . '/fields/image.php',
|
47 |
'map' => WPCF_EMBEDDED_INC_ABSPATH . '/fields/map.php',
|
41 |
'date' => WPCF_EMBEDDED_INC_ABSPATH . '/fields/date.php',
|
42 |
'email' => WPCF_EMBEDDED_INC_ABSPATH . '/fields/email.php',
|
43 |
'embed' => WPCF_EMBEDDED_INC_ABSPATH . '/fields/embed.php',
|
|
|
44 |
'file' => WPCF_EMBEDDED_INC_ABSPATH . '/fields/file.php',
|
45 |
'image' => WPCF_EMBEDDED_INC_ABSPATH . '/fields/image.php',
|
46 |
'map' => WPCF_EMBEDDED_INC_ABSPATH . '/fields/map.php',
|
library/toolset/types/embedded/includes/fields/entry.php
DELETED
@@ -1,266 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Register data (called automatically).
|
5 |
-
*
|
6 |
-
* @return array field definition
|
7 |
-
*/
|
8 |
-
function wpcf_fields_entry() {
|
9 |
-
return array(
|
10 |
-
'id' => 'wpcf-entry',
|
11 |
-
'title' => __( 'Entry', 'wpcf' ),
|
12 |
-
'description' => __( 'Entry', 'wpcf' ),
|
13 |
-
'validate' => array(
|
14 |
-
'required' => array(
|
15 |
-
'form-settings' => include( dirname( __FILE__ ) . '/patterns/validate/form-settings/required.php' )
|
16 |
-
)
|
17 |
-
),
|
18 |
-
'font-awesome' => 'file-text-o',
|
19 |
-
);
|
20 |
-
}
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Meta box form.
|
24 |
-
*
|
25 |
-
* @param type $field
|
26 |
-
* @return string
|
27 |
-
*/
|
28 |
-
function wpcf_fields_entry_meta_box_form( $field ) {
|
29 |
-
$form = array();
|
30 |
-
$form['name'] = array(
|
31 |
-
'#type' => 'textfield',
|
32 |
-
'#name' => 'wpcf[' . $field['slug'] . ']',
|
33 |
-
);
|
34 |
-
return $form;
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Editor callback form.
|
39 |
-
*/
|
40 |
-
function wpcf_fields_entry_editor_callback($field, $settings)
|
41 |
-
{
|
42 |
-
$post_type = get_post_type_object( $field['data']['post_type'] );
|
43 |
-
if ( null == $post_type ) {
|
44 |
-
return;
|
45 |
-
}
|
46 |
-
|
47 |
-
$data = wpcf_fields_entry_get_options();
|
48 |
-
|
49 |
-
foreach( $data['options'] as $key => $field_data ) {
|
50 |
-
if ( wpcf_fields_entry_check_is_available( $field['data']['post_type'], $field_data ) ) {
|
51 |
-
continue;
|
52 |
-
}
|
53 |
-
unset($data['options'][$key]);
|
54 |
-
}
|
55 |
-
|
56 |
-
return array(
|
57 |
-
'supports' => array('style'),
|
58 |
-
'tabs' => array(
|
59 |
-
'display' => array(
|
60 |
-
'menu_title' => __( 'Display options', 'wpcf' ),
|
61 |
-
'title' => __( 'Display options for this field:', 'wpcf' ),
|
62 |
-
'content' => WPCF_Loader::template( 'editor-modal-entry', $data),
|
63 |
-
)
|
64 |
-
),
|
65 |
-
);
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Editor callback form submit.
|
70 |
-
*/
|
71 |
-
function wpcf_fields_entry_editor_submit($data, $field, $context)
|
72 |
-
{
|
73 |
-
$shortcode = '';
|
74 |
-
if (
|
75 |
-
isset($data['display'])
|
76 |
-
&& preg_match('/^post-[\-a-z]+$/', $data['display'])
|
77 |
-
) {
|
78 |
-
$add = sprintf(' display="%s"', $data['display']);
|
79 |
-
if ( $context == 'usermeta' ) {
|
80 |
-
$shortcode = wpcf_usermeta_get_shortcode( $field, $add );
|
81 |
-
} else {
|
82 |
-
$shortcode = wpcf_fields_get_shortcode( $field, $add );
|
83 |
-
}
|
84 |
-
}
|
85 |
-
return $shortcode;
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* View function.
|
90 |
-
*
|
91 |
-
* @param type $params
|
92 |
-
*/
|
93 |
-
function wpcf_fields_entry_view($params)
|
94 |
-
{
|
95 |
-
if (
|
96 |
-
!isset($params['field'])
|
97 |
-
|| !isset($params['display'])
|
98 |
-
|| !isset($params['field_value'])
|
99 |
-
|| empty($params['field_value'])
|
100 |
-
) {
|
101 |
-
return '__wpcf_skip_empty';
|
102 |
-
}
|
103 |
-
/**
|
104 |
-
* use cache
|
105 |
-
*/
|
106 |
-
static $wpcf_fields_entry_view_cache;
|
107 |
-
if (
|
108 |
-
isset($wpcf_fields_entry_view_cache[$params['field']['id']])
|
109 |
-
&& isset($wpcf_fields_entry_view_cache[$params['field']['id']][$params['display']])
|
110 |
-
) {
|
111 |
-
return $wpcf_fields_entry_view_cache[$params['field']['id']][$params['display']];
|
112 |
-
}
|
113 |
-
$post = get_post($params['field_value']);
|
114 |
-
$data = wpcf_fields_entry_get_options();
|
115 |
-
foreach( $data['options'] as $key => $field_data ) {
|
116 |
-
if ( wpcf_fields_entry_check_is_available( $post->post_type, $field_data ) ) {
|
117 |
-
$value = '__wpcf_skip_empty';
|
118 |
-
switch( $key ) {
|
119 |
-
case 'post-title':
|
120 |
-
$value = apply_filters('post_title', $post->post_title);
|
121 |
-
break;
|
122 |
-
case 'post-link':
|
123 |
-
$value = sprintf(
|
124 |
-
'<a href="%s" title="%s">%s</a>',
|
125 |
-
esc_attr(get_permalink($post)),
|
126 |
-
esc_attr(apply_filters('post_title', $post->post_title)),
|
127 |
-
apply_filters('post_title', $post->post_title)
|
128 |
-
);
|
129 |
-
break;
|
130 |
-
case 'post-url':
|
131 |
-
$value = get_permalink($post);
|
132 |
-
break;
|
133 |
-
case 'post-body':
|
134 |
-
$value = apply_filters('the_content', $post->post_content);
|
135 |
-
break;
|
136 |
-
case 'post-excerpt':
|
137 |
-
$value = apply_filters('the_excerpt', $post->post_excerpt);
|
138 |
-
break;
|
139 |
-
case 'post-date':
|
140 |
-
$value = get_the_date(null, $post->ID);
|
141 |
-
break;
|
142 |
-
case 'post-author':
|
143 |
-
$value = get_the_author_meta('display_name', $post->author_id);
|
144 |
-
break;
|
145 |
-
case 'post-featured-image':
|
146 |
-
$value = get_the_post_thumbnail($post->ID);
|
147 |
-
break;
|
148 |
-
case 'post-slug':
|
149 |
-
$value = $post->post_name;
|
150 |
-
break;
|
151 |
-
case 'post-type':
|
152 |
-
$value = $post->post_type;
|
153 |
-
break;
|
154 |
-
case 'post-status':
|
155 |
-
$value = $post->post_status;
|
156 |
-
break;
|
157 |
-
case 'post-class':
|
158 |
-
$value = implode(' ', get_post_class('', $post->ID));
|
159 |
-
break;
|
160 |
-
case 'post-edit-link':
|
161 |
-
$value = get_edit_post_link($post->ID);
|
162 |
-
break;
|
163 |
-
default:
|
164 |
-
$value = $key;
|
165 |
-
}
|
166 |
-
$wpcf_fields_entry_view_cache[$params['field_value']][$key] = $value;
|
167 |
-
} else {
|
168 |
-
d(array($post->post_type, $key, $field_data));
|
169 |
-
$wpcf_fields_entry_view_cache[$params['field_value']][$key] = '__wpcf_skip_empty';
|
170 |
-
}
|
171 |
-
}
|
172 |
-
return $wpcf_fields_entry_view_cache[$params['field_value']][$params['display']];
|
173 |
-
}
|
174 |
-
|
175 |
-
function wpcf_fields_entry_check_is_available($post_type, $field)
|
176 |
-
{
|
177 |
-
/**
|
178 |
-
* remove some option if certain post type do not supports it
|
179 |
-
*/
|
180 |
-
if( isset( $field['support_field'] ) ) {
|
181 |
-
if ( !post_type_supports( $post_type, $field['support_field'])) {
|
182 |
-
return false;
|
183 |
-
}
|
184 |
-
}
|
185 |
-
/**
|
186 |
-
* remove some option if certain post type definition not match
|
187 |
-
*/
|
188 |
-
if( isset( $field['post_type'] ) ) {
|
189 |
-
$post_type = get_post_type_object($post_type);
|
190 |
-
if (
|
191 |
-
!isset($post_type->$field['post_type'])
|
192 |
-
|| empty($post_type->$field['post_type'])
|
193 |
-
) {
|
194 |
-
return false;
|
195 |
-
}
|
196 |
-
}
|
197 |
-
return true;
|
198 |
-
}
|
199 |
-
|
200 |
-
function wpcf_fields_entry_get_options()
|
201 |
-
{
|
202 |
-
return array(
|
203 |
-
'options' => array(
|
204 |
-
'post-title' => array(
|
205 |
-
'support_field' => 'title',
|
206 |
-
'label' => __('Post title', 'wpcf'),
|
207 |
-
),
|
208 |
-
'post-link' => array(
|
209 |
-
'support_field' => 'title',
|
210 |
-
'post_type' => 'public',
|
211 |
-
'label' => __('Post title with a link', 'wpcf'),
|
212 |
-
),
|
213 |
-
'post-url' => array(
|
214 |
-
'post_type' => 'public',
|
215 |
-
'label' => __('Post URL', 'wpcf'),
|
216 |
-
),
|
217 |
-
'post-body' => array(
|
218 |
-
'support_field' => 'editor',
|
219 |
-
'label' => __('Post body', 'wpcf'),
|
220 |
-
),
|
221 |
-
'post-excerpt' => array(
|
222 |
-
'support_field' => 'excerpt',
|
223 |
-
'label' => __('Post excerpt', 'wpcf'),
|
224 |
-
),
|
225 |
-
'post-date' => array(
|
226 |
-
'label' => __('Post date', 'wpcf'),
|
227 |
-
),
|
228 |
-
'post-author' => array(
|
229 |
-
'support_field' => 'author',
|
230 |
-
'label' => __('Post author', 'wpcf'),
|
231 |
-
),
|
232 |
-
'post-featured-image' => array(
|
233 |
-
'support_field' => 'thumbnail',
|
234 |
-
'label' => __('Post featured image', 'wpcf'),
|
235 |
-
),
|
236 |
-
'post-id' => array(
|
237 |
-
'label' => __('Post ID', 'wpcf'),
|
238 |
-
),
|
239 |
-
'post-slug' => array(
|
240 |
-
'label' => __('Post slug', 'wpcf'),
|
241 |
-
),
|
242 |
-
'post-type' => array(
|
243 |
-
'label' => __('Post type', 'wpcf'),
|
244 |
-
),
|
245 |
-
'post-format' => array(
|
246 |
-
'support_field' => 'post-formats',
|
247 |
-
'label' => __('Post format', 'wpcf'),
|
248 |
-
),
|
249 |
-
'post-status' => array(
|
250 |
-
'label' => __('Post status', 'wpcf'),
|
251 |
-
),
|
252 |
-
'post-comments-number' => array(
|
253 |
-
'support_field' => 'comments',
|
254 |
-
'label' => __('Post comments number', 'wpcf'),
|
255 |
-
),
|
256 |
-
'post-class' => array(
|
257 |
-
'label' => __('Post class', 'wpcf'),
|
258 |
-
),
|
259 |
-
'post-edit-link' => array(
|
260 |
-
'label' => __('Post edit link', 'wpcf'),
|
261 |
-
),
|
262 |
-
),
|
263 |
-
'default' => 'post-title',
|
264 |
-
);
|
265 |
-
}
|
266 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
library/toolset/types/embedded/locale/types-ar.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-de_DE.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-el.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-es_ES.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-fr_FR.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-he_IL.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-it_IT.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-ja.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-ko_KR.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-nl_NL.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-pl_PL.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-pt_BR.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-pt_PT.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-ru_RU.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-sv_SE.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-uk_UA.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-vi.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-zh_CN.mo
CHANGED
Binary file
|
library/toolset/types/embedded/locale/types-zh_TW.mo
CHANGED
Binary file
|
library/toolset/types/includes/classes/class.types.admin.edit.post.type.php
CHANGED
@@ -1723,234 +1723,234 @@ class Types_Admin_Edit_Post_Type extends Types_Admin_Page
|
|
1723 |
$this->verification_failed_and_die();
|
1724 |
}
|
1725 |
$icons = array(
|
1726 |
-
'admin-appearance' => __('appearance', '
|
1727 |
-
'admin-collapse' => __('collapse', '
|
1728 |
-
'admin-comments' => __('comments', '
|
1729 |
-
'admin-generic' => __('generic', '
|
1730 |
-
'admin-home' => __('home', '
|
1731 |
-
'admin-links' => __('links', '
|
1732 |
-
'admin-media' => __('media', '
|
1733 |
-
'admin-network' => __('network', '
|
1734 |
-
'admin-page' => __('page', '
|
1735 |
-
'admin-plugins' => __('plugins', '
|
1736 |
-
'admin-post' => __('post', '
|
1737 |
-
'admin-settings' => __('settings', '
|
1738 |
-
'admin-site' => __('site', '
|
1739 |
-
'admin-tools' => __('tools', '
|
1740 |
-
'admin-users' => __('users', '
|
1741 |
-
'album' => __('album', '
|
1742 |
-
'align-center' => __('align center', '
|
1743 |
-
'align-left' => __('align left', '
|
1744 |
-
'align-none' => __('align none', '
|
1745 |
-
'align-right' => __('align right', '
|
1746 |
-
'analytics' => __('analytics', '
|
1747 |
-
'archive' => __('archive', '
|
1748 |
-
'arrow-down-alt2' => __('down alt2', '
|
1749 |
-
'arrow-down-alt' => __('down alt', '
|
1750 |
-
'arrow-down' => __('down', '
|
1751 |
-
'arrow-left-alt2' => __('left alt2', '
|
1752 |
-
'arrow-left-alt' => __('left alt', '
|
1753 |
-
'arrow-left' => __('left', '
|
1754 |
-
'arrow-right-alt2' => __('right alt2', '
|
1755 |
-
'arrow-right-alt' => __('right alt', '
|
1756 |
-
'arrow-right' => __('right', '
|
1757 |
-
'arrow-up-alt2' => __('up alt2', '
|
1758 |
-
'arrow-up-alt' => __('up alt', '
|
1759 |
-
'arrow-up' => __('up', '
|
1760 |
-
'art' => __('art', '
|
1761 |
-
'awards' => __('awards', '
|
1762 |
-
'backup' => __('backup', '
|
1763 |
-
'book-alt' => __('book alt', '
|
1764 |
-
'book' => __('book', '
|
1765 |
-
'building' => __('building', '
|
1766 |
-
'businessman' => __('businessman', '
|
1767 |
-
'calendar-alt' => __('calendar alt', '
|
1768 |
-
'calendar' => __('calendar', '
|
1769 |
-
'camera' => __('camera', '
|
1770 |
-
'carrot' => __('carrot', '
|
1771 |
-
'cart' => __('cart', '
|
1772 |
-
'category' => __('category', '
|
1773 |
-
'chart-area' => __('chart area', '
|
1774 |
-
'chart-bar' => __('chart bar', '
|
1775 |
-
'chart-line' => __('chart line', '
|
1776 |
-
'chart-pie' => __('chart pie', '
|
1777 |
-
'clipboard' => __('clipboard', '
|
1778 |
-
'clock' => __('clock', '
|
1779 |
-
'cloud' => __('cloud', '
|
1780 |
-
'controls-back' => __('back', '
|
1781 |
-
'controls-forward' => __('forward', '
|
1782 |
-
'controls-pause' => __('pause', '
|
1783 |
-
'controls-play' => __('play', '
|
1784 |
-
'controls-repeat' => __('repeat', '
|
1785 |
-
'controls-skipback' => __('skip back', '
|
1786 |
-
'controls-skipforward' => __('skip forward', '
|
1787 |
-
'controls-volumeoff' => __('volume off', '
|
1788 |
-
'controls-volumeon' => __('volume on', '
|
1789 |
-
'dashboard' => __('dashboard', '
|
1790 |
-
'desktop' => __('desktop', '
|
1791 |
-
'dismiss' => __('dismiss', '
|
1792 |
-
'download' => __('download', '
|
1793 |
-
'editor-aligncenter' => __('align center', '
|
1794 |
-
'editor-alignleft' => __('align left', '
|
1795 |
-
'editor-alignright' => __('align right', '
|
1796 |
-
'editor-bold' => __('bold', '
|
1797 |
-
'editor-break' => __('break', '
|
1798 |
-
'editor-code' => __('code', '
|
1799 |
-
'editor-contract' => __('contract', '
|
1800 |
-
'editor-customchar' => __('custom char', '
|
1801 |
-
'editor-distractionfree' => __('distraction free', '
|
1802 |
-
'editor-expand' => __('expand', '
|
1803 |
-
'editor-help' => __('help', '
|
1804 |
-
'editor-indent' => __('indent', '
|
1805 |
-
'editor-insertmore' => __('insert more', '
|
1806 |
-
'editor-italic' => __('italic', '
|
1807 |
-
'editor-justify' => __('justify', '
|
1808 |
-
'editor-kitchensink' => __('kitchen sink', '
|
1809 |
-
'editor-ol' => __('ol', '
|
1810 |
-
'editor-outdent' => __('outdent', '
|
1811 |
-
'editor-paragraph' => __('paragraph', '
|
1812 |
-
'editor-paste-text' => __('paste text', '
|
1813 |
-
'editor-paste-word' => __('paste word', '
|
1814 |
-
'editor-quote' => __('quote', '
|
1815 |
-
'editor-removeformatting' => __('remove formatting', '
|
1816 |
-
'editor-rtl' => __('rtl', '
|
1817 |
-
'editor-spellcheck' => __('spellcheck', '
|
1818 |
-
'editor-strikethrough' => __('strike through', '
|
1819 |
-
'editor-textcolor' => __('text color', '
|
1820 |
-
'editor-ul' => __('ul', '
|
1821 |
-
'editor-underline' => __('underline', '
|
1822 |
-
'editor-unlink' => __('unlink', '
|
1823 |
-
'editor-video' => __('video', '
|
1824 |
-
'edit' => __('edit', '
|
1825 |
-
'email-alt' => __('email alt', '
|
1826 |
-
'email' => __('email', '
|
1827 |
-
'excerpt-view' => __('excerpt view', '
|
1828 |
|
1829 |
// because https://core.trac.wordpress.org/ticket/30832
|
1830 |
// but we don't have to offer it at all, actually it looks deprecated
|
1831 |
-
// 'exerpt-view' => __('excerpt view', '
|
1832 |
-
|
1833 |
-
'external' => __('external', '
|
1834 |
-
'facebook-alt' => __('facebook alt', '
|
1835 |
-
'facebook' => __('facebook', '
|
1836 |
-
'feedback' => __('feedback', '
|
1837 |
-
'flag' => __('flag', '
|
1838 |
-
'format-aside' => __('aside', '
|
1839 |
-
'format-audio' => __('audio', '
|
1840 |
-
'format-chat' => __('chat', '
|
1841 |
-
'format-gallery' => __('gallery', '
|
1842 |
-
'format-image' => __('image', '
|
1843 |
-
'format-links' => __('links', '
|
1844 |
-
'format-quote' => __('quote', '
|
1845 |
-
'format-standard' => __('standard', '
|
1846 |
-
'format-status' => __('status', '
|
1847 |
-
'format-video' => __('video', '
|
1848 |
-
'forms' => __('forms', '
|
1849 |
-
'googleplus' => __('google plus', '
|
1850 |
-
'grid-view' => __('grid view', '
|
1851 |
-
'groups' => __('groups', '
|
1852 |
-
'hammer' => __('hammer', '
|
1853 |
-
'heart' => __('heart', '
|
1854 |
-
'id-alt' => __('id alt', '
|
1855 |
-
'id' => __('id', '
|
1856 |
-
'images-alt2' => __('images alt2', '
|
1857 |
-
'images-alt' => __('images alt', '
|
1858 |
-
'image-crop' => __('image crop', '
|
1859 |
-
'image-flip-horizontal' => __('image flip horizontal', '
|
1860 |
-
'image-flip-vertical' => __('image flip vertical', '
|
1861 |
-
'image-rotate-left' => __('image rotate left', '
|
1862 |
-
'image-rotate-right' => __('image rotate right', '
|
1863 |
-
'index-card' => __('index card', '
|
1864 |
-
'info' => __('info', '
|
1865 |
-
'leftright' => __('left right', '
|
1866 |
-
'lightbulb' => __('light bulb', '
|
1867 |
-
'list-view' => __('list view', '
|
1868 |
-
'location-alt' => __('location alt', '
|
1869 |
-
'location' => __('location', '
|
1870 |
-
'lock' => __('lock', '
|
1871 |
-
'marker' => __('marker', '
|
1872 |
-
'media-archive' => __('media archive', '
|
1873 |
-
'media-audio' => __('media audio', '
|
1874 |
-
'media-code' => __('media code', '
|
1875 |
-
'media-default' => __('media default', '
|
1876 |
-
'media-document' => __('media document', '
|
1877 |
-
'media-interactive' => __('media interactive', '
|
1878 |
-
'media-spreadsheet' => __('media spreadsheet', '
|
1879 |
-
'media-text' => __('media text', '
|
1880 |
-
'media-video' => __('media video', '
|
1881 |
-
'megaphone' => __('megaphone', '
|
1882 |
-
'menu' => __('menu', '
|
1883 |
-
'microphone' => __('microphone', '
|
1884 |
-
'migrate' => __('migrate', '
|
1885 |
-
'minus' => __('minus', '
|
1886 |
-
'money' => __('money', '
|
1887 |
-
'nametag' => __('name tag', '
|
1888 |
-
'networking' => __('networking', '
|
1889 |
-
'no-alt' => __('no alt', '
|
1890 |
-
'no' => __('no', '
|
1891 |
-
'palmtree' => __('palm tree', '
|
1892 |
-
'performance' => __('performance', '
|
1893 |
-
'phone' => __('phone', '
|
1894 |
-
'playlist-audio' => __('playlist audio', '
|
1895 |
-
'playlist-video' => __('playlist video', '
|
1896 |
-
'plus-alt' => __('plus alt', '
|
1897 |
-
'plus' => __('plus', '
|
1898 |
-
'portfolio' => __('portfolio', '
|
1899 |
-
'post-status' => __('post status', '
|
1900 |
-
'post-trash' => __('post trash', '
|
1901 |
-
'pressthis' => __('press this', '
|
1902 |
-
'products' => __('products', '
|
1903 |
-
'randomize' => __('randomize', '
|
1904 |
-
'redo' => __('redo', '
|
1905 |
-
'rss' => __('rss', '
|
1906 |
-
'schedule' => __('schedule', '
|
1907 |
-
'screenoptions' => __('screen options', '
|
1908 |
-
'search' => __('search', '
|
1909 |
-
'share1' => __('share1', '
|
1910 |
-
'share-alt2' => __('share alt2', '
|
1911 |
-
'share-alt' => __('share alt', '
|
1912 |
-
'share' => __('share', '
|
1913 |
-
'shield-alt' => __('shield alt', '
|
1914 |
-
'shield' => __('shield', '
|
1915 |
-
'slides' => __('slides', '
|
1916 |
-
'smartphone' => __('smartphone', '
|
1917 |
-
'smiley' => __('smiley', '
|
1918 |
-
'sort' => __('sort', '
|
1919 |
-
'sos' => __('sos', '
|
1920 |
-
'star-empty' => __('star empty', '
|
1921 |
-
'star-filled' => __('star filled', '
|
1922 |
-
'star-half' => __('star half', '
|
1923 |
-
'store' => __('store', '
|
1924 |
-
'tablet' => __('tablet', '
|
1925 |
-
'tagcloud' => __('tag cloud', '
|
1926 |
-
'tag' => __('tag', '
|
1927 |
-
'testimonial' => __('testimonial', '
|
1928 |
-
'text' => __('text', '
|
1929 |
-
'tickets-alt' => __('tickets alt', '
|
1930 |
-
'tickets' => __('tickets', '
|
1931 |
-
'translation' => __('translation', '
|
1932 |
-
'trash' => __('trash', '
|
1933 |
-
'twitter' => __('twitter', '
|
1934 |
-
'undo' => __('undo', '
|
1935 |
-
'universal-access-alt' => __('universal access alt', '
|
1936 |
-
'universal-access' => __('universal access', '
|
1937 |
-
'update' => __('update', '
|
1938 |
-
'upload' => __('upload', '
|
1939 |
-
'vault' => __('vault', '
|
1940 |
-
'video-alt2' => __('video alt2', '
|
1941 |
-
'video-alt3' => __('video alt3', '
|
1942 |
-
'video-alt' => __('video alt', '
|
1943 |
-
'visibility' => __('visibility', '
|
1944 |
-
'welcome-add-page' => __('add page', '
|
1945 |
-
'welcome-comments' => __('comments', '
|
1946 |
-
'welcome-edit-page' => __('edit page', '
|
1947 |
-
'welcome-learn-more' => __('learn more', '
|
1948 |
-
'welcome-view-site' => __('view site', '
|
1949 |
-
'welcome-widgets-menus' => __('widgets menus', '
|
1950 |
-
'welcome-write-blog' => __('write blog', '
|
1951 |
-
'wordpress-alt' => __('wordpress alt', '
|
1952 |
-
'wordpress' => __('wordpress', '
|
1953 |
-
'yes' => __('yes', '
|
1954 |
);
|
1955 |
printf(
|
1956 |
'<p><input type="text" class="js-wpcf-search large-text" placeholder="%s" /</p>',
|
1723 |
$this->verification_failed_and_die();
|
1724 |
}
|
1725 |
$icons = array(
|
1726 |
+
'admin-appearance' => __('appearance', 'wpcf'),
|
1727 |
+
'admin-collapse' => __('collapse', 'wpcf'),
|
1728 |
+
'admin-comments' => __('comments', 'wpcf'),
|
1729 |
+
'admin-generic' => __('generic', 'wpcf'),
|
1730 |
+
'admin-home' => __('home', 'wpcf'),
|
1731 |
+
'admin-links' => __('links', 'wpcf'),
|
1732 |
+
'admin-media' => __('media', 'wpcf'),
|
1733 |
+
'admin-network' => __('network', 'wpcf'),
|
1734 |
+
'admin-page' => __('page', 'wpcf'),
|
1735 |
+
'admin-plugins' => __('plugins', 'wpcf'),
|
1736 |
+
'admin-post' => __('post', 'wpcf'),
|
1737 |
+
'admin-settings' => __('settings', 'wpcf'),
|
1738 |
+
'admin-site' => __('site', 'wpcf'),
|
1739 |
+
'admin-tools' => __('tools', 'wpcf'),
|
1740 |
+
'admin-users' => __('users', 'wpcf'),
|
1741 |
+
'album' => __('album', 'wpcf'),
|
1742 |
+
'align-center' => __('align center', 'wpcf'),
|
1743 |
+
'align-left' => __('align left', 'wpcf'),
|
1744 |
+
'align-none' => __('align none', 'wpcf'),
|
1745 |
+
'align-right' => __('align right', 'wpcf'),
|
1746 |
+
'analytics' => __('analytics', 'wpcf'),
|
1747 |
+
'archive' => __('archive', 'wpcf'),
|
1748 |
+
'arrow-down-alt2' => __('down alt2', 'wpcf'),
|
1749 |
+
'arrow-down-alt' => __('down alt', 'wpcf'),
|
1750 |
+
'arrow-down' => __('down', 'wpcf'),
|
1751 |
+
'arrow-left-alt2' => __('left alt2', 'wpcf'),
|
1752 |
+
'arrow-left-alt' => __('left alt', 'wpcf'),
|
1753 |
+
'arrow-left' => __('left', 'wpcf'),
|
1754 |
+
'arrow-right-alt2' => __('right alt2', 'wpcf'),
|
1755 |
+
'arrow-right-alt' => __('right alt', 'wpcf'),
|
1756 |
+
'arrow-right' => __('right', 'wpcf'),
|
1757 |
+
'arrow-up-alt2' => __('up alt2', 'wpcf'),
|
1758 |
+
'arrow-up-alt' => __('up alt', 'wpcf'),
|
1759 |
+
'arrow-up' => __('up', 'wpcf'),
|
1760 |
+
'art' => __('art', 'wpcf'),
|
1761 |
+
'awards' => __('awards', 'wpcf'),
|
1762 |
+
'backup' => __('backup', 'wpcf'),
|
1763 |
+
'book-alt' => __('book alt', 'wpcf'),
|
1764 |
+
'book' => __('book', 'wpcf'),
|
1765 |
+
'building' => __('building', 'wpcf'),
|
1766 |
+
'businessman' => __('businessman', 'wpcf'),
|
1767 |
+
'calendar-alt' => __('calendar alt', 'wpcf'),
|
1768 |
+
'calendar' => __('calendar', 'wpcf'),
|
1769 |
+
'camera' => __('camera', 'wpcf'),
|
1770 |
+
'carrot' => __('carrot', 'wpcf'),
|
1771 |
+
'cart' => __('cart', 'wpcf'),
|
1772 |
+
'category' => __('category', 'wpcf'),
|
1773 |
+
'chart-area' => __('chart area', 'wpcf'),
|
1774 |
+
'chart-bar' => __('chart bar', 'wpcf'),
|
1775 |
+
'chart-line' => __('chart line', 'wpcf'),
|
1776 |
+
'chart-pie' => __('chart pie', 'wpcf'),
|
1777 |
+
'clipboard' => __('clipboard', 'wpcf'),
|
1778 |
+
'clock' => __('clock', 'wpcf'),
|
1779 |
+
'cloud' => __('cloud', 'wpcf'),
|
1780 |
+
'controls-back' => __('back', 'wpcf'),
|
1781 |
+
'controls-forward' => __('forward', 'wpcf'),
|
1782 |
+
'controls-pause' => __('pause', 'wpcf'),
|
1783 |
+
'controls-play' => __('play', 'wpcf'),
|
1784 |
+
'controls-repeat' => __('repeat', 'wpcf'),
|
1785 |
+
'controls-skipback' => __('skip back', 'wpcf'),
|
1786 |
+
'controls-skipforward' => __('skip forward', 'wpcf'),
|
1787 |
+
'controls-volumeoff' => __('volume off', 'wpcf'),
|
1788 |
+
'controls-volumeon' => __('volume on', 'wpcf'),
|
1789 |
+
'dashboard' => __('dashboard', 'wpcf'),
|
1790 |
+
'desktop' => __('desktop', 'wpcf'),
|
1791 |
+
'dismiss' => __('dismiss', 'wpcf'),
|
1792 |
+
'download' => __('download', 'wpcf'),
|
1793 |
+
'editor-aligncenter' => __('align center', 'wpcf'),
|
1794 |
+
'editor-alignleft' => __('align left', 'wpcf'),
|
1795 |
+
'editor-alignright' => __('align right', 'wpcf'),
|
1796 |
+
'editor-bold' => __('bold', 'wpcf'),
|
1797 |
+
'editor-break' => __('break', 'wpcf'),
|
1798 |
+
'editor-code' => __('code', 'wpcf'),
|
1799 |
+
'editor-contract' => __('contract', 'wpcf'),
|
1800 |
+
'editor-customchar' => __('custom char', 'wpcf'),
|
1801 |
+
'editor-distractionfree' => __('distraction free', 'wpcf'),
|
1802 |
+
'editor-expand' => __('expand', 'wpcf'),
|
1803 |
+
'editor-help' => __('help', 'wpcf'),
|
1804 |
+
'editor-indent' => __('indent', 'wpcf'),
|
1805 |
+
'editor-insertmore' => __('insert more', 'wpcf'),
|
1806 |
+
'editor-italic' => __('italic', 'wpcf'),
|
1807 |
+
'editor-justify' => __('justify', 'wpcf'),
|
1808 |
+
'editor-kitchensink' => __('kitchen sink', 'wpcf'),
|
1809 |
+
'editor-ol' => __('ol', 'wpcf'),
|
1810 |
+
'editor-outdent' => __('outdent', 'wpcf'),
|
1811 |
+
'editor-paragraph' => __('paragraph', 'wpcf'),
|
1812 |
+
'editor-paste-text' => __('paste text', 'wpcf'),
|
1813 |
+
'editor-paste-word' => __('paste word', 'wpcf'),
|
1814 |
+
'editor-quote' => __('quote', 'wpcf'),
|
1815 |
+
'editor-removeformatting' => __('remove formatting', 'wpcf'),
|
1816 |
+
'editor-rtl' => __('rtl', 'wpcf'),
|
1817 |
+
'editor-spellcheck' => __('spellcheck', 'wpcf'),
|
1818 |
+
'editor-strikethrough' => __('strike through', 'wpcf'),
|
1819 |
+
'editor-textcolor' => __('text color', 'wpcf'),
|
1820 |
+
'editor-ul' => __('ul', 'wpcf'),
|
1821 |
+
'editor-underline' => __('underline', 'wpcf'),
|
1822 |
+
'editor-unlink' => __('unlink', 'wpcf'),
|
1823 |
+
'editor-video' => __('video', 'wpcf'),
|
1824 |
+
'edit' => __('edit', 'wpcf'),
|
1825 |
+
'email-alt' => __('email alt', 'wpcf'),
|
1826 |
+
'email' => __('email', 'wpcf'),
|
1827 |
+
'excerpt-view' => __('excerpt view', 'wpcf'),
|
1828 |
|
1829 |
// because https://core.trac.wordpress.org/ticket/30832
|
1830 |
// but we don't have to offer it at all, actually it looks deprecated
|
1831 |
+
// 'exerpt-view' => __('excerpt view', 'wpcf'),
|
1832 |
+
|
1833 |
+
'external' => __('external', 'wpcf'),
|
1834 |
+
'facebook-alt' => __('facebook alt', 'wpcf'),
|
1835 |
+
'facebook' => __('facebook', 'wpcf'),
|
1836 |
+
'feedback' => __('feedback', 'wpcf'),
|
1837 |
+
'flag' => __('flag', 'wpcf'),
|
1838 |
+
'format-aside' => __('aside', 'wpcf'),
|
1839 |
+
'format-audio' => __('audio', 'wpcf'),
|
1840 |
+
'format-chat' => __('chat', 'wpcf'),
|
1841 |
+
'format-gallery' => __('gallery', 'wpcf'),
|
1842 |
+
'format-image' => __('image', 'wpcf'),
|
1843 |
+
'format-links' => __('links', 'wpcf'),
|
1844 |
+
'format-quote' => __('quote', 'wpcf'),
|
1845 |
+
'format-standard' => __('standard', 'wpcf'),
|
1846 |
+
'format-status' => __('status', 'wpcf'),
|
1847 |
+
'format-video' => __('video', 'wpcf'),
|
1848 |
+
'forms' => __('forms', 'wpcf'),
|
1849 |
+
'googleplus' => __('google plus', 'wpcf'),
|
1850 |
+
'grid-view' => __('grid view', 'wpcf'),
|
1851 |
+
'groups' => __('groups', 'wpcf'),
|
1852 |
+
'hammer' => __('hammer', 'wpcf'),
|
1853 |
+
'heart' => __('heart', 'wpcf'),
|
1854 |
+
'id-alt' => __('id alt', 'wpcf'),
|
1855 |
+
'id' => __('id', 'wpcf'),
|
1856 |
+
'images-alt2' => __('images alt2', 'wpcf'),
|
1857 |
+
'images-alt' => __('images alt', 'wpcf'),
|
1858 |
+
'image-crop' => __('image crop', 'wpcf'),
|
1859 |
+
'image-flip-horizontal' => __('image flip horizontal', 'wpcf'),
|
1860 |
+
'image-flip-vertical' => __('image flip vertical', 'wpcf'),
|
1861 |
+
'image-rotate-left' => __('image rotate left', 'wpcf'),
|
1862 |
+
'image-rotate-right' => __('image rotate right', 'wpcf'),
|
1863 |
+
'index-card' => __('index card', 'wpcf'),
|
1864 |
+
'info' => __('info', 'wpcf'),
|
1865 |
+
'leftright' => __('left right', 'wpcf'),
|
1866 |
+
'lightbulb' => __('light bulb', 'wpcf'),
|
1867 |
+
'list-view' => __('list view', 'wpcf'),
|
1868 |
+
'location-alt' => __('location alt', 'wpcf'),
|
1869 |
+
'location' => __('location', 'wpcf'),
|
1870 |
+
'lock' => __('lock', 'wpcf'),
|
1871 |
+
'marker' => __('marker', 'wpcf'),
|
1872 |
+
'media-archive' => __('media archive', 'wpcf'),
|
1873 |
+
'media-audio' => __('media audio', 'wpcf'),
|
1874 |
+
'media-code' => __('media code', 'wpcf'),
|
1875 |
+
'media-default' => __('media default', 'wpcf'),
|
1876 |
+
'media-document' => __('media document', 'wpcf'),
|
1877 |
+
'media-interactive' => __('media interactive', 'wpcf'),
|
1878 |
+
'media-spreadsheet' => __('media spreadsheet', 'wpcf'),
|
1879 |
+
'media-text' => __('media text', 'wpcf'),
|
1880 |
+
'media-video' => __('media video', 'wpcf'),
|
1881 |
+
'megaphone' => __('megaphone', 'wpcf'),
|
1882 |
+
'menu' => __('menu', 'wpcf'),
|
1883 |
+
'microphone' => __('microphone', 'wpcf'),
|
1884 |
+
'migrate' => __('migrate', 'wpcf'),
|
1885 |
+
'minus' => __('minus', 'wpcf'),
|
1886 |
+
'money' => __('money', 'wpcf'),
|
1887 |
+
'nametag' => __('name tag', 'wpcf'),
|
1888 |
+
'networking' => __('networking', 'wpcf'),
|
1889 |
+
'no-alt' => __('no alt', 'wpcf'),
|
1890 |
+
'no' => __('no', 'wpcf'),
|
1891 |
+
'palmtree' => __('palm tree', 'wpcf'),
|
1892 |
+
'performance' => __('performance', 'wpcf'),
|
1893 |
+
'phone' => __('phone', 'wpcf'),
|
1894 |
+
'playlist-audio' => __('playlist audio', 'wpcf'),
|
1895 |
+
'playlist-video' => __('playlist video', 'wpcf'),
|
1896 |
+
'plus-alt' => __('plus alt', 'wpcf'),
|
1897 |
+
'plus' => __('plus', 'wpcf'),
|
1898 |
+
'portfolio' => __('portfolio', 'wpcf'),
|
1899 |
+
'post-status' => __('post status', 'wpcf'),
|
1900 |
+
'post-trash' => __('post trash', 'wpcf'),
|
1901 |
+
'pressthis' => __('press this', 'wpcf'),
|
1902 |
+
'products' => __('products', 'wpcf'),
|
1903 |
+
'randomize' => __('randomize', 'wpcf'),
|
1904 |
+
'redo' => __('redo', 'wpcf'),
|
1905 |
+
'rss' => __('rss', 'wpcf'),
|
1906 |
+
'schedule' => __('schedule', 'wpcf'),
|
1907 |
+
'screenoptions' => __('screen options', 'wpcf'),
|
1908 |
+
'search' => __('search', 'wpcf'),
|
1909 |
+
'share1' => __('share1', 'wpcf'),
|
1910 |
+
'share-alt2' => __('share alt2', 'wpcf'),
|
1911 |
+
'share-alt' => __('share alt', 'wpcf'),
|
1912 |
+
'share' => __('share', 'wpcf'),
|
1913 |
+
'shield-alt' => __('shield alt', 'wpcf'),
|
1914 |
+
'shield' => __('shield', 'wpcf'),
|
1915 |
+
'slides' => __('slides', 'wpcf'),
|
1916 |
+
'smartphone' => __('smartphone', 'wpcf'),
|
1917 |
+
'smiley' => __('smiley', 'wpcf'),
|
1918 |
+
'sort' => __('sort', 'wpcf'),
|
1919 |
+
'sos' => __('sos', 'wpcf'),
|
1920 |
+
'star-empty' => __('star empty', 'wpcf'),
|
1921 |
+
'star-filled' => __('star filled', 'wpcf'),
|
1922 |
+
'star-half' => __('star half', 'wpcf'),
|
1923 |
+
'store' => __('store', 'wpcf'),
|
1924 |
+
'tablet' => __('tablet', 'wpcf'),
|
1925 |
+
'tagcloud' => __('tag cloud', 'wpcf'),
|
1926 |
+
'tag' => __('tag', 'wpcf'),
|
1927 |
+
'testimonial' => __('testimonial', 'wpcf'),
|
1928 |
+
'text' => __('text', 'wpcf'),
|
1929 |
+
'tickets-alt' => __('tickets alt', 'wpcf'),
|
1930 |
+
'tickets' => __('tickets', 'wpcf'),
|
1931 |
+
'translation' => __('translation', 'wpcf'),
|
1932 |
+
'trash' => __('trash', 'wpcf'),
|
1933 |
+
'twitter' => __('twitter', 'wpcf'),
|
1934 |
+
'undo' => __('undo', 'wpcf'),
|
1935 |
+
'universal-access-alt' => __('universal access alt', 'wpcf'),
|
1936 |
+
'universal-access' => __('universal access', 'wpcf'),
|
1937 |
+
'update' => __('update', 'wpcf'),
|
1938 |
+
'upload' => __('upload', 'wpcf'),
|
1939 |
+
'vault' => __('vault', 'wpcf'),
|
1940 |
+
'video-alt2' => __('video alt2', 'wpcf'),
|
1941 |
+
'video-alt3' => __('video alt3', 'wpcf'),
|
1942 |
+
'video-alt' => __('video alt', 'wpcf'),
|
1943 |
+
'visibility' => __('visibility', 'wpcf'),
|
1944 |
+
'welcome-add-page' => __('add page', 'wpcf'),
|
1945 |
+
'welcome-comments' => __('comments', 'wpcf'),
|
1946 |
+
'welcome-edit-page' => __('edit page', 'wpcf'),
|
1947 |
+
'welcome-learn-more' => __('learn more', 'wpcf'),
|
1948 |
+
'welcome-view-site' => __('view site', 'wpcf'),
|
1949 |
+
'welcome-widgets-menus' => __('widgets menus', 'wpcf'),
|
1950 |
+
'welcome-write-blog' => __('write blog', 'wpcf'),
|
1951 |
+
'wordpress-alt' => __('wordpress alt', 'wpcf'),
|
1952 |
+
'wordpress' => __('wordpress', 'wpcf'),
|
1953 |
+
'yes' => __('yes', 'wpcf'),
|
1954 |
);
|
1955 |
printf(
|
1956 |
'<p><input type="text" class="js-wpcf-search large-text" placeholder="%s" /</p>',
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ Domain Path: /embedded/locale
|
|
7 |
License: GPLv2
|
8 |
Requires at least: 3.7
|
9 |
Tested up to: 4.8
|
10 |
-
Stable tag: 2.2.
|
11 |
|
12 |
The complete and reliable plugin for managing custom post types, custom taxonomies and custom fields.
|
13 |
|
@@ -158,6 +158,10 @@ Additionally, Types is the only plugin that lets you define parent/child relatio
|
|
158 |
|
159 |
== Changelog ==
|
160 |
|
|
|
|
|
|
|
|
|
161 |
= 2.2.13 =
|
162 |
* Fixed an issue between the Image field and databases using utf8mb4 character set
|
163 |
|
7 |
License: GPLv2
|
8 |
Requires at least: 3.7
|
9 |
Tested up to: 4.8
|
10 |
+
Stable tag: 2.2.14
|
11 |
|
12 |
The complete and reliable plugin for managing custom post types, custom taxonomies and custom fields.
|
13 |
|
158 |
|
159 |
== Changelog ==
|
160 |
|
161 |
+
= 2.2.14 =
|
162 |
+
* Improved translations
|
163 |
+
* Fixed notice in term listing page when image field URL is not valid
|
164 |
+
|
165 |
= 2.2.13 =
|
166 |
* Fixed an issue between the Image field and databases using utf8mb4 character set
|
167 |
|
wpcf.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://wordpress.org/extend/plugins/types/
|
|
5 |
Description: Toolset Types defines custom content in WordPress. Easily create custom post types, fields and taxonomy and connect everything together.
|
6 |
Author: OnTheGoSystems
|
7 |
Author URI: http://www.onthegosystems.com
|
8 |
-
Version: 2.2.
|
9 |
License: GPLv2 or later
|
10 |
|
11 |
Types is free software: you can redistribute it and/or modify
|
@@ -28,7 +28,7 @@ if( !function_exists( 'add_action' ) )
|
|
28 |
|
29 |
// version
|
30 |
if( ! defined( 'TYPES_VERSION' ) )
|
31 |
-
define( 'TYPES_VERSION', '2.2.
|
32 |
|
33 |
// backward compatibility
|
34 |
if ( ! defined( 'WPCF_VERSION' ) )
|
@@ -37,7 +37,7 @@ if ( ! defined( 'WPCF_VERSION' ) )
|
|
37 |
// release notes
|
38 |
if( ! defined( 'TYPES_RELEASE_NOTES' ) )
|
39 |
// Mind the end of the URL string, it contains the plugin version.
|
40 |
-
define( 'TYPES_RELEASE_NOTES', 'https://wp-types.com/version/types-2-2-
|
41 |
|
42 |
/*
|
43 |
* Path Constants
|
5 |
Description: Toolset Types defines custom content in WordPress. Easily create custom post types, fields and taxonomy and connect everything together.
|
6 |
Author: OnTheGoSystems
|
7 |
Author URI: http://www.onthegosystems.com
|
8 |
+
Version: 2.2.14
|
9 |
License: GPLv2 or later
|
10 |
|
11 |
Types is free software: you can redistribute it and/or modify
|
28 |
|
29 |
// version
|
30 |
if( ! defined( 'TYPES_VERSION' ) )
|
31 |
+
define( 'TYPES_VERSION', '2.2.14' );
|
32 |
|
33 |
// backward compatibility
|
34 |
if ( ! defined( 'WPCF_VERSION' ) )
|
37 |
// release notes
|
38 |
if( ! defined( 'TYPES_RELEASE_NOTES' ) )
|
39 |
// Mind the end of the URL string, it contains the plugin version.
|
40 |
+
define( 'TYPES_RELEASE_NOTES', 'https://wp-types.com/version/types-2-2-14/?utm_source=typesplugin&utm_campaign=types&utm_medium=release-notes-admin-notice&utm_term=Types%202.2.14%20release%20notes' );
|
41 |
|
42 |
/*
|
43 |
* Path Constants
|