VK All in One Expansion Unit - Version 9.1.0

Version Description

[ Delete function ] test version update checker.

Download this release

Release Info

Developer kurudrive
Plugin Icon 128x128 VK All in One Expansion Unit
Version 9.1.0
Comparing to
See all releases

Code changes from version 9.0.5 to 9.1.0

Files changed (423) hide show
  1. _scss/vkExUnit_admin.scss +0 -6
  2. admin/admin-common-init.php +0 -1
  3. admin/admin.php +14 -8
  4. admin/plugin-update-checker/Puc/v4/Factory.php +0 -6
  5. admin/plugin-update-checker/Puc/v4p4/Autoloader.php +0 -49
  6. admin/plugin-update-checker/Puc/v4p4/DebugBar/Extension.php +0 -177
  7. admin/plugin-update-checker/Puc/v4p4/DebugBar/Panel.php +0 -165
  8. admin/plugin-update-checker/Puc/v4p4/DebugBar/PluginExtension.php +0 -33
  9. admin/plugin-update-checker/Puc/v4p4/DebugBar/PluginPanel.php +0 -38
  10. admin/plugin-update-checker/Puc/v4p4/DebugBar/ThemePanel.php +0 -21
  11. admin/plugin-update-checker/Puc/v4p4/Factory.php +0 -292
  12. admin/plugin-update-checker/Puc/v4p4/Metadata.php +0 -132
  13. admin/plugin-update-checker/Puc/v4p4/OAuthSignature.php +0 -88
  14. admin/plugin-update-checker/Puc/v4p4/Plugin/Info.php +0 -130
  15. admin/plugin-update-checker/Puc/v4p4/Plugin/Update.php +0 -110
  16. admin/plugin-update-checker/Puc/v4p4/Plugin/UpdateChecker.php +0 -740
  17. admin/plugin-update-checker/Puc/v4p4/Scheduler.php +0 -177
  18. admin/plugin-update-checker/Puc/v4p4/StateStore.php +0 -207
  19. admin/plugin-update-checker/Puc/v4p4/Theme/Update.php +0 -84
  20. admin/plugin-update-checker/Puc/v4p4/Theme/UpdateChecker.php +0 -177
  21. admin/plugin-update-checker/Puc/v4p4/Update.php +0 -34
  22. admin/plugin-update-checker/Puc/v4p4/UpdateChecker.php +0 -896
  23. admin/plugin-update-checker/Puc/v4p4/UpgraderStatus.php +0 -199
  24. admin/plugin-update-checker/Puc/v4p4/Utils.php +0 -69
  25. admin/plugin-update-checker/Puc/v4p4/Vcs/Api.php +0 -302
  26. admin/plugin-update-checker/Puc/v4p4/Vcs/BaseChecker.php +0 -27
  27. admin/plugin-update-checker/Puc/v4p4/Vcs/BitBucketApi.php +0 -256
  28. admin/plugin-update-checker/Puc/v4p4/Vcs/GitHubApi.php +0 -413
  29. admin/plugin-update-checker/Puc/v4p4/Vcs/GitLabApi.php +0 -274
  30. admin/plugin-update-checker/Puc/v4p4/Vcs/PluginUpdateChecker.php +0 -217
  31. admin/plugin-update-checker/Puc/v4p4/Vcs/Reference.php +0 -49
  32. admin/plugin-update-checker/Puc/v4p4/Vcs/ThemeUpdateChecker.php +0 -118
  33. admin/plugin-update-checker/README.md +0 -274
  34. admin/plugin-update-checker/composer.json +0 -22
  35. admin/plugin-update-checker/css/puc-debug-bar.css +0 -70
  36. admin/plugin-update-checker/examples/plugin.json +0 -52
  37. admin/plugin-update-checker/examples/theme.json +0 -5
  38. admin/plugin-update-checker/js/debug-bar.js +0 -52
  39. admin/plugin-update-checker/languages/plugin-update-checker-cs_CZ.mo +0 -0
  40. admin/plugin-update-checker/languages/plugin-update-checker-cs_CZ.po +0 -45
  41. admin/plugin-update-checker/languages/plugin-update-checker-da_DK.mo +0 -0
  42. admin/plugin-update-checker/languages/plugin-update-checker-da_DK.po +0 -42
  43. admin/plugin-update-checker/languages/plugin-update-checker-de_DE.mo +0 -0
  44. admin/plugin-update-checker/languages/plugin-update-checker-de_DE.po +0 -38
  45. admin/plugin-update-checker/languages/plugin-update-checker-fa_IR.mo +0 -0
  46. admin/plugin-update-checker/languages/plugin-update-checker-fa_IR.po +0 -38
  47. admin/plugin-update-checker/languages/plugin-update-checker-fr_FR.mo +0 -0
  48. admin/plugin-update-checker/languages/plugin-update-checker-fr_FR.po +0 -42
  49. admin/plugin-update-checker/languages/plugin-update-checker-hu_HU.mo +0 -0
  50. admin/plugin-update-checker/languages/plugin-update-checker-hu_HU.po +0 -41
  51. admin/plugin-update-checker/languages/plugin-update-checker-it_IT.mo +0 -0
  52. admin/plugin-update-checker/languages/plugin-update-checker-it_IT.po +0 -38
  53. admin/plugin-update-checker/languages/plugin-update-checker-ja.mo +0 -0
  54. admin/plugin-update-checker/languages/plugin-update-checker-ja.po +0 -42
  55. admin/plugin-update-checker/languages/plugin-update-checker-pt_BR.mo +0 -0
  56. admin/plugin-update-checker/languages/plugin-update-checker-pt_BR.po +0 -48
  57. admin/plugin-update-checker/languages/plugin-update-checker-sv_SE.mo +0 -0
  58. admin/plugin-update-checker/languages/plugin-update-checker-sv_SE.po +0 -42
  59. admin/plugin-update-checker/languages/plugin-update-checker.pot +0 -49
  60. admin/plugin-update-checker/license.txt +0 -7
  61. admin/plugin-update-checker/plugin-update-checker.php +0 -24
  62. admin/plugin-update-checker/plugin-update-config.json +0 -27
  63. admin/plugin-update-checker/vendor/Parsedown.php +0 -1538
  64. admin/plugin-update-checker/vendor/ParsedownLegacy.php +0 -1535
  65. admin/plugin-update-checker/vendor/readme-parser.php +0 -334
  66. admin_other_functions.php +0 -19
  67. common_helpers.php +0 -48
  68. css/vkExUnit_admin.css +0 -1
  69. css/vkExUnit_style.css +0 -1
  70. css/vkExUnit_style_in_bs.css +0 -12
  71. inc/css-customize/css-customize.php +1 -1
  72. inc/font-awesome/package/versions/5.6.0/LICENSE.txt +0 -0
  73. inc/font-awesome/package/versions/5.6.0/css/all.min.css +0 -0
  74. inc/font-awesome/package/versions/5.6.0/js/all.min.js +0 -0
  75. inc/font-awesome/package/versions/5.6.0/metadata/categories.yml +0 -0
  76. inc/font-awesome/package/versions/5.6.0/metadata/icons.json +0 -0
  77. inc/font-awesome/package/versions/5.6.0/metadata/icons.yml +0 -0
  78. inc/font-awesome/package/versions/5.6.0/metadata/shims.json +0 -0
  79. inc/font-awesome/package/versions/5.6.0/metadata/shims.yml +0 -0
  80. inc/font-awesome/package/versions/5.6.0/metadata/sponsors.yml +0 -0
  81. inc/font-awesome/package/versions/5.6.0/sprites/brands.svg +0 -0
  82. inc/font-awesome/package/versions/5.6.0/sprites/regular.svg +0 -0
  83. inc/font-awesome/package/versions/5.6.0/sprites/solid.svg +0 -0
  84. inc/font-awesome/package/versions/5.6.0/webfonts/fa-brands-400.eot +0 -0
  85. inc/font-awesome/package/versions/5.6.0/webfonts/fa-brands-400.svg +0 -0
  86. inc/font-awesome/package/versions/5.6.0/webfonts/fa-brands-400.ttf +0 -0
  87. inc/font-awesome/package/versions/5.6.0/webfonts/fa-brands-400.woff +0 -0
  88. inc/font-awesome/package/versions/5.6.0/webfonts/fa-brands-400.woff2 +0 -0
  89. inc/font-awesome/package/versions/5.6.0/webfonts/fa-regular-400.eot +0 -0
  90. inc/font-awesome/package/versions/5.6.0/webfonts/fa-regular-400.svg +0 -0
  91. inc/font-awesome/package/versions/5.6.0/webfonts/fa-regular-400.ttf +0 -0
  92. inc/font-awesome/package/versions/5.6.0/webfonts/fa-regular-400.woff +0 -0
  93. inc/font-awesome/package/versions/5.6.0/webfonts/fa-regular-400.woff2 +0 -0
  94. inc/font-awesome/package/versions/5.6.0/webfonts/fa-solid-900.eot +0 -0
  95. inc/font-awesome/package/versions/5.6.0/webfonts/fa-solid-900.svg +0 -0
  96. inc/font-awesome/package/versions/5.6.0/webfonts/fa-solid-900.ttf +0 -0
  97. inc/font-awesome/package/versions/5.6.0/webfonts/fa-solid-900.woff +0 -0
  98. inc/font-awesome/package/versions/5.6.0/webfonts/fa-solid-900.woff2 +0 -0
  99. inc/{other_widget → other-widget}/js/admin-widget.js +0 -0
  100. inc/{other_widget/other_widget.php → other-widget/other-widget.php} +0 -0
  101. inc/{other_widget → other-widget}/widget-3pr-area.php +0 -0
  102. inc/{other_widget → other-widget}/widget-archives.php +0 -0
  103. inc/{other_widget → other-widget}/widget-banner.php +0 -0
  104. inc/{other_widget → other-widget}/widget-button.php +0 -0
  105. inc/{other_widget → other-widget}/widget-child-page-list.php +0 -0
  106. inc/{other_widget → other-widget}/widget-new-posts.php +16 -2
  107. inc/{other_widget → other-widget}/widget-page.php +0 -0
  108. inc/{other_widget → other-widget}/widget-pr-blocks.php +0 -0
  109. inc/{other_widget → other-widget}/widget-profile.php +0 -0
  110. inc/{other_widget → other-widget}/widget-side-child-page-list.php +0 -0
  111. inc/{other_widget → other-widget}/widget-taxonomies.php +0 -0
  112. inc/template-tags/template-tags.php +5 -1
  113. initialize.php +21 -90
  114. js/vkExUnit_admin.js +0 -4
  115. languages/vk-all-in-one-expansion-unit-ja.mo +0 -0
  116. languages/vk-all-in-one-expansion-unit-ja.po +833 -686
  117. languages/vk-all-in-one-expansion-unit.pot +8 -8
  118. plugins/auto_eyecatch.php +0 -138
  119. plugins/css_customize/css_customize-single.php +0 -102
  120. plugins/meta_keyword.php +0 -162
  121. plugins/other_widget/other_widget.php +0 -90
  122. plugins/post-type-manager-config.php +0 -19
  123. plugins/sitemap_page/hide-controller.php +0 -126
  124. plugins/sitemap_page/sitemap_admin.php +0 -22
  125. plugins/sns/function_meta_box.php +0 -65
  126. plugins/sns/hide_controller.php +0 -139
  127. plugins/template-tags/template-tags-veu-old.php +0 -57
  128. plugins/vk-blocks/build/block-build.js +0 -26
  129. plugins/vk-blocks/build/block-build.js.map +0 -1
  130. plugins/vk-blocks/build/languages/vk-blocks-ja-vk-blocks-buid-js.json +0 -1
  131. plugins/vk-blocks/build/languages/vk-blocks-ja.mo +0 -0
  132. plugins_admin/content-meta-box.php +0 -21
  133. plugins_admin/plugin-update-checker/Puc/v4/Factory.php +0 -6
  134. plugins_admin/plugin-update-checker/Puc/v4p4/Autoloader.php +0 -49
  135. plugins_admin/plugin-update-checker/Puc/v4p4/DebugBar/Extension.php +0 -177
  136. plugins_admin/plugin-update-checker/Puc/v4p4/DebugBar/Panel.php +0 -165
  137. plugins_admin/plugin-update-checker/Puc/v4p4/DebugBar/PluginExtension.php +0 -33
  138. plugins_admin/plugin-update-checker/Puc/v4p4/DebugBar/PluginPanel.php +0 -38
  139. plugins_admin/plugin-update-checker/Puc/v4p4/DebugBar/ThemePanel.php +0 -21
  140. plugins_admin/plugin-update-checker/Puc/v4p4/Factory.php +0 -292
  141. plugins_admin/plugin-update-checker/Puc/v4p4/Metadata.php +0 -132
  142. plugins_admin/plugin-update-checker/Puc/v4p4/OAuthSignature.php +0 -88
  143. plugins_admin/plugin-update-checker/Puc/v4p4/Plugin/Info.php +0 -130
  144. plugins_admin/plugin-update-checker/Puc/v4p4/Plugin/Update.php +0 -110
  145. plugins_admin/plugin-update-checker/Puc/v4p4/Plugin/UpdateChecker.php +0 -740
  146. plugins_admin/plugin-update-checker/Puc/v4p4/Scheduler.php +0 -177
  147. plugins_admin/plugin-update-checker/Puc/v4p4/StateStore.php +0 -207
  148. plugins_admin/plugin-update-checker/Puc/v4p4/Theme/Update.php +0 -84
  149. plugins_admin/plugin-update-checker/Puc/v4p4/Theme/UpdateChecker.php +0 -177
  150. plugins_admin/plugin-update-checker/Puc/v4p4/Update.php +0 -34
  151. plugins_admin/plugin-update-checker/Puc/v4p4/UpdateChecker.php +0 -896
  152. plugins_admin/plugin-update-checker/Puc/v4p4/UpgraderStatus.php +0 -199
  153. plugins_admin/plugin-update-checker/Puc/v4p4/Utils.php +0 -69
  154. plugins_admin/plugin-update-checker/Puc/v4p4/Vcs/Api.php +0 -302
  155. plugins_admin/plugin-update-checker/Puc/v4p4/Vcs/BaseChecker.php +0 -27
  156. plugins_admin/plugin-update-checker/Puc/v4p4/Vcs/BitBucketApi.php +0 -256
  157. plugins_admin/plugin-update-checker/Puc/v4p4/Vcs/GitHubApi.php +0 -413
  158. plugins_admin/plugin-update-checker/Puc/v4p4/Vcs/GitLabApi.php +0 -274
  159. plugins_admin/plugin-update-checker/Puc/v4p4/Vcs/PluginUpdateChecker.php +0 -217
  160. plugins_admin/plugin-update-checker/Puc/v4p4/Vcs/Reference.php +0 -49
  161. plugins_admin/plugin-update-checker/Puc/v4p4/Vcs/ThemeUpdateChecker.php +0 -118
  162. plugins_admin/plugin-update-checker/README.md +0 -274
  163. plugins_admin/plugin-update-checker/composer.json +0 -22
  164. plugins_admin/plugin-update-checker/css/puc-debug-bar.css +0 -70
  165. plugins_admin/plugin-update-checker/examples/plugin.json +0 -52
  166. plugins_admin/plugin-update-checker/examples/theme.json +0 -5
  167. plugins_admin/plugin-update-checker/js/debug-bar.js +0 -52
  168. plugins_admin/plugin-update-checker/languages/plugin-update-checker-cs_CZ.mo +0 -0
  169. plugins_admin/plugin-update-checker/languages/plugin-update-checker-cs_CZ.po +0 -45
  170. plugins_admin/plugin-update-checker/languages/plugin-update-checker-da_DK.mo +0 -0
  171. plugins_admin/plugin-update-checker/languages/plugin-update-checker-da_DK.po +0 -42
  172. plugins_admin/plugin-update-checker/languages/plugin-update-checker-de_DE.mo +0 -0
  173. plugins_admin/plugin-update-checker/languages/plugin-update-checker-de_DE.po +0 -38
  174. plugins_admin/plugin-update-checker/languages/plugin-update-checker-fa_IR.mo +0 -0
  175. plugins_admin/plugin-update-checker/languages/plugin-update-checker-fa_IR.po +0 -38
  176. plugins_admin/plugin-update-checker/languages/plugin-update-checker-fr_FR.mo +0 -0
  177. plugins_admin/plugin-update-checker/languages/plugin-update-checker-fr_FR.po +0 -42
  178. plugins_admin/plugin-update-checker/languages/plugin-update-checker-hu_HU.mo +0 -0
  179. plugins_admin/plugin-update-checker/languages/plugin-update-checker-hu_HU.po +0 -41
  180. plugins_admin/plugin-update-checker/languages/plugin-update-checker-it_IT.mo +0 -0
  181. plugins_admin/plugin-update-checker/languages/plugin-update-checker-it_IT.po +0 -38
  182. plugins_admin/plugin-update-checker/languages/plugin-update-checker-ja.mo +0 -0
  183. plugins_admin/plugin-update-checker/languages/plugin-update-checker-ja.po +0 -42
  184. plugins_admin/plugin-update-checker/languages/plugin-update-checker-pt_BR.mo +0 -0
  185. plugins_admin/plugin-update-checker/languages/plugin-update-checker-pt_BR.po +0 -48
  186. plugins_admin/plugin-update-checker/languages/plugin-update-checker-sv_SE.mo +0 -0
  187. plugins_admin/plugin-update-checker/languages/plugin-update-checker-sv_SE.po +0 -42
  188. plugins_admin/plugin-update-checker/languages/plugin-update-checker.pot +0 -49
  189. plugins_admin/plugin-update-checker/license.txt +0 -7
  190. plugins_admin/plugin-update-checker/plugin-update-checker.php +0 -24
  191. plugins_admin/plugin-update-checker/plugin-update-config.json +0 -27
  192. plugins_admin/plugin-update-checker/vendor/Parsedown.php +0 -1538
  193. plugins_admin/plugin-update-checker/vendor/ParsedownLegacy.php +0 -1535
  194. plugins_admin/plugin-update-checker/vendor/readme-parser.php +0 -334
  195. readme.txt +49 -2
  196. admin_active_setting_page.php → trunk/admin/admin-active-setting-page.php +8 -3
  197. common_init.php → trunk/admin/admin-common-init.php +15 -15
  198. admin_main_setting_page.php → trunk/admin/admin-main-setting-page.php +61 -42
  199. trunk/admin/admin-post-metabox.php +55 -0
  200. trunk/admin/admin.php +103 -0
  201. {plugins_admin → trunk/admin}/admin_bar.php +0 -0
  202. trunk/admin/class-veu-metabox-insert-items.php +28 -0
  203. trunk/admin/class-veu-metabox.php +156 -0
  204. {plugins_admin → trunk/admin}/customizer.php +0 -0
  205. plugins_admin/disable_guide.php → trunk/admin/disable-guide.php +0 -0
  206. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/_scss/vk_admin.scss +0 -0
  207. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/class-vk-admin-info.php +0 -0
  208. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/class-vk-admin.php +0 -0
  209. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/config.rb +0 -0
  210. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/css/vk_admin.css +0 -0
  211. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/images/ExUnit_bnr.png +0 -0
  212. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/images/admin_banner_recruit.jpg +0 -0
  213. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/images/billvektor_banner.png +0 -0
  214. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/images/fort-bnr.jpg +0 -0
  215. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/images/jpnstyle-bnr.jpg +0 -0
  216. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/images/lightning-pro-bnr.jpg +0 -0
  217. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/images/lightning_bnr_en.jpg +0 -0
  218. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/images/lightning_bnr_ja.jpg +0 -0
  219. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/images/pale-bnr.jpg +0 -0
  220. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/images/post_author_display_bnr_en.jpg +0 -0
  221. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/images/post_author_display_bnr_ja.jpg +0 -0
  222. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/images/variety-bnr.jpg +0 -0
  223. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/images/vektor_logo.png +0 -0
  224. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/images/vk-link-target-controller_bnr.jpg +0 -0
  225. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/images/vk-link-target-controller_notxt_bnr.jpg +0 -0
  226. {plugins_admin/vk-admin → trunk/admin/vk-admin/package}/js/vk_admin.js +0 -1
  227. {plugins_admin → trunk/admin/vk-admin}/vk-admin-config.php +2 -2
  228. {_scss → trunk/assets/_scss}/_bootstrap.scss +0 -0
  229. {_scss → trunk/assets/_scss}/_contents_option_style.scss +0 -0
  230. trunk/assets/_scss/vkExUnit_admin.scss +92 -0
  231. {_scss → trunk/assets/_scss}/vkExUnit_editor_style.scss +0 -0
  232. {_scss → trunk/assets/_scss}/vkExUnit_style.scss +45 -33
  233. {_scss → trunk/assets/_scss}/vkExUnit_style_in_bs.scss +0 -0
  234. trunk/assets/css/vkExUnit_admin.css +1 -0
  235. {css → trunk/assets/css}/vkExUnit_editor_style.css +0 -0
  236. trunk/assets/css/vkExUnit_style.css +1 -0
  237. trunk/assets/css/vkExUnit_style_in_bs.css +12 -0
  238. {images → trunk/assets/images}/arrow_bottom.svg +0 -0
  239. {images → trunk/assets/images}/head_logo_ExUnit.png +0 -0
  240. {images → trunk/assets/images}/to-top-btn-icon.svg +0 -0
  241. {js → trunk/assets/js}/all.js +0 -0
  242. {js → trunk/assets/js}/all.min.js +0 -0
  243. {js → trunk/assets/js}/jquery.flatheights.js +0 -0
  244. {js → trunk/assets/js}/master.js +0 -0
  245. trunk/assets/js/vkExUnit_admin.js +40 -0
  246. {plugins → trunk/inc}/add-body-class.php +0 -0
  247. trunk/inc/auto-eyecatch/auto-eyecatch.php +13 -0
  248. trunk/inc/auto-eyecatch/class-veu-auto-eyecatch.php +91 -0
  249. trunk/inc/auto-eyecatch/class-veu-metabox-eyecatch.php +45 -0
  250. {plugins → trunk/inc}/bootstrap.php +0 -0
  251. {plugins → trunk/inc/call-to-action}/call-to-action-config.php +1 -1
  252. {plugins/call-to-action → trunk/inc/call-to-action/package}/_scss/_call-to-action.scss +0 -0
  253. trunk/inc/call-to-action/package/class-veu-metabox-cta.php +71 -0
  254. {plugins/call-to-action → trunk/inc/call-to-action/package}/class-vk-call-to-action.php +140 -168
  255. {plugins/call-to-action → trunk/inc/call-to-action/package}/view-actionbox.php +2 -5
  256. {plugins/call-to-action → trunk/inc/call-to-action/package}/view-adminsetting.php +0 -0
  257. {plugins/call-to-action → trunk/inc/call-to-action/package}/widget-call-to-action.php +0 -0
  258. plugins/child_page_index.php → trunk/inc/child-page-index.php +1 -9
  259. {plugins → trunk/inc}/contact-section/contact-section.php +2 -3
  260. {plugins → trunk/inc}/contact-section/customizer.php +0 -0
  261. trunk/inc/css-customize/class-veu-metabox-css-customize.php +39 -0
  262. plugins/css_customize/css_customize-edit.php → trunk/inc/css-customize/css-customize-edit.php +0 -0
  263. trunk/inc/css-customize/css-customize-single.php +41 -0
  264. plugins/css_customize/css_customize.php → trunk/inc/css-customize/css-customize.php +17 -4
  265. plugins/disable_dashbord.php → trunk/inc/disable-dashbord.php +0 -0
  266. {plugins → trunk/inc}/disable_ping-back.php +0 -0
  267. {plugins → trunk/inc/font-awesome}/font-awesome-config.php +3 -3
  268. {plugins/font-awesome → trunk/inc/font-awesome/package}/class-vk-font-awesome-versions.php +5 -0
  269. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/HELP-US-OUT.txt +0 -0
  270. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/css/font-awesome.css +0 -0
  271. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/css/font-awesome.min.css +0 -0
  272. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/fonts/FontAwesome.otf +0 -0
  273. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/fonts/fontawesome-webfont.eot +0 -0
  274. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/fonts/fontawesome-webfont.svg +0 -0
  275. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/fonts/fontawesome-webfont.ttf +0 -0
  276. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/fonts/fontawesome-webfont.woff +0 -0
  277. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/fonts/fontawesome-webfont.woff2 +0 -0
  278. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/less/animated.less +0 -0
  279. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/less/bordered-pulled.less +0 -0
  280. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/less/core.less +0 -0
  281. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/less/fixed-width.less +0 -0
  282. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/less/font-awesome.less +0 -0
  283. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/less/icons.less +0 -0
  284. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/less/larger.less +0 -0
  285. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/less/list.less +0 -0
  286. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/less/mixins.less +0 -0
  287. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/less/path.less +0 -0
  288. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/less/rotated-flipped.less +0 -0
  289. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/less/screen-reader.less +0 -0
  290. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/less/stacked.less +0 -0
  291. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/less/variables.less +0 -0
  292. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/scss/_animated.scss +0 -0
  293. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/scss/_bordered-pulled.scss +0 -0
  294. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/scss/_core.scss +0 -0
  295. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/scss/_fixed-width.scss +0 -0
  296. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/scss/_icons.scss +0 -0
  297. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/scss/_larger.scss +0 -0
  298. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/scss/_list.scss +0 -0
  299. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/scss/_mixins.scss +0 -0
  300. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/scss/_path.scss +0 -0
  301. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/scss/_rotated-flipped.scss +0 -0
  302. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/scss/_screen-reader.scss +0 -0
  303. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/scss/_stacked.scss +0 -0
  304. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/scss/_variables.scss +0 -0
  305. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/4.7.0/scss/font-awesome.scss +0 -0
  306. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/LICENSE.txt +0 -0
  307. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/css/all.min.css +0 -0
  308. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/js/all.min.js +0 -0
  309. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/metadata/categories.yml +0 -0
  310. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/metadata/icons.json +0 -0
  311. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/metadata/icons.yml +0 -0
  312. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/metadata/shims.json +0 -0
  313. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/metadata/shims.yml +0 -0
  314. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/metadata/sponsors.yml +0 -0
  315. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/sprites/brands.svg +0 -0
  316. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/sprites/regular.svg +0 -0
  317. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/sprites/solid.svg +0 -0
  318. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/webfonts/fa-brands-400.eot +0 -0
  319. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/webfonts/fa-brands-400.svg +0 -0
  320. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/webfonts/fa-brands-400.ttf +0 -0
  321. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/webfonts/fa-brands-400.woff +0 -0
  322. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/webfonts/fa-brands-400.woff2 +0 -0
  323. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/webfonts/fa-regular-400.eot +0 -0
  324. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/webfonts/fa-regular-400.svg +0 -0
  325. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/webfonts/fa-regular-400.ttf +0 -0
  326. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/webfonts/fa-regular-400.woff +0 -0
  327. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/webfonts/fa-regular-400.woff2 +0 -0
  328. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/webfonts/fa-solid-900.eot +0 -0
  329. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/webfonts/fa-solid-900.svg +0 -0
  330. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/webfonts/fa-solid-900.ttf +0 -0
  331. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/webfonts/fa-solid-900.woff +0 -0
  332. {plugins/font-awesome → trunk/inc/font-awesome/package}/versions/5.6.0/webfonts/fa-solid-900.woff2 +0 -0
  333. plugins/footer_copyright_change.php → trunk/inc/footer-copyright-change.php +0 -0
  334. {plugins → trunk/inc}/google_analytics/ga_admin.php +0 -0
  335. {plugins → trunk/inc}/google_analytics/ga_customizer.php +0 -0
  336. {plugins → trunk/inc}/google_analytics/google_analytics.php +1 -1
  337. {plugins → trunk/inc}/icons.php +1 -1
  338. plugins/insert_ads.php → trunk/inc/insert-ads.php +1 -1
  339. plugins/meta_description.php → trunk/inc/meta-description.php +1 -1
  340. trunk/inc/meta-keyword/class-veu-metabox-meta-keyword.php +43 -0
  341. trunk/inc/meta-keyword/meta-keyword.php +124 -0
  342. {plugins → trunk/inc}/nav-menu-class-custom.php +0 -0
  343. trunk/inc/noindex/class-veu-metabox-noindex.php +45 -0
  344. trunk/inc/noindex/noindex.php +34 -0
  345. {plugins/other_widget → trunk/inc/other-widget}/js/admin-widget.js +0 -0
  346. trunk/inc/other-widget/other-widget.php +99 -0
  347. {plugins/other_widget → trunk/inc/other-widget}/widget-3pr-area.php +0 -0
  348. {plugins/other_widget → trunk/inc/other-widget}/widget-archives.php +0 -0
  349. {plugins/other_widget → trunk/inc/other-widget}/widget-banner.php +0 -0
  350. {plugins/other_widget → trunk/inc/other-widget}/widget-button.php +0 -0
  351. {plugins/other_widget → trunk/inc/other-widget}/widget-child-page-list.php +0 -0
  352. {plugins/other_widget → trunk/inc/other-widget}/widget-new-posts.php +16 -2
  353. {plugins/other_widget → trunk/inc/other-widget}/widget-page.php +2 -2
  354. {plugins/other_widget → trunk/inc/other-widget}/widget-pr-blocks.php +0 -0
  355. {plugins/other_widget → trunk/inc/other-widget}/widget-profile.php +0 -0
  356. {plugins/other_widget → trunk/inc/other-widget}/widget-side-child-page-list.php +0 -0
  357. {plugins/other_widget → trunk/inc/other-widget}/widget-taxonomies.php +0 -0
  358. plugins/pageList_ancestor.php → trunk/inc/page-list-ancestor.php +26 -28
  359. {plugins → trunk/inc}/pagetop-btn/_scss/_pagetop-btn.scss +0 -0
  360. {plugins → trunk/inc}/pagetop-btn/js/pagetop-btn.js +0 -0
  361. {plugins → trunk/inc}/pagetop-btn/pagetop-btn.php +0 -0
  362. {plugins/post-type-manager → trunk/inc/post-type-manager/package}/class.post-type-manager.php +0 -0
  363. trunk/inc/post-type-manager/post-type-manager-config.php +18 -0
  364. {plugins → trunk/inc}/related_posts/related_posts.php +0 -0
  365. trunk/inc/sitemap-page/class-veu-metabox-sitemap.php +49 -0
  366. trunk/inc/sitemap-page/sitemap-page-admin-main-setting.php +54 -0
  367. trunk/inc/sitemap-page/sitemap-page-helpers.php +54 -0
  368. plugins/sitemap_page/sitemap_page.php → trunk/inc/sitemap-page/sitemap-page.php +6 -50
  369. {plugins → trunk/inc}/smooth-scroll/js/smooth-scroll.js +0 -0
  370. {plugins → trunk/inc}/smooth-scroll/js/smooth-scroll.min.js +0 -0
  371. {plugins → trunk/inc}/smooth-scroll/smooth-scroll.php +0 -0
  372. trunk/inc/sns/class-veu-metabox-sns-button.php +62 -0
  373. trunk/inc/sns/class-veu-metabox-sns-title.php +39 -0
  374. {plugins → trunk/inc}/sns/function_follow.php +0 -0
  375. {plugins → trunk/inc}/sns/function_og.php +0 -0
  376. {plugins → trunk/inc}/sns/function_snsBtns.php +24 -2
  377. {plugins → trunk/inc}/sns/function_twitterCard.php +0 -0
  378. plugins/sns/icons/Read Me.txt b/trunk/inc/sns/icons/Read → Me.txt +0 -0
  379. {plugins → trunk/inc}/sns/icons/demo-files/demo.css +0 -0
  380. {plugins → trunk/inc}/sns/icons/demo-files/demo.js +0 -0
  381. {plugins → trunk/inc}/sns/icons/demo.html +0 -0
  382. {plugins → trunk/inc}/sns/icons/fonts/vk_sns.eot +0 -0
  383. {plugins → trunk/inc}/sns/icons/fonts/vk_sns.svg +0 -0
  384. {plugins → trunk/inc}/sns/icons/fonts/vk_sns.ttf +0 -0
  385. {plugins → trunk/inc}/sns/icons/fonts/vk_sns.woff +0 -0
  386. {plugins → trunk/inc}/sns/icons/selection.json +0 -0
  387. {plugins → trunk/inc}/sns/icons/style.css +0 -0
  388. {plugins → trunk/inc}/sns/sns.php +35 -10
  389. {plugins → trunk/inc}/sns/sns_admin.php +0 -0
  390. {plugins → trunk/inc}/sns/sns_customizer.php +0 -0
  391. {plugins → trunk/inc}/sns/widget-fb-page-plugin.php +0 -0
  392. {plugins → trunk/inc}/sns/widget-twitter.php +0 -0
  393. trunk/inc/template-tags/template-tags-veu-old.php +69 -0
  394. {plugins → trunk/inc}/template-tags/template-tags-veu.php +19 -3
  395. {plugins → trunk/inc}/template-tags/template-tags.php +5 -1
  396. plugins/tiny_mce_style_tags.php → trunk/inc/tiny-mce-styletags.php +0 -0
  397. {plugins/vk-blocks → trunk/inc/vk-blocks/package}/build/block-build-editor.css +1 -1
  398. {plugins/vk-blocks → trunk/inc/vk-blocks/package}/build/block-build.css +4 -2
  399. trunk/inc/vk-blocks/package/build/block-build.js +26 -0
  400. trunk/inc/vk-blocks/package/build/block-build.js.map +1 -0
  401. {plugins/vk-blocks → trunk/inc/vk-blocks/package}/build/languages/vk-blocks-ja-vk-blocks-build-js.json +1 -1
  402. trunk/inc/vk-blocks/package/build/languages/vk-blocks-ja.mo +0 -0
  403. {plugins/vk-blocks → trunk/inc/vk-blocks/package}/build/languages/vk-blocks-ja.po +260 -165
  404. {plugins/vk-blocks → trunk/inc/vk-blocks/package}/build/languages/vk-blocks.pot +66 -4
  405. {plugins/vk-blocks → trunk/inc/vk-blocks/package}/images/arrow_bottom.svg +0 -0
  406. {plugins/vk-blocks → trunk/inc/vk-blocks/package}/vk-blocks-functions.php +3 -2
  407. {plugins → trunk/inc/vk-blocks}/vk-blocks-config.php +7 -7
  408. plugins/wp_title.php → trunk/inc/wp-title.php +1 -1
  409. trunk/initialize.php +59 -0
  410. trunk/languages/vk-all-in-one-expansion-unit-ja.mo +0 -0
  411. trunk/languages/vk-all-in-one-expansion-unit-ja.po +2970 -0
  412. trunk/languages/vk-all-in-one-expansion-unit.pot +1844 -0
  413. trunk/readme.txt +548 -0
  414. trunk/screenshot-1.png +0 -0
  415. trunk/screenshot-2.png +0 -0
  416. trunk/uninstaller.php +55 -0
  417. trunk/veu-package-manager.php +112 -0
  418. trunk/veu-packages.php +476 -0
  419. trunk/vkExUnit.php +111 -0
  420. uninstaller.php +1 -1
  421. veu-package-manager.php +21 -15
  422. veu-packages.php +128 -139
  423. vkExUnit.php +17 -33
_scss/vkExUnit_admin.scss DELETED
@@ -1,6 +0,0 @@
1
- @charset "utf-8";
2
- // @import "compass";
3
-
4
- .wrap.debug_mode{
5
- tr.dev_object{ display:table-row; }
6
- }
admin/admin-common-init.php CHANGED
@@ -27,7 +27,6 @@ function veu_get_common_options_default() {
27
}
28
$default_options['post_metabox_individual'] = false;
29
$default_options['delete_options_at_deactivate'] = false;
30
- $default_options['active_test_update'] = false;
31
$default_options['content_filter_state'] = 'content';
32
return apply_filters( 'vkExUnit_common_options_default', $default_options );
33
}
27
}
28
$default_options['post_metabox_individual'] = false;
29
$default_options['delete_options_at_deactivate'] = false;
30
$default_options['content_filter_state'] = 'content';
31
return apply_filters( 'vkExUnit_common_options_default', $default_options );
32
}
admin/admin.php CHANGED
@@ -6,28 +6,34 @@
6
*/
7
8
require dirname( __FILE__ ) . '/admin-common-init.php';
9
- require dirname( __FILE__ ) . '/admin-main-setting-page.php';
10
require dirname( __FILE__ ) . '/disable-guide.php';
11
- require dirname( __FILE__ ) . '/vk-admin/vk-admin-config.php';
12
require dirname( __FILE__ ) . '/customizer.php';
13
- /*
14
- plugins_loaded の位置だとmetaboxを統合しない設定にしても個別のmetaboxが表示されない
15
- */
16
require dirname( __FILE__ ) . '/admin-post-metabox.php';
17
18
/*
19
Add Parent menu
20
/*-------------------------------------------*/
21
add_action( 'admin_menu', 'veu_setting_menu_parent' );
22
function veu_setting_menu_parent() {
23
global $menu;
24
- $parent_name = veu_get_little_short_name();
25
- $Capability_required = 'activate_plugins';
26
27
$custom_page = add_menu_page(
28
$parent_name, // Name of page
29
$parent_name, // Label in menu
30
- $Capability_required,
31
'vkExUnit_setting_page', // ユニークなこのサブメニューページの識別子
32
'vkExUnit_add_setting_page' // メニューページのコンテンツを出力する関数
33
);
6
*/
7
8
require dirname( __FILE__ ) . '/admin-common-init.php';
9
require dirname( __FILE__ ) . '/disable-guide.php';
10
require dirname( __FILE__ ) . '/customizer.php';
11
+
12
+ // plugins_loaded の位置ではmetaboxを統合しない設定にしても個別のmetaboxが表示されない
13
require dirname( __FILE__ ) . '/admin-post-metabox.php';
14
15
+ // 親メニューが出力される前に フックを通さずに直接読み込むとページが表示されなくなる
16
+ add_action( 'plugin_loaded', 'veu_load_main_setting_page' );
17
+ function veu_load_main_setting_page() {
18
+ require_once dirname( __FILE__ ) . '/admin-main-setting-page.php';
19
+ require_once dirname( __FILE__ ) . '/vk-admin/vk-admin-config.php';
20
+ }
21
+
22
/*
23
Add Parent menu
24
/*-------------------------------------------*/
25
add_action( 'admin_menu', 'veu_setting_menu_parent' );
26
function veu_setting_menu_parent() {
27
global $menu;
28
+
29
+ $parent_name = veu_get_little_short_name();
30
+
31
+ $capability_required = 'activate_plugins';
32
33
$custom_page = add_menu_page(
34
$parent_name, // Name of page
35
$parent_name, // Label in menu
36
+ $capability_required,
37
'vkExUnit_setting_page', // ユニークなこのサブメニューページの識別子
38
'vkExUnit_add_setting_page' // メニューページのコンテンツを出力する関数
39
);
admin/plugin-update-checker/Puc/v4/Factory.php DELETED
@@ -1,6 +0,0 @@
1
- <?php
2
- if ( !class_exists('Puc_v4_Factory', false) ):
3
-
4
- class Puc_v4_Factory extends Puc_v4p4_Factory { }
5
-
6
- endif;
admin/plugin-update-checker/Puc/v4p4/Autoloader.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
-
3
- if ( !class_exists('Puc_v4p4_Autoloader', false) ):
4
-
5
- class Puc_v4p4_Autoloader {
6
- private $prefix = '';
7
- private $rootDir = '';
8
- private $libraryDir = '';
9
-
10
- private $staticMap;
11
-
12
- public function __construct() {
13
- $this->rootDir = dirname(__FILE__) . '/';
14
- $nameParts = explode('_', __CLASS__, 3);
15
- $this->prefix = $nameParts[0] . '_' . $nameParts[1] . '_';
16
-
17
- $this->libraryDir = realpath($this->rootDir . '../..') . '/';
18
- $this->staticMap = array(
19
- 'PucReadmeParser' => 'vendor/readme-parser.php',
20
- 'Parsedown' => 'vendor/ParsedownLegacy.php',
21
- );
22
- if ( version_compare(PHP_VERSION, '5.3.0', '>=') ) {
23
- $this->staticMap['Parsedown'] = 'vendor/Parsedown.php';
24
- }
25
-
26
- spl_autoload_register(array($this, 'autoload'));
27
- }
28
-
29
- public function autoload($className) {
30
- if ( isset($this->staticMap[$className]) && file_exists($this->libraryDir . $this->staticMap[$className]) ) {
31
- /** @noinspection PhpIncludeInspection */
32
- include ($this->libraryDir . $this->staticMap[$className]);
33
- return;
34
- }
35
-
36
- if (strpos($className, $this->prefix) === 0) {
37
- $path = substr($className, strlen($this->prefix));
38
- $path = str_replace('_', '/', $path);
39
- $path = $this->rootDir . $path . '.php';
40
-
41
- if (file_exists($path)) {
42
- /** @noinspection PhpIncludeInspection */
43
- include $path;
44
- }
45
- }
46
- }
47
- }
48
-
49
- endif;
admin/plugin-update-checker/Puc/v4p4/DebugBar/Extension.php DELETED
@@ -1,177 +0,0 @@
1
- <?php
2
- if ( !class_exists('Puc_v4p4_DebugBar_Extension', false) ):
3
-
4
- class Puc_v4p4_DebugBar_Extension {
5
- const RESPONSE_BODY_LENGTH_LIMIT = 4000;
6
-
7
- /** @var Puc_v4p4_UpdateChecker */
8
- protected $updateChecker;
9
- protected $panelClass = 'Puc_v4p4_DebugBar_Panel';
10
-
11
- public function __construct($updateChecker, $panelClass = null) {
12
- $this->updateChecker = $updateChecker;
13
- if ( isset($panelClass) ) {
14
- $this->panelClass = $panelClass;
15
- }
16
-
17
- add_filter('debug_bar_panels', array($this, 'addDebugBarPanel'));
18
- add_action('debug_bar_enqueue_scripts', array($this, 'enqueuePanelDependencies'));
19
-
20
- add_action('wp_ajax_puc_v4_debug_check_now', array($this, 'ajaxCheckNow'));
21
- }
22
-
23
- /**
24
- * Register the PUC Debug Bar panel.
25
- *
26
- * @param array $panels
27
- * @return array
28
- */
29
- public function addDebugBarPanel($panels) {
30
- if ( $this->updateChecker->userCanInstallUpdates() ) {
31
- $panels[] = new $this->panelClass($this->updateChecker);
32
- }
33
- return $panels;
34
- }
35
-
36
- /**
37
- * Enqueue our Debug Bar scripts and styles.
38
- */
39
- public function enqueuePanelDependencies() {
40
- wp_enqueue_style(
41
- 'puc-debug-bar-style-v4',
42
- $this->getLibraryUrl("/css/puc-debug-bar.css"),
43
- array('debug-bar'),
44
- '20171124'
45
- );
46
-
47
- wp_enqueue_script(
48
- 'puc-debug-bar-js-v4',
49
- $this->getLibraryUrl("/js/debug-bar.js"),
50
- array('jquery'),
51
- '20170516'
52
- );
53
- }
54
-
55
- /**
56
- * Run an update check and output the result. Useful for making sure that
57
- * the update checking process works as expected.
58
- */
59
- public function ajaxCheckNow() {
60
- if ( $_POST['uid'] !== $this->updateChecker->getUniqueName('uid') ) {
61
- return;
62
- }
63
- $this->preAjaxRequest();
64
- $update = $this->updateChecker->checkForUpdates();
65
- if ( $update !== null ) {
66
- echo "An update is available:";
67
- echo '<pre>', htmlentities(print_r($update, true)), '</pre>';
68
- } else {
69
- echo 'No updates found.';
70
- }
71
-
72
- $errors = $this->updateChecker->getLastRequestApiErrors();
73
- if ( !empty($errors) ) {
74
- printf('<p>The update checker encountered %d API error%s.</p>', count($errors), (count($errors) > 1) ? 's' : '');
75
-
76
- foreach (array_values($errors) as $num => $item) {
77
- $wpError = $item['error'];
78
- /** @var WP_Error $wpError */
79
- printf('<h4>%d) %s</h4>', $num + 1, esc_html($wpError->get_error_message()));
80
-
81
- echo '<dl>';
82
- printf('<dt>Error code:</dt><dd><code>%s</code></dd>', esc_html($wpError->get_error_code()));
83
-
84
- if ( isset($item['url']) ) {
85
- printf('<dt>Requested URL:</dt><dd><code>%s</code></dd>', esc_html($item['url']));
86
- }
87
-
88
- if ( isset($item['httpResponse']) ) {
89
- if ( is_wp_error($item['httpResponse']) ) {
90
- $httpError = $item['httpResponse'];
91
- /** @var WP_Error $httpError */
92
- printf(
93
- '<dt>WordPress HTTP API error:</dt><dd>%s (<code>%s</code>)</dd>',
94
- esc_html($httpError->get_error_message()),
95
- esc_html($httpError->get_error_code())
96
- );
97
- } else {
98
- //Status code.
99
- printf(
100
- '<dt>HTTP status:</dt><dd><code>%d %s</code></dd>',
101
- wp_remote_retrieve_response_code($item['httpResponse']),
102
- wp_remote_retrieve_response_message($item['httpResponse'])
103
- );
104
-
105
- //Headers.
106
- echo '<dt>Response headers:</dt><dd><pre>';
107
- foreach (wp_remote_retrieve_headers($item['httpResponse']) as $name => $value) {
108
- printf("%s: %s\n", esc_html($name), esc_html($value));
109
- }
110
- echo '</pre></dd>';
111
-
112
- //Body.
113
- $body = wp_remote_retrieve_body($item['httpResponse']);
114
- if ( $body === '' ) {
115
- $body = '(Empty response.)';
116
- } else if ( strlen($body) > self::RESPONSE_BODY_LENGTH_LIMIT ) {
117
- $length = strlen($body);
118
- $body = substr($body, 0, self::RESPONSE_BODY_LENGTH_LIMIT)
119
- . sprintf("\n(Long string truncated. Total length: %d bytes.)", $length);
120
- }
121
-
122
- printf('<dt>Response body:</dt><dd><pre>%s</pre></dd>', esc_html($body));
123
- }
124
- }
125
- echo '<dl>';
126
- }
127
- }
128
-
129
- exit;
130
- }
131
-
132
- /**
133
- * Check access permissions and enable error display (for debugging).
134
- */
135
- protected function preAjaxRequest() {
136
- if ( !$this->updateChecker->userCanInstallUpdates() ) {
137
- die('Access denied');
138
- }
139
- check_ajax_referer('puc-ajax');
140
-
141
- error_reporting(E_ALL);
142
- @ini_set('display_errors', 'On');
143
- }
144
-
145
- /**
146
- * @param string $filePath
147
- * @return string
148
- */
149
- private function getLibraryUrl($filePath) {
150
- $absolutePath = realpath(dirname(__FILE__) . '/../../../' . ltrim($filePath, '/'));
151
-
152
- //Where is the library located inside the WordPress directory structure?
153
- $absolutePath = Puc_v4p4_Factory::normalizePath($absolutePath);
154
-
155
- $pluginDir = Puc_v4p4_Factory::normalizePath(WP_PLUGIN_DIR);
156
- $muPluginDir = Puc_v4p4_Factory::normalizePath(WPMU_PLUGIN_DIR);
157
- $themeDir = Puc_v4p4_Factory::normalizePath(get_theme_root());
158
-
159
- if ( (strpos($absolutePath, $pluginDir) === 0) || (strpos($absolutePath, $muPluginDir) === 0) ) {
160
- //It's part of a plugin.
161
- return plugins_url(basename($absolutePath), $absolutePath);
162
- } else if ( strpos($absolutePath, $themeDir) === 0 ) {
163
- //It's part of a theme.
164
- $relativePath = substr($absolutePath, strlen($themeDir) + 1);
165
- $template = substr($relativePath, 0, strpos($relativePath, '/'));
166
- $baseUrl = get_theme_root_uri($template);
167
-
168
- if ( !empty($baseUrl) && $relativePath ) {
169
- return $baseUrl . '/' . $relativePath;
170
- }
171
- }
172
-
173
- return '';
174
- }
175
- }
176
-
177
- endif;
admin/plugin-update-checker/Puc/v4p4/DebugBar/Panel.php DELETED
@@ -1,165 +0,0 @@
1
- <?php
2
-
3
- if ( !class_exists('Puc_v4p4_DebugBar_Panel', false) && class_exists('Debug_Bar_Panel', false) ):
4
-
5
- class Puc_v4p4_DebugBar_Panel extends Debug_Bar_Panel {
6
- /** @var Puc_v4p4_UpdateChecker */
7
- protected $updateChecker;
8
-
9
- private $responseBox = '<div class="puc-ajax-response" style="display: none;"></div>';
10
-
11
- public function __construct($updateChecker) {
12
- $this->updateChecker = $updateChecker;
13
- $title = sprintf(
14
- '<span class="puc-debug-menu-link-%s">PUC (%s)</span>',
15
- esc_attr($this->updateChecker->getUniqueName('uid')),
16
- $this->updateChecker->slug
17
- );
18
- parent::__construct($title);
19
- }
20
-
21
- public function render() {
22
- printf(
23
- '<div class="puc-debug-bar-panel-v4" id="%1$s" data-slug="%2$s" data-uid="%3$s" data-nonce="%4$s">',
24
- esc_attr($this->updateChecker->getUniqueName('debug-bar-panel')),
25
- esc_attr($this->updateChecker->slug),
26
- esc_attr($this->updateChecker->getUniqueName('uid')),
27
- esc_attr(wp_create_nonce('puc-ajax'))
28
- );
29
-
30
- $this->displayConfiguration();
31
- $this->displayStatus();
32
- $this->displayCurrentUpdate();
33
-
34
- echo '</div>';
35
- }
36
-
37
- private function displayConfiguration() {
38
- echo '<h3>Configuration</h3>';
39
- echo '<table class="puc-debug-data">';
40
- $this->displayConfigHeader();
41
- $this->row('Slug', htmlentities($this->updateChecker->slug));
42
- $this->row('DB option', htmlentities($this->updateChecker->optionName));
43
-
44
- $requestInfoButton = $this->getMetadataButton();
45
- $this->row('Metadata URL', htmlentities($this->updateChecker->metadataUrl) . ' ' . $requestInfoButton . $this->responseBox);
46
-
47
- $scheduler = $this->updateChecker->scheduler;
48
- if ( $scheduler->checkPeriod > 0 ) {
49
- $this->row('Automatic checks', 'Every ' . $scheduler->checkPeriod . ' hours');
50
- } else {
51
- $this->row('Automatic checks', 'Disabled');
52
- }
53
-
54
- if ( isset($scheduler->throttleRedundantChecks) ) {
55
- if ( $scheduler->throttleRedundantChecks && ($scheduler->checkPeriod > 0) ) {
56
- $this->row(
57
- 'Throttling',
58
- sprintf(
59
- 'Enabled. If an update is already available, check for updates every %1$d hours instead of every %2$d hours.',
60
- $scheduler->throttledCheckPeriod,
61
- $scheduler->checkPeriod
62
- )
63
- );
64
- } else {
65
- $this->row('Throttling', 'Disabled');
66
- }
67
- }
68
-
69
- $this->updateChecker->onDisplayConfiguration($this);
70
-
71
- echo '</table>';
72
- }
73
-
74
- protected function displayConfigHeader() {
75
- //Do nothing. This should be implemented in subclasses.
76
- }
77
-
78
- protected function getMetadataButton() {
79
- return '';
80
- }
81
-
82
- private function displayStatus() {
83
- echo '<h3>Status</h3>';
84
- echo '<table class="puc-debug-data">';
85
- $state = $this->updateChecker->getUpdateState();
86
- $checkNowButton = '';
87
- if ( function_exists('get_submit_button') ) {
88
- $checkNowButton = get_submit_button(
89
- 'Check Now',
90
- 'secondary',
91
- 'puc-check-now-button',
92
- false,
93
- array('id' => $this->updateChecker->getUniqueName('check-now-button'))
94
- );
95
- }
96
-
97
- if ( $state->getLastCheck() > 0 ) {
98
- $this->row('Last check', $this->formatTimeWithDelta($state->getLastCheck()) . ' ' . $checkNowButton . $this->responseBox);
99
- } else {
100
- $this->row('Last check', 'Never');
101
- }
102
-
103
- $nextCheck = wp_next_scheduled($this->updateChecker->scheduler->getCronHookName());
104
- $this->row('Next automatic check', $this->formatTimeWithDelta($nextCheck));
105
-
106
- if ( $state->getCheckedVersion() !== '' ) {
107
- $this->row('Checked version', htmlentities($state->getCheckedVersion()));
108
- $this->row('Cached update', $state->getUpdate());
109
- }
110
- $this->row('Update checker class', htmlentities(get_class($this->updateChecker)));
111
- echo '</table>';
112
- }
113
-
114
- private function displayCurrentUpdate() {
115
- $update = $this->updateChecker->getUpdate();
116
- if ( $update !== null ) {
117
- echo '<h3>An Update Is Available</h3>';
118
- echo '<table class="puc-debug-data">';
119
- $fields = $this->getUpdateFields();
120
- foreach($fields as $field) {
121
- if ( property_exists($update, $field) ) {
122
- $this->row(ucwords(str_replace('_', ' ', $field)), htmlentities($update->$field));
123
- }
124
- }
125
- echo '</table>';
126
- } else {
127
- echo '<h3>No updates currently available</h3>';
128
- }
129
- }
130
-
131
- protected function getUpdateFields() {
132
- return array('version', 'download_url', 'slug',);
133
- }
134
-
135
- private function formatTimeWithDelta($unixTime) {
136
- if ( empty($unixTime) ) {
137
- return 'Never';
138
- }
139
-
140
- $delta = time() - $unixTime;
141
- $result = human_time_diff(time(), $unixTime);
142
- if ( $delta < 0 ) {
143
- $result = 'after ' . $result;
144
- } else {
145
- $result = $result . ' ago';
146
- }
147
- $result .= ' (' . $this->formatTimestamp($unixTime) . ')';
148
- return $result;
149
- }
150
-
151
- private function formatTimestamp($unixTime) {
152
- return gmdate('Y-m-d H:i:s', $unixTime + (get_option('gmt_offset') * 3600));
153
- }
154
-
155
- public function row($name, $value) {
156
- if ( is_object($value) || is_array($value) ) {
157
- $value = '<pre>' . htmlentities(print_r($value, true)) . '</pre>';
158
- } else if ($value === null) {
159
- $value = '<code>null</code>';
160
- }
161
- printf('<tr><th scope="row">%1$s</th> <td>%2$s</td></tr>', $name, $value);
162
- }
163
- }
164
-
165
- endif;
admin/plugin-update-checker/Puc/v4p4/DebugBar/PluginExtension.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
- if ( !class_exists('Puc_v4p4_DebugBar_PluginExtension', false) ):
3
-
4
- class Puc_v4p4_DebugBar_PluginExtension extends Puc_v4p4_DebugBar_Extension {
5
- /** @var Puc_v4p4_Plugin_UpdateChecker */
6
- protected $updateChecker;
7
-
8
- public function __construct($updateChecker) {
9
- parent::__construct($updateChecker, 'Puc_v4p4_DebugBar_PluginPanel');
10
-
11
- add_action('wp_ajax_puc_v4_debug_request_info', array($this, 'ajaxRequestInfo'));
12
- }
13
-
14
- /**
15
- * Request plugin info and output it.
16
- */
17
- public function ajaxRequestInfo() {
18
- if ( $_POST['uid'] !== $this->updateChecker->getUniqueName('uid') ) {
19
- return;
20
- }
21
- $this->preAjaxRequest();
22
- $info = $this->updateChecker->requestInfo();
23
- if ( $info !== null ) {
24
- echo 'Successfully retrieved plugin info from the metadata URL:';
25
- echo '<pre>', htmlentities(print_r($info, true)), '</pre>';
26
- } else {
27
- echo 'Failed to retrieve plugin info from the metadata URL.';
28
- }
29
- exit;
30
- }
31
- }
32
-
33
- endif;
admin/plugin-update-checker/Puc/v4p4/DebugBar/PluginPanel.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
-
3
- if ( !class_exists('Puc_v4p4_DebugBar_PluginPanel', false) ):
4
-
5
- class Puc_v4p4_DebugBar_PluginPanel extends Puc_v4p4_DebugBar_Panel {
6
- /**
7
- * @var Puc_v4p4_Plugin_UpdateChecker
8
- */
9
- protected $updateChecker;
10
-
11
- protected function displayConfigHeader() {
12
- $this->row('Plugin file', htmlentities($this->updateChecker->pluginFile));
13
- parent::displayConfigHeader();
14
- }
15
-
16
- protected function getMetadataButton() {
17
- $requestInfoButton = '';
18
- if ( function_exists('get_submit_button') ) {
19
- $requestInfoButton = get_submit_button(
20
- 'Request Info',
21
- 'secondary',
22
- 'puc-request-info-button',
23
- false,
24
- array('id' => $this->updateChecker->getUniqueName('request-info-button'))
25
- );
26
- }
27
- return $requestInfoButton;
28
- }
29
-
30
- protected function getUpdateFields() {
31
- return array_merge(
32
- parent::getUpdateFields(),
33
- array('homepage', 'upgrade_notice', 'tested',)
34
- );
35
- }
36
- }
37
-
38
- endif;
admin/plugin-update-checker/Puc/v4p4/DebugBar/ThemePanel.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
-
3
- if ( !class_exists('Puc_v4p4_DebugBar_ThemePanel', false) ):
4
-
5
- class Puc_v4p4_DebugBar_ThemePanel extends Puc_v4p4_DebugBar_Panel {
6
- /**
7
- * @var Puc_v4p4_Theme_UpdateChecker
8
- */
9
- protected $updateChecker;
10
-
11
- protected function displayConfigHeader() {
12
- $this->row('Theme directory', htmlentities($this->updateChecker->directoryName));
13
- parent::displayConfigHeader();
14
- }
15
-
16
- protected function getUpdateFields() {
17
- return array_merge(parent::getUpdateFields(), array('details_url'));
18
- }
19
- }
20
-
21
- endif;
admin/plugin-update-checker/Puc/v4p4/Factory.php DELETED
@@ -1,292 +0,0 @@
1
- <?php
2
- if ( !class_exists('Puc_v4p4_Factory', false) ):
3
-
4
- /**
5
- * A factory that builds update checker instances.
6
- *
7
- * When multiple versions of the same class have been loaded (e.g. PluginUpdateChecker 4.0
8
- * and 4.1), this factory will always use the latest available minor version. Register class
9
- * versions by calling {@link PucFactory::addVersion()}.
10
- *
11
- * At the moment it can only build instances of the UpdateChecker class. Other classes are
12
- * intended mainly for internal use and refer directly to specific implementations.
13
- */
14
- class Puc_v4p4_Factory {
15
- protected static $classVersions = array();
16
- protected static $sorted = false;
17
-
18
- protected static $myMajorVersion = '';
19
- protected static $latestCompatibleVersion = '';
20
-
21
- /**
22
- * Create a new instance of the update checker.
23
- *
24
- * This method automatically detects if you're using it for a plugin or a theme and chooses
25
- * the appropriate implementation for your update source (JSON file, GitHub, BitBucket, etc).
26
- *
27
- * @see Puc_v4p4_UpdateChecker::__construct
28
- *
29
- * @param string $metadataUrl The URL of the metadata file, a GitHub repository, or another supported update source.
30
- * @param string $fullPath Full path to the main plugin file or to the theme directory.
31
- * @param string $slug Custom slug. Defaults to the name of the main plugin file or the theme directory.
32
- * @param int $checkPeriod How often to check for updates (in hours).
33
- * @param string $optionName Where to store book-keeping info about update checks.
34
- * @param string $muPluginFile The plugin filename relative to the mu-plugins directory.
35
- * @return Puc_v4p4_Plugin_UpdateChecker|Puc_v4p4_Theme_UpdateChecker|Puc_v4p4_Vcs_BaseChecker
36
- */
37
- public static function buildUpdateChecker($metadataUrl, $fullPath, $slug = '', $checkPeriod = 12, $optionName = '', $muPluginFile = '') {
38
- $fullPath = self::normalizePath($fullPath);
39
- $id = null;
40
-
41
- //Plugin or theme?
42
- $themeDirectory = self::getThemeDirectoryName($fullPath);
43
- if ( self::isPluginFile($fullPath) ) {
44
- $type = 'Plugin';
45
- $id = $fullPath;
46
- } else if ( $themeDirectory !== null ) {
47
- $type = 'Theme';
48
- $id = $themeDirectory;
49
- } else {
50
- throw new RuntimeException(sprintf(
51
- 'The update checker cannot determine if "%s" is a plugin or a theme. ' .
52
- 'This is a bug. Please contact the PUC developer.',
53
- htmlentities($fullPath)
54
- ));
55
- }
56
-
57
- //Which hosting service does the URL point to?
58
- $service = self::getVcsService($metadataUrl);
59
-
60
- $apiClass = null;
61
- if ( empty($service) ) {
62
- //The default is to get update information from a remote JSON file.
63
- $checkerClass = $type . '_UpdateChecker';
64
- } else {
65
- //You can also use a VCS repository like GitHub.
66
- $checkerClass = 'Vcs_' . $type . 'UpdateChecker';
67
- $apiClass = $service . 'Api';
68
- }
69
-
70
- $checkerClass = self::getCompatibleClassVersion($checkerClass);
71
- if ( $checkerClass === null ) {
72
- trigger_error(
73
- sprintf(
74
- 'PUC %s does not support updates for %ss %s',
75
- htmlentities(self::$latestCompatibleVersion),
76
- strtolower($type),
77
- $service ? ('hosted on ' . htmlentities($service)) : 'using JSON metadata'
78
- ),
79
- E_USER_ERROR
80
- );
81
- return null;
82
- }
83
-
84
- if ( !isset($apiClass) ) {
85
- //Plain old update checker.
86
- return new $checkerClass($metadataUrl, $id, $slug, $checkPeriod, $optionName, $muPluginFile);
87
- } else {
88
- //VCS checker + an API client.
89
- $apiClass = self::getCompatibleClassVersion($apiClass);
90
- if ( $apiClass === null ) {
91
- trigger_error(sprintf(
92
- 'PUC %s does not support %s',
93
- htmlentities(self::$latestCompatibleVersion),
94
- htmlentities($service)
95
- ), E_USER_ERROR);
96
- return null;
97
- }
98
-
99
- return new $checkerClass(
100
- new $apiClass($metadataUrl),
101
- $id,
102
- $slug,
103
- $checkPeriod,
104
- $optionName,
105
- $muPluginFile
106
- );
107
- }
108
- }
109
-
110
- /**
111
- *
112
- * Normalize a filesystem path. Introduced in WP 3.9.
113
- * Copying here allows use of the class on earlier versions.
114
- * This version adapted from WP 4.8.2 (unchanged since 4.5.0)
115
- *
116
- * @param string $path Path to normalize.
117
- * @return string Normalized path.
118
- */
119
- public static function normalizePath($path) {
120
- if ( function_exists('wp_normalize_path') ) {
121
- return wp_normalize_path($path);
122
- }
123
- $path = str_replace('\\', '/', $path);
124
- $path = preg_replace('|(?<=.)/+|', '/', $path);
125
- if ( substr($path, 1, 1) === ':' ) {
126
- $path = ucfirst($path);
127
- }
128
- return $path;
129
- }
130
-
131
- /**
132
- * Check if the path points to a plugin file.
133
- *
134
- * @param string $absolutePath Normalized path.
135
- * @return bool
136
- */
137
- protected static function isPluginFile($absolutePath) {
138
- //Is the file inside the "plugins" or "mu-plugins" directory?
139
- $pluginDir = self::normalizePath(WP_PLUGIN_DIR);
140
- $muPluginDir = self::normalizePath(WPMU_PLUGIN_DIR);
141
- if ( (strpos($absolutePath, $pluginDir) === 0) || (strpos($absolutePath, $muPluginDir) === 0) ) {
142
- return true;
143
- }
144
-
145
- //Is it a file at all? Caution: is_file() can fail if the parent dir. doesn't have the +x permission set.
146
- if ( !is_file($absolutePath) ) {
147
- return false;
148
- }
149
-
150
- //Does it have a valid plugin header?
151
- //This is a last-ditch check for plugins symlinked from outside the WP root.
152
- if ( function_exists('get_file_data') ) {
153
- $headers = get_file_data($absolutePath, array('Name' => 'Plugin Name'), 'plugin');
154
- return !empty($headers['Name']);
155
- }
156
-
157
- return false;
158
- }
159
-
160
- /**
161
- * Get the name of the theme's directory from a full path to a file inside that directory.
162
- * E.g. "/abc/public_html/wp-content/themes/foo/whatever.php" => "foo".
163
- *
164
- * Note that subdirectories are currently not supported. For example,
165
- * "/xyz/wp-content/themes/my-theme/includes/whatever.php" => NULL.
166
- *
167
- * @param string $absolutePath Normalized path.
168
- * @return string|null Directory name, or NULL if the path doesn't point to a theme.
169
- */
170
- protected static function getThemeDirectoryName($absolutePath) {
171
- if ( is_file($absolutePath) ) {
172
- $absolutePath = dirname($absolutePath);
173
- }
174
-
175
- if ( file_exists($absolutePath . '/style.css') ) {
176
- return basename($absolutePath);
177
- }
178
- return null;
179
- }
180
-
181
- /**
182
- * Get the name of the hosting service that the URL points to.
183
- *
184
- * @param string $metadataUrl
185
- * @return string|null
186
- */
187
- private static function getVcsService($metadataUrl) {
188
- $service = null;
189
-
190
- //Which hosting service does the URL point to?
191
- $host = @parse_url($metadataUrl, PHP_URL_HOST);
192
- $path = @parse_url($metadataUrl, PHP_URL_PATH);
193
- //Check if the path looks like "/user-name/repository".
194
- $usernameRepoRegex = '@^/?([^/]+?)/([^/#?&]+?)/?$@';
195
- if ( preg_match($usernameRepoRegex, $path) ) {
196
- $knownServices = array(
197
- 'github.com' => 'GitHub',
198
- 'bitbucket.org' => 'BitBucket',
199
- 'gitlab.com' => 'GitLab',
200
- );
201
- if ( isset($knownServices[$host]) ) {
202
- $service = $knownServices[$host];
203
- }
204
- }
205
-
206
- return $service;
207
- }
208
-
209
- /**
210
- * Get the latest version of the specified class that has the same major version number
211
- * as this factory class.
212
- *
213
- * @param string $class Partial class name.
214
- * @return string|null Full class name.
215
- */
216
- protected static function getCompatibleClassVersion($class) {
217
- if ( isset(self::$classVersions[$class][self::$latestCompatibleVersion]) ) {
218
- return self::$classVersions[$class][self::$latestCompatibleVersion];
219
- }
220
- return null;
221
- }
222
-
223
- /**
224
- * Get the specific class name for the latest available version of a class.
225
- *
226
- * @param string $class
227
- * @return null|string
228
- */
229
- public static function getLatestClassVersion($class) {
230
- if ( !self::$sorted ) {
231
- self::sortVersions();
232
- }
233
-
234
- if ( isset(self::$classVersions[$class]) ) {
235
- return reset(self::$classVersions[$class]);
236
- } else {
237
- return null;
238
- }
239
- }
240
-
241
- /**
242
- * Sort available class versions in descending order (i.e. newest first).
243
- */
244
- protected static function sortVersions() {
245
- foreach ( self::$classVersions as $class => $versions ) {
246
- uksort($versions, array(__CLASS__, 'compareVersions'));
247
- self::$classVersions[$class] = $versions;
248
- }
249
- self::$sorted = true;
250
- }
251
-
252
- protected static function compareVersions($a, $b) {
253
- return -version_compare($a, $b);
254
- }
255
-
256
- /**
257
- * Register a version of a class.
258
- *
259
- * @access private This method is only for internal use by the library.
260
- *
261
- * @param string $generalClass Class name without version numbers, e.g. 'PluginUpdateChecker'.
262
- * @param string $versionedClass Actual class name, e.g. 'PluginUpdateChecker_1_2'.
263
- * @param string $version Version number, e.g. '1.2'.
264
- */
265
- public static function addVersion($generalClass, $versionedClass, $version) {
266
- if ( empty(self::$myMajorVersion) ) {
267
- $nameParts = explode('_', __CLASS__, 3);
268
- self::$myMajorVersion = substr(ltrim($nameParts[1], 'v'), 0, 1);
269
- }
270
-
271
- //Store the greatest version number that matches our major version.
272
- $components = explode('.', $version);
273
- if ( $components[0] === self::$myMajorVersion ) {
274
-
275
- if (
276
- empty(self::$latestCompatibleVersion)
277
- || version_compare($version, self::$latestCompatibleVersion, '>')
278
- ) {
279
- self::$latestCompatibleVersion = $version;
280
- }
281
-
282
- }
283
-
284
- if ( !isset(self::$classVersions[$generalClass]) ) {
285
- self::$classVersions[$generalClass] = array();
286
- }
287
- self::$classVersions[$generalClass][$version] = $versionedClass;
288
- self::$sorted = false;
289
- }
290
- }
291
-
292
- endif;
admin/plugin-update-checker/Puc/v4p4/Metadata.php DELETED
@@ -1,132 +0,0 @@
1
- <?php
2
- if ( !class_exists('Puc_v4p4_Metadata', false) ):
3
-
4
- /**
5
- * A base container for holding information about updates and plugin metadata.
6
- *
7
- * @author Janis Elsts
8
- * @copyright 2016
9
- * @access public
10
- */
11
- abstract class Puc_v4p4_Metadata {
12
-
13
- /**
14
- * Create an instance of this class from a JSON document.
15
- *
16
- * @abstract
17
- * @param string $json
18
- * @return self
19
- */
20
- public static function fromJson(/** @noinspection PhpUnusedParameterInspection */ $json) {
21
- throw new LogicException('The ' . __METHOD__ . ' method must be implemented by subclasses');
22
- }
23
-
24
- /**
25
- * @param string $json
26
- * @param self $target
27
- * @return bool
28
- */
29
- protected static function createFromJson($json, $target) {
30
- /** @var StdClass $apiResponse */
31
- $apiResponse = json_decode($json);
32
- if ( empty($apiResponse) || !is_object($apiResponse) ){
33
- $errorMessage = "Failed to parse update metadata. Try validating your .json file with http://jsonlint.com/";
34
- do_action('puc_api_error', new WP_Error('puc-invalid-json', $errorMessage));
35
- trigger_error($errorMessage, E_USER_NOTICE);
36
- return false;
37
- }
38
-
39
- $valid = $target->validateMetadata($apiResponse);
40
- if ( is_wp_error($valid) ){
41
- do_action('puc_api_error', $valid);
42
- trigger_error($valid->get_error_message(), E_USER_NOTICE);
43
- return false;
44
- }
45
-
46
- foreach(get_object_vars($apiResponse) as $key => $value){
47
- $target->$key = $value;
48
- }
49
-
50
- return true;
51
- }
52
-
53
- /**
54
- * No validation by default! Subclasses should check that the required fields are present.
55
- *
56
- * @param StdClass $apiResponse
57
- * @return bool|WP_Error
58
- */
59
- protected function validateMetadata(/** @noinspection PhpUnusedParameterInspection */ $apiResponse) {
60
- return true;
61
- }
62
-
63
- /**
64
- * Create a new instance by copying the necessary fields from another object.
65
- *
66
- * @abstract
67
- * @param StdClass|self $object The source object.
68
- * @return self The new copy.
69
- */
70
- public static function fromObject(/** @noinspection PhpUnusedParameterInspection */ $object) {
71
- throw new LogicException('The ' . __METHOD__ . ' method must be implemented by subclasses');
72
- }
73
-
74
- /**
75
- * Create an instance of StdClass that can later be converted back to an
76
- * update or info container. Useful for serialization and caching, as it
77
- * avoids the "incomplete object" problem if the cached value is loaded
78
- * before this class.
79
- *
80
- * @return StdClass
81
- */
82
- public function toStdClass() {
83
- $object = new stdClass();
84
- $this->copyFields($this, $object);
85
- return $object;
86
- }
87
-
88
- /**
89
- * Transform the metadata into the format used by WordPress core.
90
- *
91
- * @return object
92
- */
93
- abstract public function toWpFormat();
94
-
95
- /**
96
- * Copy known fields from one object to another.
97
- *
98
- * @param StdClass|self $from
99
- * @param StdClass|self $to
100
- */
101
- protected function copyFields($from, $to) {
102
- $fields = $this->getFieldNames();
103
-
104
- if ( property_exists($from, 'slug') && !empty($from->slug) ) {
105
- //Let plugins add extra fields without having to create subclasses.
106
- $fields = apply_filters($this->getPrefixedFilter('retain_fields') . '-' . $from->slug, $fields);
107
- }
108
-
109
- foreach ($fields as $field) {
110
- if ( property_exists($from, $field) ) {
111
- $to->$field = $from->$field;
112
- }
113
- }
114
- }
115
-
116
- /**
117
- * @return string[]
118
- */
119
- protected function getFieldNames() {
120
- return array();
121
- }
122
-
123
- /**
124
- * @param string $tag
125
- * @return string
126
- */
127
- protected function getPrefixedFilter($tag) {
128
- return 'puc_' . $tag;
129
- }
130
- }
131
-
132
- endif;
admin/plugin-update-checker/Puc/v4p4/OAuthSignature.php DELETED
@@ -1,88 +0,0 @@
1
- <?php
2
-
3
- if ( !class_exists('Puc_v4p4_OAuthSignature', false) ):
4
-
5
- /**
6
- * A basic signature generator for zero-legged OAuth 1.0.
7
- */
8
- class Puc_v4p4_OAuthSignature {
9
- private $consumerKey = '';
10
- private $consumerSecret = '';
11
-
12
- public function __construct($consumerKey, $consumerSecret) {
13
- $this->consumerKey = $consumerKey;
14
- $this->consumerSecret = $consumerSecret;
15
- }
16
-
17
- /**
18
- * Sign a URL using OAuth 1.0.
19
- *
20
- * @param string $url The URL to be signed. It may contain query parameters.
21
- * @param string $method HTTP method such as "GET", "POST" and so on.
22
- * @return string The signed URL.
23
- */
24
- public function sign($url, $method = 'GET') {
25
- $parameters = array();
26
-
27
- //Parse query parameters.
28
- $query = @parse_url($url, PHP_URL_QUERY);
29
- if ( !empty($query) ) {
30
- parse_str($query, $parsedParams);
31
- if ( is_array($parameters) ) {
32
- $parameters = $parsedParams;
33
- }
34
- //Remove the query string from the URL. We'll replace it later.
35
- $url = substr($url, 0, strpos($url, '?'));
36
- }
37
-
38
- $parameters = array_merge(
39
- $parameters,
40
- array(
41
- 'oauth_consumer_key' => $this->consumerKey,
42
- 'oauth_nonce' => $this->nonce(),
43
- 'oauth_signature_method' => 'HMAC-SHA1',
44
- 'oauth_timestamp' => time(),
45
- 'oauth_version' => '1.0',
46
- )
47
- );
48
- unset($parameters['oauth_signature']);
49
-
50
- //Parameters must be sorted alphabetically before signing.
51
- ksort($parameters);
52
-
53
- //The most complicated part of the request - generating the signature.
54
- //The string to sign contains the HTTP method, the URL path, and all of
55
- //our query parameters. Everything is URL encoded. Then we concatenate
56
- //them with ampersands into a single string to hash.
57
- $encodedVerb = urlencode($method);
58
- $encodedUrl = urlencode($url);
59
- $encodedParams = urlencode(http_build_query($parameters, '', '&'));
60
-
61
- $stringToSign = $encodedVerb . '&' . $encodedUrl . '&' . $encodedParams;
62
-
63
- //Since we only have one OAuth token (the consumer secret) we only have
64
- //to use it as our HMAC key. However, we still have to append an & to it
65
- //as if we were using it with additional tokens.
66
- $secret = urlencode($this->consumerSecret) . '&';
67
-
68
- //The signature is a hash of the consumer key and the base string. Note
69
- //that we have to get the raw output from hash_hmac and base64 encode
70
- //the binary data result.
71
- $parameters['oauth_signature'] = base64_encode(hash_hmac('sha1', $stringToSign, $secret, true));
72
-
73
- return ($url . '?' . http_build_query($parameters));
74
- }
75
-
76
- /**
77
- * Generate a random nonce.
78
- *
79
- * @return string
80
- */
81
- private function nonce() {
82
- $mt = microtime();
83
- $rand = mt_rand();
84
- return md5($mt . '_' . $rand);
85
- }
86
- }
87
-
88
- endif;
admin/plugin-update-checker/Puc/v4p4/Plugin/Info.php DELETED
@@ -1,130 +0,0 @@
1
- <?php
2
- if ( !class_exists('Puc_v4p4_Plugin_Info', false) ):
3
-
4
- /**
5
- * A container class for holding and transforming various plugin metadata.
6
- *
7
- * @author Janis Elsts
8
- * @copyright 2016
9
- * @access public
10
- */
11
- class Puc_v4p4_Plugin_Info extends Puc_v4p4_Metadata {
12
- //Most fields map directly to the contents of the plugin's info.json file.
13
- //See the relevant docs for a description of their meaning.
14
- public $name;
15
- public $slug;
16
- public $version;
17
- public $homepage;
18
- public $sections = array();
19
- public $download_url;
20
-
21
- public $banners;
22
- public $icons = array();
23
- public $translations = array();
24
-
25
- public $author;
26
- public $author_homepage;
27
-
28
- public $requires;
29
- public $tested;
30
- public $upgrade_notice;
31
-
32
- public $rating;
33
- public $num_ratings;
34
- public $downloaded;
35
- public $active_installs;
36
- public $last_updated;
37
-
38
- public $id = 0; //The native WP.org API returns numeric plugin IDs, but they're not used for anything.
39
-
40
- public $filename; //Plugin filename relative to the plugins directory.
41
-
42
- /**
43
- * Create a new instance of Plugin Info from JSON-encoded plugin info
44
- * returned by an external update API.
45
- *
46
- * @param string $json Valid JSON string representing plugin info.
47
- * @return self|null New instance of Plugin Info, or NULL on error.
48
- */
49
- public static function fromJson($json){
50
- $instance = new self();
51
-
52
- if ( !parent::createFromJson($json, $instance) ) {
53
- return null;
54
- }
55
-
56
- //json_decode decodes assoc. arrays as objects. We want them as arrays.
57
- $instance->sections = (array)$instance->sections;
58
- $instance->icons = (array)$instance->icons;
59
-
60
- return $instance;
61
- }
62
-
63
- /**
64
- * Very, very basic validation.
65
- *
66
- * @param StdClass $apiResponse
67
- * @return bool|WP_Error
68
- */
69
- protected function validateMetadata($apiResponse) {
70
- if (
71
- !isset($apiResponse->name, $apiResponse->version)
72
- || empty($apiResponse->name)
73
- || empty($apiResponse->version)
74
- ) {
75
- return new WP_Error(
76
- 'puc-invalid-metadata',
77
- "The plugin metadata file does not contain the required 'name' and/or 'version' keys."
78
- );
79
- }
80
- return true;
81
- }
82
-
83
-
84
- /**
85
- * Transform plugin info into the format used by the native WordPress.org API
86
- *
87
- * @return object
88
- */
89
- public function toWpFormat(){
90
- $info = new stdClass;
91
-
92
- //The custom update API is built so that many fields have the same name and format
93
- //as those returned by the native WordPress.org API. These can be assigned directly.
94
- $sameFormat = array(
95
- 'name', 'slug', 'version', 'requires', 'tested', 'rating', 'upgrade_notice',
96
- 'num_ratings', 'downloaded', 'active_installs', 'homepage', 'last_updated',
97
- );
98
- foreach($sameFormat as $field){
99
- if ( isset($this->$field) ) {
100
- $info->$field = $this->$field;
101
- } else {
102
- $info->$field = null;
103
- }
104
- }
105
-
106
- //Other fields need to be renamed and/or transformed.
107
- $info->download_link = $this->download_url;
108
- $info->author = $this->getFormattedAuthor();
109
- $info->sections = array_merge(array('description' => ''), $this->sections);
110
-
111
- if ( !empty($this->banners) ) {
112
- //WP expects an array with two keys: "high" and "low". Both are optional.
113
- //Docs: https://wordpress.org/plugins/about/faq/#banners
114
- $info->banners = is_object($this->banners) ? get_object_vars($this->banners) : $this->banners;
115
- $info->banners = array_intersect_key($info->banners, array('high' => true, 'low' => true));
116
- }
117
-
118
- return $info;
119
- }
120
-
121
- protected function getFormattedAuthor() {
122
- if ( !empty($this->author_homepage) ){
123
- /** @noinspection HtmlUnknownTarget */
124
- return sprintf('<a href="%s">%s</a>', $this->author_homepage, $this->author);
125
- }
126
- return $this->author;
127
- }
128
- }
129
-
130
- endif;
admin/plugin-update-checker/Puc/v4p4/Plugin/Update.php DELETED
@@ -1,110 +0,0 @@
1
- <?php
2
- if ( !class_exists('Puc_v4p4_Plugin_Update', false) ):
3
-
4
- /**
5
- * A simple container class for holding information about an available update.
6
- *
7
- * @author Janis Elsts
8
- * @copyright 2016
9
- * @access public
10
- */
11
- class Puc_v4p4_Plugin_Update extends Puc_v4p4_Update {
12
- public $id = 0;
13
- public $homepage;
14
- public $upgrade_notice;
15
- public $tested;
16
- public $icons = array();
17
- public $filename; //Plugin filename relative to the plugins directory.
18
-
19
- protected static $extraFields = array(
20
- 'id', 'homepage', 'tested', 'upgrade_notice', 'icons', 'filename',
21
- );
22
-
23
- /**
24
- * Create a new instance of PluginUpdate from its JSON-encoded representation.
25
- *
26
- * @param string $json
27
- * @return Puc_v4p4_Plugin_Update|null
28
- */
29
- public static function fromJson($json){
30
- //Since update-related information is simply a subset of the full plugin info,
31
- //we can parse the update JSON as if it was a plugin info string, then copy over
32
- //the parts that we care about.
33
- $pluginInfo = Puc_v4p4_Plugin_Info::fromJson($json);
34
- if ( $pluginInfo !== null ) {
35
- return self::fromPluginInfo($pluginInfo);
36
- } else {
37
- return null;
38
- }
39
- }
40
-
41
- /**
42
- * Create a new instance of PluginUpdate based on an instance of PluginInfo.
43
- * Basically, this just copies a subset of fields from one object to another.
44
- *
45
- * @param Puc_v4p4_Plugin_Info $info
46
- * @return Puc_v4p4_Plugin_Update
47
- */
48
- public static function fromPluginInfo($info){
49
- return self::fromObject($info);
50
- }
51
-
52
- /**
53
- * Create a new instance by copying the necessary fields from another object.
54
- *
55
- * @param StdClass|Puc_v4p4_Plugin_Info|Puc_v4p4_Plugin_Update $object The source object.
56
- * @return Puc_v4p4_Plugin_Update The new copy.
57
- */
58
- public static function fromObject($object) {
59
- $update = new self();
60
- $update->copyFields($object, $update);
61
- return $update;
62
- }
63
-
64
- /**
65
- * @return string[]
66
- */
67
- protected function getFieldNames() {
68
- return array_merge(parent::getFieldNames(), self::$extraFields);
69
- }
70
-
71
- /**
72
- * Transform the update into the format used by WordPress native plugin API.
73
- *
74
- * @return object
75
- */
76
- public function toWpFormat() {
77
- $update = parent::toWpFormat();
78
-
79
- $update->id = $this->id;
80
- $update->url = $this->homepage;
81
- $update->tested = $this->tested;
82
- $update->plugin = $this->filename;
83
-
84
- if ( !empty($this->upgrade_notice) ) {
85
- $update->upgrade_notice = $this->upgrade_notice;
86
- }
87
-
88
- if ( !empty($this->icons) && is_array($this->icons) ) {
89
- //This should be an array with up to 4 keys: 'svg', '1x', '2x' and 'default'.
90
- //Docs: https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/#plugin-icons
91
- $icons = array_intersect_key(
92
- $this->icons,
93
- array('svg' => true, '1x' => true, '2x' => true, 'default' => true)
94
- );
95
- if ( !empty($icons) ) {
96
- $update->icons = $icons;
97
-
98
- //It appears that the 'default' icon isn't used anywhere in WordPress 4.9,
99
- //but lets set it just in case a future release needs it.
100
- if ( !isset($update->icons['default']) ) {
101
- $update->icons['default'] = current($update->icons);
102
- }
103
- }
104
- }
105
-
106
- return $update;
107
- }
108
- }
109
-
110
- endif;
admin/plugin-update-checker/Puc/v4p4/Plugin/UpdateChecker.php DELETED
@@ -1,740 +0,0 @@
1
- <?php
2
- if ( !class_exists('Puc_v4p4_Plugin_UpdateChecker', false) ):
3
-
4
- /**
5
- * A custom plugin update checker.
6
- *
7
- * @author Janis Elsts
8
- * @copyright 2016
9
- * @access public
10
- */
11
- class Puc_v4p4_Plugin_UpdateChecker extends Puc_v4p4_UpdateChecker {
12
- protected $updateTransient = 'update_plugins';
13
- protected $translationType = 'plugin';
14
-
15
- public $pluginAbsolutePath = ''; //Full path of the main plugin file.
16
- public $pluginFile = ''; //Plugin filename relative to the plugins directory. Many WP APIs use this to identify plugins.
17
- public $muPluginFile = ''; //For MU plugins, the plugin filename relative to the mu-plugins directory.
18
-
19
- private $cachedInstalledVersion = null;
20
- private $manualCheckErrorTransient = '';
21
-
22
- /**
23
- * Class constructor.
24
- *
25
- * @param string $metadataUrl The URL of the plugin's metadata file.
26
- * @param string $pluginFile Fully qualified path to the main plugin file.
27
- * @param string $slug The plugin's 'slug'. If not specified, the filename part of $pluginFile sans '.php' will be used as the slug.
28
- * @param integer $checkPeriod How often to check for updates (in hours). Defaults to checking every 12 hours. Set to 0 to disable automatic update checks.
29
- * @param string $optionName Where to store book-keeping info about update checks. Defaults to 'external_updates-$slug'.
30
- * @param string $muPluginFile Optional. The plugin filename relative to the mu-plugins directory.
31
- */
32
- public function __construct($metadataUrl, $pluginFile, $slug = '', $checkPeriod = 12, $optionName = '', $muPluginFile = ''){
33
- $this->pluginAbsolutePath = $pluginFile;
34
- $this->pluginFile = plugin_basename($this->pluginAbsolutePath);
35
- $this->muPluginFile = $muPluginFile;
36
-
37
- //If no slug is specified, use the name of the main plugin file as the slug.
38
- //For example, 'my-cool-plugin/cool-plugin.php' becomes 'cool-plugin'.
39
- if ( empty($slug) ){
40
- $slug = basename($this->pluginFile, '.php');
41
- }
42
-
43
- //Plugin slugs must be unique.
44
- $slugCheckFilter = 'puc_is_slug_in_use-' . $this->slug;
45
- $slugUsedBy = apply_filters($slugCheckFilter, false);
46
- if ( $slugUsedBy ) {
47
- $this->triggerError(sprintf(
48
- 'Plugin slug "%s" is already in use by %s. Slugs must be unique.',
49
- htmlentities($this->slug),
50
- htmlentities($slugUsedBy)
51
- ), E_USER_ERROR);
52
- }
53
- add_filter($slugCheckFilter, array($this, 'getAbsolutePath'));
54
-
55
- //Backwards compatibility: If the plugin is a mu-plugin but no $muPluginFile is specified, assume
56
- //it's the same as $pluginFile given that it's not in a subdirectory (WP only looks in the base dir).
57
- if ( (strpbrk($this->pluginFile, '/\\') === false) && $this->isUnknownMuPlugin() ) {
58
- $this->muPluginFile = $this->pluginFile;
59
- }
60
-
61
- //To prevent a crash during plugin uninstallation, remove updater hooks when the user removes the plugin.
62
- //Details: https://github.com/YahnisElsts/plugin-update-checker/issues/138#issuecomment-335590964
63
- add_action('uninstall_' . $this->pluginFile, array($this, 'removeHooks'));
64
-
65
- $this->manualCheckErrorTransient = $this->getUniqueName('manual_check_errors');
66
-
67
- parent