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

Version Description

  • Release date: 2015-04-27
  • Fixed problem with Commercial tab on Install new Plugin Page.
Download this release

Release Info

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

Code changes from version 1.6.6.4 to 1.6.6.3

Files changed (101) 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 +0 -687
  16. embedded/common/classes/class.toolset.promo.php +1 -1
  17. embedded/common/classes/forms.php +4 -9
  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 +1 -12
  21. embedded/common/res/css/toolset-promotion.css +7 -16
  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 +9 -3
  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 +110 -34
  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 +4 -5
  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 +0 -11
  53. embedded/common/toolset-forms/js/conditional.js +1 -1
  54. embedded/common/toolset-forms/js/file-wp35.js +6 -15
  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 +1 -23
  60. embedded/common/visual-editor/editor-addon-generic.class.php +21 -59
  61. embedded/common/visual-editor/editor-addon.class.php +7 -28
  62. embedded/common/visual-editor/res/js/icl_editor_addon_plugin.js +52 -62
  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 +3 -15
  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/types-access.php +1 -1
  98. readme.txt +16 -21
  99. resources/js/basic.js +1 -1
  100. resources/js/custom-types-form.js +1 -1
  101. wpcf.php +5 -5
admin.php CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * Admin functions
5
  *
6
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.4/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.3/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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
embedded/admin.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.4/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.3/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.4/embedded/bootstrap.php $
11
- * $LastChangedDate: 2015-05-12 12:24:38 +0000 (Tue, 12 May 2015) $
12
- * $LastChangedRevision: 1158787 $
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.4' );
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.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
  // 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
 
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.4/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.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 $
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.4/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.3/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.4/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.3/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.4/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.3/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.4/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.3/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.4/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.3/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.4/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.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 $
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.4/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.3/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 DELETED
@@ -1,687 +0,0 @@
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.4/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.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 $
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.4/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,15 +368,10 @@ if (!class_exists('Enlimbo_Forms_Wpcf')) {
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);
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
  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);
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.4/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.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 $
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.4/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.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 $
embedded/common/res/css/toolset-common.css CHANGED
@@ -59,15 +59,4 @@ 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;}
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
-
59
  /* ----------------------------------------------------------------------------
60
  Generic CSS to be applied anywhere
61
  ---------------------------------------------------------------------------- */
62
+ .padding-top-30{padding-top:30px;}
 
 
 
 
 
 
 
 
 
 
 
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 20px 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: 10px 30px;
23
  font-size: 24px;
24
  line-height: 30px;
25
  font-weight: 300;
@@ -33,15 +33,6 @@
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,7 +73,7 @@
82
  display: table-cell;
83
  font-size: 13px;
84
  font-weight: 700;
85
- height: 46px;
86
  padding: 0 20px 0 38px;
87
  }
88
 
@@ -102,23 +93,23 @@
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
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
  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
  top: 6px;
34
  left: 23px;
35
  font-size: 53px;
 
 
 
 
 
 
 
 
 
36
  }
37
 
38
  .toolset-modal ul:before
73
  display: table-cell;
74
  font-size: 13px;
75
  font-weight: 700;
76
+ height: 52px;
77
  padding: 0 20px 0 38px;
78
  }
79
 
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
embedded/common/res/images/toolset.promotion/icons.png CHANGED
Binary file
embedded/common/res/images/toolset.promotion/toolset.png DELETED
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.4/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.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 $
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.4/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,6 +48,12 @@ 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
  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);
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
  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);
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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,14 +20,12 @@ 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
- {
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,15 +36,18 @@ class WPToolset_Field_File extends WPToolset_Field_Textfield
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,11 +55,10 @@ class WPToolset_Field_File extends WPToolset_Field_Textfield
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,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,4 +129,80 @@ class WPToolset_Field_File extends WPToolset_Field_Textfield
129
 
130
  return $form;
131
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  }
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
  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
 
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
  * @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
  }
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
+
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
  }
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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,8 +303,7 @@ 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
- 'data-value' => $names[$tid]
308
  ),
309
  '#pattern' => '<BEFORE><PREFIX><ELEMENT><LABEL><ERROR><SUFFIX><DESCRIPTION><AFTER>',
310
  );
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
  '#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
  );
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
embedded/common/toolset-forms/css/wpt-toolset-frontend.css CHANGED
@@ -100,17 +100,6 @@ ul.wpt-form-set, ul.wpt-form-set-children {
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;
100
  margin: 10px 0;
101
  display: block;
102
  }
 
 
 
 
 
 
 
 
 
 
 
103
  input.wpt-form-error {
104
  background-color: #F8F8F8;
105
  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.4/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.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
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.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,18 +31,10 @@ 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
- 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,11 +87,10 @@ var wptFile = (function($, w) {
95
  });
96
 
97
  frame[$id].open();
 
98
  }
99
-
100
  return {
101
  init: init,
102
- bindOpen: bindOpen,
103
  };
104
  })(jQuery);
105
 
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
  */
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
  });
88
 
89
  frame[$id].open();
90
+ });
91
  }
 
92
  return {
93
  init: init,
 
94
  };
95
  })(jQuery);
96
 
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
embedded/common/utility/js/utils.js CHANGED
@@ -9,26 +9,6 @@ if( typeof WPV_Toolset.Utils == 'undefined' ) WPV_Toolset.Utils = {};
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,7 +686,7 @@ WPV_Toolset.Utils.editor_utf8_decode = function (utftext) {
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,11 +766,9 @@ String.prototype.regexEscape = function regexEscape() {
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) {
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
  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
  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) {
embedded/common/visual-editor/editor-addon-generic.class.php CHANGED
@@ -1,13 +1,4 @@
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,23 +14,7 @@ if( !class_exists( 'Editor_addon_generic' ) )
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,8 +29,10 @@ if( !class_exists( 'Editor_addon_generic' ) )
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,25 +41,7 @@ if( !class_exists( 'Editor_addon_generic' ) )
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,9 +56,9 @@ if( !class_exists( 'Editor_addon_generic' ) )
97
  )
98
  )
99
  ) {
 
100
  wp_enqueue_script( 'icl_editor-script' );
101
  }
102
-
103
  if (
104
  $pagenow == 'admin.php'
105
  && isset( $_GET['page'] )
@@ -114,7 +73,9 @@ if( !class_exists( 'Editor_addon_generic' ) )
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,29 +124,30 @@ if( !class_exists( 'Editor_addon_generic' ) )
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
  {
1
  <?php
 
 
 
 
 
 
 
 
 
2
 
3
  if( !class_exists( 'Editor_addon_generic' ) )
4
  {
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
  )
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
  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
  )
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
  '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
 
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
  {
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
- __( 'Content Template', 'wpv-views' ) );
73
  $this->add_view_type( $menus, 'view',
74
  __( 'Post View', 'wpv-views' ) );
75
  $this->add_view_type( $menus, 'view',
@@ -169,7 +169,6 @@ 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
- * 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,12 +205,7 @@ if ( file_exists( dirname(__FILE__) . '/editor-addon-generic.class.php') && !cla
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,16 +385,6 @@ if ( file_exists( dirname(__FILE__) . '/editor-addon-generic.class.php') && !cla
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,12 +406,7 @@ if ( file_exists( dirname(__FILE__) . '/editor-addon-generic.class.php') && !cla
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,8 +509,8 @@ if ( file_exists( dirname(__FILE__) . '/editor-addon-generic.class.php') && !cla
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,11 +618,11 @@ if ( file_exists( dirname(__FILE__) . '/editor-addon-generic.class.php') && !cla
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' )
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
  * @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
 
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
  * @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
  '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
  $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
  // 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' )
embedded/common/visual-editor/res/js/icl_editor_addon_plugin.js CHANGED
@@ -1,16 +1,13 @@
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,59 +26,52 @@ if ( typeof WPV_Toolset.add_qt_editor_buttons !== 'function' ) {
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,14 +240,14 @@ jQuery(document).ready(function(){
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,7 +620,7 @@ function insert_b64_shortcode_to_editor(b64_shortcode, text_area) {
630
  shortcode += '[/types]';
631
  }
632
  window.wpcfActiveEditor = text_area;
633
-
634
  icl_editor.insert(shortcode);
635
  }
636
 
@@ -811,7 +801,7 @@ var icl_editor = (function(window, $){
811
  };
812
 
813
  function isCodeMirror($textarea)
814
- {
815
  if ( ! $textarea.is('textarea') ) {
816
  return false;
817
  }
@@ -822,7 +812,7 @@ var icl_editor = (function(window, $){
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,7 +845,7 @@ var icl_editor = (function(window, $){
855
  }
856
  return false;
857
  };
858
-
859
  function isCodeMirrorWithPanels( $textarea, candidateNode ) {
860
  if ( ! $textarea.is('textarea') ) {
861
  return false;
@@ -866,14 +856,14 @@ var icl_editor = (function(window, $){
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,6 +1052,6 @@ var icl_editor = (function(window, $){
1062
  return window.iclCodemirror[textarea];
1063
  }
1064
  };
1065
-
1066
 
1067
  })(window, jQuery, undefined);
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
  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
  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
  shortcode += '[/types]';
621
  }
622
  window.wpcfActiveEditor = text_area;
623
+
624
  icl_editor.insert(shortcode);
625
  }
626
 
801
  };
802
 
803
  function isCodeMirror($textarea)
804
+ {
805
  if ( ! $textarea.is('textarea') ) {
806
  return false;
807
  }
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
  }
846
  return false;
847
  };
848
+
849
  function isCodeMirrorWithPanels( $textarea, candidateNode ) {
850
  if ( ! $textarea.is('textarea') ) {
851
  return false;
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
  return window.iclCodemirror[textarea];
1053
  }
1054
  };
1055
+
1056
 
1057
  })(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.4/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.3/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.4/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.3/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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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,18 +572,6 @@ 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
- * 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 ) ) {
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
  array() ), $_items );
573
  } else {
574
  $custom_types = get_option( 'wpcf-custom-types', array() );
 
 
 
 
 
 
 
 
 
 
 
 
575
  }
576
  // Get custom types
577
  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.4/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.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 $
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.4/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.3/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 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.4
9
  */
10
  /**
11
  *
12
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.4/embedded/plugin.php $
13
- * $LastChangedDate: 2015-05-12 12:24:38 +0000 (Tue, 12 May 2015) $
14
- * $LastChangedRevision: 1158787 $
15
  * $LastChangedBy: iworks $
16
  *
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
  */
embedded/readme.txt CHANGED
@@ -1,13 +1,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.4
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
 
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
 
embedded/resources/css/dashicons.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  *
3
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.4/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.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 $
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.4/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.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 $
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.4/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.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 $
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.4/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.3/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.4/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.3/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.4/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.3/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.4/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.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 $
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.4/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.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 $
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.4/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.3/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.4/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.3/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.4/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.3/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.4/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.3/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.4/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.3/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.4/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.3/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.4/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.3/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.4/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.3/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/tags/1.6.6.4/marketing/helpful-links.php $
4
- * $LastChangedDate: 2015-02-26 06:51:21 +0000 (Thu, 26 Feb 2015) $
5
  * $LastChangedRevision: 31922 $
6
  * $LastChangedBy: marcin $
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
  *
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.4/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.3/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 ===
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.4
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,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 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,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 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,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 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,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, 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,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 taxonomies list
148
  3. Defining custom post type
149
  4. Defining custom fields (meta-groups)
150
  5. Editing custom fields
@@ -155,11 +155,6 @@ Additionally, Types is the only plugin that lets you define parent/child relatio
155
 
156
  == Changelog ==
157
 
158
- = 1.6.6.4 =
159
-
160
- * Release date: 2015-05-12
161
- * Fixed problem Export/Import for CPT with custom fields.
162
-
163
  = 1.6.6.3 =
164
 
165
  * Release date: 2015-04-27
@@ -178,7 +173,7 @@ Additionally, Types is the only plugin that lets you define parent/child relatio
178
  = 1.6.6 =
179
 
180
  * Release date: 2015-04-02
181
- * 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/
182
  * 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/
183
  * Added ability to create CPT without title and editor. https://wp-types.com/forums/topic/inaccurate-warning-message-when-creatingediting-a-cpt/
184
  * Added Skype field validation.
@@ -186,7 +181,7 @@ Additionally, Types is the only plugin that lets you define parent/child relatio
186
  * Added ability to add to menu link to archive of post type.
187
  * Added ability to setup meta box callback function. https://wp-types.com/forums/topic/add-support-for-meta_box_cb-in-custom-taxonomy/
188
  * Added ability to add HTML5 placeholder attribute for custom post fields.
189
- * Fixed problem with CPT labels. https://wp-types.com/forums/topic/after-save-cpts-cutom-labels-always-revert-to-default-label/
190
  * 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/
191
  * Added ability to choose custom fields to display it on custom posts admin list.
192
  * Fixed problem with saving parent data into child data. On parent edit screen.
@@ -220,7 +215,7 @@ Additionally, Types is the only plugin that lets you define parent/child relatio
220
  = 1.6.4 =
221
 
222
  * Release date: 2014-11-17
223
- * Fixed an issue with dependency between custom taxonomies and custom posts when importing data from the "Custom Post Type UI" plugin.
224
  * 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/
225
  * 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/
226
  * 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 - 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
 
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
 
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
 
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
 
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
  == 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
 
156
  == Changelog ==
157
 
 
 
 
 
 
158
  = 1.6.6.3 =
159
 
160
  * Release date: 2015-04-27
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
  * 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
  = 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.
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.4/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.3/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.4/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.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 $
wpcf.php CHANGED
@@ -5,13 +5,13 @@
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.4
9
  */
10
  /**
11
  *
12
- * $HeadURL: http://plugins.svn.wordpress.org/types/tags/1.6.6.4/wpcf.php $
13
- * $LastChangedDate: 2015-05-12 12:24:38 +0000 (Tue, 12 May 2015) $
14
- * $LastChangedRevision: 1158787 $
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.4' );
24
  }
25
 
26
  define( 'WPCF_REPOSITORY', 'http://api.wp-types.com/' );
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
  /**
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/' );