Toolset Types – Custom Post Types, Custom Fields and Taxonomies - Version 1.6.6.5

Version Description

  • Release date: 2015-05-20
  • Fixed problem with Uncaught ReferenceError: pagenow is not defined. http://wp-types.com/forums/topic/nextgen-gallery-broken-urgent/
Download this release

Release Info

Developer iworks
Plugin Icon 128x128 Toolset Types – Custom Post Types, Custom Fields and Taxonomies
Version 1.6.6.5
Comparing to
See all releases

Code changes from version 1.6.6.3 to 1.6.6.5

Files changed (107) hide show
  1. admin.php +1 -1
  2. classes/class.wpcf-marketing-messages.php +1 -1
  3. classes/class.wpcf-marketing-tutorial.php +1 -1
  4. classes/class.wpcf-marketing.php +1 -1
  5. embedded/admin.php +1 -1
  6. embedded/bootstrap.php +4 -4
  7. embedded/classes/class.wpcf-post-types.php +1 -1
  8. embedded/classes/field.php +1 -1
  9. embedded/classes/fields.php +1 -1
  10. embedded/classes/forms.php +1 -1
  11. embedded/classes/loader.php +1 -1
  12. embedded/classes/path.php +1 -1
  13. embedded/classes/post-types/messages.php +1 -1
  14. embedded/classes/relationship.php +1 -1
  15. embedded/common/classes/class-toolset-admin-bar-menu.php +687 -0
  16. embedded/common/classes/class.toolset.promo.php +1 -1
  17. embedded/common/classes/forms.php +9 -4
  18. embedded/common/debug/debug-information.php +1 -1
  19. embedded/common/debug/functions_debug_information.php +1 -1
  20. embedded/common/res/css/toolset-common.css +12 -1
  21. embedded/common/res/css/toolset-promotion.css +16 -7
  22. embedded/common/res/images/toolset.promotion/icons.png +0 -0
  23. embedded/common/res/images/toolset.promotion/toolset.png +0 -0
  24. embedded/common/toolset-forms/api.php +1 -1
  25. embedded/common/toolset-forms/bootstrap.php +3 -9
  26. embedded/common/toolset-forms/classes/class.audio.php +1 -1
  27. embedded/common/toolset-forms/classes/class.checkbox.php +1 -1
  28. embedded/common/toolset-forms/classes/class.checkboxes.php +1 -1
  29. embedded/common/toolset-forms/classes/class.colorpicker.php +1 -1
  30. embedded/common/toolset-forms/classes/class.credaudio.php +1 -1
  31. embedded/common/toolset-forms/classes/class.credfile.php +1 -1
  32. embedded/common/toolset-forms/classes/class.credimage.php +1 -1
  33. embedded/common/toolset-forms/classes/class.credvideo.php +1 -1
  34. embedded/common/toolset-forms/classes/class.eforms.php +1 -1
  35. embedded/common/toolset-forms/classes/class.field_factory.php +1 -1
  36. embedded/common/toolset-forms/classes/class.fieldconfig.php +1 -1
  37. embedded/common/toolset-forms/classes/class.file.php +34 -110
  38. embedded/common/toolset-forms/classes/class.form_factory.php +1 -1
  39. embedded/common/toolset-forms/classes/class.image.php +1 -1
  40. embedded/common/toolset-forms/classes/class.radios.php +1 -1
  41. embedded/common/toolset-forms/classes/class.repetitive.php +1 -1
  42. embedded/common/toolset-forms/classes/class.select.php +1 -1
  43. embedded/common/toolset-forms/classes/class.skype.php +1 -1
  44. embedded/common/toolset-forms/classes/class.submit.php +1 -1
  45. embedded/common/toolset-forms/classes/class.taxonomy.php +1 -1
  46. embedded/common/toolset-forms/classes/class.taxonomyhierarchical.php +5 -4
  47. embedded/common/toolset-forms/classes/class.textarea.php +1 -1
  48. embedded/common/toolset-forms/classes/class.textfield.php +1 -1
  49. embedded/common/toolset-forms/classes/class.types.php +1 -1
  50. embedded/common/toolset-forms/classes/class.video.php +1 -1
  51. embedded/common/toolset-forms/classes/class.wysiwyg.php +1 -1
  52. embedded/common/toolset-forms/css/wpt-toolset-frontend.css +11 -0
  53. embedded/common/toolset-forms/js/conditional.js +1 -1
  54. embedded/common/toolset-forms/js/file-wp35.js +15 -6
  55. embedded/common/toolset-forms/js/repetitive.js +1 -1
  56. embedded/common/toolset-forms/js/validation.js +1 -1
  57. embedded/common/toolset-forms/templates/metaform-item.php +1 -1
  58. embedded/common/toolset-forms/templates/metaform.php +1 -1
  59. embedded/common/utility/js/utils.js +23 -1
  60. embedded/common/visual-editor/editor-addon-generic.class.php +59 -21
  61. embedded/common/visual-editor/editor-addon.class.php +28 -7
  62. embedded/common/visual-editor/res/js/icl_editor_addon_plugin.js +62 -52
  63. embedded/frontend.php +1 -1
  64. embedded/functions.php +1 -1
  65. embedded/includes/custom-types.php +1 -1
  66. embedded/includes/fields-post.php +1 -1
  67. embedded/includes/fields/audio.php +1 -1
  68. embedded/includes/fields/checkbox.php +1 -1
  69. embedded/includes/fields/file.php +1 -1
  70. embedded/includes/fields/image.php +1 -1
  71. embedded/includes/fields/skype.php +1 -1
  72. embedded/includes/fields/textarea.php +1 -1
  73. embedded/includes/fields/video.php +1 -1
  74. embedded/includes/import-export.php +1 -1
  75. embedded/includes/module-manager.php +15 -3
  76. embedded/includes/post-relationship.php +1 -1
  77. embedded/includes/wpml.php +1 -1
  78. embedded/plugin.php +6 -6
  79. embedded/readme.txt +5 -5
  80. embedded/resources/css/dashicons.css +1 -1
  81. embedded/resources/js/basic.js +1 -1
  82. embedded/resources/js/fields-form.js +1 -1
  83. embedded/usermeta-init.php +1 -1
  84. help.php +1 -1
  85. includes/common-functions.php +1 -1
  86. includes/custom-taxonomies-form.php +1 -1
  87. includes/custom-types-form.php +1 -1
  88. includes/fields-control.php +1 -1
  89. includes/fields-form.php +1 -1
  90. includes/fields-list.php +1 -1
  91. includes/fields.php +1 -1
  92. includes/import-export.php +1 -1
  93. includes/migration.php +1 -1
  94. includes/usermeta-control.php +1 -1
  95. includes/usermeta-form.php +1 -1
  96. marketing/helpful-links.php +2 -2
  97. plus/installer/changelog.txt +10 -0
  98. plus/installer/includes/installer.class.php +123 -45
  99. plus/installer/installer.php +1 -1
  100. plus/installer/loader.php +16 -4
  101. plus/installer/locale/orig/installer.po +230 -0
  102. plus/installer/res/js/admin.js +1 -1
  103. plus/types-access.php +1 -1
  104. readme.txt +26 -16
  105. resources/js/basic.js +1 -1
  106. resources/js/custom-types-form.js +1 -1
  107. wpcf.php +7 -7
admin.php CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * Admin functions
5
  *
6
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/admin.php $
7
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
8
  * $LastChangedRevision: 1120400 $
9
  * $LastChangedBy: iworks $
3
  *
4
  * Admin functions
5
  *
6
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/admin.php $
7
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
8
  * $LastChangedRevision: 1120400 $
9
  * $LastChangedBy: iworks $
classes/class.wpcf-marketing-messages.php CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * Types Marketing Class
5
  *
6
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/classes/class.wpcf-marketing-messages.php $
7
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
8
  * $LastChangedRevision: 1120400 $
9
  * $LastChangedBy: iworks $
3
  *
4
  * Types Marketing Class
5
  *
6
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/classes/class.wpcf-marketing-messages.php $
7
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
8
  * $LastChangedRevision: 1120400 $
9
  * $LastChangedBy: iworks $
classes/class.wpcf-marketing-tutorial.php CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * Types Tutorial Class
5
  *
6
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/classes/class.wpcf-marketing-tutorial.php $
7
  * $LastChangedDate: 2015-02-18 14:28:53 +0000 (Wed, 18 Feb 2015) $
8
  * $LastChangedRevision: 1093394 $
9
  * $LastChangedBy: iworks $
3
  *
4
  * Types Tutorial Class
5
  *
6
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/classes/class.wpcf-marketing-tutorial.php $
7
  * $LastChangedDate: 2015-02-18 14:28:53 +0000 (Wed, 18 Feb 2015) $
8
  * $LastChangedRevision: 1093394 $
9
  * $LastChangedBy: iworks $
classes/class.wpcf-marketing.php CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * Types Marketing Class
5
  *
6
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/classes/class.wpcf-marketing.php $
7
  * $LastChangedDate: 2015-02-18 14:28:53 +0000 (Wed, 18 Feb 2015) $
8
  * $LastChangedRevision: 1093394 $
9
  * $LastChangedBy: iworks $
3
  *
4
  * Types Marketing Class
5
  *
6
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/classes/class.wpcf-marketing.php $
7
  * $LastChangedDate: 2015-02-18 14:28:53 +0000 (Wed, 18 Feb 2015) $
8
  * $LastChangedRevision: 1093394 $
9
  * $LastChangedBy: iworks $
embedded/admin.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/admin.php $
5
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
6
  * $LastChangedRevision: 1125405 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/admin.php $
5
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
6
  * $LastChangedRevision: 1125405 $
7
  * $LastChangedBy: iworks $
embedded/bootstrap.php CHANGED
@@ -7,9 +7,9 @@
7
  *
8
  * @since Types 1.2
9
  *
10
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/bootstrap.php $
11
- * $LastChangedDate: 2015-04-27 10:19:57 +0000 (Mon, 27 Apr 2015) $
12
- * $LastChangedRevision: 1146882 $
13
  * $LastChangedBy: iworks $
14
  *
15
  */
@@ -138,7 +138,7 @@ function wpcf_embedded_init() {
138
  // Define necessary constants if plugin is not present
139
  // This ones are skipped if used as embedded code!
140
  if ( !defined( 'WPCF_VERSION' ) ) {
141
- define( 'WPCF_VERSION', '1.6.6.3' );
142
  define( 'WPCF_META_PREFIX', 'wpcf-' );
143
  }
144
 
7
  *
8
  * @since Types 1.2
9
  *
10
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/bootstrap.php $
11
+ * $LastChangedDate: 2015-05-20 11:41:05 +0000 (Wed, 20 May 2015) $
12
+ * $LastChangedRevision: 1164110 $
13
  * $LastChangedBy: iworks $
14
  *
15
  */
138
  // Define necessary constants if plugin is not present
139
  // This ones are skipped if used as embedded code!
140
  if ( !defined( 'WPCF_VERSION' ) ) {
141
+ define( 'WPCF_VERSION', '1.6.6.5' );
142
  define( 'WPCF_META_PREFIX', 'wpcf-' );
143
  }
144
 
embedded/classes/class.wpcf-post-types.php CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * Post Types Class
5
  *
6
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/classes/class.wpcf-post-types.php $
7
  * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
8
  * $LastChangedRevision: 1113864 $
9
  * $LastChangedBy: iworks $
3
  *
4
  * Post Types Class
5
  *
6
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/classes/class.wpcf-post-types.php $
7
  * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
8
  * $LastChangedRevision: 1113864 $
9
  * $LastChangedBy: iworks $
embedded/classes/field.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Field class.
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/classes/field.php $
6
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
7
  * $LastChangedRevision: 1125405 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Field class.
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/classes/field.php $
6
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
7
  * $LastChangedRevision: 1125405 $
8
  * $LastChangedBy: iworks $
embedded/classes/fields.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Fields class.
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/classes/fields.php $
6
  * $LastChangedDate: 2014-05-07 06:56:23 +0000 (Wed, 07 May 2014) $
7
  * $LastChangedRevision: 909470 $
8
  * $LastChangedBy: iworks $
2
  /**
3
  * Fields class.
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/classes/fields.php $
6
  * $LastChangedDate: 2014-05-07 06:56:23 +0000 (Wed, 07 May 2014) $
7
  * $LastChangedRevision: 909470 $
8
  * $LastChangedBy: iworks $
embedded/classes/forms.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Returns HTML formatted output for elements and handles form submission.
6
  *
7
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/classes/forms.php $
8
  * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
9
  * $LastChangedRevision: 1113864 $
10
  * $LastChangedBy: iworks $
4
  *
5
  * Returns HTML formatted output for elements and handles form submission.
6
  *
7
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/classes/forms.php $
8
  * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
9
  * $LastChangedRevision: 1113864 $
10
  * $LastChangedBy: iworks $
embedded/classes/loader.php CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * Loader class
5
  *
6
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/classes/loader.php $
7
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
8
  * $LastChangedRevision: 1120400 $
9
  * $LastChangedBy: iworks $
3
  *
4
  * Loader class
5
  *
6
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/classes/loader.php $
7
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
8
  * $LastChangedRevision: 1120400 $
9
  * $LastChangedBy: iworks $
embedded/classes/path.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * WPCF_Path
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/classes/path.php $
6
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
7
  * $LastChangedRevision: 1027712 $
8
  * $LastChangedBy: iworks $
2
  /**
3
  * WPCF_Path
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/classes/path.php $
6
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
7
  * $LastChangedRevision: 1027712 $
8
  * $LastChangedBy: iworks $
embedded/classes/post-types/messages.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Messages.
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/classes/post-types/messages.php $
6
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
7
  * $LastChangedRevision: 1027712 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Messages.
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/classes/post-types/messages.php $
6
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
7
  * $LastChangedRevision: 1027712 $
8
  * $LastChangedBy: iworks $
embedded/classes/relationship.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Post relationship class.
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/classes/relationship.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Post relationship class.
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/classes/relationship.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
embedded/common/classes/class-toolset-admin-bar-menu.php ADDED
@@ -0,0 +1,687 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! class_exists( 'Toolset_Admin_Bar_Menu' ) ) {
4
+
5
+ class Toolset_Admin_Bar_Menu {
6
+
7
+ // singleton
8
+ private static $instance;
9
+
10
+ /**
11
+ * Avoid executing more than once the code
12
+ * @var type bool
13
+ */
14
+ private $done;
15
+
16
+ private function __construct() {
17
+ $this->done = false;
18
+
19
+ add_action( 'admin_bar_menu', array( $this, 'admin_bar_menu' ), 99 );
20
+
21
+ if ( is_admin() ) {
22
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) );
23
+ } else {
24
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
25
+ }
26
+ }
27
+
28
+ public static function get_instance() {
29
+ if ( ! self::$instance ) {
30
+ self::$instance = new Toolset_Admin_Bar_Menu();
31
+ }
32
+
33
+ return self::$instance;
34
+ }
35
+
36
+ public function enqueue_styles() {
37
+
38
+ if( ! is_admin_bar_showing() ) {
39
+ return;
40
+ }
41
+
42
+ if ( $this->is_layouts_available() ) {
43
+
44
+ // Check also @WPDD_Layouts::enqueue_toolset_common_styles()
45
+ global $wpddlayout;
46
+ $wpddlayout->enqueue_styles( array( 'toolset-common' ) );
47
+
48
+ } else if ( $this->is_views_available() ) {
49
+
50
+ wp_enqueue_style( 'onthegosystems-icons', WPV_URL_EMBEDDED . '/common/res/css/toolset-common.css', array(), WPV_VERSION );
51
+ wp_enqueue_style( 'toolset-common', WPV_URL_EMBEDDED . '/onthego-resources/onthegosystems-icons/css/onthegosystems-icons.css', array( 'onthegosystems-icons' ), WPV_VERSION );
52
+
53
+ }
54
+ }
55
+
56
+ /**
57
+ * @see action admin_bar_menu
58
+ */
59
+ public function admin_bar_menu( $wp_admin_bar ) {
60
+ // Check this haven't called more than once
61
+ if ( $this->done ) {
62
+ return;
63
+ }
64
+
65
+ if ( $this->get_default_plugin() && $this->has_capatibilities() && $this->is_assignable() ) {
66
+
67
+ //
68
+ // We create a Toolset menu and a child submenu.
69
+ // Clicking the parent achieves the same result than clicking the child
70
+ // Maybe we add extra menu options in the future
71
+ //
72
+ // (Icon) Design with Toolset < $href >
73
+ // |
74
+ // +- $title < $href >
75
+ //
76
+
77
+ $menu_data = $this->get_menu_data();
78
+ if ( empty( $menu_data ) ) {
79
+ // If no menu is available, then don't render menu
80
+ return;
81
+ }
82
+ list( $title, $href ) = $menu_data;
83
+
84
+ $args = array(
85
+ 'id' => 'toolset_admin_bar_menu',
86
+ 'title' => __( 'Design with Toolset', 'toolset' ),
87
+ 'href' => $href,
88
+ 'meta' => array( 'class' => 'toolset-edit-link' )
89
+ );
90
+ $wp_admin_bar->add_node( $args );
91
+
92
+ $args = array(
93
+ 'parent' => 'toolset_admin_bar_menu',
94
+ 'id' => 'toolset_design_this_item',
95
+ 'title' => $title,
96
+ 'href' => $href,
97
+ );
98
+ $wp_admin_bar->add_node( $args );
99
+
100
+ $this->done = true;
101
+ }
102
+ }
103
+
104
+ /**
105
+ * User is admin or similar?
106
+ * @return boolean
107
+ */
108
+ private function has_capatibilities() {
109
+ $manage_options = current_user_can( 'manage_options' );
110
+
111
+ $has_layouts = $this->is_layouts_available();
112
+
113
+ $has_views = $this->is_views_available();
114
+
115
+ return $manage_options && ( $has_layouts || $has_views );
116
+ }
117
+
118
+ /**
119
+ * Can you assign what you are seeing right now to a Layout, Content Template or WordPress Archive?
120
+ * @return boolean
121
+ */
122
+ private function is_assignable() {
123
+
124
+ $context = $this->get_context();
125
+ if ( ! $context ) { return false; }
126
+ list( $type, $class ) = explode( '|', $context );
127
+
128
+ if ( is_admin() ) {
129
+
130
+ global $post_type;
131
+ $screen = get_current_screen();
132
+ if( preg_match( '/^(edit|edit-tags|post)$/', $screen->base ) && empty($screen->action) ) {
133
+
134
+ if( 'edit' === $screen->base ) {
135
+
136
+ // $post_type | archive
137
+
138
+ if ( 'page' === $post_type ) {
139
+ return false;
140
+ }
141
+
142
+ $post_type_object = get_post_type_object( $screen->post_type );
143
+ if ( ! ( $post_type_object->publicly_queryable && $post_type_object->has_archive ) ) {
144
+ return false;
145
+ }
146
+
147
+ } else if( 'edit-tags' === $screen->base ) {
148
+
149
+ // $taxonomy | archive
150
+
151
+ $taxonomy = get_taxonomy( $screen->taxonomy );
152
+ if ( !( $taxonomy->public ) ) {
153
+ return false;
154
+ }
155
+
156
+ } else if( 'post' === $screen->base ) {
157
+
158
+ // $post_type | page
159
+
160
+ $post_type_object = get_post_type_object( $screen->post_type );
161
+ if ( ! $post_type_object->publicly_queryable ) {
162
+ return false;
163
+ }
164
+
165
+ }
166
+
167
+ }
168
+
169
+ } else {
170
+
171
+ // Backend
172
+ if( 'page' === $class && '404' === $type ) {
173
+
174
+ return $this->is_layouts_available() && ( WPDD_Layouts_Users_Profiles::user_can_create() && WPDD_Layouts_Users_Profiles::user_can_assign() || WPDD_Layouts_Users_Profiles::user_can_edit() );
175
+
176
+ } else if ( 'page' === $class ) {
177
+
178
+ $post_type_object = get_post_type_object( $type );
179
+ $is_cpt = $post_type_object != null;
180
+ if( ! $is_cpt || ! $post_type_object->publicly_queryable ) {
181
+ return false;
182
+ }
183
+
184
+ } else if ( 'archive' === $class && preg_match( '/^(home-blog|search|author|year|month|day)$/', $type ) ) {
185
+ // DO NOTHING
186
+ } else if ( 'archive' === $class && 'page' === $type ) {
187
+ return false;
188
+ } else if ( 'archive' === $class ) {
189
+
190
+ $taxonomy = get_taxonomy( $type );
191
+ $is_tax = $taxonomy !== false;
192
+ if ( $is_tax && ! $taxonomy->public ) {
193
+ return false;
194
+ }
195
+
196
+ $post_type_object = get_post_type_object( $type );
197
+ $is_cpt = $post_type_object != null;
198
+ if( $is_cpt && ( ! $post_type_object->publicly_queryable || ! $post_type_object->has_archive ) ) {
199
+ return false;
200
+ }
201
+
202
+ }
203
+
204
+ }
205
+
206
+ return true;
207
+ }
208
+
209
+ private function is_layouts_available() {
210
+ global $wpddlayout;
211
+
212
+ // class WPDDL_Admin_Pages exists only in full version
213
+ return class_exists( 'WPDDL_Admin_Pages' ) && isset( $wpddlayout ) && is_object( $wpddlayout );
214
+ }
215
+
216
+ private function is_views_available() {
217
+ global $WP_Views;
218
+
219
+ // class WP_Views_plugin exists only in full version
220
+ return class_exists( 'WP_Views_plugin' ) && isset( $WP_Views ) && is_object( $WP_Views );
221
+ }
222
+
223
+ /**
224
+ * Get the best plugin available
225
+ * @return string (layouts|views|)
226
+ */
227
+ private function get_default_plugin() {
228
+ // Layouts always has precedence
229
+ if ( $this->is_layouts_available() ) {
230
+ return 'layouts';
231
+ } else if ( $this->is_views_available() ) {
232
+ return 'views';
233
+ } else {
234
+ // Other toolset plugins may be present
235
+ return null;
236
+ }
237
+ }
238
+
239
+ /**
240
+ * Finds the right action depending on what you're seeing and have done
241
+ * @returns array ($title, $href) or null (do not show menu)
242
+ */
243
+ private function get_menu_data() {
244
+
245
+ $context = $this->get_context();
246
+ if ( ! $context ) {
247
+ // No context => No menu
248
+ return null;
249
+ }
250
+
251
+ // Get type {post types, taxonomies, wordpress archives slugs, 404} and class {page, archive}
252
+ list( $type, $class ) = explode( '|', $context );
253
+
254
+ // We are using the best plugin available by default, unless state otherwise below
255
+ $plugin_used = $this->get_default_plugin();
256
+
257
+ $layout_id = 0;
258
+ $ct_id = 0;
259
+ $wpa_id = 0;
260
+ $post_id = 0;
261
+ $edit_link = null;
262
+
263
+ $is_new = true;
264
+ // warning! syntax sugar ahead
265
+
266
+ // Layouts - Edit Link
267
+ if ( $is_new && $this->is_layouts_available() && WPDD_Layouts_Users_Profiles::user_can_edit() ) {
268
+
269
+ global $wpddlayout;
270
+
271
+ if( is_admin() ) {
272
+
273
+ // Only individual pages, post type pages, post type archives
274
+ // and taxonomy archives are editable from backend
275
+ //
276
+
277
+ $screen = get_current_screen();
278
+ if( preg_match( '/^(edit|edit-tags|post)$/', $screen->base ) ) {
279
+ // Exists layout? $layout_id?
280
+
281
+ if( 'edit' === $screen->base ) {
282
+ // $post_type | archive
283
+
284
+ $post_type_object = get_post_type_object( $screen->post_type );
285
+ $option_type_name = WPDD_layout_post_loop_cell_manager::OPTION_TYPES_PREFIX . $post_type_object->name;
286
+ if ( $post_type_object && property_exists( $post_type_object, 'public' ) && $post_type_object->public && $wpddlayout->layout_post_loop_cell_manager->get_option( $option_type_name ) ) {
287
+ $layout_id = (int) $wpddlayout->layout_post_loop_cell_manager->get_option( $option_type_name );
288
+ }
289
+
290
+ } else if( 'edit-tags' === $screen->base ) {
291
+ // $taxonomy | archive
292
+
293
+ $option_type_name = WPDD_layout_post_loop_cell_manager::OPTION_TAXONOMY_PREFIX . $screen->taxonomy;
294
+ if ( $wpddlayout->layout_post_loop_cell_manager->get_option( $option_type_name ) ) {
295
+ $layout_id = (int) $wpddlayout->layout_post_loop_cell_manager->get_option( $option_type_name );
296
+ }
297
+
298
+ } else if( 'post' === $screen->base ) {
299
+ // $post_type | page
300
+
301
+ // Individual
302
+ $layout_slug = get_post_meta( (int) $_GET['post'], WPDDL_LAYOUTS_META_KEY, true );
303
+ if( ! empty( $layout_slug ) ) {
304
+ $layout_id = WPDD_Layouts::get_layout_id_by_slug( $layout_slug );
305
+
306
+ }
307
+
308
+ // Multiple
309
+ if( (int) $layout_id == 0 ) {
310
+ $layout_object = $wpddlayout->post_types_manager->get_layout_to_type_object( $type );
311
+ $layout_id = $layout_object && property_exists( $layout_object, 'layout_id' ) && $layout_object->layout_id > 0
312
+ ? $layout_object->layout_id
313
+ : 0;
314
+ }
315
+
316
+ }
317
+
318
+ }
319
+
320
+ } else if ( (int) $wpddlayout->get_rendered_layout_id() > 0 ) {
321
+
322
+ $layout_id = $wpddlayout->get_rendered_layout_id();
323
+
324
+ }
325
+
326
+ $is_new = $layout_id > 0 ? false : true;
327
+ $plugin_used = ! $is_new ? 'layouts' : $plugin_used;
328
+
329
+ }
330
+
331
+ // Views - Edit Link
332
+ if ( $is_new && $this->is_views_available() ) {
333
+
334
+ global $WPV_settings;
335
+
336
+ if( is_admin() ) {
337
+
338
+ // Same as Layouts
339
+ $screen = get_current_screen();
340
+ if( preg_match( '/^(edit|edit-tags|post)$/', $screen->base ) ) {
341
+ // Exists layout? $layout_id?
342
+
343
+ if( 'edit' === $screen->base ) {
344
+ // $post_type | archive
345
+
346
+ if ( isset( $WPV_settings['view_cpt_' . $type] ) && $WPV_settings['views_template_for_' . $type] > 0 ) {
347
+ $wpa_id = $WPV_settings['view_cpt_' . $type];
348
+ }
349
+
350
+ } else if( 'edit-tags' === $screen->base ) {
351
+ // $taxonomy | archive
352
+
353
+ if ( isset( $WPV_settings['view_taxonomy_loop_' . $type] ) && $WPV_settings['view_taxonomy_loop_' . $type] > 0 ) {
354
+ $wpa_id = $WPV_settings['view_taxonomy_loop_' . $type];
355
+ }
356
+
357
+ } else if( 'post' === $screen->base ) {
358
+ // $post_type | page
359
+
360
+ // Individual
361
+ if ( isset( $_GET['post'] ) && (int) $_GET['post'] > 0 ) {
362
+ $ct_id = (int) get_post_meta( (int) $_GET['post'], '_views_template', true );
363
+ }
364
+
365
+ // Multiple
366
+ if ( (int) $ct_id == 0
367
+ && isset( $WPV_settings['views_template_for_' . $type] )
368
+ && $WPV_settings['views_template_for_' . $type] > 0
369
+ ) {
370
+ $ct_id = $WPV_settings['views_template_for_' . $type];
371
+ }
372
+
373
+ }
374
+
375
+ }
376
+
377
+ if ( ( int ) $wpa_id > 0 || ( int ) $ct_id > 0 ) {
378
+ $is_new = false;
379
+ }
380
+
381
+ } else {
382
+
383
+ if ( 'archive' === $class && 'page' != $type ) {
384
+ /* WordPress Archive */
385
+
386
+ // WordPress Loop Archives
387
+ if( preg_match( '/^(home-blog|search|author|year|month|day)$/', $type )
388
+ && isset( $WPV_settings['view_'.$type.'-page'] )
389
+ && (int) $WPV_settings['view_'.$type.'-page'] > 0
390
+ ) {
391
+ $wpa_id = (int) $WPV_settings['view_'.$type.'-page'];
392
+ }
393
+
394
+ // Taxonomy Archive
395
+ if( ! $wpa_id ) {
396
+ $taxonomy = get_taxonomy( $type );
397
+ $is_tax = $taxonomy !== false;
398
+ if( $is_tax
399
+ && isset( $WPV_settings['view_taxonomy_loop_' . $type] )
400
+ && (int) $WPV_settings['view_taxonomy_loop_' . $type] > 0
401
+ ) {
402
+ $wpa_id = $WPV_settings['view_taxonomy_loop_' . $type];
403
+ }
404
+ }
405
+
406
+ // Post Type Archive
407
+ if( ! $wpa_id ) {
408
+ $post_type_object = get_post_type_object( $type );
409
+ $is_cpt = $post_type_object != null;
410
+ if( $is_cpt && isset( $WPV_settings['view_cpt_' . $type] )
411
+ && $WPV_settings['view_cpt_' . $type] > 0
412
+ ) {
413
+ $wpa_id = $WPV_settings['view_cpt_' . $type];
414
+ }
415
+ }
416
+
417
+ if ( (int) $wpa_id > 0 ) {
418
+ $is_new = false;
419
+ }
420
+
421
+ } else if( 'page' === $class && ! is_404() ) {
422
+ /* Content Template */
423
+
424
+ // Individual
425
+ $ct_id = (int) get_post_meta( get_the_ID(), '_views_template', true );
426
+
427
+ // Multiple
428
+ if( (int) $ct_id == 0 ) {
429
+
430
+ if( isset( $WPV_settings['views_template_for_'.$type] ) && $WPV_settings['views_template_for_'.$type] > 0 ) {
431
+ $ct_id = $WPV_settings['views_template_for_'.$type];
432
+ }
433
+ }
434
+
435
+ if ( (int) $ct_id > 0 ) {
436
+ $is_new = false;
437
+ }
438
+
439
+ }
440
+
441
+ }
442
+
443
+ $plugin_used = ! $is_new ? 'views' : $plugin_used;
444
+
445
+ }
446
+
447
+ // $plugin_used - Create Link
448
+ if ( $is_new ) {
449
+ if( is_admin() ) {
450
+
451
+ $screen = get_current_screen();
452
+ if( $screen->id == 'post' ) {
453
+ $post_id = (int) $_GET['post'];
454
+ }
455
+
456
+ } else {
457
+ $post_id = get_the_ID();
458
+ }
459
+ }
460
+
461
+ $title = $this->get_title ( $plugin_used, $is_new, $type, $class, max( array( $layout_id, $ct_id, $wpa_id, $post_id ) ) );
462
+ $edit_link = $this->get_edit_link( $plugin_used, $is_new, $type, $class, max( array( $layout_id, $ct_id, $wpa_id, $post_id ) ) );
463
+
464
+ if ( $edit_link !== null ) {
465
+ return array( $title, $edit_link );
466
+ } else {
467
+ // No valid data => No menu
468
+ return null;
469
+ }
470
+ }
471
+
472
+ /**
473
+ * Returns an string with the context where the link is going to be display
474
+ * It is going to be like "post_type|archive" or null if link should not be displayed
475
+ * @return string {post_type or archive_type or taxonomy or 404}|{page or archive}
476
+ */
477
+ private function get_context() {
478
+
479
+ // Rule of thumb: if there is a list of posts, it is an archive
480
+
481
+ // null means we will not show the link
482
+ $context = null;
483
+
484
+ if ( is_admin() ) {
485
+
486
+ // There are less places inside the admin to define Layouts/Templates
487
+
488
+ global $post_type;
489
+
490
+ $screen = get_current_screen();
491
+
492
+ if ( $screen->base == 'edit' && $post_type !== 'page' ) {
493
+ // list of posts page => create an archive ( WordPress Archive )
494
+ return "$post_type|archive";
495
+ } else if ( $screen->base == 'post' && empty( $screen->action ) ) {
496
+ // post editor page => create a page ( Content Template )
497
+ return "$post_type|page";
498
+ } else if ( $screen->base == 'edit-tags' ) {
499
+ // taxonomy page => always an archive ( WordPress Archive )
500
+ return "{$screen->taxonomy}|archive";
501
+ }
502
+
503
+
504
+ } else {
505
+
506
+ global $post;
507
+
508
+ if ( is_home() ) {
509
+ // Blog posts index
510
+ $context = 'home-blog|archive';
511
+ } else if ( is_search() ) {
512
+ $context = 'search|archive';
513
+ } else if ( is_author() ) {
514
+ $context = 'author|archive';
515
+ } else if ( is_year() ) {
516
+ $context = 'year|archive';
517
+ } else if ( is_month() ) {
518
+ $context = 'month|archive';
519
+ } else if ( is_day() ) {
520
+ $context = 'day|archive';
521
+ } else if ( is_category() ) {
522
+ $context = 'category|archive';
523
+ } else if ( is_tag() ) {
524
+ $context = 'post_tag|archive';
525
+ } else if ( is_tax() ) {
526
+ $taxonomy = get_taxonomy();
527
+ $context = $taxonomy->name . '|archive';
528
+ } else if ( is_post_type_archive() ) {
529
+ $context = get_post_type() . '|archive';
530
+ } else if ( is_404() ) {
531
+ // Special WordPress Error 404 Page
532
+ $context = '404|page';
533
+ } else if ( is_object( $post ) && get_class( $post ) === 'WP_Post' ) {
534
+ $context = get_post_type() . '|page';
535
+ }
536
+
537
+ }
538
+
539
+ return $context;
540
+ }
541
+
542
+ /**
543
+ * Get title for menu subitem
544
+ * @param string $plugin are we using 'layouts' or 'views'?
545
+ * @param boolean $is_new are we creating a new object?
546
+ * @param string $type post_type, taxonomy or wp slug
547
+ * @param string $class (single) page or archive
548
+ * @param int $post_id must be layout or template id if !$is_new, else post
549
+ * @return string title for menu subitem
550
+ */
551
+ private function get_title( $plugin, $is_new, $type, $class, $post_id = null) {
552
+
553
+ if ( $is_new ) {
554
+ /* Create */
555
+ // "Create a new 'Layout for Restaurant archives'"
556
+ // "Create a new 'Content Template for Restaurants'"
557
+ // "Create a new 'WordPress Archive for Restaurant archives'"
558
+
559
+ $create_a_new = __( 'Create a new', 'toolset' );
560
+ $object = $this->get_name_auto( $plugin, $type, $class, $post_id );
561
+
562
+ return trim( sprintf( '%s %s', $create_a_new, $object ) );
563
+
564
+ } else {
565
+ /* Edit */
566
+ // "Edit 'Restaurants' Layout"
567
+ // "Edit 'Layout for Restaurants' Layout" => "Edit 'Layout for Restaurants'"
568
+ // "Edit 'Layout for Restaurant archives' Layout" => "Edit 'Layout for Restaurant' archives"
569
+
570
+ $edit = __( 'Edit', 'toolset' );
571
+
572
+ // Layout or Content Template or WordPress Archive
573
+ $layouts = __( 'Layout', 'toolset' );
574
+ $views = 'archive' === $class ? __( 'WordPress Archive', 'toolset' ) : __( 'Content Template', 'toolset' );
575
+ $artifact = 'layouts' === $plugin ? $layouts : $views;
576
+
577
+ // avoid "'Layout for Restaurant archives' Layout"
578
+ // get "'Layout for Restaurants'" instead
579
+ $post_title = get_the_title( $post_id );
580
+ $object = strpos( $post_title, $artifact ) === false ? sprintf( '%s %s', $post_title, $artifact ) : $post_title;
581
+
582
+ return trim( sprintf( '%s %s', $edit, $object ) );
583
+
584
+ }
585
+
586
+ }
587
+
588
+ /**
589
+ * Get a valid and self-defining title for a Layout, Content Template or WordPress Archive
590
+ * @param string $plugin layouts or views
591
+ * @param string $type post_type, taxonomy or wp slug
592
+ * @param string $class page or archive
593
+ */
594
+ public function get_name_auto( $plugin, $type, $class, $post_id = null ) {
595
+ // Examples:
596
+ // Layout for Restaurants
597
+ // Layout for Restaurant archives
598
+ // Content Template for Restaurants
599
+ // WordPress Archive for Restaurants
600
+
601
+ /* Layout or Content Template or WordPress Archive */
602
+ $layouts = __( 'Layout', 'toolset' );
603
+ $views = 'archive' === $class ? __( 'WordPress Archive', 'toolset' ) : __( 'Content Template', 'toolset' );
604
+ $artifact = 'layouts' === $plugin ? $layouts : $views;
605
+
606
+ /* for */
607
+ $for = __( 'for', 'toolset' );
608
+
609
+ /* selection */
610
+ $selection = '';
611
+
612
+ if ( 'page' === $class && '404' === $type && 'layouts' === $plugin ) {
613
+ $selection = __( 'Error 404 page', 'toolset' );
614
+ } else if ( 'page' === $type ) {
615
+ $selection = get_the_title( $post_id );
616
+ } else if ( 'page' === $class ) {
617
+ $post_type = get_post_type_object( $type );
618
+ $selection = ucfirst( $post_type->label );
619
+ } else if ( 'archive' === $class && preg_match( '/^(home-blog|search|author|year|month|day)$/', $type ) ) {
620
+ $selection = sprintf( '%s %s', ucfirst( $type ), __( 'archives', 'toolset' ) );
621
+ } else if ( 'archive' === $class && preg_match( '/^(category|post_tag)$/', $type ) ) {
622
+ $taxonomy = get_taxonomy( $type );
623
+ $selection = 'layouts' === $plugin ? sprintf( '%s %s', ucfirst( $taxonomy->labels->singular_name ), __( 'archives', 'toolset' ) ) : ucfirst( $taxonomy->labels->name );
624
+ } else if ( 'archive' === $class ) {
625
+ $post_type = get_post_type_object( $type );
626
+ $is_cpt = $post_type != null;
627
+
628
+ $taxonomy = get_taxonomy( $type );
629
+ $is_tax = $taxonomy !== false;
630
+
631
+ if ( $is_cpt ) {
632
+ $selection = 'layouts' === $plugin ? sprintf( '%s %s', ucfirst( $post_type->labels->singular_name ), __( 'archives', 'toolset' ) ) : ucfirst( $post_type->labels->name );
633
+ } else if ( $is_tax ) {
634
+ $selection = 'layouts' === $plugin ? sprintf( '%s %s', ucfirst( $taxonomy->labels->singular_name ), __( 'archives', 'toolset' ) ) : ucfirst( $taxonomy->labels->name );
635
+ } else {
636
+ $selection = __( 'Unsupported post type archives', 'toolset' );
637
+ }
638
+
639
+ } else {
640
+ $selection = __( 'Unsupported page', 'toolset' );
641
+ }
642
+
643
+ return trim( sprintf( '%s %s %s', $artifact, $for, $selection ) );
644
+ }
645
+
646
+ public function get_edit_link( $plugin, $is_new, $type, $class, $post_id = null ) {
647
+ $edit_link = null;
648
+
649
+ if( 'layouts' === $plugin ) {
650
+
651
+ if( $is_new && WPDD_Layouts_Users_Profiles::user_can_create() && WPDD_Layouts_Users_Profiles::user_can_assign() ) {
652
+ $edit_link = wp_nonce_url( admin_url( sprintf( 'admin.php?page=dd_layouts_create_auto&type=%s&class=%s&post=%s', $type, $class, $post_id ) ), 'create_auto' );
653
+ } else if( $post_id > 0 && WPDD_Layouts_Users_Profiles::user_can_edit() ) {
654
+ // Layouts editor
655
+ $edit_link = admin_url( sprintf( 'admin.php?page=dd_layouts_edit&layout_id=%s&action=edit', $post_id ) );
656
+ }
657
+
658
+ } else if ( 'views' === $plugin && '404' != $type /* No support for Error 404 page */ ) {
659
+
660
+ if ( $is_new ) {
661
+ $edit_link = wp_nonce_url( admin_url( sprintf( 'admin.php?page=views_template_auto&type=%s&class=%s&post=%s', $type, $class, $post_id ) ), 'create_auto' );
662
+ } else if( $post_id > 0 ) {
663
+
664
+ if( 'archive' === $class ) {
665
+ // Views' WordPress Archive editor
666
+ $edit_link = admin_url( sprintf( 'admin.php?page=view-archives-editor&view_id=%s', $post_id ) );
667
+ } else if( 'page' === $class ) {
668
+ // WordPress default editor
669
+ $edit_link = admin_url( sprintf( 'post.php?action=edit&post=%s', $post_id ) );
670
+ }
671
+
672
+ }
673
+ }
674
+
675
+ return $edit_link;
676
+ }
677
+
678
+ }
679
+
680
+ // We have checked if @class Toolset_Admin_Bar_Menu already existed.
681
+ // After that, we've defined the class. Now, we instantiate it once.
682
+ // This works lìke a singleton.
683
+ // But the class itself is also a singleton. Using design patterns
684
+ // clarifies and prevents against changes in future.
685
+ global $toolset_admin_bar_menu;
686
+ $toolset_admin_bar_menu = Toolset_Admin_Bar_Menu::get_instance();
687
+ }
embedded/common/classes/class.toolset.promo.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /**
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/classes/class.toolset.promo.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
2
 
3
  /**
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/classes/class.toolset.promo.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
embedded/common/classes/forms.php CHANGED
@@ -2,9 +2,9 @@
2
  /**
3
  * Returns HTML formatted output for elements and handles form submission.
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/classes/forms.php $
6
- * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
7
- * $LastChangedRevision: 1113864 $
8
  * $LastChangedBy: iworks $
9
  *
10
  * @version 1.0
@@ -368,10 +368,15 @@ if (!class_exists('Enlimbo_Forms_Wpcf')) {
368
  if ( isset( $element['#labelclass'] ) ) {
369
  $labelclass = $element['#labelclass'] . ' ';
370
  }
 
 
 
 
371
  $element['_render']['label'] = isset($element['#title']) ? '<label class="'
372
  . $labelclass
373
  . $this->css_class . '-label ' . $this->css_class . '-'
374
- . $element['#type'] . '-label" for="' . $element['#id'] . '">'
 
375
  . stripslashes($element['#title'])
376
  . '</label>' . "\r\n" : '';
377
  $element['_render']['title'] = $this->_setElementTitle($element);
2
  /**
3
  * Returns HTML formatted output for elements and handles form submission.
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/classes/forms.php $
6
+ * $LastChangedDate: 2015-05-12 12:24:38 +0000 (Tue, 12 May 2015) $
7
+ * $LastChangedRevision: 1158787 $
8
  * $LastChangedBy: iworks $
9
  *
10
  * @version 1.0
368
  if ( isset( $element['#labelclass'] ) ) {
369
  $labelclass = $element['#labelclass'] . ' ';
370
  }
371
+ $labelstyle = '';
372
+ if ( isset( $element['#labelstyle'] ) ) {
373
+ $labelstyle = ' style="' . $element['#labelstyle'] . '" ';
374
+ }
375
  $element['_render']['label'] = isset($element['#title']) ? '<label class="'
376
  . $labelclass
377
  . $this->css_class . '-label ' . $this->css_class . '-'
378
+ . $element['#type'] . '-label" for="' . $element['#id'] . '"'.
379
+ $labelstyle . '>'
380
  . stripslashes($element['#title'])
381
  . '</label>' . "\r\n" : '';
382
  $element['_render']['title'] = $this->_setElementTitle($element);
embedded/common/debug/debug-information.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * produce debug information
5
  *
6
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/debug/debug-information.php $
7
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
8
  * $LastChangedRevision: 1027712 $
9
  * $LastChangedBy: iworks $
3
  /**
4
  * produce debug information
5
  *
6
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/debug/debug-information.php $
7
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
8
  * $LastChangedRevision: 1027712 $
9
  * $LastChangedBy: iworks $
embedded/common/debug/functions_debug_information.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * produce debug information
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/debug/functions_debug_information.php $
6
  * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
7
  * $LastChangedRevision: 1113864 $
8
  * $LastChangedBy: iworks $
2
  /**
3
  * produce debug information
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/debug/functions_debug_information.php $
6
  * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
7
  * $LastChangedRevision: 1113864 $
8
  * $LastChangedBy: iworks $
embedded/common/res/css/toolset-common.css CHANGED
@@ -59,4 +59,15 @@ Toolset Primary Button Style - use with .button.button-primary-toolset classname
59
  /* ----------------------------------------------------------------------------
60
  Generic CSS to be applied anywhere
61
  ---------------------------------------------------------------------------- */
62
- .padding-top-30{padding-top:30px;}
 
 
 
 
 
 
 
 
 
 
 
59
  /* ----------------------------------------------------------------------------
60
  Generic CSS to be applied anywhere
61
  ---------------------------------------------------------------------------- */
62
+ .padding-top-30{padding-top:30px;}
63
+
64
+ /* ----------------------------------------------------------------------------
65
+ Design with Toolset icon
66
+ ---------------------------------------------------------------------------- */
67
+ #wpadminbar ul#wp-admin-bar-root-default> li.toolset-edit-link> a{position:relative;}
68
+ #wpadminbar ul#wp-admin-bar-root-default> li.toolset-edit-link> a:before{
69
+ font-family: "onthegosystems-icons"!important;
70
+ content: "\f11a";
71
+ top:2px;
72
+ }
73
+
embedded/common/res/css/toolset-promotion.css CHANGED
@@ -5,7 +5,7 @@
5
  font-size: 15px;
6
  width: 550px;
7
  background-color: #fff;
8
- padding: 45px 0 42px 0;
9
  position: relative;
10
 
11
  -webkit-box-shadow: 5px 5px 15px 0px rgba(50, 50, 50, 0.38);
@@ -19,7 +19,7 @@
19
  color: #fff;
20
  position: relative;
21
  background-color: #333;
22
- padding: 15px 30px;
23
  font-size: 24px;
24
  line-height: 30px;
25
  font-weight: 300;
@@ -33,6 +33,15 @@
33
  top: 6px;
34
  left: 23px;
35
  font-size: 53px;
 
 
 
 
 
 
 
 
 
36
  }
37
 
38
  .toolset-modal ul:before
@@ -73,7 +82,7 @@
73
  display: table-cell;
74
  font-size: 13px;
75
  font-weight: 700;
76
- height: 52px;
77
  padding: 0 20px 0 38px;
78
  }
79
 
@@ -93,23 +102,23 @@
93
  {
94
  background: transparent url(../images/toolset.promotion/full.jpg) no-repeat;
95
  padding-left: 298px;
96
- min-height: 165px;
97
  font-size: 15px;
98
- margin-bottom: 0;
99
  }
100
 
101
  .toolset-modal .icons
102
  {
103
  border: 1px solid #777;
104
  border-width: 1px 0;
105
- padding-top: 18px;
106
  }
107
 
108
  .toolset-modal .description
109
  {
110
  font-size: 13px;
111
  color: #4d4d4d;
112
- margin: 30px 0;
113
  }
114
 
115
  .toolset-modal em
5
  font-size: 15px;
6
  width: 550px;
7
  background-color: #fff;
8
+ padding: 45px 0 20px 0;
9
  position: relative;
10
 
11
  -webkit-box-shadow: 5px 5px 15px 0px rgba(50, 50, 50, 0.38);
19
  color: #fff;
20
  position: relative;
21
  background-color: #333;
22
+ padding: 10px 30px;
23
  font-size: 24px;
24
  line-height: 30px;
25
  font-weight: 300;
33
  top: 6px;
34
  left: 23px;
35
  font-size: 53px;
36
+ background: transparent url(../images/toolset.promotion/toolset.png) no-repeat 7px 3px;
37
+ width: 55px;
38
+ height: 55px;
39
+ }
40
+
41
+ .toolset-modal .icon-toolset-logo:before
42
+ {
43
+ content: none;
44
+ display: none;
45
  }
46
 
47
  .toolset-modal ul:before
82
  display: table-cell;
83
  font-size: 13px;
84
  font-weight: 700;
85
+ height: 46px;
86
  padding: 0 20px 0 38px;
87
  }
88
 
102
  {
103
  background: transparent url(../images/toolset.promotion/full.jpg) no-repeat;
104
  padding-left: 298px;
105
+ min-height: 160px;
106
  font-size: 15px;
107
+ margin: 10px 0 0 0;
108
  }
109
 
110
  .toolset-modal .icons
111
  {
112
  border: 1px solid #777;
113
  border-width: 1px 0;
114
+ padding-top: 10px;
115
  }
116
 
117
  .toolset-modal .description
118
  {
119
  font-size: 13px;
120
  color: #4d4d4d;
121
+ margin: 10px 0 20px 0;
122
  }
123
 
124
  .toolset-modal em
embedded/common/res/images/toolset.promotion/icons.png CHANGED
Binary file
embedded/common/res/images/toolset.promotion/toolset.png ADDED
Binary file
embedded/common/toolset-forms/api.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /**
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/api.php $
6
  * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
7
  * $LastChangedRevision: 1113864 $
8
  * $LastChangedBy: iworks $
2
 
3
  /**
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/api.php $
6
  * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
7
  * $LastChangedRevision: 1113864 $
8
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/bootstrap.php CHANGED
@@ -2,9 +2,9 @@
2
 
3
  /**
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/bootstrap.php $
6
- * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
7
- * $LastChangedRevision: 1125405 $
8
  * $LastChangedBy: iworks $
9
  *
10
  */
@@ -48,12 +48,6 @@ class WPToolset_Forms_Bootstrap {
48
  add_action('wp_ajax_wpt_suggest_taxonomy_term', array($this, 'wpt_suggest_taxonomy_term'));
49
  add_action('wp_ajax_nopriv_wpt_suggest_taxonomy_term', array($this, 'wpt_suggest_taxonomy_term'));
50
 
51
- // File media popup
52
- if ((isset($_GET['context']) && $_GET['context'] == 'wpt-fields-media-insert') || (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'context=wpt-fields-media-insert') !== false)
53
- ) {
54
- require_once WPTOOLSET_FORMS_ABSPATH . '/classes/class.file.php';
55
- add_action('init', array('WPToolset_Field_File', 'mediaPopup'));
56
- }
57
  add_filter('sanitize_file_name', array($this, 'sanitize_file_name'));
58
 
59
  add_filter('wptoolset_filter_wptoolset_repdrag_image', array($this, 'set_default_repdrag_image'), 10, 1);
2
 
3
  /**
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/bootstrap.php $
6
+ * $LastChangedDate: 2015-05-12 12:24:38 +0000 (Tue, 12 May 2015) $
7
+ * $LastChangedRevision: 1158787 $
8
  * $LastChangedBy: iworks $
9
  *
10
  */
48
  add_action('wp_ajax_wpt_suggest_taxonomy_term', array($this, 'wpt_suggest_taxonomy_term'));
49
  add_action('wp_ajax_nopriv_wpt_suggest_taxonomy_term', array($this, 'wpt_suggest_taxonomy_term'));
50
 
 
 
 
 
 
 
51
  add_filter('sanitize_file_name', array($this, 'sanitize_file_name'));
52
 
53
  add_filter('wptoolset_filter_wptoolset_repdrag_image', array($this, 'set_default_repdrag_image'), 10, 1);
embedded/common/toolset-forms/classes/class.audio.php CHANGED
@@ -6,7 +6,7 @@ require_once 'class.file.php';
6
  *
7
  * @author Srdjan
8
  *
9
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.audio.php $
10
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
11
  * $LastChangedRevision: 1027712 $
12
  * $LastChangedBy: iworks $
6
  *
7
  * @author Srdjan
8
  *
9
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.audio.php $
10
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
11
  * $LastChangedRevision: 1027712 $
12
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.checkbox.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.checkbox.php $
5
  * $LastChangedDate: 2015-01-16 14:28:15 +0000 (Fri, 16 Jan 2015) $
6
  * $LastChangedRevision: 1069430 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.checkbox.php $
5
  * $LastChangedDate: 2015-01-16 14:28:15 +0000 (Fri, 16 Jan 2015) $
6
  * $LastChangedRevision: 1069430 $
7
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.checkboxes.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Srdjan
6
  *
7
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.checkboxes.php $
8
  * $LastChangedDate: 2015-01-16 14:28:15 +0000 (Fri, 16 Jan 2015) $
9
  * $LastChangedRevision: 1069430 $
10
  * $LastChangedBy: iworks $
4
  *
5
  * @author Srdjan
6
  *
7
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.checkboxes.php $
8
  * $LastChangedDate: 2015-01-16 14:28:15 +0000 (Fri, 16 Jan 2015) $
9
  * $LastChangedRevision: 1069430 $
10
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.colorpicker.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.colorpicker.php $
5
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
6
  * $LastChangedRevision: 1120400 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.colorpicker.php $
5
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
6
  * $LastChangedRevision: 1120400 $
7
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.credaudio.php CHANGED
@@ -7,7 +7,7 @@ require_once 'class.audio.php';
7
  *
8
  * @author Srdjan
9
  *
10
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.credaudio.php $
11
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
12
  * $LastChangedRevision: 1027712 $
13
  * $LastChangedBy: iworks $
7
  *
8
  * @author Srdjan
9
  *
10
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.credaudio.php $
11
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
12
  * $LastChangedRevision: 1027712 $
13
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.credfile.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.credfile.php $
5
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
6
  * $LastChangedRevision: 1027712 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.credfile.php $
5
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
6
  * $LastChangedRevision: 1027712 $
7
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.credimage.php CHANGED
@@ -7,7 +7,7 @@ require_once 'class.image.php';
7
  *
8
  * @author Srdjan
9
  *
10
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.credimage.php $
11
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
12
  * $LastChangedRevision: 1027712 $
13
  * $LastChangedBy: iworks $
7
  *
8
  * @author Srdjan
9
  *
10
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.credimage.php $
11
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
12
  * $LastChangedRevision: 1027712 $
13
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.credvideo.php CHANGED
@@ -7,7 +7,7 @@ require_once 'class.video.php';
7
  *
8
  * @author Srdjan
9
  *
10
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.credvideo.php $
11
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
12
  * $LastChangedRevision: 1027712 $
13
  * $LastChangedBy: iworks $
7
  *
8
  * @author Srdjan
9
  *
10
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.credvideo.php $
11
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
12
  * $LastChangedRevision: 1027712 $
13
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.eforms.php CHANGED
@@ -28,7 +28,7 @@
28
  * @link http://enlimbo.net/forms
29
  * @author srdjan <srdjan@enlimbo.net>
30
  *
31
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.eforms.php $
32
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
33
  * $LastChangedRevision: 1120400 $
34
  * $LastChangedBy: iworks $
28
  * @link http://enlimbo.net/forms
29
  * @author srdjan <srdjan@enlimbo.net>
30
  *
31
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.eforms.php $
32
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
33
  * $LastChangedRevision: 1120400 $
34
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.field_factory.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /**
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.field_factory.php $
6
  * $LastChangedDate: 2015-03-02 10:49:00 +0000 (Mon, 02 Mar 2015) $
7
  * $LastChangedRevision: 1103173 $
8
  * $LastChangedBy: iworks $
2
 
3
  /**
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.field_factory.php $
6
  * $LastChangedDate: 2015-03-02 10:49:00 +0000 (Mon, 02 Mar 2015) $
7
  * $LastChangedRevision: 1103173 $
8
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.fieldconfig.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /**
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.fieldconfig.php $
6
  * $LastChangedDate: 2015-01-16 14:28:15 +0000 (Fri, 16 Jan 2015) $
7
  * $LastChangedRevision: 1069430 $
8
  * $LastChangedBy: iworks $
2
 
3
  /**
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.fieldconfig.php $
6
  * $LastChangedDate: 2015-01-16 14:28:15 +0000 (Fri, 16 Jan 2015) $
7
  * $LastChangedRevision: 1069430 $
8
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.file.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.file.php $
5
- * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
6
- * $LastChangedRevision: 1120400 $
7
  * $LastChangedBy: iworks $
8
  *
9
  */
@@ -20,12 +20,14 @@ class WPToolset_Field_File extends WPToolset_Field_Textfield
20
  protected $_validation = array('required');
21
  //protected $_defaults = array('filename' => '', 'button_style' => 'btn2');
22
 
23
- public function init() {
 
24
  WPToolset_Field_File::file_enqueue_scripts();
25
  $this->set_placeholder_as_attribute();
26
  }
27
 
28
- public static function file_enqueue_scripts(){
 
29
  wp_register_script(
30
  'wptoolset-field-file',
31
  WPTOOLSET_FORMS_RELPATH . '/js/file-wp35.js',
@@ -36,18 +38,15 @@ class WPToolset_Field_File extends WPToolset_Field_Textfield
36
 
37
  if ( !wp_script_is( 'wptoolset-field-file', 'enqueued' ) ) {
38
  wp_enqueue_script( 'wptoolset-field-file' );
39
- wp_enqueue_media();
40
-
41
- // add_thickbox();
42
- global $post;
43
- $for_post = (!empty( $post->ID ) ? 'post_id=' . $post->ID . '&' : '');
44
- $js_data = array('title' => esc_js( __( 'Select', 'wpv-views' ) )." File", 'for_post' => $for_post, 'adminurl' => admin_url());
45
- wp_localize_script( 'wptoolset-field-file', 'wptFileData', $js_data );
46
- }
47
- }
48
-
49
- public function enqueueStyles() {
50
 
 
 
51
  }
52
 
53
  /**
@@ -55,10 +54,11 @@ class WPToolset_Field_File extends WPToolset_Field_Textfield
55
  * @global object $wpdb
56
  *
57
  */
58
- public function metaform() {
 
59
  $value = $this->getValue();
60
- $type = $this->getType();
61
- $translated_type = '';
62
  $form = array();
63
  $preview = '';
64
 
@@ -89,20 +89,20 @@ class WPToolset_Field_File extends WPToolset_Field_Textfield
89
  }
90
 
91
  // Set button
92
- switch( $type ) {
93
- case 'audio':
94
- $translated_type = __( 'audio', 'wpv-views' );
95
- break;
96
- case 'image':
97
- $translated_type = __( 'image', 'wpv-views' );
98
- break;
99
- case 'video':
100
- $translated_type = __( 'video', 'wpv-views' );
101
- break;
102
- default:
103
- $translated_type = __( 'file', 'wpv-views' );
104
- break;
105
- }
106
  $button = sprintf(
107
  '<a href="#" class="js-wpt-file-upload button button-secondary" data-wpt-type="%s">%s</a>',
108
  $type,
@@ -114,7 +114,7 @@ class WPToolset_Field_File extends WPToolset_Field_Textfield
114
  '#type' => 'textfield',
115
  '#name' => $this->getName(),
116
  '#title' => $this->getTitle(),
117
- '#description' => $this->getDescription(),
118
  '#value' => $value,
119
  '#suffix' => '&nbsp;' . $button,
120
  '#validate' => $this->getValidationData(),
@@ -129,80 +129,4 @@ class WPToolset_Field_File extends WPToolset_Field_Textfield
129
 
130
  return $form;
131
  }
132
-
133
- public static function mediaPopup() {
134
- WPToolset_Field_File::file_enqueue_scripts();
135
- // Add types button
136
- add_filter( 'attachment_fields_to_edit',
137
- array('WPToolset_Field_File', 'attachmentFieldsToEditFilter'),
138
- 9999, 2 );
139
- // Filter media TABs
140
- add_filter( 'media_upload_tabs',
141
- array('WPToolset_Field_File', 'mediaUploadTabsFilter') );
142
- // Add head data
143
- add_filter( 'admin_head',
144
- array('WPToolset_Field_File', 'mediaPopupHead') );
145
- }
146
-
147
- /**
148
- * Adds column to media item table.
149
- *
150
- * @param type $form_fields
151
- * @param type $post
152
- * @return type
153
- */
154
- public static function attachmentFieldsToEditFilter( $form_fields, $post ) {
155
- // Reset form
156
- $form_fields = array();
157
- $type = (strpos( $post->post_mime_type, 'image/' ) !== false) ? 'image' : 'file';
158
- $url = wp_get_attachment_url( $post->ID );
159
- $form_fields['wpt_fields_file'] = array(
160
- 'label' => __( 'Toolset' ),
161
- 'input' => 'html',
162
- 'html' => '<a href="#" title="' . $url
163
- . '" class="js-wpt-file-insert-button'
164
- . ' button-primary" onclick="wptFile.mediaInsertTrigger(\''
165
- . $url . '\', \'' . $type . '\')">'
166
- . __( 'Use as field value', 'wpv-views' ) . '</a><br /><br />',
167
- );
168
- return $form_fields;
169
- }
170
-
171
- /**
172
- * Filters media TABs.
173
- *
174
- * @param type $tabs
175
- * @return type
176
- */
177
- public static function mediaUploadTabsFilter( $tabs ) {
178
- unset( $tabs['type_url'] );
179
- return $tabs;
180
- }
181
-
182
- /**
183
- * Media popup head.
184
- */
185
- public static function mediaPopupHead() {
186
- ?>
187
- <script type="text/javascript">
188
- <?php
189
- if ( isset( $_GET['wpt']['type'] ) && in_array( $_GET['wpt']['type'],
190
- array('audio', 'video') ) ):
191
-
192
- ?>
193
- jQuery(document).ready(function($) {
194
- $('#media-upload-header').after('<div class="message updated"><p><?php
195
- printf( esc_js( __( 'Please note that not all video and audio formats are supported by the WordPress media player. Before you upload media files, have a look at %ssupported media formats%s.', 'wpv-views' ) ),
196
- '<a href="http://wp-types.com/documentation/user-guides/adding-audio-video-and-other-embedded-content-to-your-site/?utm_source=typesplugin&utm_campaign=types&utm_medium=types-field-media-popup&utm_term=supported media formats" target="_blank">',
197
- '</a>' );
198
-
199
- ?></p></div>');
200
- });
201
- <?php endif; ?>
202
- </script>
203
- <style type="text/css">
204
- tr.submit, .ml-submit, #save, #media-items .A1B1 p:last-child { display: none; }
205
- </style>
206
- <?php
207
- }
208
  }
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.file.php $
5
+ * $LastChangedDate: 2015-05-12 12:24:38 +0000 (Tue, 12 May 2015) $
6
+ * $LastChangedRevision: 1158787 $
7
  * $LastChangedBy: iworks $
8
  *
9
  */
20
  protected $_validation = array('required');
21
  //protected $_defaults = array('filename' => '', 'button_style' => 'btn2');
22
 
23
+ public function init()
24
+ {
25
  WPToolset_Field_File::file_enqueue_scripts();
26
  $this->set_placeholder_as_attribute();
27
  }
28
 
29
+ public static function file_enqueue_scripts()
30
+ {
31
  wp_register_script(
32
  'wptoolset-field-file',
33
  WPTOOLSET_FORMS_RELPATH . '/js/file-wp35.js',
38
 
39
  if ( !wp_script_is( 'wptoolset-field-file', 'enqueued' ) ) {
40
  wp_enqueue_script( 'wptoolset-field-file' );
41
+ }
42
+ global $post;
43
+ if ( is_object($post) ) {
44
+ wp_enqueue_media(array('post' => $post->ID));
45
+ }
46
+ }
 
 
 
 
 
47
 
48
+ public function enqueueStyles()
49
+ {
50
  }
51
 
52
  /**
54
  * @global object $wpdb
55
  *
56
  */
57
+ public function metaform()
58
+ {
59
  $value = $this->getValue();
60
+ $type = $this->getType();
61
+ $translated_type = '';
62
  $form = array();
63
  $preview = '';
64
 
89
  }
90
 
91
  // Set button
92
+ switch( $type ) {
93
+ case 'audio':
94
+ $translated_type = __( 'audio', 'wpv-views' );
95
+ break;
96
+ case 'image':
97
+ $translated_type = __( 'image', 'wpv-views' );
98
+ break;
99
+ case 'video':
100
+ $translated_type = __( 'video', 'wpv-views' );
101
+ break;
102
+ default:
103
+ $translated_type = __( 'file', 'wpv-views' );
104
+ break;
105
+ }
106
  $button = sprintf(
107
  '<a href="#" class="js-wpt-file-upload button button-secondary" data-wpt-type="%s">%s</a>',
108
  $type,
114
  '#type' => 'textfield',
115
  '#name' => $this->getName(),
116
  '#title' => $this->getTitle(),
117
+ '#description' => $this->getDescription(),
118
  '#value' => $value,
119
  '#suffix' => '&nbsp;' . $button,
120
  '#validate' => $this->getValidationData(),
129
 
130
  return $form;
131
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  }
embedded/common/toolset-forms/classes/class.form_factory.php CHANGED
@@ -10,7 +10,7 @@ define( "CLASS_NAME_PREFIX", "WPToolset_Field_" );
10
  * Creation Form Class
11
  * @author onTheGo System
12
  *
13
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.form_factory.php $
14
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
15
  * $LastChangedRevision: 1125405 $
16
  * $LastChangedBy: iworks $
10
  * Creation Form Class
11
  * @author onTheGo System
12
  *
13
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.form_factory.php $
14
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
15
  * $LastChangedRevision: 1125405 $
16
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.image.php CHANGED
@@ -6,7 +6,7 @@ require_once 'class.file.php';
6
  *
7
  * @author Srdjan
8
  *
9
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.image.php $
10
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
11
  * $LastChangedRevision: 1027712 $
12
  * $LastChangedBy: iworks $
6
  *
7
  * @author Srdjan
8
  *
9
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.image.php $
10
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
11
  * $LastChangedRevision: 1027712 $
12
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.radios.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.radios.php $
5
  * $LastChangedDate: 2015-02-18 14:28:53 +0000 (Wed, 18 Feb 2015) $
6
  * $LastChangedRevision: 1093394 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.radios.php $
5
  * $LastChangedDate: 2015-02-18 14:28:53 +0000 (Wed, 18 Feb 2015) $
6
  * $LastChangedRevision: 1093394 $
7
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.repetitive.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Repetitive controller
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.repetitive.php $
6
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
7
  * $LastChangedRevision: 1027712 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Repetitive controller
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.repetitive.php $
6
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
7
  * $LastChangedRevision: 1027712 $
8
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.select.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.select.php $
5
  * $LastChangedDate: 2015-02-18 14:28:53 +0000 (Wed, 18 Feb 2015) $
6
  * $LastChangedRevision: 1093394 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.select.php $
5
  * $LastChangedDate: 2015-02-18 14:28:53 +0000 (Wed, 18 Feb 2015) $
6
  * $LastChangedRevision: 1093394 $
7
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.skype.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.skype.php $
5
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
6
  * $LastChangedRevision: 1120400 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.skype.php $
5
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
6
  * $LastChangedRevision: 1120400 $
7
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.submit.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.submit.php $
5
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
6
  * $LastChangedRevision: 1120400 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.submit.php $
5
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
6
  * $LastChangedRevision: 1120400 $
7
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.taxonomy.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /**
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.taxonomy.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
2
 
3
  /**
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.taxonomy.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.taxonomyhierarchical.php CHANGED
@@ -2,9 +2,9 @@
2
 
3
  /**
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.taxonomyhierarchical.php $
6
- * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
7
- * $LastChangedRevision: 1113864 $
8
  * $LastChangedBy: iworks $
9
  *
10
  */
@@ -303,7 +303,8 @@ class WPToolset_Field_Taxonomyhierarchical extends WPToolset_Field_Textfield {
303
  '#before' => sprintf('<li class="%s">', implode(' ', $clases)),
304
  '#after' => '</li>',
305
  '#attributes' => array(
306
- 'data-parent' => $parent
 
307
  ),
308
  '#pattern' => '<BEFORE><PREFIX><ELEMENT><LABEL><ERROR><SUFFIX><DESCRIPTION><AFTER>',
309
  );
2
 
3
  /**
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.taxonomyhierarchical.php $
6
+ * $LastChangedDate: 2015-05-12 12:24:38 +0000 (Tue, 12 May 2015) $
7
+ * $LastChangedRevision: 1158787 $
8
  * $LastChangedBy: iworks $
9
  *
10
  */
303
  '#before' => sprintf('<li class="%s">', implode(' ', $clases)),
304
  '#after' => '</li>',
305
  '#attributes' => array(
306
+ 'data-parent' => $parent,
307
+ 'data-value' => $names[$tid]
308
  ),
309
  '#pattern' => '<BEFORE><PREFIX><ELEMENT><LABEL><ERROR><SUFFIX><DESCRIPTION><AFTER>',
310
  );
embedded/common/toolset-forms/classes/class.textarea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.textarea.php $
5
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
6
  * $LastChangedRevision: 1027712 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.textarea.php $
5
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
6
  * $LastChangedRevision: 1027712 $
7
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.textfield.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.textfield.php $
5
  * $LastChangedDate: 2015-03-02 10:49:00 +0000 (Mon, 02 Mar 2015) $
6
  * $LastChangedRevision: 1103173 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.textfield.php $
5
  * $LastChangedDate: 2015-03-02 10:49:00 +0000 (Mon, 02 Mar 2015) $
6
  * $LastChangedRevision: 1103173 $
7
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.types.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Types fields specific
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.types.php $
6
  * $LastChangedDate: 2015-03-02 10:49:00 +0000 (Mon, 02 Mar 2015) $
7
  * $LastChangedRevision: 1103173 $
8
  * $LastChangedBy: iworks $
2
  /**
3
  * Types fields specific
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.types.php $
6
  * $LastChangedDate: 2015-03-02 10:49:00 +0000 (Mon, 02 Mar 2015) $
7
  * $LastChangedRevision: 1103173 $
8
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.video.php CHANGED
@@ -6,7 +6,7 @@ require_once 'class.file.php';
6
  *
7
  * @author Srdjan
8
  *
9
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.video.php $
10
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
11
  * $LastChangedRevision: 1027712 $
12
  * $LastChangedBy: iworks $
6
  *
7
  * @author Srdjan
8
  *
9
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.video.php $
10
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
11
  * $LastChangedRevision: 1027712 $
12
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/classes/class.wysiwyg.php CHANGED
@@ -6,7 +6,7 @@ require_once 'class.textarea.php';
6
  *
7
  * @author Srdjan
8
  *
9
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/classes/class.wysiwyg.php $
10
  * $LastChangedDate: 2014-10-29 15:57:36 +0000 (Wed, 29 Oct 2014) $
11
  * $LastChangedRevision: 1016002 $
12
  * $LastChangedBy: iworks $
6
  *
7
  * @author Srdjan
8
  *
9
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/classes/class.wysiwyg.php $
10
  * $LastChangedDate: 2014-10-29 15:57:36 +0000 (Wed, 29 Oct 2014) $
11
  * $LastChangedRevision: 1016002 $
12
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/css/wpt-toolset-frontend.css CHANGED
@@ -100,6 +100,17 @@ ul.wpt-form-set, ul.wpt-form-set-children {
100
  margin: 10px 0;
101
  display: block;
102
  }
 
 
 
 
 
 
 
 
 
 
 
103
  input.wpt-form-error {
104
  background-color: #F8F8F8;
105
  border-color: red !important;
100
  margin: 10px 0;
101
  display: block;
102
  }
103
+
104
+ .wpt-form-success {
105
+ color:#eee;
106
+ background-color: #666600;
107
+ border: 1px solid #aaaa00;
108
+ padding: 5px 10px;
109
+ width: auto;
110
+ margin: 10px 0;
111
+ display: block;
112
+ }
113
+
114
  input.wpt-form-error {
115
  background-color: #F8F8F8;
116
  border-color: red !important;
embedded/common/toolset-forms/js/conditional.js CHANGED
@@ -1,7 +1,7 @@
1
  /**
2
  * @see WPToolset_Forms_Conditional (classes/conditional.php)
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/js/conditional.js $
5
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
6
  * $LastChangedRevision: 1125405 $
7
  * $LastChangedBy: iworks $ Riccardo
1
  /**
2
  * @see WPToolset_Forms_Conditional (classes/conditional.php)
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/js/conditional.js $
5
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
6
  * $LastChangedRevision: 1125405 $
7
  * $LastChangedBy: iworks $ Riccardo
embedded/common/toolset-forms/js/file-wp35.js CHANGED
@@ -1,8 +1,8 @@
1
  /**
2
  *
3
- * $HeadURL: https://www.onthegosystems.com/misc_svn/common/tags/1.5/toolset-forms/js/file-wp35.js $
4
- * $LastChangedDate: 2015-02-18 12:50:24 +0100 (Wed, 18 Feb 2015) $
5
- * $LastChangedRevision: 31718 $
6
  * $LastChangedBy: marcin $
7
  *
8
  */
@@ -31,10 +31,18 @@ var wptFile = (function($, w) {
31
  */
32
  // Build the choose from library frame.
33
  $('.js-wpt-field').on('click', 'a.js-wpt-file-upload', function( event ) {
34
- var $el = $(this);
 
 
 
 
 
35
  var $type = $el.data('wpt-type');
36
  var $id = $el.parent().attr('id');
37
- event.preventDefault();
 
 
 
38
 
39
  // If the media frame already exists, reopen it.
40
  if ( frame[$id] ) {
@@ -87,10 +95,11 @@ var wptFile = (function($, w) {
87
  });
88
 
89
  frame[$id].open();
90
- });
91
  }
 
92
  return {
93
  init: init,
 
94
  };
95
  })(jQuery);
96
 
1
  /**
2
  *
3
+ * $HeadURL: https://www.onthegosystems.com/misc_svn/common/tags/1.5.1/toolset-forms/js/file-wp35.js $
4
+ * $LastChangedDate: 2015-05-04 06:57:42 +0000 (Mon, 04 May 2015) $
5
+ * $LastChangedRevision: 33205 $
6
  * $LastChangedBy: marcin $
7
  *
8
  */
31
  */
32
  // Build the choose from library frame.
33
  $('.js-wpt-field').on('click', 'a.js-wpt-file-upload', function( event ) {
34
+ wptFile.bindOpen($(this), event);
35
+ });
36
+ }
37
+
38
+ function bindOpen($el, event)
39
+ {
40
  var $type = $el.data('wpt-type');
41
  var $id = $el.parent().attr('id');
42
+
43
+ if ( event ) {
44
+ event.preventDefault();
45
+ }
46
 
47
  // If the media frame already exists, reopen it.
48
  if ( frame[$id] ) {
95
  });
96
 
97
  frame[$id].open();
 
98
  }
99
+
100
  return {
101
  init: init,
102
+ bindOpen: bindOpen,
103
  };
104
  })(jQuery);
105
 
embedded/common/toolset-forms/js/repetitive.js CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * Repetitive JS.
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/js/repetitive.js $
5
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
6
  * $LastChangedRevision: 1027712 $
7
  * $LastChangedBy: iworks $
1
  /*
2
  * Repetitive JS.
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/js/repetitive.js $
5
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
6
  * $LastChangedRevision: 1027712 $
7
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/js/validation.js CHANGED
@@ -7,7 +7,7 @@
7
  *
8
  * @see class WPToolset_Validation
9
  *
10
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/js/validation.js $
11
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
12
  * $LastChangedRevision: 1125405 $
13
  * $LastChangedBy: iworks $
7
  *
8
  * @see class WPToolset_Validation
9
  *
10
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/js/validation.js $
11
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
12
  * $LastChangedRevision: 1125405 $
13
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/templates/metaform-item.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/templates/metaform-item.php $
5
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
6
  * $LastChangedRevision: 1120400 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/templates/metaform-item.php $
5
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
6
  * $LastChangedRevision: 1120400 $
7
  * $LastChangedBy: iworks $
embedded/common/toolset-forms/templates/metaform.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/common/toolset-forms/templates/metaform.php $
5
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
6
  * $LastChangedRevision: 1027712 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/common/toolset-forms/templates/metaform.php $
5
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
6
  * $LastChangedRevision: 1027712 $
7
  * $LastChangedBy: iworks $
embedded/common/utility/js/utils.js CHANGED
@@ -9,6 +9,26 @@ if( typeof WPV_Toolset.Utils == 'undefined' ) WPV_Toolset.Utils = {};
9
 
10
  WPV_Toolset.Utils.eventDispatcher = _.extend({}, Backbone.Events);
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  WPV_Toolset.Utils.do_ajax_post = function( params, callback_object )
13
  {
14
  jQuery.post(ajaxurl, params, function (response) {
@@ -686,7 +706,7 @@ WPV_Toolset.Utils.editor_utf8_decode = function (utftext) {
686
  return string;
687
  };
688
 
689
- // convert unicode character to its corrsponding numeric entity
690
  WPV_Toolset.Utils.fixedCharCodeAt = function (str, idx) {
691
  // ex. fixedCharCodeAt ('\uD800\uDC00', 0); // 65536
692
  // ex. fixedCharCodeAt ('\uD800\uDC00', 1); // 65536
@@ -766,9 +786,11 @@ String.prototype.regexEscape = function regexEscape() {
766
  var self = this;
767
  this.$element.on('mouseenter', function(event) {
768
  self.show(event);
 
769
  });
770
  this.$element.on('mouseleave', function(event) {
771
  self.hide(event);
 
772
  });
773
  },
774
  show: function (event) {
9
 
10
  WPV_Toolset.Utils.eventDispatcher = _.extend({}, Backbone.Events);
11
 
12
+ WPV_Toolset.Utils.restoreEventPropagation = function( event ){
13
+ if( event.isImmediatePropagationStopped() === false && event.isPropagationStopped() === false ){
14
+ return event;
15
+ }
16
+
17
+ var refEvent = event.originalEvent;
18
+ refEvent.cancelBubble = false;
19
+ refEvent.defaultPrevented = false;
20
+ refEvent.returnValue = true;
21
+ refEvent.timeStamp = ( new Date() ).getTime();
22
+
23
+ if (event.target.dispatchEvent) {
24
+ event.target.dispatchEvent(refEvent);
25
+ } else if (event.target.fireEvent) {
26
+ event.target.fireEvent(refEvent);
27
+ }
28
+
29
+ return refEvent;
30
+ };
31
+
32
  WPV_Toolset.Utils.do_ajax_post = function( params, callback_object )
33
  {
34
  jQuery.post(ajaxurl, params, function (response) {
706
  return string;
707
  };
708
 
709
+ // convert unicode character to its corresponding numeric entity
710
  WPV_Toolset.Utils.fixedCharCodeAt = function (str, idx) {
711
  // ex. fixedCharCodeAt ('\uD800\uDC00', 0); // 65536
712
  // ex. fixedCharCodeAt ('\uD800\uDC00', 1); // 65536
786
  var self = this;
787
  this.$element.on('mouseenter', function(event) {
788
  self.show(event);
789
+ jQuery(event.target).trigger('tooltip_show', event);
790
  });
791
  this.$element.on('mouseleave', function(event) {
792
  self.hide(event);
793
+ jQuery(event.target).trigger('tooltip_hide', event);
794
  });
795
  },
796
  show: function (event) {
embedded/common/visual-editor/editor-addon-generic.class.php CHANGED
@@ -1,4 +1,13 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
 
3
  if( !class_exists( 'Editor_addon_generic' ) )
4
  {
@@ -14,7 +23,23 @@ if( !class_exists( 'Editor_addon_generic' ) )
14
  add_action( 'admin_enqueue_scripts', 'icl_editor_admin_enqueue_styles' );
15
 
16
  if ( ! function_exists( 'icl_editor_admin_enqueue_styles' ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
17
  function icl_editor_admin_enqueue_styles() {
 
 
 
 
18
  global $pagenow;
19
  if (
20
  $pagenow == 'post.php'
@@ -29,10 +54,8 @@ if( !class_exists( 'Editor_addon_generic' ) )
29
  )
30
  ) // add the new Views edit screens
31
  ) {
32
- wp_enqueue_style( 'editor_addon_menu',
33
- EDITOR_ADDON_RELPATH . '/res/css/pro_dropdown_2.css' );
34
- wp_enqueue_style( 'editor_addon_menu_scroll',
35
- EDITOR_ADDON_RELPATH . '/res/css/scroll.css' );
36
  }
37
  }
38
  }
@@ -41,7 +64,25 @@ if( !class_exists( 'Editor_addon_generic' ) )
41
  add_action( 'admin_enqueue_scripts', 'icl_editor_admin_enqueue_scripts' );
42
 
43
  if ( ! function_exists( 'icl_editor_admin_enqueue_scripts' ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  function icl_editor_admin_enqueue_scripts() {
 
 
 
 
 
45
  global $pagenow;
46
  if (
47
  $pagenow == 'post.php'
@@ -56,9 +97,9 @@ if( !class_exists( 'Editor_addon_generic' ) )
56
  )
57
  )
58
  ) {
59
- wp_register_script( 'icl_editor-script', EDITOR_ADDON_RELPATH . '/res/js/icl_editor_addon_plugin.js', array( 'jquery', 'quicktags', 'wplink' ) );
60
  wp_enqueue_script( 'icl_editor-script' );
61
  }
 
62
  if (
63
  $pagenow == 'admin.php'
64
  && isset( $_GET['page'] )
@@ -73,9 +114,7 @@ if( !class_exists( 'Editor_addon_generic' ) )
73
  'only_img_allowed_here' => __( "You can only use an image file here", 'wpv-views' )
74
  );
75
  wp_enqueue_media();
76
- wp_enqueue_script( 'icl_media-manager-js',
77
- EDITOR_ADDON_RELPATH . '/res/js/icl_media_manager.js',
78
- array( 'jquery', 'icl_editor-script' ) );
79
  wp_localize_script( 'icl_media-manager-js', 'icl_media_manager', $media_manager_translations );
80
  }
81
  }
@@ -124,30 +163,29 @@ if( !class_exists( 'Editor_addon_generic' ) )
124
 
125
  }
126
 
127
- /*
128
-
129
- Add a menu item that will insert the shortcode.
130
-
131
- To use sub menus, add a '-!-' separator between levels in
132
- the $menu parameter.
133
- eg. Field-!-image
134
- This will create/use a menu "Field" and add a sub menu "image"
135
-
136
- $function_name is the javascript function to call for the on-click
137
- If it's left blank then a function will be created that just
138
- inserts the shortcode.
139
 
 
 
 
 
 
 
 
 
 
 
140
  */
141
-
142
  public function add_insert_shortcode_menu( $text, $shortcode, $menu,
143
  $function_name = '' ) {
144
  $this->items[] = array($text, $shortcode, $menu, $function_name);
145
  }
 
146
 
147
  public function add_form_button( $context, $text_area, $standard_v, $add_views, $codemirror_button )
148
  {
149
  throw new Exception( 'You should implement this method '. __METHOD__ );
150
  }
 
151
 
152
  public static function getWpForbiddenNames()
153
  {
1
  <?php
2
+ /**
3
+ * Editor_addon_generic class
4
+ *
5
+ * Defines EDITOR_ADDON_ABSPATH and EDITOR_ADDON_RELPATH if not already defined.
6
+ * Scripts and styles required for the icl_editor are also registered and possibly enqueued here.
7
+ *
8
+ * @since unknown
9
+ */
10
+
11
 
12
  if( !class_exists( 'Editor_addon_generic' ) )
13
  {
23
  add_action( 'admin_enqueue_scripts', 'icl_editor_admin_enqueue_styles' );
24
 
25
  if ( ! function_exists( 'icl_editor_admin_enqueue_styles' ) ) {
26
+
27
+
28
+ /**
29
+ * Register and optionally enqueue styles for icl_editor (in backend only).
30
+ *
31
+ * Styles:
32
+ *
33
+ * - editor_addon_menu
34
+ * - editor_addon_menu_scroll
35
+ *
36
+ * @since unknown
37
+ */
38
  function icl_editor_admin_enqueue_styles() {
39
+
40
+ wp_register_style( 'editor_addon_menu', EDITOR_ADDON_RELPATH . '/res/css/pro_dropdown_2.css' );
41
+ wp_register_style( 'editor_addon_menu_scroll', EDITOR_ADDON_RELPATH . '/res/css/scroll.css' );
42
+
43
  global $pagenow;
44
  if (
45
  $pagenow == 'post.php'
54
  )
55
  ) // add the new Views edit screens
56
  ) {
57
+ wp_enqueue_style( 'editor_addon_menu' );
58
+ wp_enqueue_style( 'editor_addon_menu_scroll' );
 
 
59
  }
60
  }
61
  }
64
  add_action( 'admin_enqueue_scripts', 'icl_editor_admin_enqueue_scripts' );
65
 
66
  if ( ! function_exists( 'icl_editor_admin_enqueue_scripts' ) ) {
67
+
68
+ /**
69
+ * Register and optionally enqueue scripts for icl_editor (in backend only).
70
+ *
71
+ * Scripts:
72
+ *
73
+ * - icl_editor-script
74
+ * - icl_media-manager-js
75
+ *
76
+ * When icl_media-manager-js is enqueued, it also gets localized here.
77
+ *
78
+ * @since unknown
79
+ */
80
  function icl_editor_admin_enqueue_scripts() {
81
+
82
+ wp_register_script( 'icl_editor-script', EDITOR_ADDON_RELPATH . '/res/js/icl_editor_addon_plugin.js', array( 'jquery', 'quicktags', 'wplink' ) );
83
+
84
+ wp_register_script( 'icl_media-manager-js', EDITOR_ADDON_RELPATH . '/res/js/icl_media_manager.js', array( 'jquery', 'icl_editor-script' ) );
85
+
86
  global $pagenow;
87
  if (
88
  $pagenow == 'post.php'
97
  )
98
  )
99
  ) {
 
100
  wp_enqueue_script( 'icl_editor-script' );
101
  }
102
+
103
  if (
104
  $pagenow == 'admin.php'
105
  && isset( $_GET['page'] )
114
  'only_img_allowed_here' => __( "You can only use an image file here", 'wpv-views' )
115
  );
116
  wp_enqueue_media();
117
+ wp_enqueue_script( 'icl_media-manager-js' );
 
 
118
  wp_localize_script( 'icl_media-manager-js', 'icl_media_manager', $media_manager_translations );
119
  }
120
  }
163
 
164
  }
165
 
 
 
 
 
 
 
 
 
 
 
 
 
166
 
167
+ /**
168
+ * Add a menu item that will insert the shortcode.
169
+ *
170
+ * To use sub menus, add a '-!-' separator between levels in the $menu parameter.
171
+ * eg. Field-!-image
172
+ * This will create/use a menu "Field" and add a sub menu "image"
173
+ *
174
+ * $function_name is the javascript function to call for the on-click
175
+ * If it's left blank then a function will be created that just
176
+ * inserts the shortcode.
177
  */
 
178
  public function add_insert_shortcode_menu( $text, $shortcode, $menu,
179
  $function_name = '' ) {
180
  $this->items[] = array($text, $shortcode, $menu, $function_name);
181
  }
182
+
183
 
184
  public function add_form_button( $context, $text_area, $standard_v, $add_views, $codemirror_button )
185
  {
186
  throw new Exception( 'You should implement this method '. __METHOD__ );
187
  }
188
+
189
 
190
  public static function getWpForbiddenNames()
191
  {
embedded/common/visual-editor/editor-addon.class.php CHANGED
@@ -69,7 +69,7 @@ if ( file_exists( dirname(__FILE__) . '/editor-addon-generic.class.php') && !cla
69
  // add View Template links to the "Add Field" button
70
  if ( !$standard_v ) {
71
  $this->add_view_type( $menus, 'view-template',
72
- __( 'View templates', 'wpv-views' ) );
73
  $this->add_view_type( $menus, 'view',
74
  __( 'Post View', 'wpv-views' ) );
75
  $this->add_view_type( $menus, 'view',
@@ -169,6 +169,7 @@ if ( file_exists( dirname(__FILE__) . '/editor-addon-generic.class.php') && !cla
169
  * @param string $context
170
  * @param string $text_area
171
  * @param boolean $standard_v is this a standard V button
 
172
  */
173
  function add_users_form_button( $context, $text_area = 'textarea#content', $codemirror_button = false ) {
174
  global $wp_version, $sitepress, $wpdb, $WP_Views;
@@ -205,7 +206,12 @@ if ( file_exists( dirname(__FILE__) . '/editor-addon-generic.class.php') && !cla
205
 
206
  if ( isset( $sitepress ) && function_exists( 'wpml_string_shortcode' ) ) {
207
  $nonce = wp_create_nonce('wpv_editor_callback');
208
- $this->items[] = array(__('Translatable string', 'wpv-views'), 'wpml-string',__('Basic', 'wpv-views'),'WPViews.shortcodes_gui.wpv_insert_translatable_string_popup(\'' . $nonce . '\')');
 
 
 
 
 
209
  }
210
 
211
 
@@ -385,6 +391,16 @@ if ( file_exists( dirname(__FILE__) . '/editor-addon-generic.class.php') && !cla
385
  * @return string media menu
386
  */
387
  function _output_media_menu( $menu, $text_area, $standard_v ) {
 
 
 
 
 
 
 
 
 
 
388
  $all_post_types = implode( ' ',
389
  get_post_types( array('public' => true) ) );
390
 
@@ -406,7 +422,12 @@ if ( file_exists( dirname(__FILE__) . '/editor-addon-generic.class.php') && !cla
406
  'wpv_insert_view_form_popup' ) !== false) ) {
407
  $out .= $this->wpv_parse_menu_item_from_addfield( $menu_item );
408
  } else {
409
- $out .= '<li class="item" onclick="' . $menu_item[3] . '; return false;">' . $menu_item[0] . "</li>\n";
 
 
 
 
 
410
  }
411
  }
412
  } else {
@@ -509,8 +530,8 @@ if ( file_exists( dirname(__FILE__) . '/editor-addon-generic.class.php') && !cla
509
  $slug = $menu_item[0];
510
  }
511
  // View Templates here
512
- if ( $menu_item[2] == __( 'View templates', 'wpv-views' ) ) {
513
- $param1 = 'View template';
514
  }
515
  if ( $menu_item[2] == __( 'Post View', 'wpv-views' ) || $menu_item[2] == __( 'Taxonomy View',
516
  'wpv-views' ) || $menu_item[2] == __( 'User View', 'wpv-views' ) ) {
@@ -618,11 +639,11 @@ if ( file_exists( dirname(__FILE__) . '/editor-addon-generic.class.php') && !cla
618
  // keep main references if set (not set on every screen)
619
  $menu_temp = array();
620
  $menu_names = array(
621
- __( 'Taxonomy View', 'wpv-views' ),
622
  __( 'User View', 'wpv-views' ),
 
623
  __( 'Post View', 'wpv-views' ),
624
  __( 'View', 'wpv-views' ),
625
- __( 'View templates', 'wpv-views' ),
626
  __( 'Taxonomy', 'wpv-views' ),
627
  __( 'Basic', 'wpv-views' ),
628
  __( 'Other Fields', 'wpv-views' )
69
  // add View Template links to the "Add Field" button
70
  if ( !$standard_v ) {
71
  $this->add_view_type( $menus, 'view-template',
72
+ __( 'Content Template', 'wpv-views' ) );
73
  $this->add_view_type( $menus, 'view',
74
  __( 'Post View', 'wpv-views' ) );
75
  $this->add_view_type( $menus, 'view',
169
  * @param string $context
170
  * @param string $text_area
171
  * @param boolean $standard_v is this a standard V button
172
+ * DEPRECATED since Views 1.9, not used anywhere else :-)
173
  */
174
  function add_users_form_button( $context, $text_area = 'textarea#content', $codemirror_button = false ) {
175
  global $wp_version, $sitepress, $wpdb, $WP_Views;
206
 
207
  if ( isset( $sitepress ) && function_exists( 'wpml_string_shortcode' ) ) {
208
  $nonce = wp_create_nonce('wpv_editor_callback');
209
+ $this->items[] = array(
210
+ __('Translatable string', 'wpv-views'),
211
+ 'wpml-string',
212
+ __('Basic', 'wpv-views'),
213
+ "WPViews.shortcodes_gui.wpv_insert_popup('wpml-string', '" . __( 'Translatable string', 'wpv-views' ) . "', {}, '" . $nonce . "', this )"
214
+ );
215
  }
216
 
217
 
391
  * @return string media menu
392
  */
393
  function _output_media_menu( $menu, $text_area, $standard_v ) {
394
+
395
+ /**
396
+ * get current post id
397
+ */
398
+ $post_id = 0;
399
+ global $post;
400
+ if ( is_object($post) && isset($post->ID) ) {
401
+ $post_id = $post->ID;
402
+ }
403
+
404
  $all_post_types = implode( ' ',
405
  get_post_types( array('public' => true) ) );
406
 
422
  'wpv_insert_view_form_popup' ) !== false) ) {
423
  $out .= $this->wpv_parse_menu_item_from_addfield( $menu_item );
424
  } else {
425
+ $out .= sprintf(
426
+ '<li class="item" onclick="%s; return false;" data-post-id="%d">%s</li>',
427
+ $menu_item[3],
428
+ $post_id,
429
+ $menu_item[0]
430
+ );
431
  }
432
  }
433
  } else {
530
  $slug = $menu_item[0];
531
  }
532
  // View Templates here
533
+ if ( $menu_item[2] == __( 'Content Template', 'wpv-views' ) ) {
534
+ $param1 = 'Content Template';
535
  }
536
  if ( $menu_item[2] == __( 'Post View', 'wpv-views' ) || $menu_item[2] == __( 'Taxonomy View',
537
  'wpv-views' ) || $menu_item[2] == __( 'User View', 'wpv-views' ) ) {
639
  // keep main references if set (not set on every screen)
640
  $menu_temp = array();
641
  $menu_names = array(
 
642
  __( 'User View', 'wpv-views' ),
643
+ __( 'Taxonomy View', 'wpv-views' ),
644
  __( 'Post View', 'wpv-views' ),
645
  __( 'View', 'wpv-views' ),
646
+ __( 'Content Template', 'wpv-views' ),
647
  __( 'Taxonomy', 'wpv-views' ),
648
  __( 'Basic', 'wpv-views' ),
649
  __( 'Other Fields', 'wpv-views' )
embedded/common/visual-editor/res/js/icl_editor_addon_plugin.js CHANGED
@@ -1,13 +1,16 @@
1
  var WPV_Toolset = WPV_Toolset || {};
 
 
 
2
  if ( typeof WPV_Toolset.CodeMirror_instance === "undefined" ) {
3
  WPV_Toolset.CodeMirror_instance = [];
4
  }
5
 
6
- if ( WPV_Toolset.add_qt_editor_buttons !== 'function' ) {
7
  WPV_Toolset.add_qt_editor_buttons = function( qt_instance, editor_instance ) {
8
  QTags._buttonsInit();
9
  WPV_Toolset.CodeMirror_instance[qt_instance.id] = editor_instance;
10
-
11
  for ( var button_name in qt_instance.theButtons ) {
12
  if ( qt_instance.theButtons.hasOwnProperty( button_name ) ) {
13
  qt_instance.theButtons[button_name].old_callback = qt_instance.theButtons[button_name].callback;
@@ -26,52 +29,59 @@ if ( WPV_Toolset.add_qt_editor_buttons !== 'function' ) {
26
  WPV_Toolset.CodeMirror_instance[id].focus();
27
  }
28
  } else if ( qt_instance.theButtons[button_name].id == 'close' ) {
29
-
30
  } else if ( qt_instance.theButtons[button_name].id == 'link' ) {
31
  var t = this;
32
- qt_instance.theButtons[button_name].callback =
33
  function ( b, c, d, e ) {
34
- activeUrlEditor = c;var f,g=this;return"undefined"!=typeof wpLink?void wpLink.open(d.id):(e||(e="http://"),void(g.isOpen(d)===!1?(f=prompt(quicktagsL10n.enterURL,e),f&&(g.tagStart='<a href="'+f+'">',a.TagButton.prototype.callback.call(g,b,c,d))):a.TagButton.prototype.callback.call(g,b,c,d)))
35
- }
36
- ;
37
- jQuery( '#wp-link-submit' ).off();
38
- jQuery( '#wp-link-submit' ).on( 'click', function() {
39
- var id = jQuery( activeUrlEditor ).attr('id'),
40
- selection = WPV_Toolset.CodeMirror_instance[id].getSelection(),
41
- target = '';
42
- if ( jQuery( '#link-target-checkbox' ).prop('checked') ) {
43
- target = '_blank';
44
- }
45
- html = '<a href="' + jQuery('#url-field').val() + '"';
46
- title = '';
47
- if ( jQuery( '#link-title-field' ).val() ) {
48
- title = jQuery( '#link-title-field' ).val().replace( /</g, '&lt;' ).replace( />/g, '&gt;' ).replace( /"/g, '&quot;' );
49
- html += ' title="' + title + '"';
50
- }
51
- if ( target ) {
52
- html += ' target="' + target + '"';
53
- }
54
- html += '>';
55
- if ( selection === '' ) {
56
- html += title;
57
- } else {
58
- html += selection;
59
- }
60
- html += '</a>';
61
- t.tagStart = html;
62
- selection = t.tagStart;
63
- WPV_Toolset.CodeMirror_instance[id].replaceSelection( selection, 'end' );
64
- WPV_Toolset.CodeMirror_instance[id].focus();
65
- jQuery( '#wp-link-backdrop,#wp-link-wrap' ).hide();
66
- jQuery( document.body ).removeClass( 'modal-open' );
67
- return false;
68
- });
 
 
 
 
 
 
 
69
  } else {
70
- qt_instance.theButtons[button_name].callback = function( element, canvas, ed ) {
71
  var id = jQuery( canvas ).attr( 'id' ),
72
  t = this,
73
  selection = WPV_Toolset.CodeMirror_instance[id].getSelection();
74
- if ( selection.length > 0 ) {
75
  if ( !t.tagEnd ) {
76
  selection = selection + t.tagStart;
77
  } else {
@@ -240,14 +250,14 @@ jQuery(document).ready(function(){
240
  icl_editor_popup(drop_down);
241
 
242
  jQuery(drop_down).find('.search_field').focus();
243
-
244
  // Make sure the dialog fits on the screen when used in
245
  // Layouts for the Post Content dialog
246
  if (jQuery(drop_down).closest('#ddl-default-edit').length > 0) {
247
  var dialog_bottom = jQuery(drop_down).offset().top + jQuery(drop_down).height();
248
  dialog_bottom -= jQuery(window).scrollTop();
249
  var window_height = jQuery(window).height();
250
-
251
  if (dialog_bottom > window_height) {
252
  var new_top = window_height - jQuery(drop_down).height() - 80;
253
  if (new_top < 0) {
@@ -620,7 +630,7 @@ function insert_b64_shortcode_to_editor(b64_shortcode, text_area) {
620
  shortcode += '[/types]';
621
  }
622
  window.wpcfActiveEditor = text_area;
623
-
624
  icl_editor.insert(shortcode);
625
  }
626
 
@@ -801,7 +811,7 @@ var icl_editor = (function(window, $){
801
  };
802
 
803
  function isCodeMirror($textarea)
804
- {
805
  if ( ! $textarea.is('textarea') ) {
806
  return false;
807
  }
@@ -812,7 +822,7 @@ var icl_editor = (function(window, $){
812
  if ( textareaNext ) {
813
  //Usual way before WordPress 4.1
814
  if (
815
- textareaNext.CodeMirror
816
  && $textarea[0] == textareaNext.CodeMirror.getTextArea()
817
  ) {
818
  return textareaNext.CodeMirror;
@@ -845,7 +855,7 @@ var icl_editor = (function(window, $){
845
  }
846
  return false;
847
  };
848
-
849
  function isCodeMirrorWithPanels( $textarea, candidateNode ) {
850
  if ( ! $textarea.is('textarea') ) {
851
  return false;
@@ -856,14 +866,14 @@ var icl_editor = (function(window, $){
856
  if ( candidateNode ) {
857
  var candidateNodeFirstChild = candidateNode.firstChild,
858
  candidateNodeLastChiild = candidateNode.lastChild;
859
- if (
860
- candidateNodeFirstChild
861
  && candidateNodeFirstChild.CodeMirror
862
  && $textarea[0] == candidateNodeFirstChild.CodeMirror.getTextArea()
863
  ) {
864
  return candidateNodeFirstChild.CodeMirror;
865
- } else if (
866
- candidateNodeLastChiild
867
  && candidateNodeLastChiild.CodeMirror
868
  && $textarea[0] == candidateNodeLastChiild.CodeMirror.getTextArea()
869
  ) {
@@ -1052,6 +1062,6 @@ var icl_editor = (function(window, $){
1052
  return window.iclCodemirror[textarea];
1053
  }
1054
  };
1055
-
1056
 
1057
  })(window, jQuery, undefined);
1
  var WPV_Toolset = WPV_Toolset || {};
2
+
3
+ WPV_Toolset.activeUrlEditor = null;
4
+
5
  if ( typeof WPV_Toolset.CodeMirror_instance === "undefined" ) {
6
  WPV_Toolset.CodeMirror_instance = [];
7
  }
8
 
9
+ if ( typeof WPV_Toolset.add_qt_editor_buttons !== 'function' ) {
10
  WPV_Toolset.add_qt_editor_buttons = function( qt_instance, editor_instance ) {
11
  QTags._buttonsInit();
12
  WPV_Toolset.CodeMirror_instance[qt_instance.id] = editor_instance;
13
+
14
  for ( var button_name in qt_instance.theButtons ) {
15
  if ( qt_instance.theButtons.hasOwnProperty( button_name ) ) {
16
  qt_instance.theButtons[button_name].old_callback = qt_instance.theButtons[button_name].callback;
29
  WPV_Toolset.CodeMirror_instance[id].focus();
30
  }
31
  } else if ( qt_instance.theButtons[button_name].id == 'close' ) {
32
+
33
  } else if ( qt_instance.theButtons[button_name].id == 'link' ) {
34
  var t = this;
35
+ qt_instance.theButtons[button_name].callback =
36
  function ( b, c, d, e ) {
37
+ WPV_Toolset.activeUrlEditor = c;var f,g=this;return"undefined"!=typeof wpLink?void wpLink.open(d.id):(e||(e="http://"),void(g.isOpen(d)===!1?(f=prompt(quicktagsL10n.enterURL,e),f&&(g.tagStart='<a href="'+f+'">',a.TagButton.prototype.callback.call(g,b,c,d))):a.TagButton.prototype.callback.call(g,b,c,d)))
38
+ };
39
+ if( WPV_Toolset.activeUrlEditor ){
40
+ jQuery( '#wp-link-submit' ).off();
41
+ jQuery( '#wp-link-submit' ).on( 'click', function() {
42
+ try{
43
+ var id = jQuery( WPV_Toolset.activeUrlEditor ).attr('id'),
44
+ selection = WPV_Toolset.CodeMirror_instance[id].getSelection(),
45
+ target = '';
46
+ if ( jQuery( '#link-target-checkbox' ).prop('checked') ) {
47
+ target = '_blank';
48
+ }
49
+ html = '<a href="' + jQuery('#url-field').val() + '"';
50
+ title = '';
51
+ if ( jQuery( '#link-title-field' ).val() ) {
52
+ title = jQuery( '#link-title-field' ).val().replace( /</g, '&lt;' ).replace( />/g, '&gt;' ).replace( /"/g, '&quot;' );
53
+ html += ' title="' + title + '"';
54
+ }
55
+ if ( target ) {
56
+ html += ' target="' + target + '"';
57
+ }
58
+ html += '>';
59
+ if ( selection === '' ) {
60
+ html += title;
61
+ } else {
62
+ html += selection;
63
+ }
64
+ html += '</a>';
65
+ t.tagStart = html;
66
+ selection = t.tagStart;
67
+ WPV_Toolset.CodeMirror_instance[id].replaceSelection( selection, 'end' );
68
+ WPV_Toolset.CodeMirror_instance[id].focus();
69
+ jQuery( '#wp-link-backdrop,#wp-link-wrap' ).hide();
70
+ jQuery( document.body ).removeClass( 'modal-open' );
71
+ return false;
72
+ } catch( e ){
73
+ console.log( e.message, WPV_Toolset.activeUrlEditor );
74
+ }
75
+
76
+ });
77
+ }
78
+
79
  } else {
80
+ qt_instance.theButtons[button_name].callback = function( element, canvas, ed ) {
81
  var id = jQuery( canvas ).attr( 'id' ),
82
  t = this,
83
  selection = WPV_Toolset.CodeMirror_instance[id].getSelection();
84
+ if ( selection.length > 0 ) {
85
  if ( !t.tagEnd ) {
86
  selection = selection + t.tagStart;
87
  } else {
250
  icl_editor_popup(drop_down);
251
 
252
  jQuery(drop_down).find('.search_field').focus();
253
+
254
  // Make sure the dialog fits on the screen when used in
255
  // Layouts for the Post Content dialog
256
  if (jQuery(drop_down).closest('#ddl-default-edit').length > 0) {
257
  var dialog_bottom = jQuery(drop_down).offset().top + jQuery(drop_down).height();
258
  dialog_bottom -= jQuery(window).scrollTop();
259
  var window_height = jQuery(window).height();
260
+
261
  if (dialog_bottom > window_height) {
262
  var new_top = window_height - jQuery(drop_down).height() - 80;
263
  if (new_top < 0) {
630
  shortcode += '[/types]';
631
  }
632
  window.wpcfActiveEditor = text_area;
633
+
634
  icl_editor.insert(shortcode);
635
  }
636
 
811
  };
812
 
813
  function isCodeMirror($textarea)
814
+ {
815
  if ( ! $textarea.is('textarea') ) {
816
  return false;
817
  }
822
  if ( textareaNext ) {
823
  //Usual way before WordPress 4.1
824
  if (
825
+ textareaNext.CodeMirror
826
  && $textarea[0] == textareaNext.CodeMirror.getTextArea()
827
  ) {
828
  return textareaNext.CodeMirror;
855
  }
856
  return false;
857
  };
858
+
859
  function isCodeMirrorWithPanels( $textarea, candidateNode ) {
860
  if ( ! $textarea.is('textarea') ) {
861
  return false;
866
  if ( candidateNode ) {
867
  var candidateNodeFirstChild = candidateNode.firstChild,
868
  candidateNodeLastChiild = candidateNode.lastChild;
869
+ if (
870
+ candidateNodeFirstChild
871
  && candidateNodeFirstChild.CodeMirror
872
  && $textarea[0] == candidateNodeFirstChild.CodeMirror.getTextArea()
873
  ) {
874
  return candidateNodeFirstChild.CodeMirror;
875
+ } else if (
876
+ candidateNodeLastChiild
877
  && candidateNodeLastChiild.CodeMirror
878
  && $textarea[0] == candidateNodeLastChiild.CodeMirror.getTextArea()
879
  ) {
1062
  return window.iclCodemirror[textarea];
1063
  }
1064
  };
1065
+
1066
 
1067
  })(window, jQuery, undefined);
embedded/frontend.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Frontend functions.
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/frontend.php $
6
  * $LastChangedDate: 2015-03-10 06:46:08 +0000 (Tue, 10 Mar 2015) $
7
  * $LastChangedRevision: 1109249 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Frontend functions.
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/frontend.php $
6
  * $LastChangedDate: 2015-03-10 06:46:08 +0000 (Tue, 10 Mar 2015) $
7
  * $LastChangedRevision: 1109249 $
8
  * $LastChangedBy: iworks $
embedded/functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Basic and init functions.
4
  * Since Types 1.2 moved from /embedded/types.php
5
  *
6
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/functions.php $
7
  * $LastChangedDate: 2015-04-03 10:15:58 +0000 (Fri, 03 Apr 2015) $
8
  * $LastChangedRevision: 1126927 $
9
  * $LastChangedBy: iworks $
3
  * Basic and init functions.
4
  * Since Types 1.2 moved from /embedded/types.php
5
  *
6
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/functions.php $
7
  * $LastChangedDate: 2015-04-03 10:15:58 +0000 (Fri, 03 Apr 2015) $
8
  * $LastChangedRevision: 1126927 $
9
  * $LastChangedBy: iworks $
embedded/includes/custom-types.php CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * Custom Post Types embedded code.
5
  *
6
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/includes/custom-types.php $
7
  * $LastChangedDate: 2015-04-03 10:15:58 +0000 (Fri, 03 Apr 2015) $
8
  * $LastChangedRevision: 1126927 $
9
  * $LastChangedBy: iworks $
3
  *
4
  * Custom Post Types embedded code.
5
  *
6
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/includes/custom-types.php $
7
  * $LastChangedDate: 2015-04-03 10:15:58 +0000 (Fri, 03 Apr 2015) $
8
  * $LastChangedRevision: 1126927 $
9
  * $LastChangedBy: iworks $
embedded/includes/fields-post.php CHANGED
@@ -4,7 +4,7 @@
4
  * Edit post page functions
5
  *
6
  *
7
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/includes/fields-post.php $
8
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
9
  * $LastChangedRevision: 1120400 $
10
  * $LastChangedBy: iworks $
4
  * Edit post page functions
5
  *
6
  *
7
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/includes/fields-post.php $
8
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
9
  * $LastChangedRevision: 1120400 $
10
  * $LastChangedBy: iworks $
embedded/includes/fields/audio.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/includes/fields/audio.php $
5
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
6
  * $LastChangedRevision: 1027712 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/includes/fields/audio.php $
5
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
6
  * $LastChangedRevision: 1027712 $
7
  * $LastChangedBy: iworks $
embedded/includes/fields/checkbox.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/includes/fields/checkbox.php $
5
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
6
  * $LastChangedRevision: 1027712 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/includes/fields/checkbox.php $
5
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
6
  * $LastChangedRevision: 1027712 $
7
  * $LastChangedBy: iworks $
embedded/includes/fields/file.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/includes/fields/file.php $
5
  * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
6
  * $LastChangedRevision: 1113864 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /*
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/includes/fields/file.php $
5
  * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
6
  * $LastChangedRevision: 1113864 $
7
  * $LastChangedBy: iworks $
embedded/includes/fields/image.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/includes/fields/image.php $
5
  * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
6
  * $LastChangedRevision: 1113864 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/includes/fields/image.php $
5
  * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
6
  * $LastChangedRevision: 1113864 $
7
  * $LastChangedBy: iworks $
embedded/includes/fields/skype.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/includes/fields/skype.php $
5
  * $LastChangedDate: 2015-02-18 14:28:53 +0000 (Wed, 18 Feb 2015) $
6
  * $LastChangedRevision: 1093394 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/includes/fields/skype.php $
5
  * $LastChangedDate: 2015-02-18 14:28:53 +0000 (Wed, 18 Feb 2015) $
6
  * $LastChangedRevision: 1093394 $
7
  * $LastChangedBy: iworks $
embedded/includes/fields/textarea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/includes/fields/textarea.php $
5
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
6
  * $LastChangedRevision: 1027712 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/includes/fields/textarea.php $
5
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
6
  * $LastChangedRevision: 1027712 $
7
  * $LastChangedBy: iworks $
embedded/includes/fields/video.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/includes/fields/video.php $
5
  * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
6
  * $LastChangedRevision: 1113864 $
7
  * $LastChangedBy: iworks $
1
  <?php
2
  /**
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/includes/fields/video.php $
5
  * $LastChangedDate: 2015-03-16 12:03:31 +0000 (Mon, 16 Mar 2015) $
6
  * $LastChangedRevision: 1113864 $
7
  * $LastChangedBy: iworks $
embedded/includes/import-export.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Import/export data.
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/includes/import-export.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Import/export data.
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/includes/import-export.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
embedded/includes/module-manager.php CHANGED
@@ -4,9 +4,9 @@
4
  *
5
  * Since Types 1.2
6
  *
7
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/includes/module-manager.php $
8
- * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
9
- * $LastChangedRevision: 1120400 $
10
  * $LastChangedBy: iworks $
11
  *
12
  */
@@ -572,6 +572,18 @@ function wpcf_admin_export_selected_data ( array $items, $_type = 'all', $return
572
  array() ), $_items );
573
  } else {
574
  $custom_types = get_option( 'wpcf-custom-types', array() );
 
 
 
 
 
 
 
 
 
 
 
 
575
  }
576
  // Get custom types
577
  if ( !empty( $custom_types ) ) {
4
  *
5
  * Since Types 1.2
6
  *
7
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/includes/module-manager.php $
8
+ * $LastChangedDate: 2015-05-12 12:24:38 +0000 (Tue, 12 May 2015) $
9
+ * $LastChangedRevision: 1158787 $
10
  * $LastChangedBy: iworks $
11
  *
12
  */
572
  array() ), $_items );
573
  } else {
574
  $custom_types = get_option( 'wpcf-custom-types', array() );
575
+ /**
576
+ * fix custom field array for proper XML output
577
+ */
578
+ foreach ( $custom_types as $custom_type_key => $custom_type_data ) {
579
+ if ( !isset($custom_type_data['custom_fields']) || empty($custom_type_data['custom_fields']) ) {
580
+ continue;
581
+ }
582
+ $custom_types[$custom_type_key]['custom_fields'] = array();
583
+ foreach( $custom_type_data['custom_fields'] as $custom_field_name ) {
584
+ $custom_types[$custom_type_key]['custom_fields'][$custom_field_name] = 1;
585
+ }
586
+ }
587
  }
588
  // Get custom types
589
  if ( !empty( $custom_types ) ) {
embedded/includes/post-relationship.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Post relationship code.
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/includes/post-relationship.php $
6
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
7
  * $LastChangedRevision: 1125405 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Post relationship code.
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/includes/post-relationship.php $
6
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
7
  * $LastChangedRevision: 1125405 $
8
  * $LastChangedBy: iworks $
embedded/includes/wpml.php CHANGED
@@ -8,7 +8,7 @@
8
  * Values:
9
  * 0 nothing (ignore), 1 copy, 2 translate
10
  *
11
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/includes/wpml.php $
12
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
13
  * $LastChangedRevision: 1120400 $
14
  * $LastChangedBy: iworks $
8
  * Values:
9
  * 0 nothing (ignore), 1 copy, 2 translate
10
  *
11
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/includes/wpml.php $
12
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
13
  * $LastChangedRevision: 1120400 $
14
  * $LastChangedBy: iworks $
embedded/plugin.php CHANGED
@@ -1,17 +1,17 @@
1
  <?php
2
  /*
3
- Plugin Name: Types - Complete Solution for Custom Fields and Types Embedded
4
  Plugin URI: http://wordpress.org/extend/plugins/types/
5
- Description: Define custom post types, custom taxonomy and custom fields.
6
  Author: OnTheGoSystems
7
  Author URI: http://www.onthegosystems.com
8
- Version: 1.6.6.3
9
  */
10
  /**
11
  *
12
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/plugin.php $
13
- * $LastChangedDate: 2015-04-27 10:19:57 +0000 (Mon, 27 Apr 2015) $
14
- * $LastChangedRevision: 1146882 $
15
  * $LastChangedBy: iworks $
16
  *
17
  */
1
  <?php
2
  /*
3
+ Plugin Name: Types Embedded
4
  Plugin URI: http://wordpress.org/extend/plugins/types/
5
+ Description: Define custom post types, custom taxonomies and custom fields.
6
  Author: OnTheGoSystems
7
  Author URI: http://www.onthegosystems.com
8
+ Version: 1.6.6.5
9
  */
10
  /**
11
  *
12
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/plugin.php $
13
+ * $LastChangedDate: 2015-05-20 11:41:05 +0000 (Wed, 20 May 2015) $
14
+ * $LastChangedRevision: 1164110 $
15
  * $LastChangedBy: iworks $
16
  *
17
  */
embedded/readme.txt CHANGED
@@ -1,13 +1,13 @@
1
- === Types Embedded - Custom Fields and Custom Post Types Management ===
2
  Contributors: brucepearson, AmirHelzer, jozik, mihaimihai, iworks
3
  Donate link: http://wp-types.com
4
- Tags: CMS, custom field, custom fields, custom post type, custom post types, post, post type, post types, cck, taxonomy, fields
5
  License: GPLv2
6
  Requires at least: 3.4
7
- Tested up to: 4.1.3
8
- Stable tag: 1.6.6.3
9
 
10
- The Embedded version lets you create custom types, taxonomy and fields for your theme or plugin, without requiring any plugin.
11
 
12
  = Instructions =
13
 
1
+ === Types Embedded ===
2
  Contributors: brucepearson, AmirHelzer, jozik, mihaimihai, iworks
3
  Donate link: http://wp-types.com
4
+ Tags: CMS, custom field, custom fields, custom post type, custom post types, field, fields post, post type, post types, taxonomies, taxonomy
5
  License: GPLv2
6
  Requires at least: 3.4
7
+ Tested up to: 4.2.2
8
+ Stable tag: 1.6.6.5
9
 
10
+ The Embedded version lets you create custom types, taxonomies and fields for your theme or plugin, without requiring any plugin.
11
 
12
  = Instructions =
13
 
embedded/resources/css/dashicons.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  *
3
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/resources/css/dashicons.css $
4
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
5
  * $LastChangedRevision: 1027712 $
6
  * $LastChangedBy: iworks $
1
  /**
2
  *
3
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/resources/css/dashicons.css $
4
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
5
  * $LastChangedRevision: 1027712 $
6
  * $LastChangedBy: iworks $
embedded/resources/js/basic.js CHANGED
@@ -4,7 +4,7 @@
4
  * For now full and embedded version use this script.
5
  * Before moving full-version-only code - make sure it's not needed here.
6
  *
7
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/resources/js/basic.js $
8
  * $LastChangedDate: 2015-03-10 06:46:08 +0000 (Tue, 10 Mar 2015) $
9
  * $LastChangedRevision: 1109249 $
10
  * $LastChangedBy: iworks $
4
  * For now full and embedded version use this script.
5
  * Before moving full-version-only code - make sure it's not needed here.
6
  *
7
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/resources/js/basic.js $
8
  * $LastChangedDate: 2015-03-10 06:46:08 +0000 (Tue, 10 Mar 2015) $
9
  * $LastChangedRevision: 1109249 $
10
  * $LastChangedBy: iworks $
embedded/resources/js/fields-form.js CHANGED
@@ -9,7 +9,7 @@
9
  * @since Types 1.1.5
10
  * @autor srdjan
11
  *
12
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/resources/js/fields-form.js $
13
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
14
  * $LastChangedRevision: 1120400 $
15
  * $LastChangedBy: iworks $
9
  * @since Types 1.1.5
10
  * @autor srdjan
11
  *
12
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/resources/js/fields-form.js $
13
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
14
  * $LastChangedRevision: 1120400 $
15
  * $LastChangedBy: iworks $
embedded/usermeta-init.php CHANGED
@@ -10,7 +10,7 @@ $fields_access = new Post_Fields_Access;
10
  * @author Gen gen.i@icanlocalize.com
11
  * @since Types 1.3
12
  *
13
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/embedded/usermeta-init.php $
14
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
15
  * $LastChangedRevision: 1125405 $
16
  * $LastChangedBy: iworks $
10
  * @author Gen gen.i@icanlocalize.com
11
  * @since Types 1.3
12
  *
13
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/embedded/usermeta-init.php $
14
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
15
  * $LastChangedRevision: 1125405 $
16
  * $LastChangedBy: iworks $
help.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin contextual help
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/help.php $
6
  * $LastChangedDate: 2014-05-29 08:44:10 +0000 (Thu, 29 May 2014) $
7
  * $LastChangedRevision: 922956 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Plugin contextual help
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/help.php $
6
  * $LastChangedDate: 2014-05-29 08:44:10 +0000 (Thu, 29 May 2014) $
7
  * $LastChangedRevision: 922956 $
8
  * $LastChangedBy: iworks $
includes/common-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * Custom types form - common functions
5
  *
6
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/includes/common-functions.php $
7
  * $LastChangedDate: 2015-01-16 14:28:15 +0000 (Fri, 16 Jan 2015) $
8
  * $LastChangedRevision: 1069430 $
9
  * $LastChangedBy: iworks $
3
  *
4
  * Custom types form - common functions
5
  *
6
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/includes/common-functions.php $
7
  * $LastChangedDate: 2015-01-16 14:28:15 +0000 (Fri, 16 Jan 2015) $
8
  * $LastChangedRevision: 1069430 $
9
  * $LastChangedBy: iworks $
includes/custom-taxonomies-form.php CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * Custom taxonomies form
5
  *
6
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/includes/custom-taxonomies-form.php $
7
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
8
  * $LastChangedRevision: 1125405 $
9
  * $LastChangedBy: iworks $
3
  *
4
  * Custom taxonomies form
5
  *
6
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/includes/custom-taxonomies-form.php $
7
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
8
  * $LastChangedRevision: 1125405 $
9
  * $LastChangedBy: iworks $
includes/custom-types-form.php CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * Custom types form
5
  *
6
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/includes/custom-types-form.php $
7
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
8
  * $LastChangedRevision: 1125405 $
9
  * $LastChangedBy: iworks $
3
  *
4
  * Custom types form
5
  *
6
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/includes/custom-types-form.php $
7
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
8
  * $LastChangedRevision: 1125405 $
9
  * $LastChangedBy: iworks $
includes/fields-control.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Custom Fields Control Screen
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/includes/fields-control.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Custom Fields Control Screen
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/includes/fields-control.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
includes/fields-form.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Fields and groups form functions.
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/includes/fields-form.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Fields and groups form functions.
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/includes/fields-form.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
includes/fields-list.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Fields and groups list functions
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/includes/fields-list.php $
6
  * $LastChangedDate: 2015-03-02 10:49:00 +0000 (Mon, 02 Mar 2015) $
7
  * $LastChangedRevision: 1103173 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Fields and groups list functions
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/includes/fields-list.php $
6
  * $LastChangedDate: 2015-03-02 10:49:00 +0000 (Mon, 02 Mar 2015) $
7
  * $LastChangedRevision: 1103173 $
8
  * $LastChangedBy: iworks $
includes/fields.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Fields and groups functions
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/includes/fields.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Fields and groups functions
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/includes/fields.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
includes/import-export.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Import/export data.
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/includes/import-export.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Import/export data.
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/includes/import-export.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
includes/migration.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Migration functions
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/includes/migration.php $
6
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
7
  * $LastChangedRevision: 1125405 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Migration functions
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/includes/migration.php $
6
  * $LastChangedDate: 2015-04-01 14:15:17 +0000 (Wed, 01 Apr 2015) $
7
  * $LastChangedRevision: 1125405 $
8
  * $LastChangedBy: iworks $
includes/usermeta-control.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Custom Fields Control Screen
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/includes/usermeta-control.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Custom Fields Control Screen
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/includes/usermeta-control.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
includes/usermeta-form.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Fields and groups form functions.
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/includes/usermeta-form.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Fields and groups form functions.
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/includes/usermeta-form.php $
6
  * $LastChangedDate: 2015-03-25 12:38:40 +0000 (Wed, 25 Mar 2015) $
7
  * $LastChangedRevision: 1120400 $
8
  * $LastChangedBy: iworks $
marketing/helpful-links.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
- * $HeadURL: https://www.onthegosystems.com/misc_svn/cck/branches/1.6.6/marketing/helpful-links.php $
4
- * $LastChangedDate: 2015-02-26 07:51:21 +0100 (Thu, 26 Feb 2015) $
5
  * $LastChangedRevision: 31922 $
6
  * $LastChangedBy: marcin $
7
  *
1
  <?php
2
  /**
3
+ * $HeadURL: https://www.onthegosystems.com/misc_svn/cck/tags/1.6.6.5/marketing/helpful-links.php $
4
+ * $LastChangedDate: 2015-02-26 06:51:21 +0000 (Thu, 26 Feb 2015) $
5
  * $LastChangedRevision: 31922 $
6
  * $LastChangedBy: marcin $
7
  *
plus/installer/changelog.txt CHANGED
@@ -1,3 +1,13 @@
 
 
 
 
 
 
 
 
 
 
1
  = 1.5.3 =
2
  * Fixed bug in WP_Installer::custom_plugins_api_call (filter for plugins_api) causing conflicts with other filters for plugins_api
3
 
1
+ = 1.5.5 =
2
+ * Fixed the logic for the high_priority parameter
3
+ * Fixed js bug causing a conflict with NextGen
4
+ * Fixed bug preventing users to install and upgrade Types when they didn't have a Toolset subscription
5
+ * Fixed bug preventing users to upgrade from the embedded Types to the full version
6
+
7
+ = 1.5.4 =
8
+ * Option to disable auto-updates
9
+ * Escaped urls generated with add_query_arg
10
+
11
  = 1.5.3 =
12
  * Fixed bug in WP_Installer::custom_plugins_api_call (filter for plugins_api) causing conflicts with other filters for plugins_api
13
 
plus/installer/includes/installer.class.php CHANGED
@@ -13,6 +13,8 @@ final class WP_Installer{
13
 
14
  protected $_gz_on = false;
15
 
 
 
16
  public static function instance() {
17
 
18
  if ( is_null( self::$_instance ) ) {
@@ -31,6 +33,8 @@ final class WP_Installer{
31
 
32
  add_action('admin_notices', array($this, 'show_site_key_nags'));
33
 
 
 
34
  add_action('admin_init', array($this, 'load_embedded_plugins'), 0);
35
 
36
  add_action('admin_menu', array($this, 'menu_setup'));
@@ -49,14 +53,6 @@ final class WP_Installer{
49
  $this->refresh_repositories_data();
50
  }
51
 
52
- /* Original setup for plugins updates check
53
- add_action('wp_maybe_auto_update', array($this, 'refresh_repositories_data'));
54
- if(isset($_GET['force-check']) && $_GET['force-check']){
55
- add_action('core_upgrade_preamble', array($this, 'refresh_repositories_data'));
56
- }
57
- add_action('wp_update_plugins', array($this, 'refresh_repositories_data'));
58
- */
59
-
60
  // Hook to wp_update_plugins before the WP API request
61
  // Using this in place of a missing hook in wp_update_plugins
62
  // This is being triggered every time WP checks for plugin updates
@@ -69,6 +65,7 @@ final class WP_Installer{
69
 
70
  //add_filter('wp_installer_buy_url', array($this, 'append_parameters_to_buy_url'));
71
 
 
72
 
73
  }
74
 
@@ -130,6 +127,33 @@ final class WP_Installer{
130
 
131
  }
132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  public function load_embedded_plugins(){
134
  if(file_exists($this->plugin_path() . '/embedded-plugins' )) {
135
  include_once $this->plugin_path() . '/embedded-plugins/embedded-plugins.class.php';
@@ -477,11 +501,18 @@ final class WP_Installer{
477
  }
478
 
479
  public function refresh_repositories_data(){
 
 
 
 
 
 
 
480
 
481
  foreach($this->repositories as $id => $data){
482
-
483
  $response = wp_remote_get($data['products']);
484
-
485
  if(is_wp_error($response)){
486
  // http fallback
487
  $data['products'] = preg_replace("@^https://@", 'http://', $data['products']);
@@ -489,13 +520,12 @@ final class WP_Installer{
489
  }
490
 
491
  if(is_wp_error($response)){
492
- $error = sprintf(__("Can't connect to %s") . "\n", $data['products']);
493
- if(WP_DEBUG){
494
- trigger_error($error, E_USER_WARNING);
495
- }else{
496
- error_log($error, E_USER_WARNING);
497
- }
498
-
499
  continue;
500
  }
501
 
@@ -528,7 +558,7 @@ final class WP_Installer{
528
  $this->save_settings();
529
 
530
  }
531
-
532
  public function show_products($args = array()){
533
 
534
  $screen = get_current_screen();
@@ -714,8 +744,12 @@ final class WP_Installer{
714
  if($affiliate_id && $affiliate_key){
715
  $url = add_query_arg(array('aid' => $affiliate_id, 'affiliate_key' => $affiliate_key), $url);
716
  }
717
-
718
- return $url;
 
 
 
 
719
 
720
  }
721
 
@@ -1254,25 +1288,35 @@ final class WP_Installer{
1254
  }
1255
 
1256
  public function plugin_is_embedded_version($name, $basename){
1257
-
1258
  $is = false;
1259
 
1260
- if($this->plugin_is_installed($name, $basename)){
 
 
 
 
 
 
 
 
 
 
 
 
 
1261
  return false;
1262
  }
1263
-
1264
- $plugins = get_plugins();
1265
-
1266
  foreach($plugins as $plugin_id => $plugin){
1267
-
1268
  // TBD
1269
- if( dirname($plugin_id) == $basename . '-embedded' && $plugin['Name'] == $name . ' Embedded'){
1270
- $is = true;
1271
  break;
1272
  }
1273
 
1274
  }
1275
-
1276
  return $is;
1277
 
1278
  }
@@ -1364,18 +1408,19 @@ final class WP_Installer{
1364
 
1365
  //upgrade or install?
1366
  foreach($plugins as $id => $plugin){
1367
- if(dirname($id) == $data['basename']){
 
1368
  $plugin_id = $id;
1369
  break;
1370
  }
1371
  }
1372
-
1373
- if($plugin_id){ //upgrade
1374
  $response['upgrade'] = 1;
1375
 
1376
- $plugin_is_active = is_plugin_active($plugin_id);
1377
 
1378
- $ret = $upgrader->upgrade($plugin_id);
1379
 
1380
  if(!$ret && !empty($upgrader->skin->installer_error)){
1381
  if(is_wp_error($upgrader->skin->installer_error)){
@@ -1391,7 +1436,11 @@ final class WP_Installer{
1391
  }
1392
 
1393
  }else{ //install
1394
-
 
 
 
 
1395
  $response['install'] = 1;
1396
  $ret = $upgrader->install($data['url']);
1397
  if(!$ret && !empty($upgrader->skin->installer_error)){
@@ -1518,15 +1567,21 @@ final class WP_Installer{
1518
  $slug = $args->slug;
1519
 
1520
  foreach($this->settings['repositories'] as $repository_id => $repository){
1521
-
 
 
 
 
 
 
1522
  foreach($repository['data']['packages'] as $package){
1523
 
1524
  foreach($package['products'] as $product){
1525
 
1526
  foreach($product['downloads'] as $download){
1527
-
1528
  if($download['basename'] == $slug){
1529
-
1530
  $res = new stdClass();
1531
  $res->external = true;
1532
 
@@ -1537,9 +1592,17 @@ final class WP_Installer{
1537
  $res->author_profile = '';
1538
  $res->last_updated = $download['date'];
1539
  //$res->homepage = $download['url'];
 
 
 
 
 
 
 
 
1540
  $res->homepage = $repository['data']['url'];
1541
  $res->sections = array('Description' => $download['description'], 'Changelog' => $download['changelog']);
1542
-
1543
  return $res;
1544
 
1545
  }
@@ -1579,12 +1642,16 @@ final class WP_Installer{
1579
  $site_key = $repository['subscription']['key'];
1580
  //$subscription_type = $this->get_subscription_type_for_repository($repository_id);
1581
  }
1582
-
1583
  foreach($repository['data']['packages'] as $package){
1584
 
1585
  foreach($package['products'] as $product){
1586
 
1587
  foreach($product['downloads'] as $download){
 
 
 
 
1588
 
1589
  if(empty($update_plugins->response[$plugin_id]) && $download['name'] == $name && $download['basename'] == $slug && version_compare($download['version'], $version, '>')){
1590
 
@@ -1618,7 +1685,7 @@ final class WP_Installer{
1618
  return $update_plugins;
1619
 
1620
  }
1621
-
1622
  public function setup_plugins_page_notices(){
1623
 
1624
  $plugins = get_plugins();
@@ -1637,13 +1704,17 @@ final class WP_Installer{
1637
  }else{
1638
  $site_key = $repository['subscription']['key'];
1639
  }
1640
-
1641
  foreach($repository['data']['packages'] as $package){
1642
 
1643
  foreach($package['products'] as $product){
1644
 
1645
  foreach($product['downloads'] as $download){
1646
-
 
 
 
 
1647
  if($download['name'] == $name && $download['basename'] == $slug){
1648
 
1649
  if(!$site_key){
@@ -1672,7 +1743,7 @@ final class WP_Installer{
1672
  <tr class="plugin-update-tr"><td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="plugin-update colspanchange">
1673
  <div class="update-message installer-q-icon">
1674
  <?php
1675
- printf(__('You need to 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'),
1676
  '<a href="' . $this->menu_url() . '">', '</a>');
1677
  ?>
1678
  </div>
@@ -2005,6 +2076,7 @@ final class WP_Installer{
2005
  $plugin_repository = $repository_id;
2006
  $product_name = $repository['data']['product-name'];
2007
  $plugin_name = $download['name'];
 
2008
  break;
2009
  }
2010
 
@@ -2026,6 +2098,7 @@ final class WP_Installer{
2026
  if ($site_key) {
2027
  $subscription_data = $this->fetch_subscription_data($plugin_repository, $site_key);
2028
  }
 
2029
  $sub_cache[$plugin_repository]['site_key'] = $site_key;
2030
  $sub_cache[$plugin_repository]['subscription_data'] = isset($subscription_data) ? $subscription_data : false;
2031
  }else{
@@ -2035,6 +2108,10 @@ final class WP_Installer{
2035
 
2036
  }
2037
 
 
 
 
 
2038
  if (empty($site_key) || empty($subscription_data)) {
2039
 
2040
 
@@ -2077,6 +2154,7 @@ final class WP_Installer{
2077
  $plugin_repository = $repository_id;
2078
  $product_name = $repository['data']['product-name'];
2079
  $plugin_name = $download['name'];
 
2080
  break;
2081
  }
2082
 
@@ -2096,7 +2174,7 @@ final class WP_Installer{
2096
  $subscription_data = $this->fetch_subscription_data($plugin_repository, $site_key);
2097
  }
2098
 
2099
- if (empty($site_key) || empty($subscription_data)) {
2100
 
2101
  $error_message = sprintf(__("%s cannot update because your site's registration is not valid. Please %sregister %s%s again for this site first.", 'installer'),
2102
  '<strong>'.$plugin_name . '</strong>', '<a href="' . $this->menu_url() . '&validate_repository=' . $plugin_repository .
13
 
14
  protected $_gz_on = false;
15
 
16
+ private $admin_messages = array();
17
+
18
  public static function instance() {
19
 
20
  if ( is_null( self::$_instance ) ) {
33
 
34
  add_action('admin_notices', array($this, 'show_site_key_nags'));
35
 
36
+ add_action('admin_notices', array($this, 'show_admin_messages'));
37
+
38
  add_action('admin_init', array($this, 'load_embedded_plugins'), 0);
39
 
40
  add_action('admin_menu', array($this, 'menu_setup'));
53
  $this->refresh_repositories_data();
54
  }
55
 
 
 
 
 
 
 
 
 
56
  // Hook to wp_update_plugins before the WP API request
57
  // Using this in place of a missing hook in wp_update_plugins
58
  // This is being triggered every time WP checks for plugin updates
65
 
66
  //add_filter('wp_installer_buy_url', array($this, 'append_parameters_to_buy_url'));
67
 
68
+ add_action('init', array($this,'load_locale'));
69
 
70
  }
71
 
127
 
128
  }
129
 
130
+ public function register_admin_message($text, $type = 'updated'){
131
+ $this->admin_messages[] = array('text' => $text, 'type' => $type);
132
+ }
133
+
134
+ public function show_admin_messages(){
135
+ if(!empty($this->admin_messages)){
136
+ foreach($this->admin_messages as $message){
137
+ ?>
138
+ <div class="<?php echo esc_attr($message['type']) ?>">
139
+ <p>
140
+ <?php echo $message['text'] ?>
141
+ </p>
142
+ </div>
143
+ <?php
144
+ }
145
+ }
146
+ }
147
+
148
+ public function load_locale(){
149
+ $locale = get_locale();
150
+ $locale = apply_filters( 'plugin_locale', $locale, 'installer' );
151
+ $mo_file = $this->plugin_path() . '/locale/installer-' . $locale . '.mo';
152
+ if(file_exists($mo_file)){
153
+ load_textdomain( 'installer', $mo_file );
154
+ }
155
+ }
156
+
157
  public function load_embedded_plugins(){
158
  if(file_exists($this->plugin_path() . '/embedded-plugins' )) {
159
  include_once $this->plugin_path() . '/embedded-plugins/embedded-plugins.class.php';
501
  }
502
 
503
  public function refresh_repositories_data(){
504
+ static $checked = false;
505
+
506
+ if(defined('OTGS_DISABLE_AUTO_UPDATES') && OTGS_DISABLE_AUTO_UPDATES && empty($_GET['force-check']) || $checked){
507
+ return;
508
+ }
509
+
510
+ $checked = true;
511
 
512
  foreach($this->repositories as $id => $data){
513
+
514
  $response = wp_remote_get($data['products']);
515
+
516
  if(is_wp_error($response)){
517
  // http fallback
518
  $data['products'] = preg_replace("@^https://@", 'http://', $data['products']);
520
  }
521
 
522
  if(is_wp_error($response)){
523
+
524
+ $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));
525
+ $error .= '<br /><br /><code>define("OTGS_DISABLE_AUTO_UPDATES", true);</code>';
526
+
527
+ $this->register_admin_message($error, 'error');
528
+
 
529
  continue;
530
  }
531
 
558
  $this->save_settings();
559
 
560
  }
561
+
562
  public function show_products($args = array()){
563
 
564
  $screen = get_current_screen();
744
  if($affiliate_id && $affiliate_key){
745
  $url = add_query_arg(array('aid' => $affiliate_id, 'affiliate_key' => $affiliate_key), $url);
746
  }
747
+
748
+ $url = apply_filters('wp_installer_buy_url', $url);
749
+
750
+ $url = esc_url($url);
751
+
752
+ return $url;
753
 
754
  }
755
 
1288
  }
1289
 
1290
  public function plugin_is_embedded_version($name, $basename){
 
1291
  $is = false;
1292
 
1293
+ $plugins = get_plugins();
1294
+
1295
+ //false if teh full version is also installed
1296
+ $is_full_installed = false;
1297
+ foreach($plugins as $plugin_id => $plugin){
1298
+
1299
+ if(($plugin['Name'] == $name && !preg_match("#-embedded$#", $basename)) ){
1300
+ $is_full_installed = true;
1301
+ break;
1302
+ }
1303
+
1304
+ }
1305
+
1306
+ if($is_full_installed){
1307
  return false;
1308
  }
1309
+
 
 
1310
  foreach($plugins as $plugin_id => $plugin){
1311
+
1312
  // TBD
1313
+ if( dirname($plugin_id) == $basename . '-embedded' && $plugin['Name'] == $name . ' Embedded'){
1314
+ $is = true;
1315
  break;
1316
  }
1317
 
1318
  }
1319
+
1320
  return $is;
1321
 
1322
  }
1408
 
1409
  //upgrade or install?
1410
  foreach($plugins as $id => $plugin){
1411
+ $is_embedded = $this->plugin_is_embedded_version(preg_replace('/ Embedded$/', '', $plugin['Name']), preg_replace('/-embedded$/', '', dirname($id)));
1412
+ if(dirname($id) == $data['basename'] || $is_embedded && preg_replace('/-embedded$/', '', dirname($id)) == $data['basename']){
1413
  $plugin_id = $id;
1414
  break;
1415
  }
1416
  }
1417
+
1418
+ if($plugin_id && empty($is_embedded)){ //upgrade
1419
  $response['upgrade'] = 1;
1420
 
1421
+ $plugin_is_active = is_plugin_active($plugin_id);
1422
 
1423
+ $ret = $upgrader->upgrade($plugin_id);
1424
 
1425
  if(!$ret && !empty($upgrader->skin->installer_error)){
1426
  if(is_wp_error($upgrader->skin->installer_error)){
1436
  }
1437
 
1438
  }else{ //install
1439
+
1440
+ if($is_embedded){
1441
+ delete_plugins(array($plugin_id));
1442
+ }
1443
+
1444
  $response['install'] = 1;
1445
  $ret = $upgrader->install($data['url']);
1446
  if(!$ret && !empty($upgrader->skin->installer_error)){
1567
  $slug = $args->slug;
1568
 
1569
  foreach($this->settings['repositories'] as $repository_id => $repository){
1570
+
1571
+ if(!$this->repository_has_valid_subscription($repository_id)){
1572
+ $site_key = false;
1573
+ }else{
1574
+ $site_key = $repository['subscription']['key'];
1575
+ }
1576
+
1577
  foreach($repository['data']['packages'] as $package){
1578
 
1579
  foreach($package['products'] as $product){
1580
 
1581
  foreach($product['downloads'] as $download){
1582
+
1583
  if($download['basename'] == $slug){
1584
+
1585
  $res = new stdClass();
1586
  $res->external = true;
1587
 
1592
  $res->author_profile = '';
1593
  $res->last_updated = $download['date'];
1594
  //$res->homepage = $download['url'];
1595
+
1596
+ if($site_key){
1597
+ $res->download_link = $this->append_site_key_to_download_url($download['url'], $site_key, $repository_id);
1598
+ }else{
1599
+ // if(!empty($download['free-on-wporg'])
1600
+ return false; //try somewhere else. e.g. wordpress.org
1601
+ }
1602
+
1603
  $res->homepage = $repository['data']['url'];
1604
  $res->sections = array('Description' => $download['description'], 'Changelog' => $download['changelog']);
1605
+
1606
  return $res;
1607
 
1608
  }
1642
  $site_key = $repository['subscription']['key'];
1643
  //$subscription_type = $this->get_subscription_type_for_repository($repository_id);
1644
  }
1645
+
1646
  foreach($repository['data']['packages'] as $package){
1647
 
1648
  foreach($package['products'] as $product){
1649
 
1650
  foreach($product['downloads'] as $download){
1651
+
1652
+ if(!$site_key && !empty($download['free-on-wporg'])) {
1653
+ continue;
1654
+ }
1655
 
1656
  if(empty($update_plugins->response[$plugin_id]) && $download['name'] == $name && $download['basename'] == $slug && version_compare($download['version'], $version, '>')){
1657
 
1685
  return $update_plugins;
1686
 
1687
  }
1688
+
1689
  public function setup_plugins_page_notices(){
1690
 
1691
  $plugins = get_plugins();
1704
  }else{
1705
  $site_key = $repository['subscription']['key'];
1706
  }
1707
+
1708
  foreach($repository['data']['packages'] as $package){
1709
 
1710
  foreach($package['products'] as $product){
1711
 
1712
  foreach($product['downloads'] as $download){
1713
+
1714
+ if(!$site_key && !empty($download['free-on-wporg'])) {
1715
+ continue;
1716
+ }
1717
+
1718
  if($download['name'] == $name && $download['basename'] == $slug){
1719
 
1720
  if(!$site_key){
1743
  <tr class="plugin-update-tr"><td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="plugin-update colspanchange">
1744
  <div class="update-message installer-q-icon">
1745
  <?php
1746
+ printf(__('You need to 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'),
1747
  '<a href="' . $this->menu_url() . '">', '</a>');
1748
  ?>
1749
  </div>
2076
  $plugin_repository = $repository_id;
2077
  $product_name = $repository['data']['product-name'];
2078
  $plugin_name = $download['name'];
2079
+ $free_on_wporg = !empty($download['free-on-wporg']);
2080
  break;
2081
  }
2082
 
2098
  if ($site_key) {
2099
  $subscription_data = $this->fetch_subscription_data($plugin_repository, $site_key);
2100
  }
2101
+
2102
  $sub_cache[$plugin_repository]['site_key'] = $site_key;
2103
  $sub_cache[$plugin_repository]['subscription_data'] = isset($subscription_data) ? $subscription_data : false;
2104
  }else{
2108
 
2109
  }
2110
 
2111
+ if(!$site_key && !empty($free_on_wporg)){ // allow the download from wp.org
2112
+ continue;
2113
+ }
2114
+
2115
  if (empty($site_key) || empty($subscription_data)) {
2116
 
2117
 
2154
  $plugin_repository = $repository_id;
2155
  $product_name = $repository['data']['product-name'];
2156
  $plugin_name = $download['name'];
2157
+ $free_on_wporg = !empty($download['free-on-wporg']);
2158
  break;
2159
  }
2160
 
2174
  $subscription_data = $this->fetch_subscription_data($plugin_repository, $site_key);
2175
  }
2176
 
2177
+ if ( (empty($site_key) || empty($subscription_data)) && empty($free_on_wporg)) {
2178
 
2179
  $error_message = sprintf(__("%s cannot update because your site's registration is not valid. Please %sregister %s%s again for this site first.", 'installer'),
2180
  '<strong>'.$plugin_name . '</strong>', '<a href="' . $this->menu_url() . '&validate_repository=' . $plugin_repository .
plus/installer/installer.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- define('WP_INSTALLER_VERSION', '1.5.3');
3
 
4
  include_once dirname(__FILE__) . '/includes/installer.class.php';
5
 
1
  <?php
2
+ define('WP_INSTALLER_VERSION', '1.5.5');
3
 
4
  include_once dirname(__FILE__) . '/includes/installer.class.php';
5
 
plus/installer/loader.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Installer
4
  Plugin URI: http://wp-compatibility.com/installer-plugin/
5
  Description: Need help buying, installing and upgrading commercial themes and plugins? **Installer** handles all this for you, right from the WordPress admin. Installer lets you find themes and plugins from different sources, then, buy them from within the WordPress admin. Instead of manually uploading and unpacking, you'll see those themes and plugins available, just like any other plugin you're getting from WordPress.org.
6
- Version: 1.5.3
7
  Author: OnTheGoSystems Inc.
8
  Author URI: http://www.onthegosystems.com/
9
  */
@@ -28,7 +28,7 @@ $wp_installer_instance = dirname(__FILE__) . '/installer.php';
28
  global $wp_installer_instances;
29
  $wp_installer_instances[$wp_installer_instance] = array(
30
  'bootfile' => $wp_installer_instance,
31
- 'version' => '1.5.3'
32
  );
33
 
34
  // Only one of these in the end
@@ -39,7 +39,8 @@ add_action('after_setup_theme', 'wpml_installer_instance_delegator', 1);
39
  if(!function_exists('wpml_installer_instance_delegator')){
40
  function wpml_installer_instance_delegator(){
41
  global $wp_installer_instances;
42
-
 
43
  foreach($wp_installer_instances as $instance){
44
 
45
  if(!isset($delegate)){
@@ -47,11 +48,22 @@ if(!function_exists('wpml_installer_instance_delegator')){
47
  continue;
48
  }
49
 
50
- if(version_compare($instance['version'], $delegate['version'], '>') || !empty($instance['args']['high_priority'])){
51
  $delegate = $instance;
52
  }
53
  }
54
 
 
 
 
 
 
 
 
 
 
 
 
55
  include_once $delegate['bootfile'];
56
 
57
  // set configuration
3
  Plugin Name: Installer
4
  Plugin URI: http://wp-compatibility.com/installer-plugin/
5
  Description: Need help buying, installing and upgrading commercial themes and plugins? **Installer** handles all this for you, right from the WordPress admin. Installer lets you find themes and plugins from different sources, then, buy them from within the WordPress admin. Instead of manually uploading and unpacking, you'll see those themes and plugins available, just like any other plugin you're getting from WordPress.org.
6
+ Version: 1.5.5
7
  Author: OnTheGoSystems Inc.
8
  Author URI: http://www.onthegosystems.com/
9
  */
28
  global $wp_installer_instances;
29
  $wp_installer_instances[$wp_installer_instance] = array(
30
  'bootfile' => $wp_installer_instance,
31
+ 'version' => '1.5.5'
32
  );
33
 
34
  // Only one of these in the end
39
  if(!function_exists('wpml_installer_instance_delegator')){
40
  function wpml_installer_instance_delegator(){
41
  global $wp_installer_instances;
42
+
43
+ // version based election
44
  foreach($wp_installer_instances as $instance){
45
 
46
  if(!isset($delegate)){
48
  continue;
49
  }
50
 
51
+ if(version_compare($instance['version'], $delegate['version'], '>')){
52
  $delegate = $instance;
53
  }
54
  }
55
 
56
+ // priority based election
57
+ $highest_priority = null;
58
+ foreach($wp_installer_instances as $instance) {
59
+ if(isset($instance['args']['high_priority'])){
60
+ if(is_null($highest_priority) || $instance['args']['high_priority'] <= $highest_priority){
61
+ $highest_priority = $instance['args']['high_priority'];
62
+ $delegate = $instance;
63
+ }
64
+ }
65
+ }
66
+
67
  include_once $delegate['bootfile'];
68
 
69
  // set configuration
plus/installer/locale/orig/installer.po ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file was generated by WPML
2
+ # WPML is a WordPress plugin that can turn any WordPress site into a full featured multilingual content management system.
3
+ # https://wpml.org
4
+ msgid ""
5
+ msgstr ""
6
+ "Content-Type: text/plain; charset=utf-8\n"
7
+ "Content-Transfer-Encoding: 8bit\n"
8
+ "Project-Id-Version:WPML_EXPORT\n"
9
+ "POT-Creation-Date: \n"
10
+ "PO-Revision-Date: \n"
11
+ "Last-Translator: \n"
12
+ "Language-Team: \n"
13
+ "Language:en\n"
14
+ "MIME-Version: 1.0\n"
15
+
16
+ msgid "Installer"
17
+ msgstr ""
18
+
19
+ msgid "Registered"
20
+ msgstr ""
21
+
22
+ msgid "Register"
23
+ msgstr ""
24
+
25
+ msgid "To get automatic updates, you need to register %s for this site. %sRegister %s%s"
26
+ msgstr ""
27
+
28
+ msgid "Dismiss"
29
+ msgstr ""
30
+
31
+ msgid "Commercial"
32
+ msgstr ""
33
+
34
+ msgid "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:"
35
+ msgstr ""
36
+
37
+ msgid "No repositories defined."
38
+ msgstr ""
39
+
40
+ msgid "%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."
41
+ msgstr ""
42
+
43
+ msgid "Invalid site key for the current site."
44
+ msgstr ""
45
+
46
+ msgid "You will have to renew your subscription in order to continue getting the updates and support."
47
+ msgstr ""
48
+
49
+ msgid "%sRenew here%s."
50
+ msgstr ""
51
+
52
+ msgid "Your subscription appears to no longer be valid. Please try to register again using a valid site key."
53
+ msgstr ""
54
+
55
+ msgid "You need to have a valid subscription in order to get upgrades or support for this plugin. %sPurchase a subscription or enter an existing site key%s."
56
+ msgstr ""
57
+
58
+ msgid "%s cannot update because your site's registration is not valid. Please %sregister %s%s again for this site first."
59
+ msgstr ""
60
+
61
+ msgid "Update Plugin"
62
+ msgstr ""
63
+
64
+ msgid "Return to the plugins page"
65
+ msgstr ""
66
+
67
+ msgid "Your subscription expires in %d day."
68
+ msgstr ""
69
+
70
+ msgid "Your subscription expires in %d days."
71
+ msgstr ""
72
+
73
+ msgid "Downloading is not possible because WordPress cannot write into the plugins folder. %sHow to fix%s."
74
+ msgstr ""
75
+
76
+ msgid "Plugin"
77
+ msgstr ""
78
+
79
+ msgid "downloading..."
80
+ msgstr ""
81
+
82
+ msgid "failed!"
83
+ msgstr ""
84
+
85
+ msgid "downloaded"
86
+ msgstr ""
87
+
88
+ msgid "activating"
89
+ msgstr ""
90
+
91
+ msgid "activated"
92
+ msgstr ""
93
+
94
+ msgid "Activate after download"
95
+ msgstr ""
96
+
97
+ msgid "Operation complete!"
98
+ msgstr ""
99
+
100
+ msgid "Download failed!\n\nClick OK to revalidate your subscription or CANCEL to try again."
101
+ msgstr ""
102
+
103
+ msgid "Available"
104
+ msgstr ""
105
+
106
+ msgid "Installed"
107
+ msgstr ""
108
+
109
+ msgid "Downloading"
110
+ msgstr ""
111
+
112
+ msgid "Activate"
113
+ msgstr ""
114
+
115
+ msgid "Download"
116
+ msgstr ""
117
+
118
+ msgid "Downloads:"
119
+ msgstr ""
120
+
121
+ msgid "Current version"
122
+ msgstr ""
123
+
124
+ msgid "Released"
125
+ msgstr ""
126
+
127
+ msgid "Installed version"
128
+ msgstr ""
129
+
130
+ msgid "(embedded)"
131
+ msgstr ""
132
+
133
+ msgid "installing..."
134
+ msgstr ""
135
+
136
+ msgid "updating..."
137
+ msgstr ""
138
+
139
+ msgid "installed"
140
+ msgstr ""
141
+
142
+ msgid "updated"
143
+ msgstr ""
144
+
145
+ msgid "Download failed!\n\nPlease refresh the page and try again."
146
+ msgstr ""
147
+
148
+ msgid "Incorrect setup"
149
+ msgstr ""
150
+
151
+ msgid "Invalid product"
152
+ msgstr ""
153
+
154
+ msgid "Unknown repository"
155
+ msgstr ""
156
+
157
+ msgid " Your current site key (%s) does not match the selected product (%s)."
158
+ msgstr ""
159
+
160
+ msgid "Buy %s"
161
+ msgstr ""
162
+
163
+ msgid "Already bought %s?"
164
+ msgstr ""
165
+
166
+ msgid "Renew %s"
167
+ msgstr ""
168
+
169
+ msgid "Remove current site key (%s)"
170
+ msgstr ""
171
+
172
+ msgid "%s support on wpml.org"
173
+ msgstr ""
174
+
175
+ msgid "Enter site key"
176
+ msgstr ""
177
+
178
+ msgid "Subscription is expired."
179
+ msgstr ""
180
+
181
+ msgid "Add"
182
+ msgstr ""
183
+
184
+ msgid "Are you sure you want to remove this site key?"
185
+ msgstr ""
186
+
187
+ msgid "Register %s"
188
+ msgstr ""
189
+
190
+ msgid "1. Go to your %s%s account%s and add this site URL: %s"
191
+ msgstr ""
192
+
193
+ msgid "Unregister %s from this site"
194
+ msgstr ""
195
+
196
+ msgid "%s is registered on this site. You will receive automatic updates until %s"
197
+ msgstr ""
198
+
199
+ msgid "%s is registered on this site. Your Lifetime account gives you updates for life."
200
+ msgstr ""
201
+
202
+ msgid "This page lets you install plugins and update existing plugins. To remove any of these plugins, go to the %splugins%s page and if you have the permission to remove plugins you should be able to do this."
203
+ msgstr ""
204
+
205
+ msgid "Already bought?"
206
+ msgstr ""
207
+
208
+ msgid "2. Enter your site key"
209
+ msgstr ""
210
+
211
+ msgid "Subscription is expired. You need to either purchase a new subscription or upgrade if available."
212
+ msgstr ""
213
+
214
+ msgid "Check for updates"
215
+ msgstr ""
216
+
217
+ msgid "Individual components"
218
+ msgstr ""
219
+
220
+ msgid "OK"
221
+ msgstr ""
222
+
223
+ msgid "Cancel"
224
+ msgstr ""
225
+
226
+ msgid "Are you sure you want to unregister?"
227
+ msgstr ""
228
+
229
+ msgid "Click to see individual components options."
230
+ msgstr ""
plus/installer/res/js/admin.js CHANGED
@@ -18,7 +18,7 @@
18
 
19
  otgs_wp_installer.scroll_to_repository();
20
 
21
- if( pagenow == 'plugins'){
22
 
23
  jQuery(document).ajaxSuccess(function(event, xhr, settings) {
24
  var data = otgs_wp_installer.getQueryParameters(settings.data);
18
 
19
  otgs_wp_installer.scroll_to_repository();
20
 
21
+ if( typeof pagenow != 'undefined' && pagenow == 'plugins'){
22
 
23
  jQuery(document).ajaxSuccess(function(event, xhr, settings) {
24
  var data = otgs_wp_installer.getQueryParameters(settings.data);
plus/types-access.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Types Access teaser.
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/plus/types-access.php $
6
  * $LastChangedDate: 2015-03-02 10:49:00 +0000 (Mon, 02 Mar 2015) $
7
  * $LastChangedRevision: 1103173 $
8
  * $LastChangedBy: iworks $
2
  /*
3
  * Types Access teaser.
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/plus/types-access.php $
6
  * $LastChangedDate: 2015-03-02 10:49:00 +0000 (Mon, 02 Mar 2015) $
7
  * $LastChangedRevision: 1103173 $
8
  * $LastChangedBy: iworks $
readme.txt CHANGED
@@ -1,17 +1,17 @@
1
- === Types - Custom Fields and Custom Post Types Management ===
2
  Contributors: brucepearson, AmirHelzer, jozik, mihaimihai, iworks
3
  Donate link: http://wp-types.com
4
- Tags: CMS, custom field, custom fields, custom post type, custom post types, post, post type, post types, cck, taxonomy, fields
5
  License: GPLv2
6
  Requires at least: 3.4
7
- Tested up to: 4.1.3
8
- Stable tag: 1.6.6.3
9
 
10
- The complete and reliable plugin for managing custom post types, custom taxonomy and custom fields.
11
 
12
  == Description ==
13
 
14
- Types let's you customize the WordPress admin by adding content types, custom fields and taxonomy. You will be able to craft the WordPress admin and turn it into your very own content management system.
15
 
16
  [vimeo http://vimeo.com/112053938]
17
 
@@ -67,12 +67,12 @@ Types includes support for a wide list of custom fields.
67
 
68
  Types custom fields use the standard WordPress post-meta table, making it cross-compatible with any theme or plugin. Additionally, all fields can be **repeating fields**.
69
 
70
- = CUSTOM POST TYPES AND TAXONOMY =
71
 
72
- Types lets you easily setup custom post types and taxonomy. You can create new post types in seconds and use the advanced settings to customize every aspect.
73
 
74
  * Full control over every feature
75
- * Associate taxonomy with custom post types
76
  * Integrated control over custom fields display for different post types
77
 
78
  = BUILD RELATIONAL SITES =
@@ -112,7 +112,7 @@ Sure you can! Types, by itself, replaces several other plugins that define custo
112
 
113
  If you also buy Views, with Toolset, you'll have a complete solution for both **defining** and **displaying** custom data. You can achieve everything that Views does if you're fluent in PHP and know WordPress API. When you buy Views, you're also supporting Types development, but we're not looking for donations. You should consider Views for its value and nothing else.
114
 
115
- = I am already a ninje developer, do I really need Views? =
116
 
117
  We honestly think so. Even if you're an expert developer, do you really enjoy doing the same stuff over and over again? With Views, you can concentrate on the unique features of every new site that you build, without wasting time on routine stuff.
118
 
@@ -126,7 +126,7 @@ Go to Custom fields control, under the Types menu. There, you can tell Types to
126
 
127
  = How do I migrate an existing site to use Types? =
128
 
129
- The most important thing is to remember not to define custom post types and taxonomy in more than one place. If you previously defined them in PHP, first, remove your PHP code with the manual definition. The content will appear to temporarily vanish. Don't panic. Now, redefine the same custom post types and taxonomy with Types. Everything will return :-)
130
 
131
  Types also includes data import from other plugins such as Custom Post UI and Advanced Custom Fields.
132
 
@@ -134,7 +134,7 @@ Types also includes data import from other plugins such as Custom Post UI and Ad
134
 
135
  Yes! Types includes its own import and export features, using an XML settings file. If you create a development site, you can easily transfer settings to the production site.
136
 
137
- = What is the advantage of using Types over separate plugins for custom post types, taxonomy and fields? =
138
 
139
  Types offers a much richer integration, which is simply impossible with separate plugins. For example, you have fine-grained control of where to display custom meta-boxes. Because Types defines both the post types and fields, we have greater control of where things can go.
140
 
@@ -144,7 +144,7 @@ Additionally, Types is the only plugin that lets you define parent/child relatio
144
  == Screenshots ==
145
 
146
  1. Custom post types list
147
- 2. Defining custom taxonomy list
148
  3. Defining custom post type
149
  4. Defining custom fields (meta-groups)
150
  5. Editing custom fields
@@ -155,6 +155,16 @@ Additionally, Types is the only plugin that lets you define parent/child relatio
155
 
156
  == Changelog ==
157
 
 
 
 
 
 
 
 
 
 
 
158
  = 1.6.6.3 =
159
 
160
  * Release date: 2015-04-27
@@ -173,7 +183,7 @@ Additionally, Types is the only plugin that lets you define parent/child relatio
173
  = 1.6.6 =
174
 
175
  * Release date: 2015-04-02
176
- * Fixed problem with shortcode "playlist" used in WYSIWYG field. http://wp-types.com/forums/topic/media-play-list-not-outputting-from-custom-wysiwyg-field-js-error/
177
  * Fixed empty title problem for filter "wpt_field_options" on user edit/add screen https://wp-types.com/forums/topic/populate-select-field-in-wpcf-um-group/
178
  * Added ability to create CPT without title and editor. https://wp-types.com/forums/topic/inaccurate-warning-message-when-creatingediting-a-cpt/
179
  * Added Skype field validation.
@@ -181,7 +191,7 @@ Additionally, Types is the only plugin that lets you define parent/child relatio
181
  * Added ability to add to menu link to archive of post type.
182
  * Added ability to setup meta box callback function. https://wp-types.com/forums/topic/add-support-for-meta_box_cb-in-custom-taxonomy/
183
  * Added ability to add HTML5 placeholder attribute for custom post fields.
184
- * Fixed problem with CPT labels. https://wp-types.com/forums/topic/after-save-cpts-cutom-labels-always-revert-to-default-label/
185
  * Added a filters to the post title as option text in the select dropdown for post parents. wpcf_pr_belongs_items for array of options and wpcf_pr_belongs_item for one option. https://wp-types.com/forums/topic/help-to-distinguish-duplicate-titles-in-post-relationship/
186
  * Added ability to choose custom fields to display it on custom posts admin list.
187
  * Fixed problem with saving parent data into child data. On parent edit screen.
@@ -215,7 +225,7 @@ Additionally, Types is the only plugin that lets you define parent/child relatio
215
  = 1.6.4 =
216
 
217
  * Release date: 2014-11-17
218
- * Fixed an issue with dependency between custom taxonomy and custom posts when importing data from the "Custom Post Type UI" plugin.
219
  * Fixed an issue with editing checkboxes with the option "save 0 to the database" selected, created for Custom Posts. http://wp-types.com/forums/topic/checkbox-custom-field-doesnt-save-value-since-upgrade-to-version-1-6-2/ http://wp-types.com/forums/topic/types-checkbox-field-not-saving-after-save-0-to-the-database/
220
  * Fixed an issue with PHP notices being thrown when relative URLs to images were used. http://wp-types.com/forums/topic/php-notice-undefined-index-host-in-image-php/
221
  * Fixed the example file which adds the Google Map field to Types and allows users to enter coordinates to display a map on the front-end.
1
+ === Types ===
2
  Contributors: brucepearson, AmirHelzer, jozik, mihaimihai, iworks
3
  Donate link: http://wp-types.com
4
+ Tags: CMS, custom field, custom fields, custom post type, custom post types, field, fields post, post type, post types, taxonomies, taxonomy
5
  License: GPLv2
6
  Requires at least: 3.4
7
+ Tested up to: 4.2.2
8
+ Stable tag: 1.6.6.5
9
 
10
+ The complete and reliable plugin for managing custom post types, custom taxonomies and custom fields.
11
 
12
  == Description ==
13
 
14
+ Types let's you customize the WordPress admin by adding content types, custom fields and taxonomies. You will be able to craft the WordPress admin and turn it into your very own content management system.
15
 
16
  [vimeo http://vimeo.com/112053938]
17
 
67
 
68
  Types custom fields use the standard WordPress post-meta table, making it cross-compatible with any theme or plugin. Additionally, all fields can be **repeating fields**.
69
 
70
+ = CUSTOM POST TYPES AND TAXONOMIES =
71
 
72
+ Types lets you easily setup custom post types and taxonomies. You can create new post types in seconds and use the advanced settings to customize every aspect.
73
 
74
  * Full control over every feature
75
+ * Associate taxonomies with custom post types
76
  * Integrated control over custom fields display for different post types
77
 
78
  = BUILD RELATIONAL SITES =
112
 
113
  If you also buy Views, with Toolset, you'll have a complete solution for both **defining** and **displaying** custom data. You can achieve everything that Views does if you're fluent in PHP and know WordPress API. When you buy Views, you're also supporting Types development, but we're not looking for donations. You should consider Views for its value and nothing else.
114
 
115
+ = I am already a ninja developer, do I really need Views? =
116
 
117
  We honestly think so. Even if you're an expert developer, do you really enjoy doing the same stuff over and over again? With Views, you can concentrate on the unique features of every new site that you build, without wasting time on routine stuff.
118
 
126
 
127
  = How do I migrate an existing site to use Types? =
128
 
129
+ The most important thing is to remember not to define custom post types and taxonomies in more than one place. If you previously defined them in PHP, first, remove your PHP code with the manual definition. The content will appear to temporarily vanish. Don't panic. Now, redefine the same custom post types and taxonomies with Types. Everything will return :-)
130
 
131
  Types also includes data import from other plugins such as Custom Post UI and Advanced Custom Fields.
132
 
134
 
135
  Yes! Types includes its own import and export features, using an XML settings file. If you create a development site, you can easily transfer settings to the production site.
136
 
137
+ = What is the advantage of using Types over separate plugins for custom post types, taxonomies and fields? =
138
 
139
  Types offers a much richer integration, which is simply impossible with separate plugins. For example, you have fine-grained control of where to display custom meta-boxes. Because Types defines both the post types and fields, we have greater control of where things can go.
140
 
144
  == Screenshots ==
145
 
146
  1. Custom post types list
147
+ 2. Defining custom taxonomies list
148
  3. Defining custom post type
149
  4. Defining custom fields (meta-groups)
150
  5. Editing custom fields
155
 
156
  == Changelog ==
157
 
158
+ = 1.6.6.5 =
159
+
160
+ * Release date: 2015-05-20
161
+ * Fixed problem with Uncaught ReferenceError: pagenow is not defined. http://wp-types.com/forums/topic/nextgen-gallery-broken-urgent/
162
+
163
+ = 1.6.6.4 =
164
+
165
+ * Release date: 2015-05-12
166
+ * Fixed problem Export/Import for CPT with custom fields.
167
+
168
  = 1.6.6.3 =
169
 
170
  * Release date: 2015-04-27
183
  = 1.6.6 =
184
 
185
  * Release date: 2015-04-02
186
+ * Fixed problem with shortcode "playlist" used in WYSIWYG field. http://wp-types.com/forums/topic/media-play-list-not-outputting-from-custom-wysiwyg-field-js-error/
187
  * Fixed empty title problem for filter "wpt_field_options" on user edit/add screen https://wp-types.com/forums/topic/populate-select-field-in-wpcf-um-group/
188
  * Added ability to create CPT without title and editor. https://wp-types.com/forums/topic/inaccurate-warning-message-when-creatingediting-a-cpt/
189
  * Added Skype field validation.
191
  * Added ability to add to menu link to archive of post type.
192
  * Added ability to setup meta box callback function. https://wp-types.com/forums/topic/add-support-for-meta_box_cb-in-custom-taxonomy/
193
  * Added ability to add HTML5 placeholder attribute for custom post fields.
194
+ * Fixed problem with CPT labels. https://wp-types.com/forums/topic/after-save-cpts-cutom-labels-always-revert-to-default-label/
195
  * Added a filters to the post title as option text in the select dropdown for post parents. wpcf_pr_belongs_items for array of options and wpcf_pr_belongs_item for one option. https://wp-types.com/forums/topic/help-to-distinguish-duplicate-titles-in-post-relationship/
196
  * Added ability to choose custom fields to display it on custom posts admin list.
197
  * Fixed problem with saving parent data into child data. On parent edit screen.
225
  = 1.6.4 =
226
 
227
  * Release date: 2014-11-17
228
+ * Fixed an issue with dependency between custom taxonomies and custom posts when importing data from the "Custom Post Type UI" plugin.
229
  * Fixed an issue with editing checkboxes with the option "save 0 to the database" selected, created for Custom Posts. http://wp-types.com/forums/topic/checkbox-custom-field-doesnt-save-value-since-upgrade-to-version-1-6-2/ http://wp-types.com/forums/topic/types-checkbox-field-not-saving-after-save-0-to-the-database/
230
  * Fixed an issue with PHP notices being thrown when relative URLs to images were used. http://wp-types.com/forums/topic/php-notice-undefined-index-host-in-image-php/
231
  * Fixed the example file which adds the Google Map field to Types and allows users to enter coordinates to display a map on the front-end.
resources/js/basic.js CHANGED
@@ -1,7 +1,7 @@
1
  /** * * Use this file only for scripts needed in full version.
2
  * Before moving from embedded JS - make sure it's needed only here.
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/resources/js/basic.js $
5
  * $LastChangedDate: 2015-01-16 14:28:15 +0000 (Fri, 16 Jan 2015) $
6
  * $LastChangedRevision: 1069430 $
7
  * $LastChangedBy: iworks $
1
  /** * * Use this file only for scripts needed in full version.
2
  * Before moving from embedded JS - make sure it's needed only here.
3
  *
4
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/resources/js/basic.js $
5
  * $LastChangedDate: 2015-01-16 14:28:15 +0000 (Fri, 16 Jan 2015) $
6
  * $LastChangedRevision: 1069430 $
7
  * $LastChangedBy: iworks $
resources/js/custom-types-form.js CHANGED
@@ -2,7 +2,7 @@
2
  *
3
  * Custom Types form JS
4
  *
5
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/resources/js/custom-types-form.js $
6
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
7
  * $LastChangedRevision: 1027712 $
8
  * $LastChangedBy: iworks $
2
  *
3
  * Custom Types form JS
4
  *
5
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/resources/js/custom-types-form.js $
6
  * $LastChangedDate: 2014-11-18 06:47:25 +0000 (Tue, 18 Nov 2014) $
7
  * $LastChangedRevision: 1027712 $
8
  * $LastChangedBy: iworks $
wpcf.php CHANGED
@@ -1,17 +1,17 @@
1
  <?php
2
  /*
3
- Plugin Name: Types - Complete Solution for Custom Fields and Types
4
  Plugin URI: http://wordpress.org/extend/plugins/types/
5
- Description: Define custom post types, custom taxonomy and custom fields.
6
  Author: OnTheGoSystems
7
  Author URI: http://www.onthegosystems.com
8
- Version: 1.6.6.3
9
  */
10
  /**
11
  *
12
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.3/wpcf.php $
13
- * $LastChangedDate: 2015-04-27 10:19:57 +0000 (Mon, 27 Apr 2015) $
14
- * $LastChangedRevision: 1146882 $
15
  * $LastChangedBy: iworks $
16
  *
17
  */
@@ -20,7 +20,7 @@ if ( !defined( 'WPCF_VERSION' ) ) {
20
  /**
21
  * make sure that WPCF_VERSION in embedded/bootstrap.php is the same!
22
  */
23
- define( 'WPCF_VERSION', '1.6.6.3' );
24
  }
25
 
26
  define( 'WPCF_REPOSITORY', 'http://api.wp-types.com/' );
1
  <?php
2
  /*
3
+ Plugin Name: Types
4
  Plugin URI: http://wordpress.org/extend/plugins/types/
5
+ Description: Define custom post types, custom taxonomies and custom fields.
6
  Author: OnTheGoSystems
7
  Author URI: http://www.onthegosystems.com
8
+ Version: 1.6.6.5
9
  */
10
  /**
11
  *
12
+ * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.5/wpcf.php $
13
+ * $LastChangedDate: 2015-05-20 11:41:05 +0000 (Wed, 20 May 2015) $
14
+ * $LastChangedRevision: 1164110 $
15
  * $LastChangedBy: iworks $
16
  *
17
  */
20
  /**
21
  * make sure that WPCF_VERSION in embedded/bootstrap.php is the same!
22
  */
23
+ define( 'WPCF_VERSION', '1.6.6.5' );
24
  }
25
 
26
  define( 'WPCF_REPOSITORY', 'http://api.wp-types.com/' );