Heartbeat Control - Version 1.1.3

Version Description

  • Readme updates.
Download this release

Release Info

Developer JeffMatson
Plugin Icon 128x128 Heartbeat Control
Version 1.1.3
Comparing to
See all releases

Code changes from version 1.1.2 to 1.1.3

Files changed (141) hide show
  1. heartbeat-control.php +1 -1
  2. readme.txt +6 -3
  3. trunk/LICENSE +0 -340
  4. trunk/assets/css/style.scss +0 -7
  5. trunk/assets/js/bundle.js +0 -84
  6. trunk/assets/js/bundle.min.js +0 -1
  7. trunk/assets/js/notices.js +0 -7
  8. trunk/assets/js/src/settings.js +0 -84
  9. trunk/autoloader.php +0 -12
  10. trunk/heartbeat-control-actions.php +0 -47
  11. trunk/heartbeat-control-donate.php +0 -24
  12. trunk/heartbeat-control-menu.php +0 -95
  13. trunk/heartbeat-control-options.php +0 -20
  14. trunk/heartbeat-control.php +0 -91
  15. trunk/heartbeat.php +0 -64
  16. trunk/js/donate-notice.js +0 -10
  17. trunk/readme.txt +0 -61
  18. trunk/settings.php +0 -82
  19. trunk/style.css +0 -5
  20. trunk/style.css.map +0 -1
  21. trunk/style.min.css +0 -1
  22. trunk/vendor/autoload.php +0 -7
  23. trunk/vendor/composer/ClassLoader.php +0 -415
  24. trunk/vendor/composer/LICENSE +0 -21
  25. trunk/vendor/composer/autoload_classmap.php +0 -9
  26. trunk/vendor/composer/autoload_namespaces.php +0 -9
  27. trunk/vendor/composer/autoload_psr4.php +0 -9
  28. trunk/vendor/composer/autoload_real.php +0 -52
  29. trunk/vendor/composer/autoload_static.php +0 -15
  30. trunk/vendor/composer/installed.json +0 -61
  31. trunk/vendor/webdevstudios/cmb2/.github/ISSUE_TEMPLATE.md +0 -36
  32. trunk/vendor/webdevstudios/cmb2/.github/PULL_REQUEST_TEMPLATE.md +0 -10
  33. trunk/vendor/webdevstudios/cmb2/CHANGELOG.md +0 -639
  34. trunk/vendor/webdevstudios/cmb2/CONTRIBUTING.md +0 -52
  35. trunk/vendor/webdevstudios/cmb2/bootstrap.php +0 -84
  36. trunk/vendor/webdevstudios/cmb2/css/cmb2-display-rtl.css +0 -41
  37. trunk/vendor/webdevstudios/cmb2/css/cmb2-display-rtl.min.css +0 -1
  38. trunk/vendor/webdevstudios/cmb2/css/cmb2-display.css +0 -41
  39. trunk/vendor/webdevstudios/cmb2/css/cmb2-display.css.map +0 -7
  40. trunk/vendor/webdevstudios/cmb2/css/cmb2-display.min.css +0 -1
  41. trunk/vendor/webdevstudios/cmb2/css/cmb2-front-rtl.css +0 -1545
  42. trunk/vendor/webdevstudios/cmb2/css/cmb2-front-rtl.min.css +0 -1
  43. trunk/vendor/webdevstudios/cmb2/css/cmb2-front.css +0 -1545
  44. trunk/vendor/webdevstudios/cmb2/css/cmb2-front.css.map +0 -7
  45. trunk/vendor/webdevstudios/cmb2/css/cmb2-front.min.css +0 -1
  46. trunk/vendor/webdevstudios/cmb2/css/cmb2-rtl.css +0 -2031
  47. trunk/vendor/webdevstudios/cmb2/css/cmb2-rtl.min.css +0 -1
  48. trunk/vendor/webdevstudios/cmb2/css/cmb2.css +0 -2031
  49. trunk/vendor/webdevstudios/cmb2/css/cmb2.css.map +0 -7
  50. trunk/vendor/webdevstudios/cmb2/css/cmb2.min.css +0 -1
  51. trunk/vendor/webdevstudios/cmb2/css/index.php +0 -2
  52. trunk/vendor/webdevstudios/cmb2/css/sass/cmb2-display.scss +0 -5
  53. trunk/vendor/webdevstudios/cmb2/css/sass/cmb2-front.scss +0 -6
  54. trunk/vendor/webdevstudios/cmb2/css/sass/cmb2.scss +0 -15
  55. trunk/vendor/webdevstudios/cmb2/css/sass/index.php +0 -2
  56. trunk/vendor/webdevstudios/cmb2/css/sass/partials/_collapsible_ui.scss +0 -52
  57. trunk/vendor/webdevstudios/cmb2/css/sass/partials/_context_metaboxes.scss +0 -107
  58. trunk/vendor/webdevstudios/cmb2/css/sass/partials/_display.scss +0 -34
  59. trunk/vendor/webdevstudios/cmb2/css/sass/partials/_front.scss +0 -52
  60. trunk/vendor/webdevstudios/cmb2/css/sass/partials/_jquery_ui.scss +0 -457
  61. trunk/vendor/webdevstudios/cmb2/css/sass/partials/_main_wrap.scss +0 -518
  62. trunk/vendor/webdevstudios/cmb2/css/sass/partials/_misc.scss +0 -29
  63. trunk/vendor/webdevstudios/cmb2/css/sass/partials/_mixins.scss +0 -51
  64. trunk/vendor/webdevstudios/cmb2/css/sass/partials/_options-page.scss +0 -70
  65. trunk/vendor/webdevstudios/cmb2/css/sass/partials/_post_metaboxes.scss +0 -82
  66. trunk/vendor/webdevstudios/cmb2/css/sass/partials/_sidebar_placements.scss +0 -146
  67. trunk/vendor/webdevstudios/cmb2/css/sass/partials/_variables.scss +0 -22
  68. trunk/vendor/webdevstudios/cmb2/css/sass/partials/index.php +0 -2
  69. trunk/vendor/webdevstudios/cmb2/example-functions.php +0 -735
  70. trunk/vendor/webdevstudios/cmb2/images/ico-delete.png +0 -0
  71. trunk/vendor/webdevstudios/cmb2/images/index.php +0 -2
  72. trunk/vendor/webdevstudios/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  73. trunk/vendor/webdevstudios/cmb2/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  74. trunk/vendor/webdevstudios/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  75. trunk/vendor/webdevstudios/cmb2/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  76. trunk/vendor/webdevstudios/cmb2/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  77. trunk/vendor/webdevstudios/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  78. trunk/vendor/webdevstudios/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  79. trunk/vendor/webdevstudios/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  80. trunk/vendor/webdevstudios/cmb2/images/ui-icons_222222_256x240.png +0 -0
  81. trunk/vendor/webdevstudios/cmb2/images/ui-icons_2e83ff_256x240.png +0 -0
  82. trunk/vendor/webdevstudios/cmb2/images/ui-icons_454545_256x240.png +0 -0
  83. trunk/vendor/webdevstudios/cmb2/images/ui-icons_888888_256x240.png +0 -0
  84. trunk/vendor/webdevstudios/cmb2/images/ui-icons_cd0a0a_256x240.png +0 -0
  85. trunk/vendor/webdevstudios/cmb2/includes/CMB2.php +0 -1689
  86. trunk/vendor/webdevstudios/cmb2/includes/CMB2_Ajax.php +0 -321
  87. trunk/vendor/webdevstudios/cmb2/includes/CMB2_Base.php +0 -514
  88. trunk/vendor/webdevstudios/cmb2/includes/CMB2_Boxes.php +0 -96
  89. trunk/vendor/webdevstudios/cmb2/includes/CMB2_Field.php +0 -1317
  90. trunk/vendor/webdevstudios/cmb2/includes/CMB2_Field_Display.php +0 -484
  91. trunk/vendor/webdevstudios/cmb2/includes/CMB2_Hookup_Base.php +0 -103
  92. trunk/vendor/webdevstudios/cmb2/includes/CMB2_JS.php +0 -176
  93. trunk/vendor/webdevstudios/cmb2/includes/CMB2_Options.php +0 -215
  94. trunk/vendor/webdevstudios/cmb2/includes/CMB2_Options_Hookup.php +0 -236
  95. trunk/vendor/webdevstudios/cmb2/includes/CMB2_Sanitize.php +0 -560
  96. trunk/vendor/webdevstudios/cmb2/includes/CMB2_Show_Filters.php +0 -178
  97. trunk/vendor/webdevstudios/cmb2/includes/CMB2_Types.php +0 -667
  98. trunk/vendor/webdevstudios/cmb2/includes/CMB2_Utils.php +0 -631
  99. trunk/vendor/webdevstudios/cmb2/includes/CMB2_hookup.php +0 -913
  100. trunk/vendor/webdevstudios/cmb2/includes/helper-functions.php +0 -406
  101. trunk/vendor/webdevstudios/cmb2/includes/index.php +0 -2
  102. trunk/vendor/webdevstudios/cmb2/includes/rest-api/CMB2_REST.php +0 -794
  103. trunk/vendor/webdevstudios/cmb2/includes/rest-api/CMB2_REST_Controller.php +0 -448
  104. trunk/vendor/webdevstudios/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php +0 -270
  105. trunk/vendor/webdevstudios/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php +0 -502
  106. trunk/vendor/webdevstudios/cmb2/includes/shim/WP_REST_Controller.php +0 -540
  107. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Base.php +0 -153
  108. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Checkbox.php +0 -65
  109. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Colorpicker.php +0 -58
  110. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_File.php +0 -168
  111. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_File_Base.php +0 -209
  112. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_File_List.php +0 -86
  113. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Multi_Base.php +0 -110
  114. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Multicheck.php +0 -39
  115. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Oembed.php +0 -41
  116. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Picker_Base.php +0 -56
  117. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Radio.php +0 -52
  118. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Select.php +0 -30
  119. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Select_Timezone.php +0 -29
  120. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Taxonomy_Base.php +0 -157
  121. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php +0 -77
  122. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck_Hierarchical.php +0 -46
  123. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php +0 -92
  124. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Taxonomy_Radio_Hierarchical.php +0 -45
  125. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php +0 -79
  126. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Text.php +0 -62
  127. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Text_Date.php +0 -30
  128. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp.php +0 -73
  129. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php +0 -61
  130. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Text_Time.php +0 -25
  131. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Textarea.php +0 -38
  132. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Textarea_Code.php +0 -30
  133. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Title.php +0 -47
  134. trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Wysiwyg.php +0 -92
  135. trunk/vendor/webdevstudios/cmb2/index.php +0 -1
  136. trunk/vendor/webdevstudios/cmb2/init.php +0 -194
  137. trunk/vendor/webdevstudios/cmb2/js/cmb2-wysiwyg.js +0 -331
  138. trunk/vendor/webdevstudios/cmb2/js/cmb2.js +0 -1024
  139. trunk/vendor/webdevstudios/cmb2/js/cmb2.min.js +0 -1
  140. trunk/vendor/webdevstudios/cmb2/js/index.php +0 -2
  141. trunk/vendor/webdevstudios/cmb2/js/jquery-ui-timepicker-addon.min.js +0 -5
heartbeat-control.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Heartbeat Control
4
  * Plugin URI: https://jeffmatson.net/heartbeat-control
5
  * Description: Completely controls the WordPress heartbeat.
6
- * Version: 1.1.2
7
  * Author: Jeff Matson
8
  * Author URI: http://jeffmatson.net
9
  * License: GPL2
3
  * Plugin Name: Heartbeat Control
4
  * Plugin URI: https://jeffmatson.net/heartbeat-control
5
  * Description: Completely controls the WordPress heartbeat.
6
+ * Version: 1.1.3
7
  * Author: Jeff Matson
8
  * Author URI: http://jeffmatson.net
9
  * License: GPL2
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://jeffmatson.net/donate
4
  Tags: heartbeat, admin-ajax, server resources, heartbeat control, heartbeat api, performance, debugging, javascript
5
  Requires at least: 3.6
6
  Tested up to: 4.8.2
7
- Stable tag: 1.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -14,7 +14,7 @@ Allows you to easily manage the frequency of the WordPress heartbeat API.
14
 
15
  **Important:**
16
  Upon the release of 1.1, a small issue existed that caused a big problem which broke the plugin. The issue has been resolved as of version 1.1.2.
17
- If you're getting errors, check your plugin version and update to 1.1.2, which should fix everything. You'll need to replace the plugin (wp-content/plugins/heartbeat-control) via FTP. Once you do that, all should be well.
18
 
19
  Allows you to easily manage the frequency of the WordPress heartbeat API with just a few clicks.
20
 
@@ -39,7 +39,10 @@ All options are located within Settings > Heartbeat Control.
39
  If you commonly leave your WordPress admin up for long periods of time, especially while writing or editing a post, the repeated POST requests can cause high resource usage. To avoid this, the heartbeat can be modified or even disabled to lower your server resource usage.
40
 
41
  == Changelog ==
42
- =1.1.2 =
 
 
 
43
  * Bugfixes.
44
  * Resolves potential fatal error mistakenly pushed to 1.1.
45
 
4
  Tags: heartbeat, admin-ajax, server resources, heartbeat control, heartbeat api, performance, debugging, javascript
5
  Requires at least: 3.6
6
  Tested up to: 4.8.2
7
+ Stable tag: 1.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
14
 
15
  **Important:**
16
  Upon the release of 1.1, a small issue existed that caused a big problem which broke the plugin. The issue has been resolved as of version 1.1.2.
17
+ If you're getting errors, check your plugin version and update to 1.1.3, which should fix everything. You'll need to replace the plugin (wp-content/plugins/heartbeat-control) via FTP. Once you do that, all should be well.
18
 
19
  Allows you to easily manage the frequency of the WordPress heartbeat API with just a few clicks.
20
 
39
  If you commonly leave your WordPress admin up for long periods of time, especially while writing or editing a post, the repeated POST requests can cause high resource usage. To avoid this, the heartbeat can be modified or even disabled to lower your server resource usage.
40
 
41
  == Changelog ==
42
+ = 1.1.3 =
43
+ * Readme updates.
44
+
45
+ = 1.1.2 =
46
  * Bugfixes.
47
  * Resolves potential fatal error mistakenly pushed to 1.1.
48
 
trunk/LICENSE DELETED
@@ -1,340 +0,0 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 2, June 1991
3
-
4
- Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
5
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
- Everyone is permitted to copy and distribute verbatim copies
7
- of this license document, but changing it is not allowed.
8
-
9
- Preamble
10
-
11
- The licenses for most software are designed to take away your
12
- freedom to share and change it. By contrast, the GNU General Public
13
- License is intended to guarantee your freedom to share and change free
14
- software--to make sure the software is free for all its users. This
15
- General Public License applies to most of the Free Software
16
- Foundation's software and to any other program whose authors commit to
17
- using it. (Some other Free Software Foundation software is covered by
18
- the GNU Lesser General Public License instead.) You can apply it to
19
- your programs, too.
20
-
21
- When we speak of free software, we are referring to freedom, not
22
- price. Our General Public Licenses are designed to make sure that you
23
- have the freedom to distribute copies of free software (and charge for
24
- this service if you wish), that you receive source code or can get it
25
- if you want it, that you can change the software or use pieces of it
26
- in new free programs; and that you know you can do these things.
27
-
28
- To protect your rights, we need to make restrictions that forbid
29
- anyone to deny you these rights or to ask you to surrender the rights.
30
- These restrictions translate to certain responsibilities for you if you
31
- distribute copies of the software, or if you modify it.
32
-
33
- For example, if you distribute copies of such a program, whether
34
- gratis or for a fee, you must give the recipients all the rights that
35
- you have. You must make sure that they, too, receive or can get the
36
- source code. And you must show them these terms so they know their
37
- rights.
38
-
39
- We protect your rights with two steps: (1) copyright the software, and
40
- (2) offer you this license which gives you legal permission to copy,
41
- distribute and/or modify the software.
42
-
43
- Also, for each author's protection and ours, we want to make certain
44
- that everyone understands that there is no warranty for this free
45
- software. If the software is modified by someone else and passed on, we
46
- want its recipients to know that what they have is not the original, so
47
- that any problems introduced by others will not reflect on the original
48
- authors' reputations.
49
-
50
- Finally, any free program is threatened constantly by software
51
- patents. We wish to avoid the danger that redistributors of a free
52
- program will individually obtain patent licenses, in effect making the
53
- program proprietary. To prevent this, we have made it clear that any
54
- patent must be licensed for everyone's free use or not licensed at all.
55
-
56
- The precise terms and conditions for copying, distribution and
57
- modification follow.
58
-
59
- GNU GENERAL PUBLIC LICENSE
60
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
-
62
- 0. This License applies to any program or other work which contains
63
- a notice placed by the copyright holder saying it may be distributed
64
- under the terms of this General Public License. The "Program", below,
65
- refers to any such program or work, and a "work based on the Program"
66
- means either the Program or any derivative work under copyright law:
67
- that is to say, a work containing the Program or a portion of it,
68
- either verbatim or with modifications and/or translated into another
69
- language. (Hereinafter, translation is included without limitation in
70
- the term "modification".) Each licensee is addressed as "you".
71
-
72
- Activities other than copying, distribution and modification are not
73
- covered by this License; they are outside its scope. The act of
74
- running the Program is not restricted, and the output from the Program
75
- is covered only if its contents constitute a work based on the
76
- Program (independent of having been made by running the Program).
77
- Whether that is true depends on what the Program does.
78
-
79
- 1. You may copy and distribute verbatim copies of the Program's
80
- source code as you receive it, in any medium, provided that you
81
- conspicuously and appropriately publish on each copy an appropriate
82
- copyright notice and disclaimer of warranty; keep intact all the
83
- notices that refer to this License and to the absence of any warranty;
84
- and give any other recipients of the Program a copy of this License
85
- along with the Program.
86
-
87
- You may charge a fee for the physical act of transferring a copy, and
88
- you may at your option offer warranty protection in exchange for a fee.
89
-
90
- 2. You may modify your copy or copies of the Program or any portion
91
- of it, thus forming a work based on the Program, and copy and
92
- distribute such modifications or work under the terms of Section 1
93
- above, provided that you also meet all of these conditions:
94
-
95
- a) You must cause the modified files to carry prominent notices
96
- stating that you changed the files and the date of any change.
97
-
98
- b) You must cause any work that you distribute or publish, that in
99
- whole or in part contains or is derived from the Program or any
100
- part thereof, to be licensed as a whole at no charge to all third
101
- parties under the terms of this License.
102
-
103
- c) If the modified program normally reads commands interactively
104
- when run, you must cause it, when started running for such
105
- interactive use in the most ordinary way, to print or display an
106
- announcement including an appropriate copyright notice and a
107
- notice that there is no warranty (or else, saying that you provide
108
- a warranty) and that users may redistribute the program under
109
- these conditions, and telling the user how to view a copy of this
110
- License. (Exception: if the Program itself is interactive but
111
- does not normally print such an announcement, your work based on
112
- the Program is not required to print an announcement.)
113
-
114
- These requirements apply to the modified work as a whole. If
115
- identifiable sections of that work are not derived from the Program,
116
- and can be reasonably considered independent and separate works in
117
- themselves, then this License, and its terms, do not apply to those
118
- sections when you distribute them as separate works. But when you
119
- distribute the same sections as part of a whole which is a work based
120
- on the Program, the distribution of the whole must be on the terms of
121
- this License, whose permissions for other licensees extend to the
122
- entire whole, and thus to each and every part regardless of who wrote it.
123
-
124
- Thus, it is not the intent of this section to claim rights or contest
125
- your rights to work written entirely by you; rather, the intent is to
126
- exercise the right to control the distribution of derivative or
127
- collective works based on the Program.
128
-
129
- In addition, mere aggregation of another work not based on the Program
130
- with the Program (or with a work based on the Program) on a volume of
131
- a storage or distribution medium does not bring the other work under
132
- the scope of this License.
133
-
134
- 3. You may copy and distribute the Program (or a work based on it,
135
- under Section 2) in object code or executable form under the terms of
136
- Sections 1 and 2 above provided that you also do one of the following:
137
-
138
- a) Accompany it with the complete corresponding machine-readable
139
- source code, which must be distributed under the terms of Sections
140
- 1 and 2 above on a medium customarily used for software interchange; or,
141
-
142
- b) Accompany it with a written offer, valid for at least three
143
- years, to give any third party, for a charge no more than your
144
- cost of physically performing source distribution, a complete
145
- machine-readable copy of the corresponding source code, to be
146
- distributed under the terms of Sections 1 and 2 above on a medium
147
- customarily used for software interchange; or,
148
-
149
- c) Accompany it with the information you received as to the offer
150
- to distribute corresponding source code. (This alternative is
151
- allowed only for noncommercial distribution and only if you
152
- received the program in object code or executable form with such
153
- an offer, in accord with Subsection b above.)
154
-
155
- The source code for a work means the preferred form of the work for
156
- making modifications to it. For an executable work, complete source
157
- code means all the source code for all modules it contains, plus any
158
- associated interface definition files, plus the scripts used to
159
- control compilation and installation of the executable. However, as a
160
- special exception, the source code distributed need not include
161
- anything that is normally distributed (in either source or binary
162
- form) with the major components (compiler, kernel, and so on) of the
163
- operating system on which the executable runs, unless that component
164
- itself accompanies the executable.
165
-
166
- If distribution of executable or object code is made by offering
167
- access to copy from a designated place, then offering equivalent
168
- access to copy the source code from the same place counts as
169
- distribution of the source code, even though third parties are not
170
- compelled to copy the source along with the object code.
171
-
172
- 4. You may not copy, modify, sublicense, or distribute the Program
173
- except as expressly provided under this License. Any attempt
174
- otherwise to copy, modify, sublicense or distribute the Program is
175
- void, and will automatically terminate your rights under this License.
176
- However, parties who have received copies, or rights, from you under
177
- this License will not have their licenses terminated so long as such
178
- parties remain in full compliance.
179
-
180
- 5. You are not required to accept this License, since you have not
181
- signed it. However, nothing else grants you permission to modify or
182
- distribute the Program or its derivative works. These actions are
183
- prohibited by law if you do not accept this License. Therefore, by
184
- modifying or distributing the Program (or any work based on the
185
- Program), you indicate your acceptance of this License to do so, and
186
- all its terms and conditions for copying, distributing or modifying
187
- the Program or works based on it.
188
-
189
- 6. Each time you redistribute the Program (or any work based on the
190
- Program), the recipient automatically receives a license from the
191
- original licensor to copy, distribute or modify the Program subject to
192
- these terms and conditions. You may not impose any further
193
- restrictions on the recipients' exercise of the rights granted herein.
194
- You are not responsible for enforcing compliance by third parties to
195
- this License.
196
-
197
- 7. If, as a consequence of a court judgment or allegation of patent
198
- infringement or for any other reason (not limited to patent issues),
199
- conditions are imposed on you (whether by court order, agreement or
200
- otherwise) that contradict the conditions of this License, they do not
201
- excuse you from the conditions of this License. If you cannot
202
- distribute so as to satisfy simultaneously your obligations under this
203
- License and any other pertinent obligations, then as a consequence you
204
- may not distribute the Program at all. For example, if a patent
205
- license would not permit royalty-free redistribution of the Program by
206
- all those who receive copies directly or indirectly through you, then
207
- the only way you could satisfy both it and this License would be to
208
- refrain entirely from distribution of the Program.
209
-
210
- If any portion of this section is held invalid or unenforceable under
211
- any particular circumstance, the balance of the section is intended to
212
- apply and the section as a whole is intended to apply in other
213
- circumstances.
214
-
215
- It is not the purpose of this section to induce you to infringe any
216
- patents or other property right claims or to contest validity of any
217
- such claims; this section has the sole purpose of protecting the
218
- integrity of the free software distribution system, which is
219
- implemented by public license practices. Many people have made
220
- generous contributions to the wide range of software distributed
221
- through that system in reliance on consistent application of that
222
- system; it is up to the author/donor to decide if he or she is willing
223
- to distribute software through any other system and a licensee cannot
224
- impose that choice.
225
-
226
- This section is intended to make thoroughly clear what is believed to
227
- be a consequence of the rest of this License.
228
-
229
- 8. If the distribution and/or use of the Program is restricted in
230
- certain countries either by patents or by copyrighted interfaces, the
231
- original copyright holder who places the Program under this License
232
- may add an explicit geographical distribution limitation excluding
233
- those countries, so that distribution is permitted only in or among
234
- countries not thus excluded. In such case, this License incorporates
235
- the limitation as if written in the body of this License.
236
-
237
- 9. The Free Software Foundation may publish revised and/or new versions
238
- of the General Public License from time to time. Such new versions will
239
- be similar in spirit to the present version, but may differ in detail to
240
- address new problems or concerns.
241
-
242
- Each version is given a distinguishing version number. If the Program
243
- specifies a version number of this License which applies to it and "any
244
- later version", you have the option of following the terms and conditions
245
- either of that version or of any later version published by the Free
246
- Software Foundation. If the Program does not specify a version number of
247
- this License, you may choose any version ever published by the Free Software
248
- Foundation.
249
-
250
- 10. If you wish to incorporate parts of the Program into other free
251
- programs whose distribution conditions are different, write to the author
252
- to ask for permission. For software which is copyrighted by the Free
253
- Software Foundation, write to the Free Software Foundation; we sometimes
254
- make exceptions for this. Our decision will be guided by the two goals
255
- of preserving the free status of all derivatives of our free software and
256
- of promoting the sharing and reuse of software generally.
257
-
258
- NO WARRANTY
259
-
260
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
- REPAIR OR CORRECTION.
269
-
270
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
- POSSIBILITY OF SUCH DAMAGES.
279
-
280
- END OF TERMS AND CONDITIONS
281
-
282
- How to Apply These Terms to Your New Programs
283
-
284
- If you develop a new program, and you want it to be of the greatest
285
- possible use to the public, the best way to achieve this is to make it
286
- free software which everyone can redistribute and change under these terms.
287
-
288
- To do so, attach the following notices to the program. It is safest
289
- to attach them to the start of each source file to most effectively
290
- convey the exclusion of warranty; and each file should have at least
291
- the "copyright" line and a pointer to where the full notice is found.
292
-
293
- {description}
294
- Copyright (C) {year} {fullname}
295
-
296
- This program is free software; you can redistribute it and/or modify
297
- it under the terms of the GNU General Public License as published by
298
- the Free Software Foundation; either version 2 of the License, or
299
- (at your option) any later version.
300
-
301
- This program is distributed in the hope that it will be useful,
302
- but WITHOUT ANY WARRANTY; without even the implied warranty of
303
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
- GNU General Public License for more details.
305
-
306
- You should have received a copy of the GNU General Public License along
307
- with this program; if not, write to the Free Software Foundation, Inc.,
308
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
-
310
- Also add information on how to contact you by electronic and paper mail.
311
-
312
- If the program is interactive, make it output a short notice like this
313
- when it starts in an interactive mode:
314
-
315
- Gnomovision version 69, Copyright (C) year name of author
316
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
- This is free software, and you are welcome to redistribute it
318
- under certain conditions; type `show c' for details.
319
-
320
- The hypothetical commands `show w' and `show c' should show the appropriate
321
- parts of the General Public License. Of course, the commands you use may
322
- be called something other than `show w' and `show c'; they could even be
323
- mouse-clicks or menu items--whatever suits your program.
324
-
325
- You should also get your employer (if you work as a programmer) or your
326
- school, if any, to sign a "copyright disclaimer" for the program, if
327
- necessary. Here is a sample; alter the names:
328
-
329
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
-
332
- {signature of Ty Coon}, 1 April 1989
333
- Ty Coon, President of Vice
334
-
335
- This General Public License does not permit incorporating your program into
336
- proprietary programs. If your program is a subroutine library, you may
337
- consider it more useful to permit linking proprietary applications with the
338
- library. If this is what you want to do, use the GNU Lesser General
339
- Public License instead of this License.
340
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/css/style.scss DELETED
@@ -1,7 +0,0 @@
1
- .slider-field-value-display {
2
- float: right;
3
- font-weight: 400;
4
- font-size: 12px;
5
- color: #888;
6
- padding-top: .5em;
7
- }
 
 
 
 
 
 
 
trunk/assets/js/bundle.js DELETED
@@ -1,84 +0,0 @@
1
- (function($) {
2
-
3
- 'use strict';
4
-
5
- $('#heartbeat_control_behavior').change(function() {
6
- console.log('changed');
7
- if (this.value === 'modify') {
8
- $('.cmb2-id-heartbeat-control-frequency').show();
9
- } else {
10
- $('.cmb2-id-heartbeat-control-frequency').hide();
11
- }
12
- });
13
-
14
- // Init slider at start
15
- $('.cmb-type-slider').each(function() {
16
-
17
- initRow($(this));
18
-
19
- });
20
-
21
-
22
- // When a group row is shifted, reinitialise slider value
23
- $('.cmb-repeatable-group').on('cmb2_shift_rows_complete', function(event, instance) {
24
-
25
- var shiftedGroup = $(instance).closest('.cmb-repeatable-group');
26
-
27
- shiftedGroup.find('.cmb-type-slider').each(function() {
28
-
29
- $(this).find('.slider-field').slider('value', $(this).find('.slider-field-value').val());
30
- $(this).find('.slider-field-value-text').text($(this).find('.slider-field-value').val());
31
-
32
- });
33
-
34
- return false;
35
- });
36
-
37
-
38
- // When a group row is added, reset slider
39
- $('.cmb-repeatable-group').on('cmb2_add_row', function(event, newRow) {
40
-
41
- $(newRow).find('.cmb-type-slider').each(function() {
42
-
43
- initRow($(this));
44
-
45
- $(this).find('.ui-slider-range').css('width', 0);
46
- $(this).find('.slider-field').slider('value', 0);
47
- $(this).find('.slider-field-value-text').text('0');
48
- });
49
-
50
- return false;
51
- });
52
-
53
-
54
- // Init slider
55
- function initRow(row) {
56
-
57
- // Loop through all cmb-type-slider-field instances and instantiate the slider UI
58
- row.each(function() {
59
- var $this = $(this);
60
- var $value = $this.find('.slider-field-value');
61
- var $slider = $this.find('.slider-field');
62
- var $text = $this.find('.slider-field-value-text');
63
- var slider_data = $value.data();
64
-
65
- $slider.slider({
66
- range: 'min',
67
- value: slider_data.start,
68
- min: slider_data.min,
69
- max: slider_data.max,
70
- step: slider_data.step,
71
- slide: function(event, ui) {
72
- $value.val(ui.value);
73
- $text.text(ui.value);
74
- }
75
- });
76
-
77
- // Initiate the display
78
- $value.val($slider.slider('value'));
79
- $text.text($slider.slider('value'));
80
- });
81
- }
82
-
83
-
84
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/bundle.min.js DELETED
@@ -1 +0,0 @@
1
- !function(e){"use strict";function i(i){i.each(function(){var i=e(this),t=i.find(".slider-field-value"),l=i.find(".slider-field"),d=i.find(".slider-field-value-text"),n=t.data();l.slider({range:"min",value:n.start,min:n.min,max:n.max,step:n.step,slide:function(e,i){t.val(i.value),d.text(i.value)}}),t.val(l.slider("value")),d.text(l.slider("value"))})}e("#heartbeat_control_behavior").change(function(){console.log("changed"),"modify"===this.value?e(".cmb2-id-heartbeat-control-frequency").show():e(".cmb2-id-heartbeat-control-frequency").hide()}),e(".cmb-type-slider").each(function(){i(e(this))}),e(".cmb-repeatable-group").on("cmb2_shift_rows_complete",function(i,t){var l=e(t).closest(".cmb-repeatable-group");return l.find(".cmb-type-slider").each(function(){e(this).find(".slider-field").slider("value",e(this).find(".slider-field-value").val()),e(this).find(".slider-field-value-text").text(e(this).find(".slider-field-value").val())}),!1}),e(".cmb-repeatable-group").on("cmb2_add_row",function(t,l){return e(l).find(".cmb-type-slider").each(function(){i(e(this)),e(this).find(".ui-slider-range").css("width",0),e(this).find(".slider-field").slider("value",0),e(this).find(".slider-field-value-text").text("0")}),!1})}(jQuery);
 
trunk/assets/js/notices.js DELETED
@@ -1,7 +0,0 @@
1
- jQuery(document).ready(function() {
2
- jQuery('#heartbeat_control_update_notice > button').click(function() {
3
- jQuery.post(ajaxurl, {
4
- action: 'dismiss_heartbeat_control_update_notice'
5
- });
6
- });
7
- });
 
 
 
 
 
 
 
trunk/assets/js/src/settings.js DELETED
@@ -1,84 +0,0 @@
1
- (function($) {
2
-
3
- 'use strict';
4
-
5
- $('#heartbeat_control_behavior').change(function() {
6
- console.log('changed');
7
- if (this.value === 'modify') {
8
- $('.cmb2-id-heartbeat-control-frequency').show();
9
- } else {
10
- $('.cmb2-id-heartbeat-control-frequency').hide();
11
- }
12
- });
13
-
14
- // Init slider at start
15
- $('.cmb-type-slider').each(function() {
16
-
17
- initRow($(this));
18
-
19
- });
20
-
21
-
22
- // When a group row is shifted, reinitialise slider value
23
- $('.cmb-repeatable-group').on('cmb2_shift_rows_complete', function(event, instance) {
24
-
25
- var shiftedGroup = $(instance).closest('.cmb-repeatable-group');
26
-
27
- shiftedGroup.find('.cmb-type-slider').each(function() {
28
-
29
- $(this).find('.slider-field').slider('value', $(this).find('.slider-field-value').val());
30
- $(this).find('.slider-field-value-text').text($(this).find('.slider-field-value').val());
31
-
32
- });
33
-
34
- return false;
35
- });
36
-
37
-
38
- // When a group row is added, reset slider
39
- $('.cmb-repeatable-group').on('cmb2_add_row', function(event, newRow) {
40
-
41
- $(newRow).find('.cmb-type-slider').each(function() {
42
-
43
- initRow($(this));
44
-
45
- $(this).find('.ui-slider-range').css('width', 0);
46
- $(this).find('.slider-field').slider('value', 0);
47
- $(this).find('.slider-field-value-text').text('0');
48
- });
49
-
50
- return false;
51
- });
52
-
53
-
54
- // Init slider
55
- function initRow(row) {
56
-
57
- // Loop through all cmb-type-slider-field instances and instantiate the slider UI
58
- row.each(function() {
59
- var $this = $(this);
60
- var $value = $this.find('.slider-field-value');
61
- var $slider = $this.find('.slider-field');
62
- var $text = $this.find('.slider-field-value-text');
63
- var slider_data = $value.data();
64
-
65
- $slider.slider({
66
- range: 'min',
67
- value: slider_data.start,
68
- min: slider_data.min,
69
- max: slider_data.max,
70
- step: slider_data.step,
71
- slide: function(event, ui) {
72
- $value.val(ui.value);
73
- $text.text(ui.value);
74
- }
75
- });
76
-
77
- // Initiate the display
78
- $value.val($slider.slider('value'));
79
- $text.text($slider.slider('value'));
80
- });
81
- }
82
-
83
-
84
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/autoloader.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) { exit; }
3
-
4
- function heartbeat_control_autoload( $classname ) {
5
- $class = str_replace( '\\', DIRECTORY_SEPARATOR, str_replace( '_', '-', strtolower($classname) ) );
6
- $file_path = WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $class . '.php';
7
- if ( file_exists( $file_path ) ) {
8
- require_once $file_path;
9
- }
10
- }
11
-
12
- spl_autoload_register('heartbeat_control_autoload');
 
 
 
 
 
 
 
 
 
 
 
 
trunk/heartbeat-control-actions.php DELETED
@@ -1,47 +0,0 @@
1
- <?php
2
- $heartbeat_location = get_option('heartbeat_location');
3
- $heartbeat_frequency = get_option('heartbeat_frequency');
4
-
5
- if ( $heartbeat_location == 'disable-heartbeat-everywhere') {
6
-
7
- add_action( 'init', 'stop_heartbeat', 1 );
8
-
9
- function stop_heartbeat() {
10
-
11
- wp_deregister_script('heartbeat');
12
-
13
- }
14
-
15
- } elseif ($heartbeat_location == 'disable-heartbeat-dashboard') {
16
-
17
- add_action( 'init', 'stop_heartbeat', 1 );
18
-
19
- function stop_heartbeat() {
20
- global $pagenow;
21
-
22
- if ( $pagenow == 'index.php' )
23
- wp_deregister_script('heartbeat');
24
- }
25
-
26
- } elseif ($heartbeat_location == 'allow-heartbeat-post-edit') {
27
-
28
- add_action( 'init', 'stop_heartbeat', 1 );
29
-
30
- function stop_heartbeat() {
31
- global $pagenow;
32
-
33
- if ( $pagenow != 'post.php' && $pagenow != 'post-new.php' )
34
- wp_deregister_script('heartbeat');
35
- }
36
-
37
- }
38
-
39
- if ( is_numeric( $heartbeat_frequency ) ) {
40
- function heartbeat_frequency( $settings ) {
41
- global $heartbeat_frequency;
42
- $settings['interval'] = $heartbeat_frequency;
43
- return $settings;
44
- }
45
-
46
- add_filter( 'heartbeat_settings', 'heartbeat_frequency' );
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/heartbeat-control-donate.php DELETED
@@ -1,24 +0,0 @@
1
- <?php
2
-
3
- if( get_option( 'heartbeat_control_donate_dismissed' == '1' ) ) {
4
- add_action( 'admin_notices', 'heartbeat_control_donate_notice' );
5
- }
6
-
7
- function heartbeat_control_donate_notice() {
8
- ?>
9
- <div class="notice heartbeat-control-donate is-dismissible" >
10
- <p>Thanks for using Heartbeat Control! As I don't make any money from this plugin, please consider <a href="http://jeffmatson.net/donate">donating</a> to help keep Heartbeat Control updated.</p>
11
- </div>
12
- <?php
13
- }
14
-
15
- add_action( 'admin_enqueue_scripts', 'heartbeat_control_assets' );
16
-
17
- function heartbeat_control_assets() {
18
- wp_enqueue_script( 'heartbeat-control-donate-notice', plugins_url( '/js/donate-notice.js', __FILE__ ), array( 'jquery' ), '1.0', true );
19
- }
20
-
21
- function heartbeat_control_dismiss_donate() {
22
- update_option( 'heartbeat_control_donate_dismissed', '1' );
23
- }
24
- add_action( 'wp_ajax_heartbeat_control_dismiss_donate', 'heartbeat_control_dismiss_donate' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/heartbeat-control-menu.php DELETED
@@ -1,95 +0,0 @@
1
- <?php
2
-
3
- add_action( 'admin_menu', 'heartbeat_control_menu_page' );
4
- /**
5
- * heartbeat_control_menu function.
6
- *
7
- * @access public
8
- * @return void
9
- */
10
- function heartbeat_control_menu_page() {
11
-
12
- add_submenu_page(
13
- 'options-general.php',
14
- __( 'Heartbeat Control', 'heartbeat-control' ),
15
- __( 'Heartbeat Control', 'heartbeat-control' ),
16
- 'manage_options',
17
- 'heartbeat-control',
18
- 'heartbeat_control_menu',
19
- 99
20
- );
21
- }
22
-
23
- function heartbeat_control_menu() {
24
-
25
- $directory = plugin_dir_path( __FILE__ );
26
-
27
- require_once $directory . '/heartbeat-control-options.php';
28
- ?>
29
-
30
- <?php if ( isset( $_POST['heartbeat_location'] ) && in_array( $_POST['heartbeat_location'], $heartbeat_control_options ) ) {
31
- update_option( 'heartbeat_location', $_POST['heartbeat_location'] );
32
- }?>
33
-
34
- <?php if ( isset( $_POST['heartbeat_frequency'] ) && in_array( $_POST['heartbeat_frequency'], $heartbeat_frequency_options ) ) {
35
- update_option( 'heartbeat_frequency', $_POST['heartbeat_frequency'] );
36
- }?>
37
-
38
- <div class="wrap">
39
-
40
- <h1> Heartbeat Control configuration </h1>
41
-
42
- <form method="post" action="<?php admin_url( 'tools.php?page=heartbeat-control' ); ?>">
43
-
44
- <table class="form-table">
45
- <tr valign="top">
46
- <th scope="row">Control heartbeat locations:</th>
47
-
48
- <?php $heartbeat_setting = get_option( 'heartbeat_location' ) ?>
49
-
50
- <td>
51
- <label>
52
- <select name="heartbeat_location">
53
-
54
- <?php foreach ( $heartbeat_control_options as $options => $setting_value ) : ?>
55
-
56
- <option value="<?php echo $setting_value ?>"
57
- <?php selected( $setting_value, $heartbeat_setting ); ?>>
58
- <?php echo esc_html( $options ); ?>
59
- </option>
60
-
61
- <?php endforeach; ?>
62
-
63
- </select>
64
- </label>
65
- </td>
66
- </tr>
67
- <tr valign="top">
68
- <th scope="row">Override heartbeat frequency:</th>
69
-
70
- <?php $heartbeat_frequency = get_option( 'heartbeat_frequency' ) ?>
71
-
72
- <td>
73
- <label>
74
- <select name="heartbeat_frequency">
75
-
76
- <?php foreach ( $heartbeat_frequency_options as $options => $setting_value ) : ?>
77
-
78
- <option value="<?php echo $setting_value ?>"
79
- <?php selected( $setting_value, $heartbeat_frequency ); ?>>
80
- <?php echo esc_html( $options ); ?>
81
- </option>
82
-
83
- <?php endforeach; ?>
84
-
85
- </select>
86
- </label>
87
- </td>
88
- </tr>
89
- </table>
90
- <?php submit_button(); ?>
91
- </form>
92
- <p><strong>Did this plugin help you? Please consider donating to help keep Heartbeat Control updated:</strong></p>
93
- <a class="button button-primary" href="http://jeffmatson.net/donate">Donate</a>
94
- <?php
95
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/heartbeat-control-options.php DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
- $heartbeat_control_options = array (
3
- 'Use default' => 'use-default',
4
- 'Disable everywhere' => 'disable-heartbeat-everywhere',
5
- 'Disable on dashboard page' => 'disable-heartbeat-dashboard',
6
- 'Allow only on post edit pages' => 'allow-heartbeat-post-edit',
7
- );
8
-
9
- $heartbeat_frequency_options = array(
10
- 'Use default' => 'default',
11
- '15 seconds' => '15',
12
- '20 seconds' => '20',
13
- '25 seconds' => '25',
14
- '30 seconds' => '30',
15
- '35 seconds' => '35',
16
- '40 seconds' => '40',
17
- '45 seconds' => '45',
18
- '50 seconds' => '50',
19
- '60 seconds' => '60',
20
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/heartbeat-control.php DELETED
@@ -1,91 +0,0 @@
1
- <?php
2
- /**
3
- * Plugin Name: Heartbeat Control
4
- * Plugin URI: https://jeffmatson.net/heartbeat-control
5
- * Description: Completely controls the WordPress heartbeat.
6
- * Version: 1.1.2
7
- * Author: Jeff Matson
8
- * Author URI: http://jeffmatson.net
9
- * License: GPL2
10
- */
11
-
12
- namespace Heartbeat_Control;
13
-
14
- class Heartbeat_Control {
15
-
16
- public $version = '1.1';
17
-
18
- public function __construct() {
19
- $this->maybe_upgrade();
20
- $this->register_dependencies();
21
- require_once( dirname( __FILE__ ) . '/vendor/webdevstudios/cmb2/init.php' );
22
- add_action( 'cmb2_admin_init', array( new Settings, 'init_metaboxes' ) );
23
- add_action( 'wp_ajax_dismiss_heartbeat_control_update_notice', array( $this, 'dismiss_update_notice' ) );
24
- add_action( 'admin_enqueue_scripts', array( $this, 'maybe_enqueue_scripts' ) );
25
- new Heartbeat;
26
- }
27
-
28
- public function maybe_enqueue_scripts() {
29
- if ( get_option( 'heartbeat_control_update_notice' ) ) {
30
- wp_enqueue_script( 'heartbeat-control-notices', plugins_url( '/assets/js/notices.js' , __FILE__ ), array('jquery'), '1.0.0', true);
31
- wp_localize_script( 'heartbeat-control-notices', 'ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
32
- }
33
- }
34
-
35
- public function register_dependencies() {
36
- require_once( dirname( __FILE__ ) . '/autoloader.php' );
37
- }
38
-
39
- public function maybe_upgrade() {
40
- add_action( 'admin_notices', array( $this, 'heartbeat_control_updated' ) );
41
- if ( get_option( 'heartbeat_control_version' ) !== $this->version ) {
42
- $this->upgrade_10_to_11();
43
- }
44
-
45
-
46
- }
47
-
48
- public function upgrade_10_to_11() {
49
- $updated_options = array();
50
- if ( $old_location = get_option('heartbeat_location') ) {
51
- if ( $old_location === 'disable-heartbeat-everywhere' ) {
52
- $updated_options['heartbeat_control_behavior'] = 'disable';
53
- $updated_options['heartbeat_control_location'] = array( 'frontend', 'admin', '/wp-admin/post.php' );
54
- } elseif ( $old_location === 'disable-heartbeat-dashboard' ) {
55
- $updated_options['heartbeat_control_behavior'] = 'disable';
56
- $updated_options['heartbeat_control_location'] = array( 'admin' );
57
- } elseif ( $old_location === 'allow-heartbeat-post-edit' ) {
58
- $updated_options['heartbeat_control_behavior'] = 'allow';
59
- $updated_options['heartbeat_control_location'] = array( '/wp-admin/post.php' );
60
- } else {
61
- if ( $old_frequency = get_option('heartbeat_frequency') ) {
62
- $updated_options['heartbeat_control_behavior'] = 'modify';
63
- $updated_options['heartbeat_control_location'] = array( 'frontend', 'admin', '/wp-admin/post.php' );
64
- $updated_options['heartbeat_control_frequency'] = $old_frequency;
65
- }
66
- }
67
- }
68
-
69
- update_option( 'heartbeat_control_settings', $updated_options );
70
- update_option( 'heartbeat_control_version', '1.1' );
71
- update_option( 'heartbeat_control_update_notice', true );
72
- }
73
-
74
- public function heartbeat_control_updated() {
75
- if ( get_option('heartbeat_control_update_notice') ) {
76
- ?>
77
- <div id="heartbeat_control_update_notice" class="notice notice-success is-dismissible">
78
- <p><?php _e( 'Heartbeat Control has updated to a new version!', 'heartbeat-control' ); ?></p>
79
- <p><?php _e( 'All prior settings should be preserved, but it might be a good idea to check out the settings to be sure.', 'heartbeat-control' ); ?></p>
80
- </div>
81
- <?php
82
- }
83
- }
84
-
85
- public function dismiss_update_notice() {
86
- delete_option( 'heartbeat_control_update_notice' );
87
- }
88
-
89
- }
90
-
91
- new Heartbeat_Control;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/heartbeat.php DELETED
@@ -1,64 +0,0 @@
1
- <?php
2
-
3
- namespace Heartbeat_Control;
4
-
5
- class Heartbeat {
6
-
7
- public $current_screen;
8
- public $current_query_string;
9
- public $settings = array();
10
-
11
- public function __construct() {
12
-
13
- if ( ! empty( $_SERVER['QUERY_STRING'] ) ) {
14
- $current_url = $_SERVER['REQUEST_URI'] . '?' . $_SERVER['QUERY_STRING'];
15
- } else {
16
- $current_url = $_SERVER['REQUEST_URI'];
17
- }
18
-
19
- $this->current_screen = parse_url( $current_url );
20
- $this->settings = get_option( 'heartbeat_control_settings' );
21
-
22
- if ( ! is_array( $this->settings ) ) {
23
- return;
24
- }
25
-
26
- add_action( 'admin_enqueue_scripts', array( $this, 'maybe_disable' ), 99 );
27
- add_action( 'wp_enqueue_scripts', array( $this, 'maybe_disable' ), 99 );
28
- add_filter( 'heartbeat_settings', array( $this, 'maybe_modify' ), 99, 1 );
29
- }
30
-
31
- public function check_location() {
32
- $location = $this->settings['heartbeat_control_location'];
33
-
34
- if ( in_array( $this->current_screen['path'], $location ) ) {
35
- return true;
36
- } elseif ( ( ! is_admin() ) && ( in_array( 'frontend', $location ) ) ) {
37
- return true;
38
- } elseif ( ( is_admin() ) && ( in_array( 'frontend', $location ) ) ) {
39
- return true;
40
- }
41
-
42
- return false;
43
- }
44
-
45
- public function maybe_disable() {
46
- if ( array_key_exists( 'heartbeat_control_behavior', $this->settings ) && $this->settings['heartbeat_control_behavior'] === 'disable' ) {
47
- if ( $this->check_location() ) {
48
- wp_deregister_script( 'heartbeat' );
49
- }
50
- }
51
- }
52
-
53
- public function maybe_modify( $settings ) {
54
-
55
- if ( array_key_exists( 'heartbeat_control_behavior', $this->settings ) && $this->settings['heartbeat_control_behavior'] === 'modify' ) {
56
- if ( $this->check_location() ) {
57
- $settings['interval'] = intval( $this->settings['heartbeat_control_frequency'] );
58
- }
59
- }
60
-
61
- return $settings;
62
- }
63
-
64
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/js/donate-notice.js DELETED
@@ -1,10 +0,0 @@
1
- jQuery(document).on( 'click', '.heartbeat-control-donate .notice-dismiss', function() {
2
-
3
- jQuery.ajax({
4
- url: ajaxurl,
5
- data: {
6
- action: 'heartbeat_control_dismiss_donate'
7
- }
8
- })
9
-
10
- });
 
 
 
 
 
 
 
 
 
 
trunk/readme.txt DELETED
@@ -1,61 +0,0 @@
1
- === Heartbeat Control ===
2
- Contributors: JeffMatson
3
- Donate link: https://jeffmatson.net/donate
4
- Tags: heartbeat, admin-ajax, server resources, heartbeat control, heartbeat api, performance, debugging, javascript
5
- Requires at least: 3.6
6
- Tested up to: 4.8.2
7
- Stable tag: 1.1.2
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
-
11
- Allows you to easily manage the frequency of the WordPress heartbeat API.
12
-
13
- == Description ==
14
-
15
- **Important:**
16
- Upon the release of 1.1, a small issue existed that caused a big problem which broke the plugin. The issue has been resolved as of version 1.1.2.
17
- If you're getting errors, check your plugin version and update to 1.1.2, which should fix everything. You'll need to replace the plugin (wp-content/plugins/heartbeat-control) via FTP. Once you do that, all should be well.
18
-
19
- Allows you to easily manage the frequency of the WordPress heartbeat API with just a few clicks.
20
-
21
- The heartbeat API can be disabled entirely and allowed for only specific locations.
22
-
23
- Heartbeat intervals can be modified between 15 and 300 seconds between requests, saving on server resources.
24
-
25
- == Installation ==
26
-
27
- 1. Upload the plugin folder to the /wp-content/plugins/ directory.
28
- 1. Activate Heartbeat Control on the Plugins page.
29
- 1. Adjust any settings within Settings > Heartbeat Control.
30
-
31
- == Frequently Asked Questions ==
32
-
33
- = How do I change my settings? =
34
-
35
- All options are located within Settings > Heartbeat Control.
36
-
37
- = Why would I want to change the default heartbeat intervals? =
38
-
39
- If you commonly leave your WordPress admin up for long periods of time, especially while writing or editing a post, the repeated POST requests can cause high resource usage. To avoid this, the heartbeat can be modified or even disabled to lower your server resource usage.
40
-
41
- == Changelog ==
42
- =1.1.2 =
43
- * Bugfixes.
44
- * Resolves potential fatal error mistakenly pushed to 1.1.
45
-
46
- = 1.1.1 =
47
- * Bugfixes.
48
-
49
- = 1.1 =
50
- * Rewritten from the ground up for future extensibility.
51
- * Performance enhancements.
52
- * Improved UI.
53
- * Better handling for late calls to the Heartbeat API.
54
- * New condition settings for filtering on the frontend.
55
-
56
- = 1.0.2 =
57
- * Bumped tested version
58
- * Added donation button
59
-
60
- = 1.0 =
61
- * Initial release.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/settings.php DELETED
@@ -1,82 +0,0 @@
1
- <?php
2
-
3
- namespace Heartbeat_Control;
4
-
5
- class Settings {
6
-
7
- public function render_slider_field( $field, $field_escaped_value, $field_object_id, $field_object_type, $field_type_object ) {
8
- echo '<div class="slider-field"></div>';
9
- echo $field_type_object->input( array(
10
- 'type' => 'hidden',
11
- 'class' => 'slider-field-value',
12
- 'readonly' => 'readonly',
13
- 'data-start' => absint( $field_escaped_value ),
14
- 'data-min' => $field->min(),
15
- 'data-max' => $field->max(),
16
- 'data-step' => $field->step(),
17
- 'desc' => '',
18
- ) );
19
- echo '<span class="slider-field-value-display">'. $field->value_label() .' <span class="slider-field-value-text"></span></span>';
20
- $field_type_object->_desc( true, true );
21
- }
22
-
23
- public function enqueue_scripts( $hook ) {
24
- if ( $hook != 'settings_page_heartbeat_control_settings' ) {
25
- return;
26
- }
27
-
28
- wp_enqueue_script('heartbeat-control-settings', plugins_url( '/assets/js/bundle.js' , __FILE__ ), array('jquery', 'jquery-ui-slider'), '1.0.0', true);
29
- wp_localize_script( 'heartbeat-control-settings', 'ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
30
- wp_register_style( 'slider_ui', '//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.min.css', array(), '1.0' );
31
- wp_enqueue_style('heartbeat-control-settings', plugins_url( '/style.css' , __FILE__ ), array('slider_ui'), '1.0.0');
32
- }
33
-
34
- public function init_metaboxes() {
35
- add_action( 'cmb2_render_slider', array( $this, 'render_slider_field' ), 10, 5 );
36
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
37
- $prefix = 'heartbeat_control_';
38
-
39
- $cmb = new_cmb2_box( array(
40
- 'id' => 'heartbeat_control_settings',
41
- 'title' => __( 'Heartbeat Control Settings', 'cmb2' ),
42
- 'object_types' => array( 'options-page', ), // Post type
43
- 'option_key' => 'heartbeat_control_settings',
44
- 'capability' => 'manage_options',
45
- 'parent_slug' => 'options-general.php',
46
- ) );
47
-
48
- $cmb->add_field( array(
49
- 'name' => __( 'Heartbeat Behavior', 'cmb2' ),
50
- 'id' => $prefix . 'behavior',
51
- 'type' => 'select',
52
- 'default' => 'allow',
53
- 'options' => array(
54
- 'allow' => __( 'Allow Heartbeat', 'cmb2' ),
55
- 'disable' => __( 'Disable Heartbeat', 'cmb2' ),
56
- 'modify' => __( 'Modify Heartbeat', 'cmb2' ),
57
- ),
58
- ) );
59
-
60
- $cmb->add_field( array(
61
- 'name' => __( 'Locations', 'cmb2' ),
62
- 'id' => $prefix . 'location',
63
- 'type' => 'multicheck',
64
- 'options' => array(
65
- 'admin' => __( 'WordPress Dashboard', 'cmb2' ),
66
- 'frontend' => __( 'Frontend', 'cmb2' ),
67
- '/wp-admin/post.php' => __( 'Post Editor', 'cmb2' ),
68
- ),
69
- ) );
70
-
71
- $cmb->add_field( array(
72
- 'name' => __( 'Frequency', 'cmb2' ),
73
- 'id' => $prefix . 'frequency',
74
- 'type' => 'slider',
75
- 'min' => '15',
76
- 'step' => '1',
77
- 'max' => '300',
78
- 'default' => '15',
79
- ) );
80
- }
81
-
82
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/style.css DELETED
@@ -1,5 +0,0 @@
1
- .slider-field-value-display { float: right; font-weight: 400; font-size: 12px; color: #888; padding-top: .5em; }
2
-
3
- /*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3R5bGUuY3NzIiwic291cmNlcyI6WyJzdHlsZS5zY3NzIl0sIm1hcHBpbmdzIjoiQUFBQSxBQUFBLDJCQUEyQixDQUFDLEVBQ3hCLEtBQUssRUFBRSxLQUFNLEVBQ2IsV0FBVyxFQUFFLEdBQUksRUFDakIsU0FBUyxFQUFFLElBQUssRUFDaEIsS0FBSyxFQUFFLElBQUssRUFDWixXQUFXLEVBQUUsSUFBSyxHQUNyQiIsIm5hbWVzIjpbXX0= */
4
-
5
- /*# sourceMappingURL=style.css.map */
 
 
 
 
 
trunk/style.css.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["style.scss","style.css"],"names":[],"mappings":"AAAA,8BACI,aAAa,CACb,iBAAiB,CACjB,gBAAgB,CAChB,YAAY,CACZ,kBAAkB,EACrB;;ACJD,8VAA8V","file":"style.css","sourcesContent":[".slider-field-value-display {\n float: right;\n font-weight: 400;\n font-size: 12px;\n color: #888;\n padding-top: .5em;\n}"]}
 
trunk/style.min.css DELETED
@@ -1 +0,0 @@
1
- .slider-field-value-display{float:right;font-weight:400;font-size:12px;color:#888;padding-top:.5em}
 
trunk/vendor/autoload.php DELETED
@@ -1,7 +0,0 @@
1
- <?php
2
-
3
- // autoload.php @generated by Composer
4
-
5
- require_once __DIR__ . '/composer' . '/autoload_real.php';
6
-
7
- return ComposerAutoloaderInitc1369967f44240795d4fb2b71efbee90::getLoader();
 
 
 
 
 
 
 
trunk/vendor/composer/ClassLoader.php DELETED
@@ -1,415 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of Composer.
5
- *
6
- * (c) Nils Adermann <naderman@naderman.de>
7
- * Jordi Boggiano <j.boggiano@seld.be>
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
12
-
13
- namespace Composer\Autoload;
14
-
15
- /**
16
- * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
- *
18
- * $loader = new \Composer\Autoload\ClassLoader();
19
- *
20
- * // register classes with namespaces
21
- * $loader->add('Symfony\Component', __DIR__.'/component');
22
- * $loader->add('Symfony', __DIR__.'/framework');
23
- *
24
- * // activate the autoloader
25
- * $loader->register();
26
- *
27
- * // to enable searching the include path (eg. for PEAR packages)
28
- * $loader->setUseIncludePath(true);
29
- *
30
- * In this example, if you try to use a class in the Symfony\Component
31
- * namespace or one of its children (Symfony\Component\Console for instance),
32
- * the autoloader will first look for the class under the component/
33
- * directory, and it will then fallback to the framework/ directory if not
34
- * found before giving up.
35
- *
36
- * This class is loosely based on the Symfony UniversalClassLoader.
37
- *
38
- * @author Fabien Potencier <fabien@symfony.com>
39
- * @author Jordi Boggiano <j.boggiano@seld.be>
40
- * @see http://www.php-fig.org/psr/psr-0/
41
- * @see http://www.php-fig.org/psr/psr-4/
42
- */
43
- class ClassLoader
44
- {
45
- // PSR-4
46
- private $prefixLengthsPsr4 = array();
47
- private $prefixDirsPsr4 = array();
48
- private $fallbackDirsPsr4 = array();
49
-
50
- // PSR-0
51
- private $prefixesPsr0 = array();
52
- private $fallbackDirsPsr0 = array();
53
-
54
- private $useIncludePath = false;
55
- private $classMap = array();
56
- private $classMapAuthoritative = false;
57
- private $missingClasses = array();
58
-
59
- public function getPrefixes()
60
- {
61
- if (!empty($this->prefixesPsr0)) {
62
- return call_user_func_array('array_merge', $this->prefixesPsr0);
63
- }
64
-
65
- return array();
66
- }
67
-
68
- public function getPrefixesPsr4()
69
- {
70
- return $this->prefixDirsPsr4;
71
- }
72
-
73
- public function getFallbackDirs()
74
- {
75
- return $this->fallbackDirsPsr0;
76
- }
77
-
78
- public function getFallbackDirsPsr4()
79
- {
80
- return $this->fallbackDirsPsr4;
81
- }
82
-
83
- public function getClassMap()
84
- {
85
- return $this->classMap;
86
- }
87
-
88
- /**
89
- * @param array $classMap Class to filename map
90
- */
91
- public function addClassMap(array $classMap)
92
- {
93
- if ($this->classMap) {
94
- $this->classMap = array_merge($this->classMap, $classMap);
95
- } else {
96
- $this->classMap = $classMap;
97
- }
98
- }
99
-
100
- /**
101
- * Registers a set of PSR-0 directories for a given prefix, either
102
- * appending or prepending to the ones previously set for this prefix.
103
- *
104
- * @param string $prefix The prefix
105
- * @param array|string $paths The PSR-0 root directories
106
- * @param bool $prepend Whether to prepend the directories
107
- */
108
- public function add($prefix, $paths, $prepend = false)
109
- {
110
- if (!$prefix) {
111
- if ($prepend) {
112
- $this->fallbackDirsPsr0 = array_merge(
113
- (array) $paths,
114
- $this->fallbackDirsPsr0
115
- );
116
- } else {
117
- $this->fallbackDirsPsr0 = array_merge(
118
- $this->fallbackDirsPsr0,
119
- (array) $paths
120
- );
121
- }
122
-
123
- return;
124
- }
125
-
126
- $first = $prefix[0];
127
- if (!isset($this->prefixesPsr0[$first][$prefix])) {
128
- $this->prefixesPsr0[$first][$prefix] = (array) $paths;
129
-
130
- return;
131
- }
132
- if ($prepend) {
133
- $this->prefixesPsr0[$first][$prefix] = array_merge(
134
- (array) $paths,
135
- $this->prefixesPsr0[$first][$prefix]
136
- );
137
- } else {
138
- $this->prefixesPsr0[$first][$prefix] = array_merge(
139
- $this->prefixesPsr0[$first][$prefix],
140
- (array) $paths
141
- );
142
- }
143
- }
144
-
145
- /**
146
- * Registers a set of PSR-4 directories for a given namespace, either
147
- * appending or prepending to the ones previously set for this namespace.
148
- *
149
- * @param string $prefix The prefix/namespace, with trailing '\\'
150
- * @param array|string $paths The PSR-4 base directories
151
- * @param bool $prepend Whether to prepend the directories
152
- *
153
- * @throws \InvalidArgumentException
154
- */
155
- public function addPsr4($prefix, $paths, $prepend = false)
156
- {
157
- if (!$prefix) {
158
- // Register directories for the root namespace.
159
- if ($prepend) {
160
- $this->fallbackDirsPsr4 = array_merge(
161
- (array) $paths,
162
- $this->fallbackDirsPsr4
163
- );
164
- } else {
165
- $this->fallbackDirsPsr4 = array_merge(
166
- $this->fallbackDirsPsr4,
167
- (array) $paths
168
- );
169
- }
170
- } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
171
- // Register directories for a new namespace.
172
- $length = strlen($prefix);
173
- if ('\\' !== $prefix[$length - 1]) {
174
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
175
- }
176
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
177
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
178
- } elseif ($prepend) {
179
- // Prepend directories for an already registered namespace.
180
- $this->prefixDirsPsr4[$prefix] = array_merge(
181
- (array) $paths,
182
- $this->prefixDirsPsr4[$prefix]
183
- );
184
- } else {
185
- // Append directories for an already registered namespace.
186
- $this->prefixDirsPsr4[$prefix] = array_merge(
187
- $this->prefixDirsPsr4[$prefix],
188
- (array) $paths
189
- );
190
- }
191
- }
192
-
193
- /**
194
- * Registers a set of PSR-0 directories for a given prefix,
195
- * replacing any others previously set for this prefix.
196
- *
197
- * @param string $prefix The prefix
198
- * @param array|string $paths The PSR-0 base directories
199
- */
200
- public function set($prefix, $paths)
201
- {
202
- if (!$prefix) {
203
- $this->fallbackDirsPsr0 = (array) $paths;
204
- } else {
205
- $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
206
- }
207
- }
208
-
209
- /**
210
- * Registers a set of PSR-4 directories for a given namespace,
211
- * replacing any others previously set for this namespace.
212
- *
213
- * @param string $prefix The prefix/namespace, with trailing '\\'
214
- * @param array|string $paths The PSR-4 base directories
215
- *
216
- * @throws \InvalidArgumentException
217
- */
218
- public function setPsr4($prefix, $paths)
219
- {
220
- if (!$prefix) {
221
- $this->fallbackDirsPsr4 = (array) $paths;
222
- } else {
223
- $length = strlen($prefix);
224
- if ('\\' !== $prefix[$length - 1]) {
225
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
226
- }
227
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
228
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
229
- }
230
- }
231
-
232
- /**
233
- * Turns on searching the include path for class files.
234
- *
235
- * @param bool $useIncludePath
236
- */
237
- public function setUseIncludePath($useIncludePath)
238
- {
239
- $this->useIncludePath = $useIncludePath;
240
- }
241
-
242
- /**
243
- * Can be used to check if the autoloader uses the include path to check
244
- * for classes.
245
- *
246
- * @return bool
247
- */
248
- public function getUseIncludePath()
249
- {
250
- return $this->useIncludePath;
251
- }
252
-
253
- /**
254
- * Turns off searching the prefix and fallback directories for classes
255
- * that have not been registered with the class map.
256
- *
257
- * @param bool $classMapAuthoritative
258
- */
259
- public function setClassMapAuthoritative($classMapAuthoritative)
260
- {
261
- $this->classMapAuthoritative = $classMapAuthoritative;
262
- }
263
-
264
- /**
265
- * Should class lookup fail if not found in the current class map?
266
- *
267
- * @return bool
268
- */
269
- public function isClassMapAuthoritative()
270
- {
271
- return $this->classMapAuthoritative;
272
- }
273
-
274
- /**
275
- * Registers this instance as an autoloader.
276
- *
277
- * @param bool $prepend Whether to prepend the autoloader or not
278
- */
279
- public function register($prepend = false)
280
- {
281
- spl_autoload_register(array($this, 'loadClass'), true, $prepend);
282
- }
283
-
284
- /**
285
- * Unregisters this instance as an autoloader.
286
- */
287
- public function unregister()
288
- {
289
- spl_autoload_unregister(array($this, 'loadClass'));
290
- }
291
-
292
- /**
293
- * Loads the given class or interface.
294
- *
295
- * @param string $class The name of the class
296
- * @return bool|null True if loaded, null otherwise
297
- */
298
- public function loadClass($class)
299
- {
300
- if ($file = $this->findFile($class)) {
301
- includeFile($file);
302
-
303
- return true;
304
- }
305
- }
306
-
307
- /**
308
- * Finds the path to the file where the class is defined.
309
- *
310
- * @param string $class The name of the class
311
- *
312
- * @return string|false The path if found, false otherwise
313
- */
314
- public function findFile($class)
315
- {
316
- // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
317
- if ('\\' == $class[0]) {
318
- $class = substr($class, 1);
319
- }
320
-
321
- // class map lookup
322
- if (isset($this->classMap[$class])) {
323
- return $this->classMap[$class];
324
- }
325
- if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
326
- return false;
327
- }
328
-
329
- $file = $this->findFileWithExtension($class, '.php');
330
-
331
- // Search for Hack files if we are running on HHVM
332
- if (false === $file && defined('HHVM_VERSION')) {
333
- $file = $this->findFileWithExtension($class, '.hh');
334
- }
335
-
336
- if (false === $file) {
337
- // Remember that this class does not exist.
338
- $this->missingClasses[$class] = true;
339
- }
340
-
341
- return $file;
342
- }
343
-
344
- private function findFileWithExtension($class, $ext)
345
- {
346
- // PSR-4 lookup
347
- $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
348
-
349
- $first = $class[0];
350
- if (isset($this->prefixLengthsPsr4[$first])) {
351
- foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
352
- if (0 === strpos($class, $prefix)) {
353
- foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
354
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
355
- return $file;
356
- }
357
- }
358
- }
359
- }
360
- }
361
-
362
- // PSR-4 fallback dirs
363
- foreach ($this->fallbackDirsPsr4 as $dir) {
364
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
365
- return $file;
366
- }
367
- }
368
-
369
- // PSR-0 lookup
370
- if (false !== $pos = strrpos($class, '\\')) {
371
- // namespaced class name
372
- $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
373
- . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
374
- } else {
375
- // PEAR-like class name
376
- $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
377
- }
378
-
379
- if (isset($this->prefixesPsr0[$first])) {
380
- foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
381
- if (0 === strpos($class, $prefix)) {
382
- foreach ($dirs as $dir) {
383
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
384
- return $file;
385
- }
386
- }
387
- }
388
- }
389
- }
390
-
391
- // PSR-0 fallback dirs
392
- foreach ($this->fallbackDirsPsr0 as $dir) {
393
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
394
- return $file;
395
- }
396
- }
397
-
398
- // PSR-0 include paths.
399
- if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
400
- return $file;
401
- }
402
-
403
- return false;
404
- }
405
- }
406
-
407
- /**
408
- * Scope isolated include.
409
- *
410
- * Prevents access to $this/self from included files.
411
- */
412
- function includeFile($file)
413
- {
414
- include $file;
415
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/LICENSE DELETED
@@ -1,21 +0,0 @@
1
-
2
- Copyright (c) 2016 Nils Adermann, Jordi Boggiano
3
-
4
- Permission is hereby granted, free of charge, to any person obtaining a copy
5
- of this software and associated documentation files (the "Software"), to deal
6
- in the Software without restriction, including without limitation the rights
7
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the Software is furnished
9
- to do so, subject to the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included in all
12
- copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- THE SOFTWARE.
21
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/autoload_classmap.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- // autoload_classmap.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- );
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/autoload_namespaces.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- // autoload_namespaces.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- );
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/autoload_psr4.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- // autoload_psr4.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- );
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/autoload_real.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
-
3
- // autoload_real.php @generated by Composer
4
-
5
- class ComposerAutoloaderInitc1369967f44240795d4fb2b71efbee90
6
- {
7
- private static $loader;
8
-
9
- public static function loadClassLoader($class)
10
- {
11
- if ('Composer\Autoload\ClassLoader' === $class) {
12
- require __DIR__ . '/ClassLoader.php';
13
- }
14
- }
15
-
16
- public static function getLoader()
17
- {
18
- if (null !== self::$loader) {
19
- return self::$loader;
20
- }
21
-
22
- spl_autoload_register(array('ComposerAutoloaderInitc1369967f44240795d4fb2b71efbee90', 'loadClassLoader'), true, true);
23
- self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitc1369967f44240795d4fb2b71efbee90', 'loadClassLoader'));
25
-
26
- $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
27
- if ($useStaticLoader) {
28
- require_once __DIR__ . '/autoload_static.php';
29
-
30
- call_user_func(\Composer\Autoload\ComposerStaticInitc1369967f44240795d4fb2b71efbee90::getInitializer($loader));
31
- } else {
32
- $map = require __DIR__ . '/autoload_namespaces.php';
33
- foreach ($map as $namespace => $path) {
34
- $loader->set($namespace, $path);
35
- }
36
-
37
- $map = require __DIR__ . '/autoload_psr4.php';
38
- foreach ($map as $namespace => $path) {
39
- $loader->setPsr4($namespace, $path);
40
- }
41
-
42
- $classMap = require __DIR__ . '/autoload_classmap.php';
43
- if ($classMap) {
44
- $loader->addClassMap($classMap);
45
- }
46
- }
47
-
48
- $loader->register(true);
49
-
50
- return $loader;
51
- }
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/autoload_static.php DELETED
@@ -1,15 +0,0 @@
1
- <?php
2
-
3
- // autoload_static.php @generated by Composer
4
-
5
- namespace Composer\Autoload;
6
-
7
- class ComposerStaticInitc1369967f44240795d4fb2b71efbee90
8
- {
9
- public static function getInitializer(ClassLoader $loader)
10
- {
11
- return \Closure::bind(function () use ($loader) {
12
-
13
- }, null, ClassLoader::class);
14
- }
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/installed.json DELETED
@@ -1,61 +0,0 @@
1
- [
2
- {
3
- "name": "webdevstudios/cmb2",
4
- "version": "v2.2.5.3",
5
- "version_normalized": "2.2.5.3",
6
- "source": {
7
- "type": "git",
8
- "url": "https://github.com/CMB2/CMB2.git",
9
- "reference": "5c9bdb6e99e17e4dad71ebbc68dab5def3c64e12"
10
- },
11
- "dist": {
12
- "type": "zip",
13
- "url": "https://api.github.com/repos/CMB2/CMB2/zipball/5c9bdb6e99e17e4dad71ebbc68dab5def3c64e12",
14
- "reference": "5c9bdb6e99e17e4dad71ebbc68dab5def3c64e12",
15
- "shasum": ""
16
- },
17
- "require": {
18
- "php": ">5.2.4"
19
- },
20
- "require-dev": {
21
- "phpunit/phpunit": "3.7.*"
22
- },
23
- "suggest": {
24
- "composer/installers": "~1.0"
25
- },
26
- "time": "2017-08-22 18:14:34",
27
- "type": "wordpress-plugin",
28
- "installation-source": "dist",
29
- "notification-url": "https://packagist.org/downloads/",
30
- "license": [
31
- "GPL-2.0+"
32
- ],
33
- "authors": [
34
- {
35
- "name": "WebDevStudios",
36
- "email": "contact@webdevstudios.com",
37
- "homepage": "https://github.com/WebDevStudios",
38
- "role": "Developer"
39
- },
40
- {
41
- "name": "Justin Sternberg",
42
- "email": "justin@dsgnwrks.pro",
43
- "homepage": "https://dsgnwrks.pro",
44
- "role": "Developer"
45
- },
46
- {
47
- "name": "Zao",
48
- "email": "office@zao.com",
49
- "homepage": "http://zao.is",
50
- "role": "Developer"
51
- }
52
- ],
53
- "description": "CMB2 is a metabox, custom fields, and forms library for WordPress that will blow your mind.",
54
- "homepage": "https://github.com/CMB2/CMB2",
55
- "keywords": [
56
- "metabox",
57
- "plugin",
58
- "wordpress"
59
- ]
60
- }
61
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/.github/ISSUE_TEMPLATE.md DELETED
@@ -1,36 +0,0 @@
1
- <!--
2
- Before posting a new issue:
3
- - Please post general support and questions at https://www.wordpress.org/support/plugin/cmb2/. We will move to GitHub once a confirmed bug.
4
- - Please check if your issue is addressed in the CMB2 Wiki Troubleshooting page: https://github.com/CMB2/CMB2/wiki/Troubleshooting
5
- - Please review the contributing guidelines: https://github.com/CMB2/CMB2/blob/trunk/CONTRIBUTING.md.
6
- -->
7
- ### Expected Behavior:
8
-
9
-
10
-
11
- ### Actual Behavior:
12
-
13
-
14
-
15
- ### Steps to reproduce (I have confirmed I can reproduce this issue on the trunk branch):
16
-
17
- 1.
18
- 2.
19
-
20
- ### CMB2 Field Registration Code:
21
-
22
- ```php
23
- add_action( 'cmb2_admin_init', 'yourprefix_register_demo_metabox' );
24
- function yourprefix_register_demo_metabox() {
25
-
26
- $cmb = new_cmb2_box( array(
27
- // Box Config...
28
- ) );
29
-
30
- $cmb->add_field( array(
31
- // Field Config...
32
- ) );
33
-
34
- // Additional fields...
35
- }
36
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/.github/PULL_REQUEST_TEMPLATE.md DELETED
@@ -1,10 +0,0 @@
1
- Fixes #{issue-number}.
2
-
3
- ### Changes proposed in this pull request
4
-
5
- -
6
-
7
- -
8
-
9
- -
10
-
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/CHANGELOG.md DELETED
@@ -1,639 +0,0 @@
1
- # Changelog
2
- All notable changes to this project will be documented in this file.
3
-
4
- ## Unreleased
5
-
6
- ## [2.2.5.3 - 2017-08-22][https://github.com/CMB2/CMB2/releases/tag/v2.2.5.3]
7
-
8
- ### Enhancements
9
-
10
- * Update to instead initate CMB2 hookup via "cmb2_init_hookup_{$cmb_id}" hook. Allows plugins to unhook/rehook/etc.
11
-
12
- ### Bug Fixes
13
-
14
- * Spelling/Grammar fixes. Props [@garrett-eclipse](https://github.com/garrett-eclipse) ([#1012](https://github.com/CMB2/CMB2/pull/1012)).
15
- * Fix "PHP Strict Standards: Static function should not be abstract" notice.
16
- * Add `CMB2_Utils::normalize_if_numeric()` to address problems when using floats as select/radio values. Fixes [#869](https://github.com/CMB2/CMB2/issues/869). See [#1013](https://github.com/CMB2/CMB2/pull/1013).
17
- * Fix issues with apostrophes in money values. (e.g. in Swiss German the thousand separator is an apostrophe). Props [@ocean90](https://github.com/ocean90) ([#1014](https://github.com/CMB2/CMB2/issues/1014), [#1015](https://github.com/CMB2/CMB2/pull/1015)).
18
- * Provide public access to the `CMB2_Options_Hookup::$option_key` property.
19
- * Change the updated-settings notice query variable so that WordPress does not auto-add settings notices on top of ours.
20
- * For settings pages, only output settings errors if WordPress does not do it by default (for sub-pages of `options-general.php`), and if the errors are not disabled via the `'disable_settings_errors'` box property.
21
-
22
- ## [2.2.5.2 - 2017-08-08][https://github.com/CMB2/CMB2/releases/tag/v2.2.5.2]
23
-
24
- ### Bug Fixes
25
-
26
- * Fix issue in 2.2.5 with non-sortable repeatable groups not having new groups values be emptied on creation/clone. [Support thread](https://wordpress.org/support/topic/the-default-parameter-dont-work-in-group-fields/page/2/)
27
- * Fix issue in 2.2.5 with options pages not saving when `'parent_slug'` box property was used. Fixes [#1008](https://github.com/CMB2/CMB2/issues/1008).
28
-
29
- ## [2.2.5.1 - 2017-08-07][https://github.com/CMB2/CMB2/releases/tag/v2.2.5.1]
30
-
31
- ### Bug Fixes
32
-
33
- * Fix issue in 2.2.5 which caused empty repeatable groups having the buttons set to have a disabled "Remove Group" button. [Support thread](https://wordpress.org/support/topic/the-default-parameter-dont-work-in-group-fields/)
34
-
35
- ## [2.2.5 - 2017-08-07][https://github.com/CMB2/CMB2/releases/tag/v2.2.5]
36
-
37
- ### Enhancements
38
-
39
- * Options pages are now first-class CMB2 citizens, and registering a box to show on an options page will automatically register the menu page and output the form on the page. [See example](https://github.com/CMB2/CMB2/blob/v2.2.5/example-functions.php#L640-L683). (The [snippets](https://github.com/CMB2/CMB2-Snippet-Library/tree/master/options-and-settings-pages) in the snippet library will be updated to reflect this change)
40
- * Improved Options Page styling. Props [@anhskohbo](https://github.com/anhskohbo) ([#1006](https://github.com/CMB2/CMB2/pull/1006)).
41
- * Improved cohesive styles for repeatable fields. Props [@anhskohbo](https://github.com/anhskohbo) ([#819](https://github.com/CMB2/CMB2/pull/819)).
42
- * New field types, `'taxonomy_radio_hierarchical'`, and `'taxonomy_multicheck_hierarchical'`, for displaying taxonomy options in a hierarchial layout. Props to [eriktelepovsky](https://github.com/eriktelepovsky) for the [working code](https://github.com/CMB2/CMB2/issues/640#issuecomment-246938690). ([#640](https://github.com/CMB2/CMB2/issues/640))
43
- * Removing last repeat item row (and repeat group row) is now somewhat allowed in that the "remove" button simply resets the last item to empty. Fixes [#312](https://github.com/CMB2/CMB2/issues/312).
44
- * Enable the additional media library modal filters. Fixes [#873](https://github.com/CMB2/CMB2/issues/873).
45
- * Sanitize the attributes added via the `cmb2_group_wrap_attributes` filter.
46
- * New field parameter, `'query_args'`, which can be used by the `'taxonomy_*'` fields. Provides ability to override the arguments passed to `get_terms()`.
47
- * The `cmb2_can_save` filter now passes the CMB2 object as the 2nd parameter. Props [@Arno33](https://github.com/Arno33) ([#994](https://github.com/CMB2/CMB2/pull/994)).
48
- * Update the file field type to work properly within a custom field context by allowing the passing of override arguments to `CMB2_Types::file()` method.
49
- * Many WordPress Code Standards improvements/updates. Props [@bradp](https://github.com/bradp)
50
- * Include absolute paths when including the core php files. Props [@anhskohbo](https://github.com/anhskohbo) ([#998](https://github.com/CMB2/CMB2/pull/998)).
51
- * Change language throught to reflect CMB2's move to its own organization.
52
- * Break `CMB2_Field:options()` method apart to allow re-setting options from field params. Related: [reaktivstudios/cmb2-flexible-content/pull/8](https://github.com/reaktivstudios/cmb2-flexible-content/pull/8).
53
- * New `CMB2:box_types()` method for getting the array of registered `'object_types'` for a box. Ensures the return is an array.
54
- * Improved inline hooks documentation.
55
- * Updated several CMB2 methods to return the CMB2 object (for method chaining). Methods include:
56
- * `CMB2::show_form()`
57
- * `CMB2::render_form_open()`
58
- * `CMB2::render_form_close()`
59
- * `CMB2::render_group_row()`
60
- * `CMB2::render_hidden_fields()`
61
- * `CMB2::save_fields()`
62
- * `CMB2::process_fields()`
63
- * `CMB2::process_field()`
64
- * `CMB2::pre_process()`
65
- * `CMB2::after_save()`
66
- * `CMB2::add_fields()`
67
-
68
- ### Bug Fixes
69
-
70
- * Update for `file`/`file_list` fields to properly show a preview for SVG images. Fixes [#874](https://github.com/CMB2/CMB2/pull/874).
71
- * Fix and standardize inconsistent button classes. Update all buttons to use the `.button-secondary` class instead of the `.button` class. This alleviates some front-end issues for themes which target the `.button` class. _This is a backwards-compatibility break._ If your theme or plugin targets the `.button` class within CMB2, you will need to update to use `.button-secondary`.
72
- * Correct the before/after form hooks order. For more details see ([#954](https://github.com/CMB2/CMB2/pull/954)).
73
- * Fix regression with custom fields not properly repeating. Props [@desrosj](https://github.com/desrosj) ([#969](https://github.com/CMB2/CMB2/pull/969)). Fixes [#901](https://github.com/CMB2/CMB2/issues/901).
74
- * Fix "Illegal string offset" notices when `CMB2_Option` methods are called when the option value is empty, as well as additional unit tests for the `CMB2_Option` class. Props [@anhskohbo](https://github.com/anhskohbo) ([#993](https://github.com/CMB2/CMB2/pull/993)).
75
- * Fix bug where select fields or checkbox fields occasionally would retain previous group's value when adding new groups. Fixes [#853](https://github.com/CMB2/CMB2/issues/853).
76
- * Fix JS to prevent meta keys with `|` or `/` from breaking file fields. Props [@lipemat](https://github.com/lipemat) ([#1003](https://github.com/CMB2/CMB2/pull/1003)).
77
- * Fix jQuery Migrate's `jQuery.fn.attr('value', val) no longer sets properties` warning.
78
- * Fix issue with CMB2 being too aggressive with stripping slashes from values. Fixes [#981](https://github.com/CMB2/CMB2/issues/981).
79
-
80
- ## [2.2.4 - 2017-02-27](https://github.com/CMB2/CMB2/releases/tag/v2.2.4)
81
-
82
- ### Enhancements
83
-
84
- * Modify `'taxonomy_*'` fields to return stored terms for non-post objects.
85
- * Modify `CMB2::get_sanitized_values()` to return the sanitized `'taxonomy_*'` field values. Also added `"cmb2_return_taxonomy_values_{$cmb_id}"` filter to modify if `'taxonomy_*'` field values are returned. Fixes [#538](https://github.com/CMB2/CMB2/issues/538).
86
- * Allow outputting CMB2 boxes/fields in additional locations in the post-editor.
87
-
88
- **The new locations are:** [`form_top`](https://developer.wordpress.org/reference/hooks/edit_form_top/), [`before_permalink`](https://developer.wordpress.org/reference/hooks/edit_form_before_permalink/), [`after_title`](https://developer.wordpress.org/reference/hooks/edit_form_after_title/), and [`after_editor`](https://developer.wordpress.org/reference/hooks/edit_form_after_editor/)
89
-
90
- These would be defined by setting the `context` property for your box:
91
-
92
- ```php
93
- $cmb_demo = new_cmb2_box( array(
94
- ...
95
- 'context' => 'before_permalink',
96
- ) );
97
- ```
98
-
99
- If it is preferred that the fields are output without the metabox, then omit the `'title'` property from the metabox registration array, and instead add ` 'remove_box_wrap' => true,`.
100
-
101
- Props [@norcross](https://github.com/norcross) ([#836](https://github.com/CMB2/CMB2/pull/836)).
102
- * New field parameter, `'render_class'`, allowing you to override the default `'CMB2_Type_Base'` class that is used when rendering the field. This provides interesting object-oriented ways to override default CMB2 behavior by subclassing the default class and overriding methods. The render class can also be overridden with the `"cmb2_render_class_{$fieldtype}"` filter, which is passed the default render class name as well as the `CMB2_Types` object, but this should be used sparingly, and within the context of your project's boxes/fields or you could break other plugins'/themes' CMB2 fields.
103
- * Improvements to the `file`/`file_list` fields javascript APIs, including using undersore templates.
104
- * Small improvements to the styling for the `file_list` field type.
105
- * New action hook, `cmb2_footer_enqueue`, which occurs after CMB2 enqueues its assets.
106
- * Example functions clean up. Props [@PavelK27](https://github.com/PavelK27) ([#866](https://github.com/CMB2/CMB2/pull/866)).
107
- * New `CMB2_Utils` methods, `get_available_image_sizes()` and `get_named_size()`. Props [@Cai333](https://github.com/Cai333).
108
-
109
- ### Bug Fixes
110
-
111
- * Fix datepicker month/year dropdown text color. On windows, the option text was showing as white (invisible). Fixes [#770](https://github.com/CMB2/CMB2/issues/770).
112
- * Repeatable WYSIWYG no longer breaks if `'quicktags'` param is set to false. Props [@timburden](https://github.com/timburden) ([#797](https://github.com/CMB2/CMB2/pull/797), [#796](https://github.com/CMB2/CMB2/issues/796)).
113
- * Do not process title fields during group field save process.
114
- * Fix issue where term-meta values were not being displayed for some users. Props [@sbussetti](https://github.com/sbussetti) ([#763](https://github.com/CMB2/CMB2/pull/763), [#700](https://github.com/CMB2/CMB2/issues/700)).
115
- * Fix issue where term meta would not be applied when using the new term form if multiple object types were specified. Props [@ADC07](https://github.com/ADC07) ([#842](https://github.com/CMB2/CMB2/pull/842), [#841](https://github.com/CMB2/CMB2/issues/841)).
116
- * Fix WordPress spinner styling when boxes/fields used on the frontend.
117
- * Fix issue where clicking to remove a `file_list` item could occasionally remove the field row. ([#828](https://github.com/CMB2/CMB2/pull/828)).
118
- * Fix issue where empty file field in group would still cause non-empty values to store to database. ([#721](https://github.com/CMB2/CMB2/issues/721)).
119
- * Make `file`/`file_list` field preview images work with named sizes. Props [@Cai333](https://github.com/Cai333) ([#848](https://github.com/CMB2/CMB2/pull/848), [#844](https://github.com/CMB2/CMB2/issues/844)).
120
- * Fix incorrect text-domain. ([#798](https://github.com/CMB2/CMB2/issues/798))
121
- * Do not silence notices/errors in `CMB2_Utils::get_file_ext()`.
122
- * If `title` field type has no name value, then only output a span element (instead of a header element).
123
-
124
- ## [2.2.3.1 - 2016-11-08](https://github.com/CMB2/CMB2/releases/tag/v2.2.3.1)
125
-
126
- ### Enhancements
127
-
128
- * Better styling for disabled group "X" buttons, and add title attr. Fixes [#773](https://github.com/CMB2/CMB2/issues/773).
129
-
130
- ### Bug Fixes
131
-
132
- * Use quotes for `label[for=""]` selector. Fixed `Syntax error, unrecognized expression`. Props [@anhskohbo](https://github.com/anhskohbo) ([#789](https://github.com/CMB2/CMB2/pull/789)).
133
- * Fix `ReferenceError: tinyMCE is not defined` javascript errors (happening when trying to remove a repeatable field/group). Fixes [#790](https://github.com/CMB2/CMB2/issues/790), and [#730](https://github.com/CMB2/CMB2/issues/730).
134
- * Fix REST API `'show_in_rest'` examples in `example-functions.php`. Any REST API boxes/fields must use the `'cmb2_init'` hook (as opposed to the `'cmb2_admin_init'` hook).
135
-
136
- ## [2.2.3 - 2016-10-25](https://github.com/CMB2/CMB2/releases/tag/v2.2.3)
137
-
138
- ### Enhancements
139
-
140
- * CMB2 REST API! CMB2 now has WP REST API endpoints for displaying your boxes and fields data, as well as registers rest fields in the existing post, user, term, and comment endpoints (in the cmb2 namespace). Enabling the REST API for your boxes/fields is opt-in, meaning it will not be automatically enabled. For more info, [check out the wiki](https://github.com/CMB2/CMB2/wiki/REST-API).
141
- * Small string improvement, move a period inside the translatable string. Props [@pedro-mendonca](https://github.com/pedro-mendonca) ([#672](https://github.com/CMB2/CMB2/pull/672)).
142
- * Introduce the `'save_field'` boolean field parameter for disabling the saving of a field. Useful if you want to display the value of another field, or use a disabled/read-only field. Props [@jamesgol](https://github.com/jamesgol) ([#674](https://github.com/CMB2/CMB2/pull/674), [#346](https://github.com/CMB2/CMB2/issues/346), [#500](https://github.com/CMB2/CMB2/issues/500)).
143
- * Update docblocks for `CMB2_Field::save_field_from_data()` and `CMB2_Field::save_field()`. Props [@jamesgol](https://github.com/jamesgol) ([#675](https://github.com/CMB2/CMB2/pull/675)).
144
- * More javascript events tied to the media modal actions (related to the `'file'` and '`file_list'` fields). `'cmb_media_modal_init'`, `'cmb_media_modal_open'`, and `'cmb_media_modal_select'`.
145
- * All CMB2 JS events now also get the CMB2 JS object passed in the list of arguments.
146
- * CMB2 JS object is now instantiated without stomping existing object, to enable extending.
147
- * New field parameter for taxonomy fields, `'remove_default'` which allows disabling the default taxonomy metabox. Props [@c3mdigital](https://github.com/c3mdigital) ([#593](https://github.com/CMB2/CMB2/pull/593)).
148
- * Change `'row_classes'` to just `'classes'`, to mirror the metabox `'classes'` property. Also now accepts a `'classes_cb'` parameter for specifying a callback which returns a string or array. The callback will receive `$field_args` as the first argument, and the CMB2_Field `$field` object as the second argument. (`'row_classes'` will continue to work, but is deprecated)
149
- * Make wysiwyg editors work in the repeatable groups context. A standard repeatable (non-group) wysiwyg field is not supported (but will possibly be included in a future update). Props [@johnsonpaul1014](https://github.com/johnsonpaul1014) ([#26](https://github.com/CMB2/CMB2/pull/26), [#99](https://github.com/CMB2/CMB2/pull/99), [#260](https://github.com/CMB2/CMB2/pull/260), [#264](https://github.com/CMB2/CMB2/pull/264), [#356](https://github.com/CMB2/CMB2/pull/356), [#431](https://github.com/CMB2/CMB2/pull/431), [#462](https://github.com/CMB2/CMB2/pull/462), [#657](https://github.com/CMB2/CMB2/pull/657), [#693](https://github.com/CMB2/CMB2/pull/693)).
150
- * Add an id to the heading tag in the title field. This allows linking to a particular title using the id.
151
- * Internationalization improvements. Props [ramiy](https://github.com/ramiy) ([#696](https://github.com/CMB2/CMB2/pull/696)).
152
- * Ensure that saving does not happen during a switch-to-blog session, as data would be saved to the wrong object. [See more](https://wordpress.org/support/topic/bug-in-lastest-version?replies=2).
153
- * Add `'cmb2_group_wrap_attributes'` filter to modifying the group wrap div's attributes. Filter gets passed an array of attributes and expects the return to be an array. Props [jrfnl](https://github.com/jrfnl) ([#582](https://github.com/CMB2/CMB2/pull/582)).
154
- * Update the unit-tests README and inline docs. Props [bobbingwide](https://github.com/bobbingwide) ([#714](https://github.com/CMB2/CMB2/pull/714), [#715](https://github.com/CMB2/CMB2/pull/715)).
155
- * Minor update to make naming-conventions consistent. Props [ramiy](https://github.com/ramiy) ([#718](https://github.com/CMB2/CMB2/pull/718)).
156
- * Update files to be compatible with PHP7 CodeSniffer standards. Props [ryanshoover](https://github.com/ryanshoover) ([#719](https://github.com/CMB2/CMB2/pull/719), [#720](https://github.com/CMB2/CMB2/pull/720)).
157
- * Make exception message translatable. Props [ramiy](https://github.com/ramiy) ([#724](https://github.com/CMB2/CMB2/pull/724)).
158
- * Portuguese translation provided by [@alvarogois](https://github.com/alvarogois) and [@pedro-mendonca](https://github.com/pedro-mendonca) - [#709](https://github.com/CMB2/CMB2/pull/709), [#727](https://github.com/CMB2/CMB2/pull/727).
159
- * Stop using `$wp_version` global. Props [ramiy](https://github.com/ramiy) ([#731](https://github.com/CMB2/CMB2/pull/731)).
160
- * Closures (anonymous functions) are now supported for any box/field `'*_cb'` parameters. E.g.
161
- ```php
162
- ...
163
- 'show_on_cb' => function( $cmb ) { return has_tag( 'cats', $cmb->object_id ); },
164
- ...
165
- ```
166
-
167
- ### Bug Fixes
168
-
169
- * If custom field types use a method and the Type object has not been instantiated, Try to guess the Type object and instantiate.
170
- * Normalize WordPress root path (`ABSPATH`) and theme rooth path (`get_theme_root()`). Props [@rianbotha](https://github.com/rianbotha) ([#677](https://github.com/CMB2/CMB2/pull/677), [#676](https://github.com/CMB2/CMB2/pull/676)).
171
- * Fix issue with `'cmb2_remove_row'` Javascript callback for non-group row removal. Fixes [#729](https://github.com/CMB2/CMB2/pull/729)).
172
- * Fix issue with missing assignment of variable (undefined variable). Props [@anhskohbo](https://github.com/anhskohbo) ([#779](https://github.com/CMB2/CMB2/pull/779)).
173
-
174
- ## 2.2.2.1 - 2016-06-27
175
-
176
- ### Bug Fixes
177
-
178
- * Fix issue that kept CMB2 stylesheet from being enqueued when using the [options-page snippets](https://github.com/CMB2/CMB2-Snippet-Library/tree/master/options-and-settings-pages).
179
- * Fix issue which caused the CMB2 column display styles to be enqueued in the wrong pages. Now only enqueues on admin pages with columns.
180
-
181
- ## 2.2.2 - 2016-06-27
182
-
183
- ### Enhancements
184
-
185
- * You can now set admin post-listing columns with an extra field parameter, `'column' => true,`. If you want to dictate what position the column is, use `'column' => array( 'position' => 2 ),`. If you want to dictate the column title (instead of using the field `'name'` value), use `'column' => array( 'name' => 'My Column' ),`. If you need to specify the column display callback, set the `'display_cb'` parameter to [a callback function](https://github.com/CMB2/CMB2/wiki/Field-Parameters#render_row_cb). Columns work for post (all post-types), comment, user, and term object types.
186
- * Updated Datepicker styles using JJJ's "jQuery UI Datepicker CSS for WordPress", so props Props [@stuttter](https://github.com/stuttter), [@johnjamesjacoby](https://github.com/johnjamesjacoby). Also cleaned up the timepicker styles (specifically the buttons) to more closely align with the datepicker and WordPress styles.
187
- * CMB2 is now a lot more intelligent about where it is located in your installation. This update should solve almost all of the reasons to use the `'cmb2_meta_box_url'` filter (thought it will continue to work as expected). ([#27](https://github.com/CMB2/CMB2/issues/27), [#118](https://github.com/CMB2/CMB2/issues/118), [#432](https://github.com/CMB2/CMB2/issues/432), [related wiki item](https://github.com/CMB2/CMB2/wiki/Troubleshooting#cmb2-urls-issues))
188
- * Implement CMB2_Ajax as a singleton. Props [jrfnl](https://github.com/jrfnl) ([#602](https://github.com/CMB2/CMB2/pull/602)).
189
- * Add `classes` and `classes_cb` CMB2 box params which allows you to add additional classes to the cmb-wrap. The `classes` parameter can take a string or array, and the `classes_cb` takes a callback which returns a string or array. The callback will receive `$cmb` as an argument. These classes are also passed through a new filter, `'cmb2_wrap_classes'`, which receives the array of classes as the first argument, and the CMB2 object as the second. Reported/requested in [#364](https://github.com/CMB2/CMB2/issues/364#issuecomment-213223692).
190
- * Make the `'title'` field type accept extra arguments. Props [@vladolaru](https://github.com/vladolaru), [@pixelgrade](https://github.com/pixelgrade) ([#656](https://github.com/CMB2/CMB2/pull/656)).
191
- * Updated `cmb2_get_oembed()` function to NOT return the "remove" link, as it's intended for outputting the oembed only. **This is a backwards-compatibility concern.** If you were depending on the "remove" link, use `cmb2_ajax()->get_oembed( $args )` instead.
192
- * New function, `cmb2_do_oembed()`', which is hooked to `'cmb2_do_oembed'`, so you can use `do_action( 'cmb2_do_oembed', $args )` in your themes without `function_exists()` checks.
193
- * New method, `CMB2:set_prop( $property, $value )`, for setting a CMB2 metabox object property.
194
- * The `CMB2_Field` object instances will now have a `cmb_id` property and a `get_cmb` method to enable access to the field's `CMB2` parent object's instance, in places like field callbacks and filters (e.g. `$cmb = $field->get_cmb();`).
195
- * Add a `data-fieldtype` attribute to the field rows for simpler identification in Javascript.
196
- * Moved each type in `CMB2_Types` to it's own class so that each field type can handle it's own field display, and added the infrastructure to maintainn back-compatibility.
197
- * New `CMB2_Utils` methods, `notempty()` and `filter_empty()`, both of which consider `null`, `''` and `false` as empty, but allow `0` (for saving `0` as a field value).
198
- * New `CMB2_Utils` public methods, `get_url_from_dir()`, `get_file_ext()`, `get_file_name_from_path()`, and `wp_at_least()`.
199
- * Add a `cmb_pre_init` Javascript event to allow overriding CMB2 defaults via JS.
200
-
201
- ### Bug Fixes
202
- * Fix issue with 'default' callback not being applied in all instances. Introduced new `CMB2_Field::get_default()` method, and `'default_cb'` field parameter. Using the `'default'` field parameter with a callback will be deprecated in the next few releases. ([#572](https://github.com/CMB2/CMB2/issues/572)).
203
- * Be sure to call `CMB2_Field::row_classes()` for group field rows. Also, update CSS to use the "cmb-type-group" classname instead of "cmb-repeat-group-wrap".
204
- * Introduce new `'text'` and `'text_cb'` field parameters for overriding CMB2 text strings instead of using the `'options'` array. ([#630](https://github.com/CMB2/CMB2/pull/630))
205
- * Fix bug where the value of '0' could not be saved in group fields.
206
- * Fix bug where a serialized empty array value in the database for a repeatable field would output as "Array".
207
- * Allow for optional/empty money field. Props [@jrfnl](https://github.com/jrfnl) ([#577](https://github.com/CMB2/CMB2/pull/577)).
208
- * The `CMB2::$updated` parameter (which contains field ids for all fields updated during a save) now also correctly adds group field ids to the array.
209
-
210
- ## 2.2.1 - 2016-02-29
211
-
212
- ### Bug Fixes
213
-
214
- * Fixes back-compatibility issue which could allow multiple CMB2 instances to load (causing fatal errors). ([#520](https://github.com/CMB2/CMB2/pull/520))
215
-
216
- ## 2.2.0 - 2016-02-27
217
-
218
- ### Enhancements
219
-
220
- * Term Meta! As of WordPress 4.4, [WordPress will have the ability to use term metadata](https://make.wordpress.org/core/2015/10/23/4-4-taxonomy-roundup/). CMB2 will work with term meta out of the box. To do so, see the example cmb registration in the `yourprefix_register_taxonomy_metabox` function in [example-functions.php](https://github.com/CMB2/CMB2/blob/master/example-functions.php).
221
- * New hooks which hook in after save field action: `'cmb2_save_field'` and `"cmb2_save_field_{$field_id}"`. Props [wpsmith](https://github.com/wpsmith) ([#475](https://github.com/CMB2/CMB2/pull/475)).
222
- * The "cmb2_sanitize_{$field_type}" hook now runs for every field type (not just custom types) so you can override the sanitization for all field types via a filter.
223
- * `CMB2::show_form()` is now composed of 3 smaller methods, `CMB2::render_form_open()`, `CMB2::render_field()`, `CMB2::render_form_close()` ([#506](https://github.com/CMB2/CMB2/pull/506)).
224
- * RTL Style generated. Props [@devinsays](https://github.com/devinsays) ([#510](https://github.com/CMB2/CMB2/pull/510)).
225
- * Properly scope date/time-pickers styling by adding a class to only cmb2 picker instances. ([#527](https://github.com/CMB2/CMB2/pull/527))
226
- * Allow per-field overrides for the date/time/color picker options (wiki documentation: [Modify Field Date, Time, or Color Picker options](https://github.com/CMB2/CMB2/wiki/Tips-&-Tricks#modify-field-date-time-or-color-picker-options))
227
- * Fix some inline documentation issues. Props [@jrfnl](https://github.com/jrfnl) ([#579](https://github.com/CMB2/CMB2/pull/579)).
228
- * Include `.gitattributes` file for excluding development resources when using Composer. Props [@benoitchantre](https://github.com/benoitchantre) ([#575](https://github.com/CMB2/CMB2/pull/575), [#53](https://github.com/CMB2/CMB2/pull/53)).
229
-
230
- ### Bug Fixes
231
-
232
- * Fixed issue with `'taxonomy_select'` field type where a term which evaluated falsey would not be displayed properly. Props [adamcapriola](https://github.com/adamcapriola) ([#477](https://github.com/CMB2/CMB2/pull/477)).
233
- * Fix issue with colorpickers not changing when sorting groups.
234
- * `'show_option_none'` field parameter now works on taxonomy fields when explicitly setting to false.
235
- * Fix so the date/time-picker javascript respects the `'date_format'` and `'time_format'` field parameters. Props [@yivi](https://github.com/yivi) ([#39](https://github.com/CMB2/CMB2/pull/39), [#282](https://github.com/CMB2/CMB2/pull/282), [#300](https://github.com/CMB2/CMB2/pull/300), [#318](https://github.com/CMB2/CMB2/pull/318), [#330](https://github.com/CMB2/CMB2/pull/330), [#446](https://github.com/CMB2/CMB2/pull/446), [#498](https://github.com/CMB2/CMB2/pull/498)).
236
- * Fix a sometimes-broken unit test. Props [JPry](https://github.com/JPry) ([#539](https://github.com/CMB2/CMB2/pull/539)).
237
- * Fix issue with oembed fields not working correctly on options pages. ([#542](https://github.com/CMB2/CMB2/pull/542)).
238
- * Fix issue with repeatable field <button> elements stealing focus from "submit" button.
239
-
240
- ## 2.1.2 - 2015-10-01
241
-
242
- ### Bug Fixes
243
-
244
- * Fixes back-compatibility issue when adding fields array to the metabox registration. ([#472](https://github.com/CMB2/CMB2/pull/472))
245
-
246
- ## 2.1.1 - 2015-09-30
247
-
248
- ### Enhancements
249
-
250
- * Make all CMB2::save_fields arguments optional to fall-back to `$_POST` data. Props [JPry](https://github.com/JPry).
251
- * New filter, `cmb2_non_repeatable_fields` for adding additional fields to the blacklist of repeatable field-types. Props [JPry](https://github.com/JPry) ([#430](https://github.com/CMB2/CMB2/pull/430)).
252
- * New recommended hook for adding metaboxes, `cmb2_admin_init`. Most metabox registration only needs to happen if in wp-admin, so there is no reason to register them when loading the front-end (and increase the memory usage). `cmb2_init` still exists to register metaboxes that will be used on the front-end or used on both the front and back-end. Instances of `cmb2_init` in example-functions.php have been switched to `cmb2_admin_init`.
253
- * Add `'render_row_cb'` field parameter for overriding the field render method.
254
- * Add `'label_cb'` field parameter for overriding the field label render method.
255
- * Allow `CMB2_Types::checkbox()` method to be more flexible for extending by taking an args array and an `$is_checked` second argument.
256
- * More thorough unit tests. Props [pglewis](https://github.com/pglewis), ([#447](https://github.com/CMB2/CMB2/pull/447),[#448](https://github.com/CMB2/CMB2/pull/448)).
257
- * Update `CMB2_Utils::image_id_from_url` to be more reliable. Props [wpscholar](https://github.com/wpscholar), ([#453](https://github.com/CMB2/CMB2/pull/453)).
258
- * `cmb2_get_option` now takes a default fallback value as a third parameter.
259
-
260
- ### Bug Fixes
261
-
262
- * Address issue where `'file'` and `'file_list'` field results were getting mixed. Props [augustuswm](https://github.com/augustuswm) ([#382](https://github.com/CMB2/CMB2/pull/382), [#250](https://github.com/CMB2/CMB2/pull/250), [#296](https://github.com/CMB2/CMB2/pull/296)).
263
- * Fix long-standing issues with radio and multicheck fields in repeatable groups losing their values when new rows are added. ([#341](https://github.com/CMB2/CMB2/pull/341), [#304](https://github.com/CMB2/CMB2/pull/304), [#263](https://github.com/CMB2/CMB2/pull/263), [#246](https://github.com/CMB2/CMB2/pull/246), [#150](https://github.com/CMB2/CMB2/pull/150))
264
- * Fixes issue where currently logged-in user's profile data would display in the "Add New User" screen fields. ([#427](https://github.com/CMB2/CMB2/pull/427))
265
- * Fixes issue where radio values/selections would not always properly transfer when shifting rows (up/down). Props [jamiechong](https://github.com/jamiechong) ([#429](https://github.com/CMB2/CMB2/pull/429), [#152](https://github.com/CMB2/CMB2/pull/152)).
266
- * Fixes issue where repeatable groups display "Array" as the field values if group is left completely empty. ([#332](https://github.com/CMB2/CMB2/pull/332),[#390](https://github.com/CMB2/CMB2/pull/390)).
267
- * Fixes issue with `'file_list'` fields not saving properly when in repeatable groups display. Props [jamiechong](https://github.com/jamiechong) ([#433](https://github.com/CMB2/CMB2/pull/433),[#187](https://github.com/CMB2/CMB2/pull/187)).
268
- * Update `'taxonomy_radio_inline'` and `'taxonomy_multicheck_inline'` fields sanitization method to use the same method as the non-inline versions. Props [superfreund](https://github.com/superfreund) ([#454](https://github.com/CMB2/CMB2/pull/454)).
269
-
270
- ## 2.1.0 - 2015-08-05
271
-
272
- ### Bug Fixes
273
-
274
- * Fix user fields not saving. Props [achavez](https://github.com/achavez), ([#417](https://github.com/CMB2/CMB2/pull/417)).
275
-
276
- ## 2.0.9 - 2015-07-28
277
-
278
- ### Enhancements
279
-
280
- * Updated/Added many translations. Props [fxbenard](https://github.com/fxbenard), ([#203](https://github.com/CMB2/CMB2/pull/344)) and [Mte90](https://github.com/Mte90) for the Italian translation.
281
- * Updated `'file_list'` field type to have a more intuitive selection in the media library, and updated the 'Use file' text in the button. Props [SteveHoneyNZ](https://github.com/SteveHoneyNZ) ([#357](https://github.com/CMB2/CMB2/pull/357), [#358](https://github.com/CMB2/CMB2/pull/358)).
282
- * `'closed'` group field option parameter introduced in order to set the groups as collapsed by default. Requested in [#391](https://github.com/CMB2/CMB2/issues/391).
283
- * Added `"cmb2_{$object_type}_process_fields_{$cmb_id}"` hook for hooking in and modifying the metabox or fields before the fields are processed/sanitized for saving.
284
- * Added Comment Metabox support. Props [GregLancaster71](https://github.com/GregLancaster71) ([#238](https://github.com/CMB2/CMB2/pull/238), [#244](https://github.com/CMB2/CMB2/pull/244)).
285
- * New `"cmb2_{$field_id}_is_valid_img_ext"`` filter for determining if a field value has a valid image file-type extension.
286
-
287
- ### Bug Fixes
288
-
289
- * `'multicheck_inline'`, `'taxonomy_radio_inline'`, and `'taxonomy_multicheck_inline'` field types were not outputting anything since it's value was not being returned. Props [ediamin](https://github.com/ediamin), ([#367](https://github.com/CMB2/CMB2/pull/367), ([#405](https://github.com/CMB2/CMB2/pull/405)).
290
- * `'hidden'` type fields were not honoring the `'show_on_cb'` callback. Props [JPry](https://github.com/JPry), ([commits](https://github.com/CMB2/CMB2/compare/5a4146eec546089fbe1a1c859d680dfda3a86ee2...1ef5ef1e3b2260ab381090c4abe9dc7234cfa0a6)).
291
- * Fixed: There was no minified cmb2-front.min.css file.
292
- * Fallback for fatal error with invalid timezone. Props [ryanduff](https://github.com/ryanduff) ([#385](https://github.com/CMB2/CMB2/pull/385)).
293
- * Fix issues with deleting a row from repeatable group. Props [yuks](https://github.com/yuks) ([#387](https://github.com/CMB2/CMB2/pull/387)).
294
- * Ensure value passed to `strtotime` in `make_valid_time_stamp` is cast to a string. Props [vajrasar](https://github.com/vajrasar) ([#389](https://github.com/CMB2/CMB2/pull/389)).
295
- * Fixed issue with Windows IIS and bundling CMB2 in the theme. Props [DevinWalker](https://github.com/DevinWalker), ([#400](https://github.com/CMB2/CMB2/pull/400), [#401](https://github.com/CMB2/CMB2/pull/401))
296
-
297
- ## 2.0.8 - 2015-06-01
298
-
299
- ### Bug Fixes
300
-
301
- * Fix color-picker field not enqueueing the colorpicker script. ([#333](https://github.com/CMB2/CMB2/issues/333))
302
-
303
- ## 2.0.7 - 2015-05-28
304
-
305
- ### Enhancements
306
-
307
- * Ability to use non-repeatable group fields by setting the `'repeatable'` field param to `false` when registering a group field type. Props [marcusbattle](https://github.com/marcusbattle), ([#159](https://github.com/CMB2/CMB2/pull/159)).
308
- * Add and enqeueue a front-end specific CSS file which adds additional styles which are typically covered by wp-admin css. ([#311](https://github.com/CMB2/CMB2/issues/311))
309
- * Better handling of the CMB2 javascript (and CSS) required dependencies array. Dependencies are now only added conditionally based on the field types that are actually visible. ([#136](https://github.com/CMB2/CMB2/issues/136))
310
- * **THIS IS A BREAKING CHANGE:** The `group` field type's `'show_on_cb'` parameter now receives the `CMB2_Field` object instance as an argument instead of the `CMB2` instance. If you're using the `'show_on_cb'` parameter for a `group` field, please adjust accordingly. _note: you can still retrieve the `CMB2` instance via the `cmb2_get_metabox` helper function._
311
- * New dynamic hook, `"cmb2_save_{$object_type}_fields_{$this->cmb_id}"`, to complement the existing `"cmb2_save_{$object_type}_fields"` hook.
312
- * New CMB2 parameter, `enqueue_js`, to disable the enqueueing of the CMB2 Javascript.
313
- * German translation provided by Friedhelm Jost.
314
-
315
- ### Bug Fixes
316
-
317
- * Fix incorrect repeatable group title number. ([#310](https://github.com/CMB2/CMB2/pull/310))
318
- * Fix obscure bug which prevented group field arguments from being passed to the sub-fields (like `show_names` and `context`).
319
- * Fixed occasional issue when adding a group row, the previous row's content would be cloned. ([#257](https://github.com/CMB2/CMB2/pull/257))
320
-
321
- ## 2.0.6 - 2015-04-30
322
-
323
- ### Enhancements
324
-
325
- * New metabox/form parameter, `show_on_cb`, allows you to conditionally display a cmb metabox/form via a callback. The `$cmb` object gets passed as a parameter to the callback. This complements the `'show_on_cb'` parameter that already exists for individual fields. Using this callback is similar to using the `'cmb2_show_on'` filter, but only applies to that specific metabox and it is recommended to use this callback instead as it minimizes th risk that your filter will affect other metaboxes.
326
- * Taxonomy types no longer save a value. The value getting saved was causing confusion and is not meant to be used. To use the saved taxonomy data, you need to use the WordPress term api, `get_the_terms `, `get_the_term_list`, etc.
327
- * Add `'multiple'` field parameter to store values in individual rows instead of serialized array. Will only work if field is not repeatable or a repeatable group. Props [JohnyGoerend](https://github.com/JohnyGoerend). ([#262](https://github.com/CMB2/CMB2/pull/262), [#206](https://github.com/CMB2/CMB2/issues/206), [#45](https://github.com/CMB2/CMB2/issues/45)).
328
- * Portuguese (Brazil) translation provided by [@lucascdsilva](https://github.com/lucascdsilva) - [#293](https://github.com/CMB2/CMB2/pull/293).
329
- * Spanish (Spain) translation updated by [@yivi](https://github.com/yivi) - [#272](https://github.com/CMB2/CMB2/pull/272).
330
- * Added group field callback parameters, `'before_group'`, `'before_group_row'`, `'after_group_row'`, `'after_group'` to complement the `'before_row'`, `'before'`, `'after'`, `'after_row'` field parameters.
331
- * Better styling for `title` fields and `title` descriptions on options pages.
332
- * Add a `sanitization_cb` field parameter check for the `group` field type.
333
- * Better function/file doc-blocks to provide better documentation for automated documentation tools. See: [cmb2.io/api](http://cmb2.io/api/).
334
- * `cmb2_print_metabox_form`, `cmb2_metabox_form`, and `cmb2_get_metabox_form` helper functions now accept two new parameters:
335
- * an `'object_type'` parameter to explictly set that in the `$cmb` object.
336
- * an `'enqueue_js'` parameter to explicitly disable the CMB JS enqueue. This is handy if you're not planning on using any of the fields which require JS (like color/date pickers, wysiwyg, file, etc).
337
-
338
- ### Bug Fixes
339
-
340
- * Fix issue with oembed fields in repeatable groups where changing video changed it for all fields in a group.
341
- * Fix empty arrays (like in the group field) saving as a value.
342
- * Move `'cmb2_override_meta_value'` and `"cmb2_override_{$field_id}_meta_value"` filters to the `CMB2_Field::get_data()` method so that the filters are applied every time the data is requested. **THIS IS A BREAKING CHANGE:** The parameters for those filters have changed a bit. Previously, the filters accepted 5 arguments, `$value`, `$object_id`, `$field_args`, `$object_type`, `$field`. They have changed to accept 4 arguments instead, `$value`, `$object_id`, `$args`, `$field`, where `$args` is an array that contains the following:
343
- * @type string $type The current object type
344
- * @type int $id The current object ID
345
- * @type string $field_id The ID of the field being requested
346
- * @type bool $repeat Whether current field is repeatable
347
- * @type bool $single Whether current field is a single database row
348
-
349
-
350
- ## 2.0.5 - 2015-03-17
351
-
352
- ### Bug Fixes
353
-
354
- * Fix grouped fields display (first field was being repeated), broken in 2.0.3.
355
-
356
- ## 2.0.4 - 2015-03-16
357
-
358
- ### Enhancements
359
-
360
- * `select`, `radio`, `radio_inline` field types now all accept the `'show_option_none'` field parameter. This parameter allows you to set the text to display for showing a 'no selection' option. Default will be `false`, which means a 'none' option will not be added. Set to `true` to use the default text, 'None', or specify another value, i.e. 'No selection'.
361
-
362
- ### Bug Fixes
363
-
364
- * Fix back-compatibility when adding group field sub-fields via old array method (vs using the `CMB2:add_group_field()` method). Thanks to [norcross](https://github.com/norcross) for reporting.
365
- * Fix occasional jQuery issues with group-field indexes.
366
-
367
- ## 2.0.3 - 2015-03-15
368
-
369
- ### Enhancements
370
-
371
- * New constant, `CMB2_DIR`, which stores the file-path to the CMB2 directory.
372
- * `text_date`, `text_time`, `text_date_timestamp`, `text_datetime_timestamp`, and ` text_datetime_timestamp_timezone` field types now take an arguments array so they can be extended by custom field types.
373
- * Removed auto-scroll when adding groups. To re-add the feature, use the [snippet/plugin here](https://github.com/CMB2/CMB2-Snippet-Library/blob/master/javascript/cmb2-auto-scroll-to-new-group.php). ([#205](https://github.com/CMB2/CMB2/issues/205))
374
- * Updated Timepicker utilizing the [@trentrichardson](https://github.com/trentrichardson) jQuery Timepicker add-on (https://github.com/trentrichardson/jQuery-Timepicker-Addon), and updated Datepicker styles. Props [JonMasterson](https://github.com/JonMasterson). ([#204](https://github.com/CMB2/CMB2/issues/204), [#206](https://github.com/CMB2/CMB2/issues/206), [#45](https://github.com/CMB2/CMB2/issues/45)).
375
- * Added a callback option for the field default value. The callback gets passed an array of all the field parameters as the first argument, and the field object as the second argument. (which means you can get the post id using `$field->object_id`). ([#233](https://github.com/CMB2/CMB2/issues/233)).
376
- * New `CMB2::get_field()` method and `cmb2_get_field` helper function for retrieving a `CMB2_Field` object from the array of registered fields for a metabox.
377
- * New `CMB2::get_sanitized_values()` method and `cmb2_get_metabox_sanitized_values` helper function for retrieving sanitized values from an array of values (usually `$_POST` data).
378
- * New `'save_fields'` metabox parameter that can be used to disable (by setting `'save_fields' => false`) the automatic saving of the fields when the form is submitted. These can be useful when you want to handle the saving of the fields yourself, or want to use submitted data for other purposes like generating new posts, or sending emails, etc.
379
-
380
- ### Bug Fixes
381
-
382
- * Fix commented out text_datetime_timestamp_timezone field registration example in `example-functions.php`. Props [cliffordp](https://github.com/cliffordp), ([#203](https://github.com/CMB2/CMB2/pull/203)).
383
- * Fix sidebar styling for money fields and fields with textareas. ([#234](https://github.com/CMB2/CMB2/issues/234))
384
- * Fix `CMB2_Sanitize` class to properly use the stripslashed value (which was added in [#162](https://github.com/CMB2/CMB2/pull/162) but never used). Props [dustyf](https://github.com/dustyf), ([#241](https://github.com/CMB2/CMB2/pull/241)).
385
-
386
- ## 2.0.2 - 2015-02-15
387
-
388
- ### Enhancements
389
-
390
- * Use the more appropriate `add_meta_boxes` hook for hooking in metaboxes to post-edit screen. Thanks [@inspiraaz](https://github.com/inspiraaz) for reporting. ([#161](https://github.com/CMB2/CMB2/issues/161))
391
- * Add a `row_classes` field param which allows you to add additional classes to the cmb-row wrap. This parameter can take a string, or array, or can take a callback that returns a string or array. The callback will receive `$field_args` as the first argument, and the CMB2_Field `$field` object as the second argument. Reported/requested in [#68](https://github.com/CMB2/CMB2/issues/68).
392
- * New constant, `CMB2_LOADED`, which you can use to check if CMB2 is loaded for your plugins/themes with CMB2 dependency.
393
- * New hooks, [`cmb2_init_before_hookup` and `cmb2_after_init`](https://github.com/CMB2/CMB2-Snippet-Library/blob/master/filters-and-actions).
394
- * New API for adding metaboxes and fields, demonstrated in [`example-functions.php`](https://github.com/CMB2/CMB2/blob/master/example-functions.php). In keeping with backwards-compatibility, the `cmb2_meta_boxes` filter method will still work, but is not recommended. New API includes `new_cmb2_box` helper function to generate a new metabox, and returns a `$cmb` object to add new fields (via the `CMB2::add_field()` and `CMB2::add_group_field()` methods).
395
- * New CMB2 method, [`CMB2::remove_field()`](https://github.com/CMB2/CMB2-Snippet-Library/blob/master/filters-and-actions/cmb2_init_%24cmb_id-remove-field.php).
396
- * New CMB2_Boxes method, [`CMB2_Boxes::remove()`](https://github.com/CMB2/CMB2-Snippet-Library/blob/master/filters-and-actions/cmb2_init_before_hookup-remove-cmb2-metabox.php).
397
- * When clicking on a file/image in the `file`, or `file_list` type, the media modal will open with that image selected. Props [johnsonpaul1014](https://github.com/johnsonpaul1014), ([#120](https://github.com/CMB2/CMB2/pull/120)).
398
-
399
-
400
- ## 2.0.1 - 2015-02-02
401
-
402
- 2.0.1 is the official version after beta, and includes all the changes from 2.0.0 (beta).
403
-
404
- ## 2.0.0(beta) - 2014-08-16
405
-
406
- 2.0.0 is the official version number for the transition to CMB2, and 2.0.1 is the official version after beta. It is a complete rewrite. Improvements and fixes are listed below. __Note: This release requires WordPress 3.8+__
407
-
408
- ### Enhancements
409
-
410
- * Converted `<table>` markup to more generic `<div>` markup to be more extensible and allow easier styling.
411
- * Much better handling and display of repeatable groups.
412
- * Entirely translation-ready [with full translations](http://wp-translations.org/project/cmb2/) in Spanish, French (Props [@fredserva](https://github.com/fredserva) - [#127](https://github.com/CMB2/CMB2/pull/127)), Finnish (Props [@onnimonni](https://github.com/onnimonni) - [#108](https://github.com/CMB2/CMB2/pull/108)), Swedish (Props [@EyesX](https://github.com/EyesX) - [#141](https://github.com/CMB2/CMB2/pull/141)), and English.
413
- * Add cmb fields to new user page. Props [GioSensation](https://github.com/GioSensation), ([#645](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/645)).
414
- * Improved and additional [helper-functions](https://github.com/CMB2/CMB2/blob/master/includes/helper-functions.php).
415
- * Added new features and translation for datepicker. Props [kalicki](https://github.com/kalicki), ([#657](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/657)).
416
- * General code standards cleanup. Props [gregrickaby](https://github.com/gregrickaby), ([#17](https://github.com/CMB2/CMB2/pull/17) & others).
417
- * Use SASS for development. Props [gregrickaby](https://github.com/gregrickaby), ([#18](https://github.com/CMB2/CMB2/pull/18)).
418
- * New `hidden` field type.
419
- * [Ability to override text strings in fields via field options parameter](https://github.com/CMB2/CMB2/wiki/Tips-&-Tricks#override-text-strings-in-field).
420
- * Added composer.json. Props [nlemoine](https://github.com/nlemoine), ([#19](https://github.com/CMB2/CMB2/pull/19)).
421
- * New field 'hooks' can take [static text/html](https://github.com/CMB2/CMB2/wiki/Tips-&-Tricks#inject-static-content-in-a-field) or a [callback](https://github.com/CMB2/CMB2/wiki/Tips-&-Tricks#inject-dynamic-content-in-a-field-via-a-callback).
422
- * New `preview_size` parameter for `file` field type. Takes an array or named image size.
423
- * Empty index.php file to all folders (for more security). Props [brunoramalho](https://github.com/brunoramalho), ([#41](https://github.com/CMB2/CMB2/pull/41)).
424
- * Clean up styling. Props [brunoramalho](https://github.com/brunoramalho), ([#43](https://github.com/CMB2/CMB2/pull/43)) and [senicar](https://github.com/senicar).
425
- * Collapsible field groups. Props [cluke009](https://github.com/cluke009), ([#59](https://github.com/CMB2/CMB2/pull/59)).
426
- * Allow for override of update/remove for CMB2_Field. Props [sc0ttkclark](https://github.com/sc0ttkclark), ([#65](https://github.com/CMB2/CMB2/pull/65)).
427
- * Use class button-disabled instead of disabled="disabled" for <a> buttons. Props [sc0ttkclark](https://github.com/sc0ttkclark), ([#66](https://github.com/CMB2/CMB2/pull/66)).
428
- * [New before/after dynamic form hooks](https://github.com/CMB2/CMB2/wiki/Tips-&-Tricks#using-the-dynamic-beforeafter-form-hooks).
429
- * Larger unit test coverage. Props to [@pmgarman](https://github.com/pmgarman) for assistance. ([#90](https://github.com/CMB2/CMB2/pull/90) and [#91](https://github.com/CMB2/CMB2/pull/91))
430
- * Added helper function to update an option. Props [mAAdhaTTah](https://github.com/mAAdhaTTah), ([#110](https://github.com/CMB2/CMB2/pull/110)).
431
- * More JS hooks during repeat group shifting. Props [AlchemyUnited](https://github.com/AlchemyUnited), ([#125](https://github.com/CMB2/CMB2/pull/125)).
432
- * [New metabox config option for defaulting to closed](https://github.com/CMB2/CMB2/wiki/Tips-&-Tricks#setting-a-metabox-to-closed-by-default).
433
- * New hooks, [`cmb2_init`](https://github.com/CMB2/CMB2/wiki/Tips-&-Tricks#using-cmb2-helper-functions-and-cmb2_init) and `cmb2_init_{$cmb_id}`.
434
-
435
- ### Bug Fixes
436
-
437
- * New mechanism to ensure CMB2 only loads the most recent version of CMB2 in your system. This fixes the issue where another bundled version could conflict or take precendent over your up-to-date version.
438
- * Fix issue with field labels being hidden. Props [mustardBees](https://github.com/mustardBees), ([#48](https://github.com/CMB2/CMB2/pull/48)).
439
- * Address issues with autoloading before autoloader is setup. Props [JPry](https://github.com/JPry), ([#56](https://github.com/CMB2/CMB2/pull/56)).
440
- * Fixed 'show_on_cb' for field groups. Props [marcusbattle](https://github.com/marcusbattle), ([#98](https://github.com/CMB2/CMB2/pull/98)).
441
- * Make get_object_terms work with and without object caching. Props [joshlevinson](https://github.com/joshlevinson), ([#105](https://github.com/CMB2/CMB2/pull/105)).
442
- * Don't use `__DIR__` in example-functions.php to ensure PHP 5.2 compatibility. Props [bryceadams](https://github.com/bryceadams), ([#129](https://github.com/CMB2/CMB2/pull/129)).
443
- * Added support for radio input swapping in repeatable fields. Props [DevinWalker](https://github.com/DevinWalker), ([#138](https://github.com/CMB2/CMB2/pull/138), [#149](https://github.com/CMB2/CMB2/pull/149)).
444
- * Fix metabox form not being returned to caller. Props [akshayagarwal](https://github.com/akshayagarwal), ([#145](https://github.com/CMB2/CMB2/pull/145)).
445
- * Run stripslashes before saving data, since WordPress forces magic quotes. Props [clifgriffin](https://github.com/clifgriffin), ([#162](https://github.com/CMB2/CMB2/pull/162)).
446
-
447
- ## 1.3.0 - (never released, merged into CMB2)
448
-
449
- ### Enhancements
450
-
451
- * Localize Date, Time, and Color picker defaults so that they can be overridden via the `cmb_localized_data` filter. ([#528](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/528))
452
- * Change third parameter for 'cmb_metabox_form' to be an args array. Optional arguments include `echo`, `form_format`, and `save_button`.
453
- * Add support for `show_option_none` argument for `taxonomy_select` and `taxonomy_radio` field types. Also adds the following filters: `cmb_all_or_nothing_types`, `cmb_taxonomy_select_default_value`, `cmb_taxonomy_select_{$this->_id()}_default_value`, `cmb_taxonomy_radio_{$this->_id()}_default_value`, `cmb_taxonomy_radio_default_value`. Props [@pmgarman](https://github.com/pmgarman), ([#569](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/569)).
454
- * Make the list items in the `file_list` field type drag & drop sortable. Props [twoelevenjay](https://github.com/twoelevenjay), ([#603](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/603)).
455
-
456
- ### Bug Fixes
457
-
458
- * Fixed typo in closing `</th>` tag. Props [@CivicImages](https://github.com/CivicImages). ([#616](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/616))
459
-
460
- ## 1.2.0 - 2014-05-03
461
-
462
- ### Enhancements
463
-
464
- * Add support for custom date/time formats. Props [@Scrent](https://github.com/Scrent). ([#506](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/506))
465
- * Simplify `wysiwyg` escaping and allow it to be overridden via the `escape_cb` parameter. ([#491](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/491))
466
- * Add a 'Select/Deselect all' button for the `multicheck` field type.
467
- * Add title option for [repeatable groups](https://github.com/CMB2/CMB2/wiki/Field-Types#group). Title field takes an optional replacement hash, "{#}" that will be replaced by the row number.
468
- * New field parameter, `show_on_cb`, allows you to conditionally display a field via a callback. ([#47](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/47))
469
- * Unit testing (the beginning). Props [@brichards](https://github.com/brichards) and [@camdensegal](https://github.com/camdensegal).
470
-
471
- ### Bug Fixes
472
-
473
- * Fixed issue where remove file button wouldn't clear the url field. ([#514](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/514))
474
- * `wysiwyg` fields now allow underscores. Fixes some wysiwyg display issues in WordPress 3.8. Props [@lswilson](https://github.com/lswilson). ([#491](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/491))
475
- * Nonce field should only be added once per page. ([#521](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/521))
476
- * Fix `in_array` issue when a post does not have any saved terms for a taxonomy multicheck. ([#527](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/527))
477
- * Fixed error: 'Uninitialized string offset: 0 in cmb_Meta_Box_field.php...`. Props [@DevinWalker](https://github.com/DevinWalker). ([#539](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/539), [#549](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/549)))
478
- * Fix missing `file` field description. ([#543](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/543), [#547](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/547))
479
-
480
-
481
-
482
- ## 1.1.3 - 2014-04-07
483
-
484
- ### Bug Fixes
485
-
486
- * Update `cmb_get_field_value` function as it was passing the parameters to `cmb_get_field` in the wrong order.
487
- * Fix repeating fields not working correctly if meta key or prefix contained an integer. ([#503](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/503))
488
-
489
- ## 1.1.2 - 2014-04-05
490
-
491
- ### Bug Fixes
492
-
493
- * Fix issue with `cmb_Meta_Box_types.php` calling a missing method, `image_id_from_url`. ([#502](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/502))
494
-
495
-
496
- ## 1.1.1 - 2014-04-03
497
-
498
- ### Bug Fixes
499
-
500
- * Radio button values were not showing saved value. ([#500](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/500))
501
-
502
- ## 1.1.0 - 2014-04-02
503
-
504
- ### Enhancements
505
-
506
- * [Repeatable groups](https://github.com/CMB2/CMB2/wiki/Field-Types#group)
507
- * Support for more fields to be repeatable, including oEmbed field, and date, time, and color picker fields, etc.
508
- * Codebase has been revamped to be more modular and object-oriented.
509
- * New filter, `"cmb_{$element}_attributes" ` for modifying an element's attributes.
510
- * Every field now supports an `attributes` parameter that takes an array of attributes. [Read more](https://github.com/CMB2/CMB2/wiki/Field-Types#attributes).
511
- * Removed `cmb_std_filter` in favor of `cmb_default_filter`. **THIS IS A BREAKING CHANGE**
512
- * Better handling of labels in sidebar. They are now placed on top of the input rather than adjacent.
513
- * Added i18n compatibility to text_money. props [@ArchCarrier](https://github.com/ArchCarrier), ([#485](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/485))
514
- * New helper functions: `cmb_get_field` and `cmb_get_field_value` for getting access to CMB's field object and/or value.
515
- * New JavaScript events, `cmb_add_row` and `cmb_remove_row` for hooking in and manipulating the new row's data.
516
- * New filter, `cmb_localized_data`, for modifiying localized data passed to the CMB JS.
517
-
518
- ### Bug Fixes
519
- * Resolved occasional issue where only the first character of the label/value was diplayed. props [@mustardBees](https://github.com/mustardBees), ([#486](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/486))
520
-
521
-
522
- ## 1.0.2 - 2014-03-03
523
-
524
- ### Enhancements
525
-
526
- * Change the way the `'cmb_validate_{$field['type']}'` filter works.
527
- It is now passed a null value vs saved value. If null is returned, default sanitization will follow. **THIS IS A BREAKING CHANGE**. If you're already using this filter, take note.
528
- * All field types that take an option array have been simplified to take `key => value` pairs (vs `array( 'name' => 'value', 'value' => 'key', )`). This effects the 'select', 'radio', 'radio_inline' field types. The 'multicheck' field type was already using the `key => value` format. Backwards compatibility has been maintained for those using the older style.
529
- * Added default value option for `taxonomy_select` field type. props [@darlantc](https://github.com/darlantc), ([#473](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/473))
530
- * Added `preview_size` parameter for `file_list` field type. props [@IgorCode](https://github.com/IgorCode), ([#471](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/471))
531
- * Updated `file_list` images to be displayed horizontally instead of vertically. props [@IgorCode](https://github.com/IgorCode), ([#467](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/467))
532
- * Use `get_the_terms` where possible since the data is cached.
533
-
534
- ### Bug Fixes
535
-
536
- * Fixed wysiwyg escaping slashes. props [@gregrickaby](https://github.com/gregrickaby), ([#465](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/465))
537
- * Replaced `__DIR__`, as `dirname( __FILE__ )` is easier to maintain back-compatibility.
538
- * Fixed missing table styling on new posts. props [@mustardBees](https://github.com/mustardBees), ([#438](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/438))
539
- * Fix undeclared JS variable. [@veelen](https://github.com/veelen), ([#451](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/451))
540
- * Fix `file_list` errors when removing all files and saving.
541
- * Set correct `object_id` to be used later in `cmb_show_on` filter. [@lauravaq](https://github.com/lauravaq), ([#445](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/445))
542
- * Fix sanitization recursion memeory issues.
543
-
544
- ## 1.0.1 - 2014-01-24
545
-
546
- ### Enhancements
547
-
548
- * Now works with option pages and site settings. ([view example in wiki](https://github.com/CMB2/CMB2/wiki/Using-CMB-to-create-an-Admin-Theme-Options-Page))
549
- * two filters to override the setting and getting of options, `cmb_override_option_get_$option_key` and `cmb_override_option_save_$option_key` respectively. Handy for using plugins like [WP Large Options](https://github.com/voceconnect/wp-large-options/) ([also here](http://vip.wordpress.com/plugins/wp-large-options/)).
550
- * Improved styling on taxonomy (\*tease\*) and options pages and for new 3.8 admin UI.
551
- * New sanitization class to sanitize data when saved.
552
- * New callback field parameter, `sanitization_cb`, for performing your own sanitization.
553
- * new `cmb_Meta_Box_types::esc()` method that handles escaping data for display.
554
- * New callback field parameter, `escape_cb`, for performing your own data escaping, as well as a new filter, `'cmb_types_esc_'. $field['type']`.
555
-
556
- ### Bug Fixes
557
-
558
- * Fixed wysiwyg editor button padding. props [@corvannoorloos](https://github.com/corvannoorloos), ([#391](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/391))
559
- * A few php < 5.3 errors were addressed.
560
- * Fields with quotation marks no longer break the input/textarea fields.
561
- * metaboxes for Attachment pages now save correctly. Thanks [@nciske](https://github.com/nciske) for reporting. ([#412](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/412))
562
- * Occasionally fields wouldn't save because of the admin show_on filter.
563
- * Smaller images loaded to the file field type will no longer be blown up larger than their dimensions.
564
-
565
- ## 1.0.0 - 2013-11-30
566
-
567
- * Added `text_datetime_timestamp_timezone` type, a datetime combo field with an additional timezone drop down, props [@dessibelle](https://github.com/dessibelle)
568
- * Added `select_timezone` type, a standalone time zone select dropdown. The time zone select can be used with standalone `text_datetime_timestamp` if desired. Props [@dessibelle](https://github.com/dessibelle)
569
- * Added `text_url` type, a basic url field. Props [@dessibelle](https://github.com/dessibelle)
570
- * Added `text_email` type, a basic email field. Props [@dessibelle](https://github.com/dessibelle)
571
- * Added ability to display metabox fields in frontend. Default is true, but can be overriden using the `cmb_allow_frontend filter`. If set to true, an entire metabox form can be output with the `cmb_metabox_form( $meta_box, $object_id, $echo )` function. Props [@dessibelle](https://github.com/dessibelle), [@messenlehner](https://github.com/messenlehner) & [@jtsternberg](https://github.com/jtsternberg).
572
- * Added hook `cmb_after_table` after all metabox output. Props [@wpsmith](https://github.com/wpsmith)
573
- * `file_list` now works like a repeatable field. Add as many files as you want. Props [@coreymcollins](https://github.com/coreymcollins)
574
- * `text`, `text_small`, `text_medium`, `text_url`, `text_email`, & `text_money` fields now all have the option to be repeatable. Props [@jtsternberg](https://github.com/jtsternberg)
575
- * Custom metaboxes can now be added for user meta. Add them on the user add/edit screen, or in a custom user profile edit page on the front-end. Props [@tw2113](https://github.com/tw2113), [@jtsternberg](https://github.com/jtsternberg)
576
-
577
- ## 0.9.4
578
-
579
- * Added field "before" and "after" options for each field. Solves issue with '$' not being the desired text_money monetary symbol, props [@GaryJones](https://github.com/GaryJones)
580
- * Added filter for 'std' default fallback value, props [@messenlehner](https://github.com/messenlehner)
581
- * Ensure oEmbed videos fit in their respective metaboxes, props [@jtsternberg](https://github.com/jtsternberg)
582
- * Fixed issue where an upload field with 'show_names' disabled wouldn't have the correct button label, props [@jtsternberg](https://github.com/jtsternberg)
583
- * Better file-extension check for images, props [@GhostToast](https://github.com/GhostToast)
584
- * New filter, `cmb_valid_img_types`, for whitelisted image file-extensions, props [@jtsternberg](https://github.com/jtsternberg)
585
-
586
- ## 0.9.3
587
- * Added field type and field id classes to each cmb table row, props [@jtsternberg](https://github.com/jtsternberg)
588
-
589
- ## 0.9.2
590
- * Added post type comparison to prevent storing null values for taxonomy selectors, props [@norcross](https://github.com/norcross)
591
-
592
- ## 0.9.1
593
- * Added `oEmbed` field type with ajax display, props [@jtsternberg](https://github.com/jtsternberg)
594
-
595
- ## 0.9
596
- * __Note: This release requires WordPress 3.3+__
597
- * Cleaned up scripts being queued, props [@jaredatch](https://github.com/jaredatch)
598
- * Cleaned up and reorganized jQuery, props [@GaryJones](https://github.com/GaryJones)
599
- * Use $pagenow instead of custom $current_page, props [@jaredatch](https://github.com/jaredatch)
600
- * Fixed CSS, removed inline styles, now all in style.css, props [@jaredatch](https://github.com/jaredatch)
601
- * Fixed multicheck issues (issue #48), props [@jaredatch](https://github.com/jaredatch)
602
- * Fixed jQuery UI datepicker CSS conflicting with WordPress UI elements, props [@jaredatch](https://github.com/jaredatch)
603
- * Fixed zeros not saving in fields, props [@GaryJones](https://github.com/GaryJones)
604
- * Fixed improper labels on radio and multicheck fields, props [@jaredatch](https://github.com/jaredatch)
605
- * Fixed fields not rendering properly when in sidebar, props [@jaredatch](https://github.com/jaredatch)
606
- * Fixed bug where datepicker triggers extra space after footer in Firefox (issue #14), props [@jaredatch](https://github.com/jaredatch)
607
- * Added jQuery UI datepicker packaged with 3.3 core, props [@jaredatch](https://github.com/jaredatch)
608
- * Added date time combo picker, props [@jaredatch](https://github.com/jaredatch)
609
- * Added color picker, props [@jaredatch](https://github.com/jaredatch)
610
- * Added readme.md markdown file, props [@jaredatch](https://github.com/jaredatch)
611
-
612
- ## 0.8 - 2012-01-19
613
- * Added jQuery timepicker, props [@norcross](https://github.com/norcross)
614
- * Added 'raw' textarea to convert special HTML entities back to characters, props [@norcross](https://github.com/norcross)
615
- * Added missing examples on example-functions.php, props [@norcross](https://github.com/norcross)
616
-
617
- ## 0.7
618
- * Added the new wp_editor() function for the WYSIWYG dialog box, props [@jcpry](https://github.com/jcpry)
619
- * Created 'cmb_show_on' filter to define your own Show On Filters, props [@billerickson](https://github.com/billerickson)
620
- * Added page template show_on filter, props [@billerickson](https://github.com/billerickson)
621
- * Improvements to the 'file' field type, props [@randyhoyt](https://github.com/randyhoyt)
622
- * Allow for default values on 'radio' and 'radio_inline' field types, props [@billerickson](https://github.com/billerickson)
623
-
624
- ## 0.6.1
625
- * Enabled the ability to define your own custom field types (issue #28). props [@randyhoyt](https://github.com/randyhoyt)
626
-
627
- ## 0.6
628
- * Added the ability to limit metaboxes to certain posts by id. props [@billerickson](https://github.com/billerickson)
629
-
630
- ## 0.5
631
- * Fixed define to prevent notices. props [@destos](https://github.com/destos)
632
- * Added text_date_timestap option. props [@andrewyno](https://github.com/andrewyno)
633
- * Fixed WYSIWYG paragraph breaking/spacing bug. props [@wpsmith](https://github.com/wpsmith)
634
- * Added taxonomy_radio and taxonomies_select options. props [@c3mdigital](https://github.com/c3mdigital)
635
- * Fixed script causing the dashboard widgets to not be collapsible.
636
- * Fixed various spacing and whitespace inconsistencies
637
-
638
- ## 0.4
639
- * Think we have a release that is mostly working. We'll say the initial release :)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/CONTRIBUTING.md DELETED
@@ -1,52 +0,0 @@
1
- # Contributing to CMB2
2
-
3
- Thank you for your interest in contributing back to CMB2. Please help us review your issues and/or merge your pull requests by following the below guidelines.
4
-
5
- #### NOTE: The issues section is for bug reports and feature requests only.
6
- _Support is not offered for this library, and the likelihood that the maintainers will respond is very low. If you need help, please use [stackoverflow](http://stackoverflow.com/search?q=cmb), or the [wordpress.org plugin forums](http://wordpress.org/support/plugin/cmb2)._
7
-
8
- Before reporting a bug
9
- ---
10
- 1. Please review the [documentation](https://github.com/CMB2/CMB2/wiki). Most questions revolve around the [field types](https://github.com/CMB2/CMB2/wiki/Field-Types), [field parameters](https://github.com/CMB2/CMB2/wiki/Field-Parameters), or are addressed in the [troubleshooting](https://github.com/CMB2/CMB2/wiki/Troubleshooting) section.
11
- 2. Search [issues](https://github.com/CMB2/CMB2/issues) to see if the issue has been previously reported.
12
- 3. Install the trunk version of CMB2 and test there.
13
-
14
-
15
- How to report a bug
16
- ---
17
- 1. Specify the version number for both WordPress and CMB2.
18
- 3. Describe the problem in detail. Explain what happened, and what you expected would happen.
19
- 4. Provide a small test-case and a link to a [gist](https://gist.github.com/) containing your entire metabox registration code.
20
- 5. If helpful, include a screenshot. Annotate the screenshot for clarity.
21
-
22
-
23
- How to contribute to CMB2
24
- ---
25
- All contributions welcome. If you would like to submit a pull request, please follow the steps below.
26
-
27
- 1. Make sure you have a GitHub account.
28
- 2. Fork the repository on GitHub.
29
- 3. **Check out the trunk version of CMB2.** If you submit to the master branch, the PR will be closed with a link back to this document.
30
- 4. **Verify your issue still exists in the trunk branch.**
31
- 5. Make changes to your clone of the repository.
32
- 1. Please follow the [WordPress code standards](https://make.wordpress.org/core/handbook/coding-standards).
33
- 2. If possible, and if applicable, please also add/update unit tests for your changes.
34
- 3. Please add documentation to any new functions, methods, actions and filters.
35
- 4. When committing, reference your issue (if present) and include a note about the fix.
36
- 6. [Submit a pull request](https://help.github.com/articles/creating-a-pull-request/).
37
-
38
- **Note:** You may gain more ground and avoid unecessary effort if you first open an issue with the proposed changes, but this step is not necessary.
39
-
40
- Translations
41
- ---
42
- If you are looking to provide language translation files, Please do so via [WP-Translations](http://wp-translations.org/project/cmb2/).
43
-
44
- Additional Resources
45
- ---
46
-
47
- * [CMB2 Documentation Wiki](https://github.com/CMB2/CMB2/wiki)
48
- * [CMB2 Snippet Library](https://github.com/CMB2/CMB2-Snippet-Library)
49
- * [CMB2 API Documentation](http://cmb2.io/api/)
50
- * [General GitHub Documentation](http://help.github.com/)
51
- * [GitHub Pull Request documentation](http://help.github.com/send-pull-requests/)
52
- * [PHPUnit Tests Guide](http://phpunit.de/manual/current/en/writing-tests-for-phpunit.html)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/bootstrap.php DELETED
@@ -1,84 +0,0 @@
1
- <?php
2
- /**
3
- * Bootstraps the CMB2 process
4
- *
5
- * @category WordPress_Plugin
6
- * @package CMB2
7
- * @author CMB2
8
- * @license GPL-2.0+
9
- * @link https://cmb2.io
10
- */
11
-
12
- /**
13
- * Function to encapsulate the CMB2 bootstrap process.
14
- *
15
- * @since 2.2.0
16
- * @return void
17
- */
18
- function cmb2_bootstrap() {
19
-
20
- if ( is_admin() ) {
21
- /**
22
- * Fires on the admin side when CMB2 is included/loaded.
23
- *
24
- * In most cases, this should be used to add metaboxes. See example-functions.php
25
- */
26
- do_action( 'cmb2_admin_init' );
27
- }
28
-
29
- /**
30
- * Fires when CMB2 is included/loaded
31
- *
32
- * Can be used to add metaboxes if needed on the front-end or WP-API (or the front and backend).
33
- */
34
- do_action( 'cmb2_init' );
35
-
36
- /**
37
- * For back-compat. Does the dirty-work of instantiating all the
38
- * CMB2 instances for the cmb2_meta_boxes filter
39
- *
40
- * @since 2.0.2
41
- */
42
- $cmb_config_arrays = apply_filters( 'cmb2_meta_boxes', array() );
43
- foreach ( (array) $cmb_config_arrays as $cmb_config ) {
44
- new CMB2( $cmb_config );
45
- }
46
-
47
- /**
48
- * Fires after all CMB2 instances are created
49
- */
50
- do_action( 'cmb2_init_before_hookup' );
51
-
52
- /**
53
- * Get all created metaboxes, and instantiate CMB2_hookup
54
- * on metaboxes which require it.
55
- *
56
- * @since 2.0.2
57
- */
58
- foreach ( CMB2_Boxes::get_all() as $cmb ) {
59
-
60
- /**
61
- * Initiates the box "hookup" into WordPress.
62
- *
63
- * Unless the 'hookup' box property is `false`, the box will be hooked in as
64
- * a post/user/comment/option/term box.
65
- *
66
- * And if the 'show_in_rest' box property is set, the box will be hooked
67
- * into the CMB2 REST API.
68
- *
69
- * The dynamic portion of the hook name, $cmb->cmb_id, is the box id.
70
- *
71
- * @since 2.2.6
72
- *
73
- * @param array $cmb The CMB2 object to hookup.
74
- */
75
- do_action( "cmb2_init_hookup_{$cmb->cmb_id}", $cmb );
76
- }
77
-
78
- /**
79
- * Fires after CMB2 initiation process has been completed
80
- */
81
- do_action( 'cmb2_after_init' );
82
- }
83
-
84
- /* End. That's it, folks! */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/cmb2-display-rtl.css DELETED
@@ -1,41 +0,0 @@
1
- /**
2
- * CMB2 Styling
3
- */
4
- /**
5
- * CMB2 Styling
6
- */
7
- /* line 6, sass/partials/_display.scss */
8
- .cmb2-colorpicker-swatch span {
9
- display: inline-block;
10
- width: 1em;
11
- height: 1em;
12
- border-radius: 1em;
13
- float: right;
14
- margin-top: 3px;
15
- margin-left: 2px;
16
- }
17
-
18
- /* line 17, sass/partials/_display.scss */
19
- .cmb2-code {
20
- overflow: scroll;
21
- }
22
-
23
- /* line 21, sass/partials/_display.scss */
24
- .cmb-image-display {
25
- max-width: 100%;
26
- height: auto;
27
- }
28
-
29
- /* line 26, sass/partials/_display.scss */
30
- .cmb2-display-file-list li {
31
- display: inline;
32
- margin: 0 0 .5em .5em;
33
- }
34
-
35
- /* line 31, sass/partials/_display.scss */
36
- .cmb2-oembed * {
37
- max-width: 100%;
38
- height: auto;
39
- }
40
-
41
- /*# sourceMappingURL=cmb2-display.css.map */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/cmb2-display-rtl.min.css DELETED
@@ -1 +0,0 @@
1
- .cmb2-colorpicker-swatch span{display:inline-block;width:1em;height:1em;border-radius:1em;float:right;margin-top:3px;margin-left:2px}.cmb2-code{overflow:scroll}.cmb-image-display{max-width:100%;height:auto}.cmb2-display-file-list li{display:inline;margin:0 0 .5em .5em}.cmb2-oembed *{max-width:100%;height:auto}
 
trunk/vendor/webdevstudios/cmb2/css/cmb2-display.css DELETED
@@ -1,41 +0,0 @@
1
- /**
2
- * CMB2 Styling
3
- */
4
- /**
5
- * CMB2 Styling
6
- */
7
- /* line 6, sass/partials/_display.scss */
8
- .cmb2-colorpicker-swatch span {
9
- display: inline-block;
10
- width: 1em;
11
- height: 1em;
12
- border-radius: 1em;
13
- float: left;
14
- margin-top: 3px;
15
- margin-right: 2px;
16
- }
17
-
18
- /* line 17, sass/partials/_display.scss */
19
- .cmb2-code {
20
- overflow: scroll;
21
- }
22
-
23
- /* line 21, sass/partials/_display.scss */
24
- .cmb-image-display {
25
- max-width: 100%;
26
- height: auto;
27
- }
28
-
29
- /* line 26, sass/partials/_display.scss */
30
- .cmb2-display-file-list li {
31
- display: inline;
32
- margin: 0 .5em .5em 0;
33
- }
34
-
35
- /* line 31, sass/partials/_display.scss */
36
- .cmb2-oembed * {
37
- max-width: 100%;
38
- height: auto;
39
- }
40
-
41
- /*# sourceMappingURL=cmb2-display.css.map */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/cmb2-display.css.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "mappings": "AAAA;;GAEG;ACFH;;GAEG;;AAGF,6BAAK;EACJ,OAAO,EAAE,YAAY;EACrB,KAAK,EAAE,GAAG;EACV,MAAM,EAAE,GAAG;EACX,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,GAAG;EACf,YAAY,EAAE,GAAG;;;;AAInB,UAAW;EACV,QAAQ,EAAE,MAAM;;;;AAGjB,kBAAmB;EAClB,SAAS,EAAE,IAAI;EACf,MAAM,EAAE,IAAI;;;;AAGb,0BAA2B;EAC1B,OAAO,EAAE,MAAM;EACf,MAAM,EAAE,aAAa;;;;AAGtB,cAAe;EACd,SAAS,EAAE,IAAI;EACf,MAAM,EAAE,IAAI",
4
- "sources": ["sass/cmb2-display.scss","sass/partials/_display.scss"],
5
- "names": [],
6
- "file": "cmb2-display.css"
7
- }
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/cmb2-display.min.css DELETED
@@ -1 +0,0 @@
1
- .cmb2-colorpicker-swatch span{display:inline-block;width:1em;height:1em;border-radius:1em;float:left;margin-top:3px;margin-right:2px}.cmb2-code{overflow:scroll}.cmb-image-display{max-width:100%;height:auto}.cmb2-display-file-list li{display:inline;margin:0 .5em .5em 0}.cmb2-oembed *{max-width:100%;height:auto}
 
trunk/vendor/webdevstudios/cmb2/css/cmb2-front-rtl.css DELETED
@@ -1,1545 +0,0 @@
1
- @charset "UTF-8";
2
- /**
3
- * CMB2 Styling
4
- */
5
- /*--------------------------------------------------------------
6
- Main Wrap
7
- --------------------------------------------------------------*/
8
- /* line 5, sass/partials/_main_wrap.scss */
9
- .cmb2-wrap {
10
- margin: 0;
11
- }
12
- /* line 8, sass/partials/_main_wrap.scss */
13
- .cmb2-wrap input,
14
- .cmb2-wrap textarea {
15
- font-size: 14px;
16
- max-width: 100%;
17
- padding: 5px;
18
- }
19
- /* line 18, sass/partials/_main_wrap.scss */
20
- .cmb2-wrap input[type=text].cmb2-oembed {
21
- width: 100%;
22
- }
23
- /* line 23, sass/partials/_main_wrap.scss */
24
- .cmb2-wrap textarea {
25
- width: 500px;
26
- }
27
- /* line 26, sass/partials/_main_wrap.scss */
28
- .cmb2-wrap textarea.cmb2-textarea-code {
29
- font-family: "Courier 10 Pitch", Courier, monospace;
30
- line-height: 16px;
31
- }
32
- /* line 34, sass/partials/_main_wrap.scss */
33
- .cmb2-wrap input.cmb2-text-small, .cmb2-wrap input.cmb2-timepicker {
34
- width: 100px;
35
- }
36
- /* line 40, sass/partials/_main_wrap.scss */
37
- .cmb2-wrap input.cmb2-text-money {
38
- width: 90px;
39
- }
40
- /* line 45, sass/partials/_main_wrap.scss */
41
- .cmb2-wrap input.cmb2-text-medium {
42
- width: 230px;
43
- }
44
- /* line 50, sass/partials/_main_wrap.scss */
45
- .cmb2-wrap input.cmb2-upload-file {
46
- width: 65%;
47
- }
48
- /* line 54, sass/partials/_main_wrap.scss */
49
- .cmb2-wrap input.ed_button {
50
- padding: 2px 4px;
51
- }
52
- /* line 59, sass/partials/_main_wrap.scss */
53
- .cmb2-wrap input:not([type="hidden"]) + input,
54
- .cmb2-wrap input:not([type="hidden"]) + .button-secondary,
55
- .cmb2-wrap input:not([type="hidden"]) + select {
56
- margin-right: 20px;
57
- }
58
- /* line 67, sass/partials/_main_wrap.scss */
59
- .cmb2-wrap ul {
60
- margin: 0;
61
- }
62
- /* line 71, sass/partials/_main_wrap.scss */
63
- .cmb2-wrap li {
64
- font-size: 14px;
65
- line-height: 16px;
66
- margin: 1px 0 5px 0;
67
- }
68
- /* line 82, sass/partials/_main_wrap.scss */
69
- .cmb2-wrap select {
70
- font-size: 14px;
71
- margin-top: 3px;
72
- }
73
- /* line 87, sass/partials/_main_wrap.scss */
74
- .cmb2-wrap input:focus,
75
- .cmb2-wrap textarea:focus {
76
- background: #fffff8;
77
- }
78
- /* line 92, sass/partials/_main_wrap.scss */
79
- .cmb2-wrap input[type="radio"] {
80
- margin: 0 0 0 5px;
81
- padding: 0;
82
- }
83
- /* line 97, sass/partials/_main_wrap.scss */
84
- .cmb2-wrap input[type="checkbox"] {
85
- margin: 0 0 0 5px;
86
- padding: 0;
87
- }
88
- /* line 102, sass/partials/_main_wrap.scss */
89
- .cmb2-wrap button,
90
- .cmb2-wrap .button-secondary {
91
- white-space: nowrap;
92
- }
93
- /* line 107, sass/partials/_main_wrap.scss */
94
- .cmb2-wrap .mceLayout {
95
- border: 1px solid #e9e9e9 !important;
96
- }
97
- /* line 111, sass/partials/_main_wrap.scss */
98
- .cmb2-wrap .mceIframeContainer {
99
- background: #fff;
100
- }
101
- /* line 115, sass/partials/_main_wrap.scss */
102
- .cmb2-wrap .meta_mce {
103
- width: 97%;
104
- }
105
- /* line 118, sass/partials/_main_wrap.scss */
106
- .cmb2-wrap .meta_mce textarea {
107
- width: 100%;
108
- }
109
- /* line 124, sass/partials/_main_wrap.scss */
110
- .cmb2-wrap .wp-color-result,
111
- .cmb2-wrap .wp-picker-input-wrap {
112
- vertical-align: middle;
113
- }
114
- /* line 129, sass/partials/_main_wrap.scss */
115
- .cmb2-wrap .wp-color-result,
116
- .cmb2-wrap .wp-picker-container {
117
- margin: 0 0 0 10px;
118
- }
119
- /* line 134, sass/partials/_main_wrap.scss */
120
- .cmb2-wrap .cmb-row {
121
- margin: 0;
122
- }
123
- /* line 137, sass/partials/_main_wrap.scss */
124
- .cmb2-wrap .cmb-row:after {
125
- content: '';
126
- clear: both;
127
- display: block;
128
- width: 100%;
129
- }
130
- /* line 144, sass/partials/_main_wrap.scss */
131
- .cmb2-wrap .cmb-row.cmb-repeat .cmb2-metabox-description {
132
- padding-top: 0;
133
- padding-bottom: 1em;
134
- }
135
-
136
- /* line 152, sass/partials/_main_wrap.scss */
137
- .cmb2-metabox {
138
- clear: both;
139
- margin: 0;
140
- }
141
- /* line 158, sass/partials/_main_wrap.scss */
142
- .cmb2-metabox > .cmb-row:first-of-type > .cmb-td,
143
- .cmb2-metabox > .cmb-row:first-of-type > .cmb-th,
144
- .cmb2-metabox .cmb-field-list > .cmb-row:first-of-type > .cmb-td,
145
- .cmb2-metabox .cmb-field-list > .cmb-row:first-of-type > .cmb-th {
146
- border: 0;
147
- }
148
-
149
- /* line 165, sass/partials/_main_wrap.scss */
150
- .cmb-add-row {
151
- margin: 1.8em 0 0;
152
- }
153
-
154
- /* line 169, sass/partials/_main_wrap.scss */
155
- .cmb-nested .cmb-td,
156
- .cmb-repeatable-group .cmb-th,
157
- .cmb-repeatable-group:first-of-type {
158
- border: 0;
159
- }
160
-
161
- /* line 175, sass/partials/_main_wrap.scss */
162
- .cmb-row:last-of-type,
163
- .cmb2-wrap .cmb-row:last-of-type,
164
- .cmb-repeatable-group:last-of-type {
165
- border-bottom: 0;
166
- }
167
-
168
- /* line 181, sass/partials/_main_wrap.scss */
169
- .cmb-repeatable-grouping {
170
- border: 1px solid #e9e9e9;
171
- padding: 0 1em;
172
- }
173
- /* line 185, sass/partials/_main_wrap.scss */
174
- .cmb-repeatable-grouping.cmb-row {
175
- margin: 0 0 0.8em;
176
- }
177
-
178
- /* line 193, sass/partials/_main_wrap.scss */
179
- .cmb-th {
180
- color: #222222;
181
- float: right;
182
- font-weight: 600;
183
- line-height: 1.3;
184
- padding: 20px 0 20px 10px;
185
- vertical-align: top;
186
- width: 200px;
187
- }
188
- @media (max-width: 450px) {
189
- /* line 193, sass/partials/_main_wrap.scss */
190
- .cmb-th {
191
- font-size: 1.2em;
192
- display: block;
193
- float: none;
194
- padding-bottom: 1em;
195
- text-align: right;
196
- width: 100%;
197
- }
198
- /* line 27, sass/partials/_mixins.scss */
199
- .cmb-th label {
200
- display: block;
201
- margin-top: 0;
202
- margin-bottom: 0.5em;
203
- }
204
- }
205
-
206
- /* line 207, sass/partials/_main_wrap.scss */
207
- .cmb-td {
208
- line-height: 1.3;
209
- max-width: 100%;
210
- padding: 15px 10px;
211
- vertical-align: middle;
212
- }
213
-
214
- /* line 216, sass/partials/_main_wrap.scss */
215
- .cmb-type-title .cmb-td {
216
- padding: 0;
217
- }
218
-
219
- /* line 221, sass/partials/_main_wrap.scss */
220
- .cmb-th label {
221
- display: block;
222
- padding: 5px 0;
223
- }
224
-
225
- /* line 226, sass/partials/_main_wrap.scss */
226
- .cmb-th + .cmb-td {
227
- float: right;
228
- }
229
-
230
- /* line 230, sass/partials/_main_wrap.scss */
231
- .cmb-td .cmb-td {
232
- padding-bottom: 1em;
233
- }
234
-
235
- /* line 234, sass/partials/_main_wrap.scss */
236
- .cmb-remove-row {
237
- text-align: left;
238
- }
239
-
240
- /* line 238, sass/partials/_main_wrap.scss */
241
- .empty-row.hidden {
242
- display: none;
243
- }
244
-
245
- /* line 243, sass/partials/_main_wrap.scss */
246
- .cmb-repeat-table {
247
- background-color: #fafafa;
248
- border: 1px solid #e1e1e1;
249
- }
250
- /* line 247, sass/partials/_main_wrap.scss */
251
- .cmb-repeat-table .cmb-row.cmb-repeat-row {
252
- position: relative;
253
- counter-increment: el;
254
- margin: 0;
255
- padding: 10px 50px 10px 10px;
256
- border-bottom: none !important;
257
- }
258
- /* line 255, sass/partials/_main_wrap.scss */
259
- .cmb-repeat-table .cmb-row.cmb-repeat-row + .cmb-repeat-row {
260
- border-top: solid 1px #e9e9e9;
261
- }
262
- /* line 259, sass/partials/_main_wrap.scss */
263
- .cmb-repeat-table .cmb-row.cmb-repeat-row:before {
264
- content: counter(el);
265
- display: block;
266
- top: 0;
267
- right: 0;
268
- position: absolute;
269
- width: 35px;
270
- height: 100%;
271
- line-height: 35px;
272
- color: #aaaaaa;
273
- text-align: center;
274
- border-left: solid 1px #e9e9e9;
275
- }
276
- /* line 276, sass/partials/_main_wrap.scss */
277
- .cmb-repeat-table .cmb-row.cmb-repeat-row .cmb-td {
278
- margin: 0;
279
- padding: 0;
280
- }
281
- /* line 283, sass/partials/_main_wrap.scss */
282
- .cmb-repeat-table + .cmb-add-row {
283
- margin: 0;
284
- }
285
- /* line 286, sass/partials/_main_wrap.scss */
286
- .cmb-repeat-table + .cmb-add-row:before {
287
- content: '';
288
- width: 1px;
289
- height: 1.6em;
290
- display: block;
291
- margin-right: 17px;
292
- background-color: gainsboro;
293
- }
294
- /* line 296, sass/partials/_main_wrap.scss */
295
- .cmb-repeat-table .cmb-remove-row {
296
- top: 7px;
297
- left: 7px;
298
- position: absolute;
299
- width: auto;
300
- margin-right: 0;
301
- padding: 0 !important;
302
- display: none;
303
- }
304
- /* line 307, sass/partials/_main_wrap.scss */
305
- .cmb-repeat-table .cmb-remove-row > .cmb-remove-row-button {
306
- font-size: 20px;
307
- text-indent: -1000px;
308
- overflow: hidden;
309
- position: relative;
310
- height: auto;
311
- line-height: 1;
312
- padding: 0 10px 0;
313
- }
314
- /* line 318, sass/partials/_main_wrap.scss */
315
- .cmb-repeat-table .cmb-remove-row > .cmb-remove-row-button:before {
316
- content: "";
317
- font-family: 'Dashicons';
318
- speak: none;
319
- font-weight: normal;
320
- font-variant: normal;
321
- text-transform: none;
322
- line-height: 1;
323
- -webkit-font-smoothing: antialiased;
324
- margin: 0;
325
- text-indent: 0;
326
- position: absolute;
327
- top: 0;
328
- right: 0;
329
- width: 100%;
330
- height: 100%;
331
- text-align: center;
332
- }
333
- /* line 324, sass/partials/_main_wrap.scss */
334
- .cmb-repeat-table .cmb-repeat-row:hover .cmb-remove-row {
335
- display: block;
336
- }
337
-
338
- /* line 332, sass/partials/_main_wrap.scss */
339
- .cmb-repeatable-group .cmb-th {
340
- padding: 5px;
341
- }
342
- /* line 336, sass/partials/_main_wrap.scss */
343
- .cmb-repeatable-group .cmb-group-title {
344
- background-color: #e9e9e9;
345
- padding: 8px 2.2em 8px 12px;
346
- margin: 0 -1em;
347
- min-height: 1.5em;
348
- font-size: 14px;
349
- line-height: 1.4;
350
- }
351
- /* line 344, sass/partials/_main_wrap.scss */
352
- .cmb-repeatable-group .cmb-group-title h4 {
353
- border: 0;
354
- margin: 0;
355
- font-size: 1.2em;
356
- font-weight: 500;
357
- padding: 0.5em 0.75em;
358
- }
359
- /* line 352, sass/partials/_main_wrap.scss */
360
- .cmb-repeatable-group .cmb-group-title .cmb-th {
361
- display: block;
362
- width: 100%;
363
- }
364
- /* line 358, sass/partials/_main_wrap.scss */
365
- .cmb-repeatable-group .cmb-group-description .cmb-th {
366
- font-size: 1.2em;
367
- display: block;
368
- float: none;
369
- padding-bottom: 1em;
370
- text-align: right;
371
- width: 100%;
372
- }
373
- /* line 27, sass/partials/_mixins.scss */
374
- .cmb-repeatable-group .cmb-group-description .cmb-th label {
375
- display: block;
376
- margin-top: 0;
377
- margin-bottom: 0.5em;
378
- }
379
- /* line 362, sass/partials/_main_wrap.scss */
380
- .cmb-repeatable-group .cmb-shift-rows {
381
- font-size: 1em;
382
- margin-left: 1em;
383
- text-decoration: none;
384
- }
385
- /* line 367, sass/partials/_main_wrap.scss */
386
- .cmb-repeatable-group .cmb-shift-rows .dashicons {
387
- font-size: 1.5em;
388
- height: 1.5em;
389
- line-height: 1.2em;
390
- width: 1em;
391
- }
392
- /* line 373, sass/partials/_main_wrap.scss */
393
- .cmb-repeatable-group .cmb-shift-rows .dashicons.dashicons-arrow-down-alt2 {
394
- line-height: 1.3em;
395
- }
396
- /* line 380, sass/partials/_main_wrap.scss */
397
- .cmb-repeatable-group .cmb2-upload-button {
398
- float: left;
399
- }
400
-
401
- /* line 386, sass/partials/_main_wrap.scss */
402
- p.cmb2-metabox-description {
403
- color: #aaaaaa;
404
- font-style: italic;
405
- margin: 0;
406
- padding-top: .5em;
407
- }
408
-
409
- /* line 393, sass/partials/_main_wrap.scss */
410
- span.cmb2-metabox-description {
411
- color: #aaaaaa;
412
- font-style: italic;
413
- }
414
-
415
- /* line 398, sass/partials/_main_wrap.scss */
416
- .cmb2-metabox-title {
417
- margin: 0 0 5px 0;
418
- padding: 5px 0 0 0;
419
- font-size: 14px;
420
- }
421
-
422
- /* line 404, sass/partials/_main_wrap.scss */
423
- .cmb-inline ul {
424
- padding: 4px 0 0 0;
425
- }
426
-
427
- /* line 408, sass/partials/_main_wrap.scss */
428
- .cmb-inline li {
429
- display: inline-block;
430
- padding-left: 18px;
431
- }
432
-
433
- /* line 413, sass/partials/_main_wrap.scss */
434
- .cmb-type-textarea-code pre {
435
- margin: 0;
436
- }
437
-
438
- /* line 419, sass/partials/_main_wrap.scss */
439
- .cmb2-media-status .img-status {
440
- clear: none;
441
- display: inline-block;
442
- vertical-align: middle;
443
- margin-left: 10px;
444
- width: auto;
445
- }
446
- /* line 426, sass/partials/_main_wrap.scss */
447
- .cmb2-media-status .img-status img {
448
- max-width: 350px;
449
- height: auto;
450
- }
451
- /* line 432, sass/partials/_main_wrap.scss */
452
- .cmb2-media-status .img-status img,
453
- .cmb2-media-status .embed-status {
454
- background: #ffffff;
455
- border: 1px solid #e9e9e9;
456
- border-radius: 2px;
457
- -moz-border-radius: 2px;
458
- margin: 15px 0 0 0;
459
- padding: 5px;
460
- }
461
- /* line 442, sass/partials/_main_wrap.scss */
462
- .cmb2-media-status .embed-status {
463
- float: right;
464
- max-width: 800px;
465
- }
466
- /* line 447, sass/partials/_main_wrap.scss */
467
- .cmb2-media-status .img-status, .cmb2-media-status .embed-status {
468
- position: relative;
469
- }
470
- /* line 450, sass/partials/_main_wrap.scss */
471
- .cmb2-media-status .img-status .cmb2-remove-file-button, .cmb2-media-status .embed-status .cmb2-remove-file-button {
472
- background: url(../images/ico-delete.png);
473
- height: 16px;
474
- right: -5px;
475
- position: absolute;
476
- text-indent: -9999px;
477
- top: -5px;
478
- width: 16px;
479
- }
480
- /* line 464, sass/partials/_main_wrap.scss */
481
- .cmb2-media-status .img-status .cmb2-remove-file-button {
482
- top: 10px;
483
- }
484
- /* line 469, sass/partials/_main_wrap.scss */
485
- .cmb2-media-status .img-status img, .cmb2-media-status .file-status > span {
486
- cursor: pointer;
487
- }
488
-
489
- /* line 475, sass/partials/_main_wrap.scss */
490
- .cmb-type-file-list .cmb2-media-status .img-status {
491
- clear: none;
492
- vertical-align: middle;
493
- width: auto;
494
- margin-left: 10px;
495
- margin-bottom: 10px;
496
- margin-top: 0;
497
- }
498
-
499
- /* line 484, sass/partials/_main_wrap.scss */
500
- .cmb-attach-list li {
501
- clear: both;
502
- display: inline-block;
503
- width: 100%;
504
- margin-top: 5px;
505
- margin-bottom: 10px;
506
- }
507
- /* line 491, sass/partials/_main_wrap.scss */
508
- .cmb-attach-list li img {
509
- cursor: move;
510
- float: right;
511
- margin-left: 10px;
512
- }
513
-
514
- /* line 498, sass/partials/_main_wrap.scss */
515
- .cmb2-remove-wrapper {
516
- margin: 0;
517
- }
518
-
519
- /* line 502, sass/partials/_main_wrap.scss */
520
- .child-cmb2 .cmb-th {
521
- text-align: right;
522
- }
523
-
524
- /* line 506, sass/partials/_main_wrap.scss */
525
- .cmb2-indented-hierarchy {
526
- padding-right: 1.5em;
527
- }
528
-
529
- @media (max-width: 450px) {
530
- /* line 511, sass/partials/_main_wrap.scss */
531
- .cmb-th,
532
- .cmb-td,
533
- .cmb-th + .cmb-td {
534
- display: block;
535
- float: none;
536
- width: 100%;
537
- }
538
- }
539
- /*--------------------------------------------------------------
540
- Post Metaboxes
541
- --------------------------------------------------------------*/
542
- /* line 4, sass/partials/_post_metaboxes.scss */
543
- #poststuff .cmb-group-title {
544
- margin-right: -1em;
545
- margin-left: -1em;
546
- min-height: 1.5em;
547
- }
548
-
549
- /* line 10, sass/partials/_post_metaboxes.scss */
550
- #poststuff .repeatable .cmb-group-title {
551
- padding-right: 2.2em;
552
- }
553
-
554
- /* line 16, sass/partials/_post_metaboxes.scss */
555
- .cmb2-postbox .cmb2-wrap, .cmb-type-group .cmb2-wrap {
556
- margin: 0;
557
- }
558
- /* line 19, sass/partials/_post_metaboxes.scss */
559
- .cmb2-postbox .cmb2-wrap > .cmb-field-list > .cmb-row, .cmb-type-group .cmb2-wrap > .cmb-field-list > .cmb-row {
560
- padding: 1.8em 0;
561
- }
562
- /* line 25, sass/partials/_post_metaboxes.scss */
563
- .cmb2-postbox .cmb2-wrap input[type=text].cmb2-oembed, .cmb-type-group .cmb2-wrap input[type=text].cmb2-oembed {
564
- width: 100%;
565
- }
566
- /* line 31, sass/partials/_post_metaboxes.scss */
567
- .cmb2-postbox .cmb-row, .cmb-type-group .cmb-row {
568
- padding: 0 0 1.8em;
569
- margin: 0 0 0.8em;
570
- }
571
- /* line 35, sass/partials/_post_metaboxes.scss */
572
- .cmb2-postbox .cmb-row .cmbhandle, .cmb-type-group .cmb-row .cmbhandle {
573
- left: -1em;
574
- position: relative;
575
- }
576
- /* line 41, sass/partials/_post_metaboxes.scss */
577
- .cmb2-postbox .cmb-repeatable-grouping, .cmb-type-group .cmb-repeatable-grouping {
578
- padding: 0 1em;
579
- max-width: 100%;
580
- min-width: 1px !important;
581
- }
582
- /* line 47, sass/partials/_post_metaboxes.scss */
583
- .cmb2-postbox .cmb-repeatable-group > .cmb-row, .cmb-type-group .cmb-repeatable-group > .cmb-row {
584
- padding-bottom: 0;
585
- }
586
- /* line 51, sass/partials/_post_metaboxes.scss */
587
- .cmb2-postbox .cmb-th, .cmb-type-group .cmb-th {
588
- width: 18%;
589
- padding: 0 0 0 2%;
590
- }
591
- /* line 57, sass/partials/_post_metaboxes.scss */
592
- .cmb2-postbox .cmb-td, .cmb-type-group .cmb-td {
593
- margin-bottom: 0;
594
- padding: 0;
595
- line-height: 1.3;
596
- }
597
- /* line 63, sass/partials/_post_metaboxes.scss */
598
- .cmb2-postbox .cmb-th + .cmb-td, .cmb-type-group .cmb-th + .cmb-td {
599
- width: 80%;
600
- float: left;
601
- }
602
- /* line 68, sass/partials/_post_metaboxes.scss */
603
- .cmb2-postbox .cmb-row:not(:last-of-type),
604
- .cmb2-postbox .cmb-repeatable-group:not(:last-of-type), .cmb-type-group .cmb-row:not(:last-of-type),
605
- .cmb-type-group .cmb-repeatable-group:not(:last-of-type) {
606
- border-bottom: 1px solid #e9e9e9;
607
- }
608
- @media (max-width: 450px) {
609
- /* line 68, sass/partials/_post_metaboxes.scss */
610
- .cmb2-postbox .cmb-row:not(:last-of-type),
611
- .cmb2-postbox .cmb-repeatable-group:not(:last-of-type), .cmb-type-group .cmb-row:not(:last-of-type),
612
- .cmb-type-group .cmb-repeatable-group:not(:last-of-type) {
613
- border-bottom: 0;
614
- }
615
- }
616
- /* line 77, sass/partials/_post_metaboxes.scss */
617
- .cmb2-postbox .cmb-repeat-group-field,
618
- .cmb2-postbox .cmb-remove-field-row, .cmb-type-group .cmb-repeat-group-field,
619
- .cmb-type-group .cmb-remove-field-row {
620
- padding-top: 1.8em;
621
- }
622
-
623
- /*--------------------------------------------------------------
624
- Context Metaboxes
625
- --------------------------------------------------------------*/
626
- /* Metabox collapse arrow indicators */
627
- /* line 9, sass/partials/_context_metaboxes.scss */
628
- .js .cmb2-postbox.context-box .toggle-indicator:before {
629
- content: "\f142";
630
- display: inline-block;
631
- font: normal 20px/1 dashicons;
632
- speak: none;
633
- -webkit-font-smoothing: antialiased;
634
- -moz-osx-font-smoothing: grayscale;
635
- text-decoration: none !important;
636
- }
637
- /* line 22, sass/partials/_context_metaboxes.scss */
638
- .js .cmb2-postbox.context-box.closed .toggle-indicator:before {
639
- content: "\f140";
640
- }
641
-
642
- /* line 30, sass/partials/_context_metaboxes.scss */
643
- .cmb2-postbox.context-box {
644
- margin-bottom: 10px;
645
- }
646
- /* line 34, sass/partials/_context_metaboxes.scss */
647
- .cmb2-postbox.context-box.context-before_permalink-box {
648
- margin-top: 10px;
649
- }
650
- /* line 38, sass/partials/_context_metaboxes.scss */
651
- .cmb2-postbox.context-box.context-after_title-box {
652
- margin-top: 10px;
653
- }
654
- /* line 42, sass/partials/_context_metaboxes.scss */
655
- .cmb2-postbox.context-box.context-after_editor-box {
656
- margin-top: 20px;
657
- margin-bottom: 0;
658
- }
659
- /* line 47, sass/partials/_context_metaboxes.scss */
660
- .cmb2-postbox.context-box.context-form_top-box {
661
- margin-top: 10px;
662
- }
663
- /* line 51, sass/partials/_context_metaboxes.scss */
664
- .cmb2-postbox.context-box.context-form_top-box .hndle {
665
- font-size: 14px;
666
- padding: 8px 12px;
667
- margin: 0;
668
- line-height: 1.4;
669
- }
670
- /* line 59, sass/partials/_context_metaboxes.scss */
671
- .cmb2-postbox.context-box .hndle {
672
- cursor: auto;
673
- }
674
-
675
- /* line 64, sass/partials/_context_metaboxes.scss */
676
- .cmb2-context-wrap {
677
- margin-top: 10px;
678
- }
679
- /* line 68, sass/partials/_context_metaboxes.scss */
680
- .cmb2-context-wrap.cmb2-context-wrap-form_top {
681
- margin-left: 300px;
682
- width: auto;
683
- }
684
- /* line 75, sass/partials/_context_metaboxes.scss */
685
- .cmb2-context-wrap.cmb2-context-wrap-no-title .cmb2-metabox {
686
- padding: 10px;
687
- }
688
- /* line 80, sass/partials/_context_metaboxes.scss */
689
- .cmb2-context-wrap .cmb-th {
690
- padding: 0 0 0 2%;
691
- width: 18%;
692
- }
693
- /* line 85, sass/partials/_context_metaboxes.scss */
694
- .cmb2-context-wrap .cmb-td {
695
- width: 80%;
696
- padding: 0;
697
- }
698
- /* line 90, sass/partials/_context_metaboxes.scss */
699
- .cmb2-context-wrap .cmb-row {
700
- margin-bottom: 10px;
701
- }
702
- /* line 93, sass/partials/_context_metaboxes.scss */
703
- .cmb2-context-wrap .cmb-row:last-of-type {
704
- margin-bottom: 0;
705
- }
706
-
707
- /* one column on the post write/edit screen */
708
- @media only screen and (max-width: 850px) {
709
- /* line 103, sass/partials/_context_metaboxes.scss */
710
- .cmb2-context-wrap.cmb2-context-wrap-form_top {
711
- margin-left: 0;
712
- }
713
- }
714
- /*--------------------------------------------------------------
715
- Options page
716
- --------------------------------------------------------------*/
717
- /* line 4, sass/partials/_options-page.scss */
718
- .cmb2-options-page {
719
- max-width: 1200px;
720
- }
721
- /* line 7, sass/partials/_options-page.scss */
722
- .cmb2-options-page.wrap > h2 {
723
- margin-bottom: 1em;
724
- }
725
- /* line 11, sass/partials/_options-page.scss */
726
- .cmb2-options-page .cmb2-metabox > .cmb-row {
727
- padding: 1em;
728
- margin-top: -1px;
729
- background: #ffffff;
730
- border: 1px solid #e9e9e9;
731
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
732
- }
733
- /* line 18, sass/partials/_options-page.scss */
734
- .cmb2-options-page .cmb2-metabox > .cmb-row > .cmb-th {
735
- padding: 0;
736
- font-weight: initial;
737
- }
738
- /* line 23, sass/partials/_options-page.scss */
739
- .cmb2-options-page .cmb2-metabox > .cmb-row > .cmb-th + .cmb-td {
740
- float: none;
741
- padding: 0 1em 0 0;
742
- margin-right: 200px;
743
- }
744
- @media (max-width: 450px) {
745
- /* line 23, sass/partials/_options-page.scss */
746
- .cmb2-options-page .cmb2-metabox > .cmb-row > .cmb-th + .cmb-td {
747
- padding: 0;
748
- margin-right: 0;
749
- }
750
- }
751
- /* line 36, sass/partials/_options-page.scss */
752
- .cmb2-options-page .cmb2-wrap .cmb-type-title {
753
- margin-top: 1em;
754
- padding: 0.6em 1em;
755
- background-color: #fafafa;
756
- }
757
- /* line 41, sass/partials/_options-page.scss */
758
- .cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-title {
759
- font-size: 12px;
760
- margin-top: 0;
761
- margin-bottom: 0;
762
- text-transform: uppercase;
763
- }
764
- /* line 48, sass/partials/_options-page.scss */
765
- .cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-description {
766
- padding-top: 0.25em;
767
- }
768
- /* line 54, sass/partials/_options-page.scss */
769
- .cmb2-options-page .cmb-repeatable-group .cmb-group-description .cmb-th {
770
- padding: 0 0 0.8em 0;
771
- }
772
- /* line 58, sass/partials/_options-page.scss */
773
- .cmb2-options-page .cmb-repeatable-group .cmb-group-name {
774
- font-size: 16px;
775
- margin-top: 0;
776
- margin-bottom: 0;
777
- }
778
- /* line 64, sass/partials/_options-page.scss */
779
- .cmb2-options-page .cmb-repeatable-group .cmb-th > .cmb2-metabox-description {
780
- font-weight: 400;
781
- padding-bottom: 0 !important;
782
- }
783
-
784
- /*--------------------------------------------------------------
785
- Misc.
786
- --------------------------------------------------------------*/
787
- /* line 5, sass/partials/_misc.scss */
788
- #poststuff .cmb-repeatable-group h2 {
789
- margin: 0;
790
- }
791
-
792
- /* line 12, sass/partials/_misc.scss */
793
- .edit-tags-php .cmb2-metabox-title,
794
- .profile-php .cmb2-metabox-title,
795
- .user-edit-php .cmb2-metabox-title {
796
- font-size: 1.4em;
797
- }
798
-
799
- /* line 18, sass/partials/_misc.scss */
800
- .cmb2-postbox .cmb-spinner, .cmb2-no-box-wrap .cmb-spinner {
801
- float: right;
802
- display: none;
803
- }
804
-
805
- /* line 24, sass/partials/_misc.scss */
806
- .cmb-spinner {
807
- display: none;
808
- }
809
- /* line 26, sass/partials/_misc.scss */
810
- .cmb-spinner.is-active {
811
- display: block;
812
- }
813
-
814
- /*--------------------------------------------------------------
815
- Sidebar Placement Adjustments
816
- --------------------------------------------------------------*/
817
- /* line 10, sass/partials/_sidebar_placements.scss */
818
- .inner-sidebar .cmb2-wrap > .cmb-field-list > .cmb-row,
819
- #side-sortables .cmb2-wrap > .cmb-field-list > .cmb-row {
820
- padding: 1.4em 0;
821
- }
822
- /* line 16, sass/partials/_sidebar_placements.scss */
823
- .inner-sidebar .cmb2-wrap input[type=text]:not(.wp-color-picker),
824
- #side-sortables .cmb2-wrap input[type=text]:not(.wp-color-picker) {
825
- width: 100%;
826
- }
827
- /* line 20, sass/partials/_sidebar_placements.scss */
828
- .inner-sidebar .cmb2-wrap input + input:not(.wp-picker-clear), .inner-sidebar .cmb2-wrap input + select,
829
- #side-sortables .cmb2-wrap input + input:not(.wp-picker-clear),
830
- #side-sortables .cmb2-wrap input + select {
831
- margin-right: 0;
832
- margin-top: 1em;
833
- display: block;
834
- }
835
- /* line 26, sass/partials/_sidebar_placements.scss */
836
- .inner-sidebar .cmb2-wrap input.cmb2-text-money,
837
- #side-sortables .cmb2-wrap input.cmb2-text-money {
838
- max-width: 70%;
839
- }
840
- /* line 28, sass/partials/_sidebar_placements.scss */
841
- .inner-sidebar .cmb2-wrap input.cmb2-text-money + .cmb2-metabox-description,
842
- #side-sortables .cmb2-wrap input.cmb2-text-money + .cmb2-metabox-description {
843
- display: block;
844
- }
845
- /* line 34, sass/partials/_sidebar_placements.scss */
846
- .inner-sidebar .cmb2-wrap label,
847
- #side-sortables .cmb2-wrap label {
848
- display: block;
849
- font-weight: 700;
850
- padding: 0 0 5px;
851
- }
852
- /* line 42, sass/partials/_sidebar_placements.scss */
853
- .inner-sidebar textarea,
854
- #side-sortables textarea {
855
- max-width: 99%;
856
- }
857
- /* line 46, sass/partials/_sidebar_placements.scss */
858
- .inner-sidebar .cmb-repeatable-group,
859
- #side-sortables .cmb-repeatable-group {
860
- border-bottom: 1px solid #e9e9e9;
861
- }
862
- /* line 50, sass/partials/_sidebar_placements.scss */
863
- .inner-sidebar .cmb-type-group > .cmb-td > .cmb-repeatable-group,
864
- #side-sortables .cmb-type-group > .cmb-td > .cmb-repeatable-group {
865
- border-bottom: 0;
866
- margin-bottom: -1.4em;
867
- }
868
- /* line 55, sass/partials/_sidebar_placements.scss */
869
- .inner-sidebar .cmb-th,
870
- .inner-sidebar .cmb-td:not(.cmb-remove-row),
871
- .inner-sidebar .cmb-th + .cmb-td,
872
- #side-sortables .cmb-th,
873
- #side-sortables .cmb-td:not(.cmb-remove-row),
874
- #side-sortables .cmb-th + .cmb-td {
875
- width: 100%;
876
- display: block;
877
- float: none;
878
- }
879
- /* line 63, sass/partials/_sidebar_placements.scss */
880
- .inner-sidebar .closed .inside,
881
- #side-sortables .closed .inside {
882
- display: none;
883
- }
884
- /* line 67, sass/partials/_sidebar_placements.scss */
885
- .inner-sidebar .cmb-th,
886
- #side-sortables .cmb-th {
887
- display: block;
888
- float: none;
889
- padding-bottom: 1em;
890
- text-align: right;
891
- width: 100%;
892
- padding-right: 0;
893
- padding-left: 0;
894
- }
895
- /* line 27, sass/partials/_mixins.scss */
896
- .inner-sidebar .cmb-th label,
897
- #side-sortables .cmb-th label {
898
- display: block;
899
- margin-top: 0;
900
- margin-bottom: 0.5em;
901
- }
902
- /* line 14, sass/partials/_mixins.scss */
903
- .inner-sidebar .cmb-th label,
904
- #side-sortables .cmb-th label {
905
- font-size: 14px;
906
- line-height: 1.4em;
907
- }
908
- /* line 74, sass/partials/_sidebar_placements.scss */
909
- .inner-sidebar .cmb-group-description .cmb-th,
910
- #side-sortables .cmb-group-description .cmb-th {
911
- padding-top: 0;
912
- }
913
- /* line 77, sass/partials/_sidebar_placements.scss */
914
- .inner-sidebar .cmb-group-description .cmb2-metabox-description,
915
- #side-sortables .cmb-group-description .cmb2-metabox-description {
916
- padding: 0;
917
- }
918
- /* line 84, sass/partials/_sidebar_placements.scss */
919
- .inner-sidebar .cmb-group-title .cmb-th,
920
- #side-sortables .cmb-group-title .cmb-th {
921
- padding: 0;
922
- }
923
- /* line 90, sass/partials/_sidebar_placements.scss */
924
- .inner-sidebar .cmb-repeatable-grouping + .cmb-repeatable-grouping,
925
- #side-sortables .cmb-repeatable-grouping + .cmb-repeatable-grouping {
926
- margin-top: 1em;
927
- }
928
- /* line 99, sass/partials/_sidebar_placements.scss */
929
- .inner-sidebar .cmb2-media-status .img-status img,
930
- .inner-sidebar .cmb2-media-status .embed-status img,
931
- #side-sortables .cmb2-media-status .img-status img,
932
- #side-sortables .cmb2-media-status .embed-status img {
933
- max-width: 90%;
934
- height: auto;
935
- }
936
- /* line 107, sass/partials/_sidebar_placements.scss */
937
- .inner-sidebar .cmb2-list label,
938
- #side-sortables .cmb2-list label {
939
- display: inline;
940
- font-weight: normal;
941
- }
942
- /* line 112, sass/partials/_sidebar_placements.scss */
943
- .inner-sidebar .cmb2-metabox-description,
944
- #side-sortables .cmb2-metabox-description {
945
- display: block;
946
- padding: 7px 0 0;
947
- }
948
- /* line 119, sass/partials/_sidebar_placements.scss */
949
- .inner-sidebar .cmb-type-checkbox .cmb-td label,
950
- .inner-sidebar .cmb-type-checkbox .cmb2-metabox-description,
951
- #side-sortables .cmb-type-checkbox .cmb-td label,
952
- #side-sortables .cmb-type-checkbox .cmb2-metabox-description {
953
- font-weight: normal;
954
- display: inline;
955
- }
956
- /* line 126, sass/partials/_sidebar_placements.scss */
957
- .inner-sidebar .cmb-row .cmb2-metabox-description,
958
- #side-sortables .cmb-row .cmb2-metabox-description {
959
- padding-bottom: 1.8em;
960
- }
961
- /* line 130, sass/partials/_sidebar_placements.scss */
962
- .inner-sidebar .cmb2-metabox-title,
963
- #side-sortables .cmb2-metabox-title {
964
- font-size: 1.2em;
965
- font-style: italic;
966
- }
967
- /* line 135, sass/partials/_sidebar_placements.scss */
968
- .inner-sidebar .cmb-remove-row,
969
- #side-sortables .cmb-remove-row {
970
- clear: both;
971
- padding-top: 12px;
972
- padding-bottom: 0;
973
- }
974
- /* line 141, sass/partials/_sidebar_placements.scss */
975
- .inner-sidebar .cmb2-upload-button,
976
- #side-sortables .cmb2-upload-button {
977
- clear: both;
978
- margin-top: 12px;
979
- }
980
-
981
- /* line 2, sass/partials/_collapsible_ui.scss */
982
- .cmb2-metabox .cmbhandle {
983
- color: #aaa;
984
- float: left;
985
- width: 27px;
986
- height: 30px;
987
- cursor: pointer;
988
- left: -1em;
989
- position: relative;
990
- }
991
- /* line 10, sass/partials/_collapsible_ui.scss */
992
- .cmb2-metabox .cmbhandle:before {
993
- content: '\f142';
994
- left: 12px;
995
- font: normal 20px/1 'dashicons';
996
- speak: none;
997
- display: inline-block;
998
- padding: 8px 10px;
999
- top: 0;
1000
- position: relative;
1001
- -webkit-font-smoothing: antialiased;
1002
- -moz-osx-font-smoothing: grayscale;
1003
- text-decoration: none !important;
1004
- }
1005
- /* line 27, sass/partials/_collapsible_ui.scss */
1006
- .cmb2-metabox .postbox.closed .cmbhandle:before {
1007
- content: '\f140';
1008
- }
1009
- /* line 33, sass/partials/_collapsible_ui.scss */
1010
- .cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row {
1011
- -webkit-appearance: none !important;
1012
- background: none !important;
1013
- border: none !important;
1014
- position: absolute;
1015
- right: 0;
1016
- top: .5em;
1017
- line-height: 1em;
1018
- padding: 2px 6px 3px;
1019
- opacity: .5;
1020
- }
1021
- /* line 43, sass/partials/_collapsible_ui.scss */
1022
- .cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]) {
1023
- cursor: pointer;
1024
- color: #a00;
1025
- opacity: 1;
1026
- }
1027
- /* line 47, sass/partials/_collapsible_ui.scss */
1028
- .cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]):hover {
1029
- color: #f00;
1030
- }
1031
-
1032
- /*
1033
- * jQuery UI CSS Framework 1.8.16
1034
- *
1035
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
1036
- * Dual licensed under the MIT or GPL Version 2 licenses.
1037
- * http://jquery.org/license
1038
- *
1039
- * http://docs.jquery.com/UI/Theming/API
1040
- *
1041
- * WordPress Styles adopted from "jQuery UI Datepicker CSS for WordPress"
1042
- * https://github.com/stuttter/wp-datepicker-styling
1043
- *
1044
- */
1045
- /* line 15, sass/partials/_jquery_ui.scss */
1046
- * html .cmb2-element.ui-helper-clearfix {
1047
- height: 1%;
1048
- }
1049
-
1050
- /* line 24, sass/partials/_jquery_ui.scss */
1051
- .cmb2-element.ui-datepicker, .cmb2-element .ui-datepicker {
1052
- padding: 0;
1053
- margin: 0;
1054
- -webkit-border-radius: 0;
1055
- -moz-border-radius: 0;
1056
- border-radius: 0;
1057
- background-color: #fff;
1058
- border: 1px solid #dfdfdf;
1059
- border-top: none;
1060
- -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075);
1061
- box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075);
1062
- min-width: 17em;
1063
- width: auto;
1064
- /* Default Color Scheme */
1065
- }
1066
- /* line 38, sass/partials/_jquery_ui.scss */
1067
- .cmb2-element.ui-datepicker *, .cmb2-element .ui-datepicker * {
1068
- padding: 0;
1069
- font-family: "Open Sans", sans-serif;
1070
- -webkit-border-radius: 0;
1071
- -moz-border-radius: 0;
1072
- border-radius: 0;
1073
- }
1074
- /* line 46, sass/partials/_jquery_ui.scss */
1075
- .cmb2-element.ui-datepicker table, .cmb2-element .ui-datepicker table {
1076
- font-size: 13px;
1077
- margin: 0;
1078
- border: none;
1079
- border-collapse: collapse;
1080
- }
1081
- /* line 53, sass/partials/_jquery_ui.scss */
1082
- .cmb2-element.ui-datepicker .ui-widget-header,
1083
- .cmb2-element.ui-datepicker .ui-datepicker-header, .cmb2-element .ui-datepicker .ui-widget-header,
1084
- .cmb2-element .ui-datepicker .ui-datepicker-header {
1085
- background-image: none;
1086
- border: none;
1087
- color: #fff;
1088
- font-weight: normal;
1089
- }
1090
- /* line 61, sass/partials/_jquery_ui.scss */
1091
- .cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover, .cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover {
1092
- background: transparent;
1093
- border-color: transparent;
1094
- cursor: pointer;
1095
- }
1096
- /* line 67, sass/partials/_jquery_ui.scss */
1097
- .cmb2-element.ui-datepicker .ui-datepicker-title, .cmb2-element .ui-datepicker .ui-datepicker-title {
1098
- margin: 0;
1099
- padding: 10px 0;
1100
- color: #fff;
1101
- font-size: 14px;
1102
- line-height: 14px;
1103
- text-align: center;
1104
- }
1105
- /* line 75, sass/partials/_jquery_ui.scss */
1106
- .cmb2-element.ui-datepicker .ui-datepicker-title select, .cmb2-element .ui-datepicker .ui-datepicker-title select {
1107
- margin-top: -8px;
1108
- margin-bottom: -8px;
1109
- }
1110
- /* line 81, sass/partials/_jquery_ui.scss */
1111
- .cmb2-element.ui-datepicker .ui-datepicker-prev,
1112
- .cmb2-element.ui-datepicker .ui-datepicker-next, .cmb2-element .ui-datepicker .ui-datepicker-prev,
1113
- .cmb2-element .ui-datepicker .ui-datepicker-next {
1114
- position: relative;
1115
- top: 0;
1116
- height: 34px;
1117
- width: 34px;
1118
- }
1119
- /* line 89, sass/partials/_jquery_ui.scss */
1120
- .cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-prev,
1121
- .cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-next, .cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-prev,
1122
- .cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-next {
1123
- border: none;
1124
- }
1125
- /* line 94, sass/partials/_jquery_ui.scss */
1126
- .cmb2-element.ui-datepicker .ui-datepicker-prev,
1127
- .cmb2-element.ui-datepicker .ui-datepicker-prev-hover, .cmb2-element .ui-datepicker .ui-datepicker-prev,
1128
- .cmb2-element .ui-datepicker .ui-datepicker-prev-hover {
1129
- right: 0;
1130
- }
1131
- /* line 99, sass/partials/_jquery_ui.scss */
1132
- .cmb2-element.ui-datepicker .ui-datepicker-next,
1133
- .cmb2-element.ui-datepicker .ui-datepicker-next-hover, .cmb2-element .ui-datepicker .ui-datepicker-next,
1134
- .cmb2-element .ui-datepicker .ui-datepicker-next-hover {
1135
- left: 0;
1136
- }
1137
- /* line 104, sass/partials/_jquery_ui.scss */
1138
- .cmb2-element.ui-datepicker .ui-datepicker-next span,
1139
- .cmb2-element.ui-datepicker .ui-datepicker-prev span, .cmb2-element .ui-datepicker .ui-datepicker-next span,
1140
- .cmb2-element .ui-datepicker .ui-datepicker-prev span {
1141
- display: none;
1142
- }
1143
- /* line 109, sass/partials/_jquery_ui.scss */
1144
- .cmb2-element.ui-datepicker .ui-datepicker-prev, .cmb2-element .ui-datepicker .ui-datepicker-prev {
1145
- float: right;
1146
- }
1147
- /* line 113, sass/partials/_jquery_ui.scss */
1148
- .cmb2-element.ui-datepicker .ui-datepicker-next, .cmb2-element .ui-datepicker .ui-datepicker-next {
1149
- float: left;
1150
- }
1151
- /* line 117, sass/partials/_jquery_ui.scss */
1152
- .cmb2-element.ui-datepicker .ui-datepicker-prev:before,
1153
- .cmb2-element.ui-datepicker .ui-datepicker-next:before, .cmb2-element .ui-datepicker .ui-datepicker-prev:before,
1154
- .cmb2-element .ui-datepicker .ui-datepicker-next:before {
1155
- font: normal 20px/34px 'dashicons';
1156
- padding-right: 7px;
1157
- color: #fff;
1158
- speak: none;
1159
- -webkit-font-smoothing: antialiased;
1160
- -moz-osx-font-smoothing: grayscale;
1161
- width: 34px;
1162
- height: 34px;
1163
- }
1164
- /* line 129, sass/partials/_jquery_ui.scss */
1165
- .cmb2-element.ui-datepicker .ui-datepicker-prev:before, .cmb2-element .ui-datepicker .ui-datepicker-prev:before {
1166
- content: '\f341';
1167
- }
1168
- /* line 133, sass/partials/_jquery_ui.scss */
1169
- .cmb2-element.ui-datepicker .ui-datepicker-next:before, .cmb2-element .ui-datepicker .ui-datepicker-next:before {
1170
- content: '\f345';
1171
- }
1172
- /* line 137, sass/partials/_jquery_ui.scss */
1173
- .cmb2-element.ui-datepicker .ui-datepicker-prev-hover:before,
1174
- .cmb2-element.ui-datepicker .ui-datepicker-next-hover:before, .cmb2-element .ui-datepicker .ui-datepicker-prev-hover:before,
1175
- .cmb2-element .ui-datepicker .ui-datepicker-next-hover:before {
1176
- opacity: 0.7;
1177
- }
1178
- /* line 142, sass/partials/_jquery_ui.scss */
1179
- .cmb2-element.ui-datepicker select.ui-datepicker-month,
1180
- .cmb2-element.ui-datepicker select.ui-datepicker-year, .cmb2-element .ui-datepicker select.ui-datepicker-month,
1181
- .cmb2-element .ui-datepicker select.ui-datepicker-year {
1182
- width: 33%;
1183
- background: transparent;
1184
- border-color: transparent;
1185
- box-shadow: none;
1186
- color: #fff;
1187
- }
1188
- /* line 149, sass/partials/_jquery_ui.scss */
1189
- .cmb2-element.ui-datepicker select.ui-datepicker-month option,
1190
- .cmb2-element.ui-datepicker select.ui-datepicker-year option, .cmb2-element .ui-datepicker select.ui-datepicker-month option,
1191
- .cmb2-element .ui-datepicker select.ui-datepicker-year option {
1192
- color: #333;
1193
- }
1194
- /* line 154, sass/partials/_jquery_ui.scss */
1195
- .cmb2-element.ui-datepicker thead, .cmb2-element .ui-datepicker thead {
1196
- color: #fff;
1197
- font-weight: 600;
1198
- }
1199
- /* line 157, sass/partials/_jquery_ui.scss */
1200
- .cmb2-element.ui-datepicker thead th, .cmb2-element .ui-datepicker thead th {
1201
- font-weight: normal;
1202
- }
1203
- /* line 162, sass/partials/_jquery_ui.scss */
1204
- .cmb2-element.ui-datepicker th, .cmb2-element .ui-datepicker th {
1205
- padding: 10px;
1206
- }
1207
- /* line 166, sass/partials/_jquery_ui.scss */
1208
- .cmb2-element.ui-datepicker td, .cmb2-element .ui-datepicker td {
1209
- padding: 0;
1210
- border: 1px solid #f4f4f4;
1211
- }
1212
- /* line 171, sass/partials/_jquery_ui.scss */
1213
- .cmb2-element.ui-datepicker td.ui-datepicker-other-month, .cmb2-element .ui-datepicker td.ui-datepicker-other-month {
1214
- border: transparent;
1215
- }
1216
- /* line 175, sass/partials/_jquery_ui.scss */
1217
- .cmb2-element.ui-datepicker td.ui-datepicker-week-end, .cmb2-element .ui-datepicker td.ui-datepicker-week-end {
1218
- background-color: #f4f4f4;
1219
- border: 1px solid #f4f4f4;
1220
- }
1221
- /* line 178, sass/partials/_jquery_ui.scss */
1222
- .cmb2-element.ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today, .cmb2-element .ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today {
1223
- -webkit-box-shadow: inset 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
1224
- -moz-box-shadow: inset 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
1225
- box-shadow: inset 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
1226
- }
1227
- /* line 185, sass/partials/_jquery_ui.scss */
1228
- .cmb2-element.ui-datepicker td.ui-datepicker-today, .cmb2-element .ui-datepicker td.ui-datepicker-today {
1229
- background-color: #f0f0c0;
1230
- }
1231
- /* line 189, sass/partials/_jquery_ui.scss */
1232
- .cmb2-element.ui-datepicker td.ui-datepicker-current-day, .cmb2-element .ui-datepicker td.ui-datepicker-current-day {
1233
- background: #bbdd88;
1234
- }
1235
- /* line 193, sass/partials/_jquery_ui.scss */
1236
- .cmb2-element.ui-datepicker td .ui-state-default, .cmb2-element .ui-datepicker td .ui-state-default {
1237
- background: transparent;
1238
- border: none;
1239
- text-align: center;
1240
- text-decoration: none;
1241
- width: auto;
1242
- display: block;
1243
- padding: 5px 10px;
1244
- font-weight: normal;
1245
- color: #444;
1246
- }
1247
- /* line 205, sass/partials/_jquery_ui.scss */
1248
- .cmb2-element.ui-datepicker td.ui-state-disabled .ui-state-default, .cmb2-element .ui-datepicker td.ui-state-disabled .ui-state-default {
1249
- opacity: 0.5;
1250
- }
1251
- /* line 210, sass/partials/_jquery_ui.scss */
1252
- .cmb2-element.ui-datepicker .ui-widget-header,
1253
- .cmb2-element.ui-datepicker .ui-datepicker-header, .cmb2-element .ui-datepicker .ui-widget-header,
1254
- .cmb2-element .ui-datepicker .ui-datepicker-header {
1255
- background: #00a0d2;
1256
- }
1257
- /* line 215, sass/partials/_jquery_ui.scss */
1258
- .cmb2-element.ui-datepicker thead, .cmb2-element .ui-datepicker thead {
1259
- background: #32373c;
1260
- }
1261
- /* line 219, sass/partials/_jquery_ui.scss */
1262
- .cmb2-element.ui-datepicker td .ui-state-hover, .cmb2-element.ui-datepicker td .ui-state-active, .cmb2-element .ui-datepicker td .ui-state-hover, .cmb2-element .ui-datepicker td .ui-state-active {
1263
- background: #0073aa;
1264
- color: #fff;
1265
- }
1266
- /* line 224, sass/partials/_jquery_ui.scss */
1267
- .cmb2-element.ui-datepicker .ui-timepicker-div, .cmb2-element .ui-datepicker .ui-timepicker-div {
1268
- font-size: 14px;
1269
- }
1270
- /* line 226, sass/partials/_jquery_ui.scss */
1271
- .cmb2-element.ui-datepicker .ui-timepicker-div dl, .cmb2-element .ui-datepicker .ui-timepicker-div dl {
1272
- text-align: right;
1273
- padding: 0 .6em;
1274
- }
1275
- /* line 229, sass/partials/_jquery_ui.scss */
1276
- .cmb2-element.ui-datepicker .ui-timepicker-div dl dt, .cmb2-element .ui-datepicker .ui-timepicker-div dl dt {
1277
- float: right;
1278
- clear: right;
1279
- padding: 0 5px 0 0;
1280
- }
1281
- /* line 234, sass/partials/_jquery_ui.scss */
1282
- .cmb2-element.ui-datepicker .ui-timepicker-div dl dd, .cmb2-element .ui-datepicker .ui-timepicker-div dl dd {
1283
- margin: 0 40% 10px 10px;
1284
- }
1285
- /* line 236, sass/partials/_jquery_ui.scss */
1286
- .cmb2-element.ui-datepicker .ui-timepicker-div dl dd select, .cmb2-element .ui-datepicker .ui-timepicker-div dl dd select {
1287
- width: 100%;
1288
- }
1289
- /* line 242, sass/partials/_jquery_ui.scss */
1290
- .cmb2-element.ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane, .cmb2-element .ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane {
1291
- padding: .6em;
1292
- text-align: right;
1293
- }
1294
- /* line 246, sass/partials/_jquery_ui.scss */
1295
- .cmb2-element.ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-primary, .cmb2-element.ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-secondary, .cmb2-element .ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-primary, .cmb2-element .ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-secondary {
1296
- padding: 0 10px 1px;
1297
- -webkit-border-radius: 3px;
1298
- -moz-border-radius: 3px;
1299
- border-radius: 3px;
1300
- margin: 0 .4em .4em .6em;
1301
- }
1302
-
1303
- /* line 260, sass/partials/_jquery_ui.scss */
1304
- .admin-color-fresh .cmb2-element.ui-datepicker .ui-widget-header,
1305
- .admin-color-fresh .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-fresh .cmb2-element .ui-datepicker .ui-widget-header,
1306
- .admin-color-fresh .cmb2-element .ui-datepicker .ui-datepicker-header {
1307
- background: #00a0d2;
1308
- }
1309
- /* line 265, sass/partials/_jquery_ui.scss */
1310
- .admin-color-fresh .cmb2-element.ui-datepicker thead, .admin-color-fresh .cmb2-element .ui-datepicker thead {
1311
- background: #32373c;
1312
- }
1313
- /* line 269, sass/partials/_jquery_ui.scss */
1314
- .admin-color-fresh .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-fresh .cmb2-element .ui-datepicker td .ui-state-hover {
1315
- background: #0073aa;
1316
- color: #fff;
1317
- }
1318
-
1319
- /* line 277, sass/partials/_jquery_ui.scss */
1320
- .admin-color-blue .cmb2-element.ui-datepicker .ui-widget-header,
1321
- .admin-color-blue .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-blue .cmb2-element .ui-datepicker .ui-widget-header,
1322
- .admin-color-blue .cmb2-element .ui-datepicker .ui-datepicker-header {
1323
- background: #52accc;
1324
- }
1325
- /* line 282, sass/partials/_jquery_ui.scss */
1326
- .admin-color-blue .cmb2-element.ui-datepicker thead, .admin-color-blue .cmb2-element .ui-datepicker thead {
1327
- background: #4796b3;
1328
- }
1329
- /* line 291, sass/partials/_jquery_ui.scss */
1330
- .admin-color-blue .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-blue .cmb2-element.ui-datepicker td .ui-state-active, .admin-color-blue .cmb2-element .ui-datepicker td .ui-state-hover, .admin-color-blue .cmb2-element .ui-datepicker td .ui-state-active {
1331
- background: #096484;
1332
- color: #fff;
1333
- }
1334
- /* line 296, sass/partials/_jquery_ui.scss */
1335
- .admin-color-blue .cmb2-element.ui-datepicker td.ui-datepicker-today, .admin-color-blue .cmb2-element .ui-datepicker td.ui-datepicker-today {
1336
- background: #eee;
1337
- }
1338
-
1339
- /* line 305, sass/partials/_jquery_ui.scss */
1340
- .admin-color-coffee .cmb2-element.ui-datepicker .ui-widget-header,
1341
- .admin-color-coffee .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-coffee .cmb2-element .ui-datepicker .ui-widget-header,
1342
- .admin-color-coffee .cmb2-element .ui-datepicker .ui-datepicker-header {
1343
- background: #59524c;
1344
- }
1345
- /* line 310, sass/partials/_jquery_ui.scss */
1346
- .admin-color-coffee .cmb2-element.ui-datepicker thead, .admin-color-coffee .cmb2-element .ui-datepicker thead {
1347
- background: #46403c;
1348
- }
1349
- /* line 314, sass/partials/_jquery_ui.scss */
1350
- .admin-color-coffee .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-coffee .cmb2-element .ui-datepicker td .ui-state-hover {
1351
- background: #c7a589;
1352
- color: #fff;
1353
- }
1354
-
1355
- /* line 322, sass/partials/_jquery_ui.scss */
1356
- .admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-widget-header,
1357
- .admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-widget-header,
1358
- .admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-datepicker-header {
1359
- background: #523f6d;
1360
- }
1361
- /* line 327, sass/partials/_jquery_ui.scss */
1362
- .admin-color-ectoplasm .cmb2-element.ui-datepicker thead, .admin-color-ectoplasm .cmb2-element .ui-datepicker thead {
1363
- background: #413256;
1364
- }
1365
- /* line 331, sass/partials/_jquery_ui.scss */
1366
- .admin-color-ectoplasm .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-ectoplasm .cmb2-element .ui-datepicker td .ui-state-hover {
1367
- background: #a3b745;
1368
- color: #fff;
1369
- }
1370
-
1371
- /* line 339, sass/partials/_jquery_ui.scss */
1372
- .admin-color-midnight .cmb2-element.ui-datepicker .ui-widget-header,
1373
- .admin-color-midnight .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-midnight .cmb2-element .ui-datepicker .ui-widget-header,
1374
- .admin-color-midnight .cmb2-element .ui-datepicker .ui-datepicker-header {
1375
- background: #363b3f;
1376
- }
1377
- /* line 344, sass/partials/_jquery_ui.scss */
1378
- .admin-color-midnight .cmb2-element.ui-datepicker thead, .admin-color-midnight .cmb2-element .ui-datepicker thead {
1379
- background: #26292c;
1380
- }
1381
- /* line 348, sass/partials/_jquery_ui.scss */
1382
- .admin-color-midnight .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-midnight .cmb2-element .ui-datepicker td .ui-state-hover {
1383
- background: #e14d43;
1384
- color: #fff;
1385
- }
1386
-
1387
- /* line 356, sass/partials/_jquery_ui.scss */
1388
- .admin-color-ocean .cmb2-element.ui-datepicker .ui-widget-header,
1389
- .admin-color-ocean .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-ocean .cmb2-element .ui-datepicker .ui-widget-header,
1390
- .admin-color-ocean .cmb2-element .ui-datepicker .ui-datepicker-header {
1391
- background: #738e96;
1392
- }
1393
- /* line 361, sass/partials/_jquery_ui.scss */
1394
- .admin-color-ocean .cmb2-element.ui-datepicker thead, .admin-color-ocean .cmb2-element .ui-datepicker thead {
1395
- background: #627c83;
1396
- }
1397
- /* line 365, sass/partials/_jquery_ui.scss */
1398
- .admin-color-ocean .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-ocean .cmb2-element .ui-datepicker td .ui-state-hover {
1399
- background: #9ebaa0;
1400
- color: #fff;
1401
- }
1402
-
1403
- /* line 373, sass/partials/_jquery_ui.scss */
1404
- .admin-color-sunrise .cmb2-element.ui-datepicker .ui-widget-header,
1405
- .admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header,
1406
- .admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover, .admin-color-sunrise .cmb2-element .ui-datepicker .ui-widget-header,
1407
- .admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header,
1408
- .admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover {
1409
- background: #cf4944;
1410
- }
1411
- /* line 379, sass/partials/_jquery_ui.scss */
1412
- .admin-color-sunrise .cmb2-element.ui-datepicker th, .admin-color-sunrise .cmb2-element .ui-datepicker th {
1413
- border-color: #be3631;
1414
- background: #be3631;
1415
- }
1416
- /* line 384, sass/partials/_jquery_ui.scss */
1417
- .admin-color-sunrise .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-sunrise .cmb2-element .ui-datepicker td .ui-state-hover {
1418
- background: #dd823b;
1419
- color: #fff;
1420
- }
1421
-
1422
- /* line 392, sass/partials/_jquery_ui.scss */
1423
- .admin-color-light .cmb2-element.ui-datepicker .ui-widget-header,
1424
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-light .cmb2-element .ui-datepicker .ui-widget-header,
1425
- .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-header {
1426
- background: #e5e5e5;
1427
- }
1428
- /* line 397, sass/partials/_jquery_ui.scss */
1429
- .admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-month,
1430
- .admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-year, .admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-month,
1431
- .admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-year {
1432
- color: #555;
1433
- }
1434
- /* line 402, sass/partials/_jquery_ui.scss */
1435
- .admin-color-light .cmb2-element.ui-datepicker thead, .admin-color-light .cmb2-element .ui-datepicker thead {
1436
- background: #888;
1437
- }
1438
- /* line 406, sass/partials/_jquery_ui.scss */
1439
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-title,
1440
- .admin-color-light .cmb2-element.ui-datepicker td .ui-state-default,
1441
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-prev:before,
1442
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-next:before, .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-title,
1443
- .admin-color-light .cmb2-element .ui-datepicker td .ui-state-default,
1444
- .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-prev:before,
1445
- .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-next:before {
1446
- color: #555;
1447
- }
1448
- /* line 414, sass/partials/_jquery_ui.scss */
1449
- .admin-color-light .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-light .cmb2-element.ui-datepicker td .ui-state-active, .admin-color-light .cmb2-element .ui-datepicker td .ui-state-hover, .admin-color-light .cmb2-element .ui-datepicker td .ui-state-active {
1450
- background: #ccc;
1451
- }
1452
- /* line 418, sass/partials/_jquery_ui.scss */
1453
- .admin-color-light .cmb2-element.ui-datepicker td.ui-datepicker-today, .admin-color-light .cmb2-element .ui-datepicker td.ui-datepicker-today {
1454
- background: #eee;
1455
- }
1456
-
1457
- /* line 426, sass/partials/_jquery_ui.scss */
1458
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-widget-header,
1459
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-widget-header,
1460
- .admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-datepicker-header {
1461
- background: #56b274;
1462
- }
1463
- /* line 431, sass/partials/_jquery_ui.scss */
1464
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker thead, .admin-color-bbp-evergreen .cmb2-element .ui-datepicker thead {
1465
- background: #36533f;
1466
- }
1467
- /* line 435, sass/partials/_jquery_ui.scss */
1468
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-bbp-evergreen .cmb2-element .ui-datepicker td .ui-state-hover {
1469
- background: #446950;
1470
- color: #fff;
1471
- }
1472
-
1473
- /* line 443, sass/partials/_jquery_ui.scss */
1474
- .admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-widget-header,
1475
- .admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-widget-header,
1476
- .admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-datepicker-header {
1477
- background: #4ca26a;
1478
- }
1479
- /* line 448, sass/partials/_jquery_ui.scss */
1480
- .admin-color-bbp-mint .cmb2-element.ui-datepicker thead, .admin-color-bbp-mint .cmb2-element .ui-datepicker thead {
1481
- background: #4f6d59;
1482
- }
1483
- /* line 452, sass/partials/_jquery_ui.scss */
1484
- .admin-color-bbp-mint .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-bbp-mint .cmb2-element .ui-datepicker td .ui-state-hover {
1485
- background: #5fb37c;
1486
- color: #fff;
1487
- }
1488
-
1489
- /**
1490
- * CMB2 Frontend
1491
- */
1492
- /* line 1, sass/partials/_front.scss */
1493
- .closed .inside {
1494
- display: none;
1495
- }
1496
-
1497
- /* line 5, sass/partials/_front.scss */
1498
- .cmb-repeatable-grouping {
1499
- position: relative;
1500
- }
1501
- /* line 8, sass/partials/_front.scss */
1502
- .cmb-repeatable-grouping .cmb-group-title {
1503
- margin-right: -1em;
1504
- margin-left: -1em;
1505
- min-height: 1.5em;
1506
- }
1507
- /* line 14, sass/partials/_front.scss */
1508
- .cmb-repeatable-grouping h3 {
1509
- font-size: 14px;
1510
- padding: 8px 12px;
1511
- margin: 0;
1512
- line-height: 1.4;
1513
- }
1514
-
1515
- /* line 25, sass/partials/_front.scss */
1516
- .cmb-repeatable-group.repeatable .cmb-group-title {
1517
- padding-right: 2.2em;
1518
- }
1519
- /* line 29, sass/partials/_front.scss */
1520
- .cmb-repeatable-group.non-repeatable .cmb-group-title {
1521
- padding-right: 12px;
1522
- }
1523
-
1524
- /* line 35, sass/partials/_front.scss */
1525
- .cmb-type-group .cmb-row .cmbhandle {
1526
- left: 0;
1527
- position: absolute;
1528
- }
1529
-
1530
- /* line 40, sass/partials/_front.scss */
1531
- .cmb-spinner {
1532
- background: url(/wp-admin/images/spinner.gif) no-repeat;
1533
- -webkit-background-size: 20px 20px;
1534
- background-size: 20px 20px;
1535
- display: none;
1536
- float: left;
1537
- vertical-align: middle;
1538
- opacity: 0.7;
1539
- filter: alpha(opacity=70);
1540
- width: 20px;
1541
- height: 20px;
1542
- margin: 4px 10px 0;
1543
- }
1544
-
1545
- /*# sourceMappingURL=cmb2-front.css.map */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/cmb2-front-rtl.min.css DELETED
@@ -1 +0,0 @@
1
- @charset "UTF-8";.cmb2-wrap{margin:0}.cmb2-wrap input,.cmb2-wrap textarea{font-size:14px;max-width:100%;padding:5px}.cmb2-wrap input[type=text].cmb2-oembed{width:100%}.cmb2-wrap textarea{width:500px}.cmb2-wrap textarea.cmb2-textarea-code{font-family:"Courier 10 Pitch",Courier,monospace;line-height:16px}.cmb2-wrap input.cmb2-text-small,.cmb2-wrap input.cmb2-timepicker{width:100px}.cmb2-wrap input.cmb2-text-money{width:90px}.cmb2-wrap input.cmb2-text-medium{width:230px}.cmb2-wrap input.cmb2-upload-file{width:65%}.cmb2-wrap input.ed_button{padding:2px 4px}.cmb2-wrap input:not([type=hidden])+.button-secondary,.cmb2-wrap input:not([type=hidden])+input,.cmb2-wrap input:not([type=hidden])+select{margin-right:20px}.cmb2-wrap ul{margin:0}.cmb2-wrap li{font-size:14px;line-height:16px;margin:1px 0 5px}.cmb2-wrap select{font-size:14px;margin-top:3px}.cmb2-wrap input:focus,.cmb2-wrap textarea:focus{background:#fffff8}.cmb2-wrap input[type=checkbox],.cmb2-wrap input[type=radio]{margin:0 0 0 5px;padding:0}.cmb2-wrap .button-secondary,.cmb2-wrap button{white-space:nowrap}.cmb2-wrap .mceLayout{border:1px solid #e9e9e9!important}.cmb2-wrap .mceIframeContainer{background:#fff}.cmb2-wrap .meta_mce{width:97%}.cmb2-wrap .meta_mce textarea{width:100%}.cmb2-wrap .wp-color-result,.cmb2-wrap .wp-picker-input-wrap{vertical-align:middle}.cmb2-wrap .wp-color-result,.cmb2-wrap .wp-picker-container{margin:0 0 0 10px}.cmb2-wrap .cmb-row{margin:0}.cmb2-wrap .cmb-row:after{content:'';clear:both;display:block;width:100%}.cmb2-wrap .cmb-row.cmb-repeat .cmb2-metabox-description{padding-top:0;padding-bottom:1em}.cmb2-metabox{clear:both;margin:0}.cmb2-metabox .cmb-field-list>.cmb-row:first-of-type>.cmb-td,.cmb2-metabox .cmb-field-list>.cmb-row:first-of-type>.cmb-th,.cmb2-metabox>.cmb-row:first-of-type>.cmb-td,.cmb2-metabox>.cmb-row:first-of-type>.cmb-th{border:0}.cmb-add-row{margin:1.8em 0 0}.cmb-nested .cmb-td,.cmb-repeatable-group .cmb-th,.cmb-repeatable-group:first-of-type{border:0}.cmb-repeatable-group:last-of-type,.cmb-row:last-of-type,.cmb2-wrap .cmb-row:last-of-type{border-bottom:0}.cmb-repeatable-grouping{border:1px solid #e9e9e9;padding:0 1em}.cmb-repeatable-grouping.cmb-row{margin:0 0 .8em}.cmb-th{color:#222;float:right;font-weight:600;line-height:1.3;padding:20px 0 20px 10px;vertical-align:top;width:200px}@media (max-width:450px){.cmb-th{font-size:1.2em;display:block;float:none;padding-bottom:1em;text-align:right;width:100%}.cmb-th label{display:block;margin-top:0;margin-bottom:.5em}}.cmb-td{line-height:1.3;max-width:100%;padding:15px 10px;vertical-align:middle}.cmb-type-title .cmb-td{padding:0}.cmb-th label{display:block;padding:5px 0}.cmb-th+.cmb-td{float:right}.cmb-td .cmb-td{padding-bottom:1em}.cmb-remove-row{text-align:left}.empty-row.hidden{display:none}.cmb-repeat-table{background-color:#fafafa;border:1px solid #e1e1e1}.cmb-repeat-table .cmb-row.cmb-repeat-row{position:relative;counter-increment:el;margin:0;padding:10px 50px 10px 10px;border-bottom:none!important}.cmb-repeat-table .cmb-row.cmb-repeat-row+.cmb-repeat-row{border-top:solid 1px #e9e9e9}.cmb-repeat-table .cmb-row.cmb-repeat-row:before{content:counter(el);display:block;top:0;right:0;position:absolute;width:35px;height:100%;line-height:35px;color:#aaa;text-align:center;border-left:solid 1px #e9e9e9}.cmb-repeat-table .cmb-row.cmb-repeat-row .cmb-td{margin:0;padding:0}.cmb-repeat-table+.cmb-add-row{margin:0}.cmb-repeat-table+.cmb-add-row:before{content:'';width:1px;height:1.6em;display:block;margin-right:17px;background-color:#dcdcdc}.cmb-repeat-table .cmb-remove-row{top:7px;left:7px;position:absolute;width:auto;margin-right:0;padding:0!important;display:none}.cmb-repeat-table .cmb-remove-row>.cmb-remove-row-button{font-size:20px;text-indent:-1000px;overflow:hidden;position:relative;height:auto;line-height:1;padding:0 10px}.cmb-repeat-table .cmb-remove-row>.cmb-remove-row-button:before{content:"";font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;right:0;width:100%;height:100%;text-align:center}.cmb-repeat-table .cmb-repeat-row:hover .cmb-remove-row{display:block}.cmb-repeatable-group .cmb-th{padding:5px}.cmb-repeatable-group .cmb-group-title{background-color:#e9e9e9;padding:8px 2.2em 8px 12px;margin:0 -1em;min-height:1.5em;font-size:14px;line-height:1.4}.cmb-repeatable-group .cmb-group-title h4{border:0;margin:0;font-size:1.2em;font-weight:500;padding:.5em .75em}.cmb-repeatable-group .cmb-group-title .cmb-th{display:block;width:100%}.cmb-repeatable-group .cmb-group-description .cmb-th{font-size:1.2em;display:block;float:none;padding-bottom:1em;text-align:right;width:100%}.cmb-repeatable-group .cmb-group-description .cmb-th label{display:block;margin-top:0;margin-bottom:.5em}.cmb-repeatable-group .cmb-shift-rows{font-size:1em;margin-left:1em;text-decoration:none}.cmb-repeatable-group .cmb-shift-rows .dashicons{font-size:1.5em;height:1.5em;line-height:1.2em;width:1em}.cmb-repeatable-group .cmb-shift-rows .dashicons.dashicons-arrow-down-alt2{line-height:1.3em}.cmb-repeatable-group .cmb2-upload-button{float:left}p.cmb2-metabox-description{color:#aaa;font-style:italic;margin:0;padding-top:.5em}span.cmb2-metabox-description{color:#aaa;font-style:italic}.cmb2-metabox-title{margin:0 0 5px;padding:5px 0 0;font-size:14px}.cmb-inline ul{padding:4px 0 0}.cmb-inline li{display:inline-block;padding-left:18px}.cmb-type-textarea-code pre{margin:0}.cmb2-media-status .img-status{clear:none;display:inline-block;vertical-align:middle;margin-left:10px;width:auto}.cmb2-media-status .img-status img{max-width:350px;height:auto}.cmb2-media-status .embed-status,.cmb2-media-status .img-status img{background:#fff;border:1px solid #e9e9e9;border-radius:2px;-moz-border-radius:2px;margin:15px 0 0;padding:5px}.cmb2-media-status .embed-status{float:right;max-width:800px}.cmb2-media-status .embed-status,.cmb2-media-status .img-status{position:relative}.cmb2-media-status .embed-status .cmb2-remove-file-button,.cmb2-media-status .img-status .cmb2-remove-file-button{background:url(../images/ico-delete.png);height:16px;right:-5px;position:absolute;text-indent:-9999px;top:-5px;width:16px}.cmb2-media-status .img-status .cmb2-remove-file-button{top:10px}.cmb2-media-status .file-status>span,.cmb2-media-status .img-status img{cursor:pointer}.cmb-type-file-list .cmb2-media-status .img-status{clear:none;vertical-align:middle;width:auto;margin-left:10px;margin-bottom:10px;margin-top:0}.cmb-attach-list li{clear:both;display:inline-block;width:100%;margin-top:5px;margin-bottom:10px}.cmb-attach-list li img{cursor:move;float:right;margin-left:10px}.cmb2-remove-wrapper{margin:0}.child-cmb2 .cmb-th{text-align:right}.cmb2-indented-hierarchy{padding-right:1.5em}@media (max-width:450px){.cmb-td,.cmb-th,.cmb-th+.cmb-td{display:block;float:none;width:100%}}#poststuff .cmb-group-title{margin-right:-1em;margin-left:-1em;min-height:1.5em}#poststuff .repeatable .cmb-group-title{padding-right:2.2em}.cmb-type-group .cmb2-wrap,.cmb2-postbox .cmb2-wrap{margin:0}.cmb-type-group .cmb2-wrap>.cmb-field-list>.cmb-row,.cmb2-postbox .cmb2-wrap>.cmb-field-list>.cmb-row{padding:1.8em 0}.cmb-type-group .cmb2-wrap input[type=text].cmb2-oembed,.cmb2-postbox .cmb2-wrap input[type=text].cmb2-oembed{width:100%}.cmb-type-group .cmb-row,.cmb2-postbox .cmb-row{padding:0 0 1.8em;margin:0 0 .8em}.cmb-type-group .cmb-row .cmbhandle,.cmb2-postbox .cmb-row .cmbhandle{left:-1em;position:relative}.cmb-type-group .cmb-repeatable-grouping,.cmb2-postbox .cmb-repeatable-grouping{padding:0 1em;max-width:100%;min-width:1px!important}.cmb-type-group .cmb-repeatable-group>.cmb-row,.cmb2-postbox .cmb-repeatable-group>.cmb-row{padding-bottom:0}.cmb-type-group .cmb-th,.cmb2-postbox .cmb-th{width:18%;padding:0 0 0 2%}.cmb-type-group .cmb-td,.cmb2-postbox .cmb-td{margin-bottom:0;padding:0;line-height:1.3}.cmb-type-group .cmb-th+.cmb-td,.cmb2-postbox .cmb-th+.cmb-td{width:80%;float:left}.cmb-type-group .cmb-repeatable-group:not(:last-of-type),.cmb-type-group .cmb-row:not(:last-of-type),.cmb2-postbox .cmb-repeatable-group:not(:last-of-type),.cmb2-postbox .cmb-row:not(:last-of-type){border-bottom:1px solid #e9e9e9}@media (max-width:450px){.cmb-type-group .cmb-repeatable-group:not(:last-of-type),.cmb-type-group .cmb-row:not(:last-of-type),.cmb2-postbox .cmb-repeatable-group:not(:last-of-type),.cmb2-postbox .cmb-row:not(:last-of-type){border-bottom:0}}.cmb-type-group .cmb-remove-field-row,.cmb-type-group .cmb-repeat-group-field,.cmb2-postbox .cmb-remove-field-row,.cmb2-postbox .cmb-repeat-group-field{padding-top:1.8em}.js .cmb2-postbox.context-box .toggle-indicator:before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.js .cmb2-postbox.context-box.closed .toggle-indicator:before{content:"\f140"}.cmb2-postbox.context-box{margin-bottom:10px}.cmb2-postbox.context-box.context-after_title-box,.cmb2-postbox.context-box.context-before_permalink-box{margin-top:10px}.cmb2-postbox.context-box.context-after_editor-box{margin-top:20px;margin-bottom:0}.cmb2-postbox.context-box.context-form_top-box{margin-top:10px}.cmb2-postbox.context-box.context-form_top-box .hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}.cmb2-postbox.context-box .hndle{cursor:auto}.cmb2-context-wrap{margin-top:10px}.cmb2-context-wrap.cmb2-context-wrap-form_top{margin-left:300px;width:auto}.cmb2-context-wrap.cmb2-context-wrap-no-title .cmb2-metabox{padding:10px}.cmb2-context-wrap .cmb-th{padding:0 0 0 2%;width:18%}.cmb2-context-wrap .cmb-td{width:80%;padding:0}.cmb2-context-wrap .cmb-row{margin-bottom:10px}.cmb2-context-wrap .cmb-row:last-of-type{margin-bottom:0}@media only screen and (max-width:850px){.cmb2-context-wrap.cmb2-context-wrap-form_top{margin-left:0}}.cmb2-options-page{max-width:1200px}.cmb2-options-page.wrap>h2{margin-bottom:1em}.cmb2-options-page .cmb2-metabox>.cmb-row{padding:1em;margin-top:-1px;background:#fff;border:1px solid #e9e9e9;box-shadow:0 1px 1px rgba(0,0,0,.05)}.cmb2-options-page .cmb2-metabox>.cmb-row>.cmb-th{padding:0;font-weight:initial}.cmb2-options-page .cmb2-metabox>.cmb-row>.cmb-th+.cmb-td{float:none;padding:0 1em 0 0;margin-right:200px}@media (max-width:450px){.cmb2-options-page .cmb2-metabox>.cmb-row>.cmb-th+.cmb-td{padding:0;margin-right:0}}.cmb2-options-page .cmb2-wrap .cmb-type-title{margin-top:1em;padding:.6em 1em;background-color:#fafafa}.cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-title{font-size:12px;margin-top:0;margin-bottom:0;text-transform:uppercase}.cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-description{padding-top:.25em}.cmb2-options-page .cmb-repeatable-group .cmb-group-description .cmb-th{padding:0 0 .8em}.cmb2-options-page .cmb-repeatable-group .cmb-group-name{font-size:16px;margin-top:0;margin-bottom:0}.cmb2-options-page .cmb-repeatable-group .cmb-th>.cmb2-metabox-description{font-weight:400;padding-bottom:0!important}#poststuff .cmb-repeatable-group h2{margin:0}.edit-tags-php .cmb2-metabox-title,.profile-php .cmb2-metabox-title,.user-edit-php .cmb2-metabox-title{font-size:1.4em}.cmb2-no-box-wrap .cmb-spinner,.cmb2-postbox .cmb-spinner{float:right;display:none}.cmb-spinner.is-active{display:block}#side-sortables .cmb2-wrap>.cmb-field-list>.cmb-row,.inner-sidebar .cmb2-wrap>.cmb-field-list>.cmb-row{padding:1.4em 0}#side-sortables .cmb2-wrap input[type=text]:not(.wp-color-picker),.inner-sidebar .cmb2-wrap input[type=text]:not(.wp-color-picker){width:100%}#side-sortables .cmb2-wrap input+input:not(.wp-picker-clear),#side-sortables .cmb2-wrap input+select,.inner-sidebar .cmb2-wrap input+input:not(.wp-picker-clear),.inner-sidebar .cmb2-wrap input+select{margin-right:0;margin-top:1em;display:block}#side-sortables .cmb2-wrap input.cmb2-text-money,.inner-sidebar .cmb2-wrap input.cmb2-text-money{max-width:70%}#side-sortables .cmb2-wrap input.cmb2-text-money+.cmb2-metabox-description,.inner-sidebar .cmb2-wrap input.cmb2-text-money+.cmb2-metabox-description{display:block}#side-sortables .cmb2-wrap label,.inner-sidebar .cmb2-wrap label{display:block;font-weight:700;padding:0 0 5px}#side-sortables textarea,.inner-sidebar textarea{max-width:99%}#side-sortables .cmb-repeatable-group,.inner-sidebar .cmb-repeatable-group{border-bottom:1px solid #e9e9e9}#side-sortables .cmb-type-group>.cmb-td>.cmb-repeatable-group,.inner-sidebar .cmb-type-group>.cmb-td>.cmb-repeatable-group{border-bottom:0;margin-bottom:-1.4em}#side-sortables .cmb-td:not(.cmb-remove-row),#side-sortables .cmb-th,#side-sortables .cmb-th+.cmb-td,.inner-sidebar .cmb-td:not(.cmb-remove-row),.inner-sidebar .cmb-th,.inner-sidebar .cmb-th+.cmb-td{width:100%;display:block;float:none}#side-sortables .closed .inside,.inner-sidebar .closed .inside{display:none}#side-sortables .cmb-th,.inner-sidebar .cmb-th{display:block;float:none;padding-bottom:1em;text-align:right;width:100%;padding-right:0;padding-left:0}#side-sortables .cmb-th label,.inner-sidebar .cmb-th label{display:block;margin-top:0;margin-bottom:.5em;font-size:14px;line-height:1.4em}#side-sortables .cmb-group-description .cmb-th,.inner-sidebar .cmb-group-description .cmb-th{padding-top:0}#side-sortables .cmb-group-description .cmb2-metabox-description,#side-sortables .cmb-group-title .cmb-th,.inner-sidebar .cmb-group-description .cmb2-metabox-description,.inner-sidebar .cmb-group-title .cmb-th{padding:0}#side-sortables .cmb-repeatable-grouping+.cmb-repeatable-grouping,.inner-sidebar .cmb-repeatable-grouping+.cmb-repeatable-grouping{margin-top:1em}#side-sortables .cmb2-media-status .embed-status img,#side-sortables .cmb2-media-status .img-status img,.inner-sidebar .cmb2-media-status .embed-status img,.inner-sidebar .cmb2-media-status .img-status img{max-width:90%;height:auto}#side-sortables .cmb2-list label,.inner-sidebar .cmb2-list label{display:inline;font-weight:400}#side-sortables .cmb2-metabox-description,.inner-sidebar .cmb2-metabox-description{display:block;padding:7px 0 0}#side-sortables .cmb-type-checkbox .cmb-td label,#side-sortables .cmb-type-checkbox .cmb2-metabox-description,.inner-sidebar .cmb-type-checkbox .cmb-td label,.inner-sidebar .cmb-type-checkbox .cmb2-metabox-description{font-weight:400;display:inline}#side-sortables .cmb-row .cmb2-metabox-description,.inner-sidebar .cmb-row .cmb2-metabox-description{padding-bottom:1.8em}#side-sortables .cmb2-metabox-title,.inner-sidebar .cmb2-metabox-title{font-size:1.2em;font-style:italic}#side-sortables .cmb-remove-row,.inner-sidebar .cmb-remove-row{clear:both;padding-top:12px;padding-bottom:0}#side-sortables .cmb2-upload-button,.inner-sidebar .cmb2-upload-button{clear:both;margin-top:12px}.cmb2-metabox .cmbhandle{color:#aaa;float:left;width:27px;height:30px;cursor:pointer;left:-1em;position:relative}.cmb2-metabox .cmbhandle:before{content:'\f142';left:12px;font:400 20px/1 dashicons;speak:none;display:inline-block;padding:8px 10px;top:0;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.cmb2-metabox .postbox.closed .cmbhandle:before{content:'\f140'}.cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row{-webkit-appearance:none!important;background:none!important;border:none!important;position:absolute;right:0;top:.5em;line-height:1em;padding:2px 6px 3px;opacity:.5}.cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]){cursor:pointer;color:#a00;opacity:1}.cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]):hover{color:red}* html .cmb2-element.ui-helper-clearfix{height:1%}.cmb2-element .ui-datepicker,.cmb2-element.ui-datepicker{padding:0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:#fff;border:1px solid #dfdfdf;border-top:none;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.075);box-shadow:0 3px 6px rgba(0,0,0,.075);min-width:17em;width:auto}.cmb2-element .ui-datepicker *,.cmb2-element.ui-datepicker *{padding:0;font-family:"Open Sans",sans-serif;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.cmb2-element .ui-datepicker table,.cmb2-element.ui-datepicker table{font-size:13px;margin:0;border:none;border-collapse:collapse}.cmb2-element .ui-datepicker .ui-datepicker-header,.cmb2-element .ui-datepicker .ui-widget-header,.cmb2-element.ui-datepicker .ui-datepicker-header,.cmb2-element.ui-datepicker .ui-widget-header{border:none;color:#fff;font-weight:400}.cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover,.cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover{background:0 0;border-color:transparent;cursor:pointer}.cmb2-element .ui-datepicker .ui-datepicker-title,.cmb2-element.ui-datepicker .ui-datepicker-title{margin:0;padding:10px 0;color:#fff;font-size:14px;line-height:14px;text-align:center}.cmb2-element .ui-datepicker .ui-datepicker-title select,.cmb2-element.ui-datepicker .ui-datepicker-title select{margin-top:-8px;margin-bottom:-8px}.cmb2-element .ui-datepicker .ui-datepicker-next,.cmb2-element .ui-datepicker .ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-datepicker-next,.cmb2-element.ui-datepicker .ui-datepicker-prev{position:relative;top:0;height:34px;width:34px}.cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-next,.cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-next,.cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-prev{border:none}.cmb2-element .ui-datepicker .ui-datepicker-prev,.cmb2-element .ui-datepicker .ui-datepicker-prev-hover,.cmb2-element.ui-datepicker .ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-datepicker-prev-hover{right:0}.cmb2-element .ui-datepicker .ui-datepicker-next,.cmb2-element .ui-datepicker .ui-datepicker-next-hover,.cmb2-element.ui-datepicker .ui-datepicker-next,.cmb2-element.ui-datepicker .ui-datepicker-next-hover{left:0}.cmb2-element .ui-datepicker .ui-datepicker-next span,.cmb2-element .ui-datepicker .ui-datepicker-prev span,.cmb2-element.ui-datepicker .ui-datepicker-next span,.cmb2-element.ui-datepicker .ui-datepicker-prev span{display:none}.cmb2-element .ui-datepicker .ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-datepicker-prev{float:right}.cmb2-element .ui-datepicker .ui-datepicker-next,.cmb2-element.ui-datepicker .ui-datepicker-next{float:left}.cmb2-element .ui-datepicker .ui-datepicker-next:before,.cmb2-element .ui-datepicker .ui-datepicker-prev:before,.cmb2-element.ui-datepicker .ui-datepicker-next:before,.cmb2-element.ui-datepicker .ui-datepicker-prev:before{font:400 20px/34px dashicons;padding-right:7px;color:#fff;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:34px;height:34px}.cmb2-element .ui-datepicker .ui-datepicker-prev:before,.cmb2-element.ui-datepicker .ui-datepicker-prev:before{content:'\f341'}.cmb2-element .ui-datepicker .ui-datepicker-next:before,.cmb2-element.ui-datepicker .ui-datepicker-next:before{content:'\f345'}.cmb2-element .ui-datepicker .ui-datepicker-next-hover:before,.cmb2-element .ui-datepicker .ui-datepicker-prev-hover:before,.cmb2-element.ui-datepicker .ui-datepicker-next-hover:before,.cmb2-element.ui-datepicker .ui-datepicker-prev-hover:before{opacity:.7}.cmb2-element .ui-datepicker select.ui-datepicker-month,.cmb2-element .ui-datepicker select.ui-datepicker-year,.cmb2-element.ui-datepicker select.ui-datepicker-month,.cmb2-element.ui-datepicker select.ui-datepicker-year{width:33%;background:0 0;border-color:transparent;box-shadow:none;color:#fff}.cmb2-element .ui-datepicker select.ui-datepicker-month option,.cmb2-element .ui-datepicker select.ui-datepicker-year option,.cmb2-element.ui-datepicker select.ui-datepicker-month option,.cmb2-element.ui-datepicker select.ui-datepicker-year option{color:#333}.cmb2-element .ui-datepicker thead,.cmb2-element.ui-datepicker thead{color:#fff;font-weight:600}.cmb2-element .ui-datepicker thead th,.cmb2-element.ui-datepicker thead th{font-weight:400}.cmb2-element .ui-datepicker th,.cmb2-element.ui-datepicker th{padding:10px}.cmb2-element .ui-datepicker td,.cmb2-element.ui-datepicker td{padding:0;border:1px solid #f4f4f4}.cmb2-element .ui-datepicker td.ui-datepicker-other-month,.cmb2-element.ui-datepicker td.ui-datepicker-other-month{border:transparent}.cmb2-element .ui-datepicker td.ui-datepicker-week-end,.cmb2-element.ui-datepicker td.ui-datepicker-week-end{background-color:#f4f4f4;border:1px solid #f4f4f4}.cmb2-element .ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today,.cmb2-element.ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today{-webkit-box-shadow:inset 0 0 1px 0 rgba(0,0,0,.1);-moz-box-shadow:inset 0 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 0 1px 0 rgba(0,0,0,.1)}.cmb2-element .ui-datepicker td.ui-datepicker-today,.cmb2-element.ui-datepicker td.ui-datepicker-today{background-color:#f0f0c0}.cmb2-element .ui-datepicker td.ui-datepicker-current-day,.cmb2-element.ui-datepicker td.ui-datepicker-current-day{background:#bd8}.cmb2-element .ui-datepicker td .ui-state-default,.cmb2-element.ui-datepicker td .ui-state-default{background:0 0;border:none;text-align:center;text-decoration:none;width:auto;display:block;padding:5px 10px;font-weight:400;color:#444}.cmb2-element .ui-datepicker td.ui-state-disabled .ui-state-default,.cmb2-element.ui-datepicker td.ui-state-disabled .ui-state-default{opacity:.5}.cmb2-element .ui-datepicker .ui-datepicker-header,.cmb2-element .ui-datepicker .ui-widget-header,.cmb2-element.ui-datepicker .ui-datepicker-header,.cmb2-element.ui-datepicker .ui-widget-header{background:#00a0d2}.cmb2-element .ui-datepicker thead,.cmb2-element.ui-datepicker thead{background:#32373c}.cmb2-element .ui-datepicker td .ui-state-active,.cmb2-element .ui-datepicker td .ui-state-hover,.cmb2-element.ui-datepicker td .ui-state-active,.cmb2-element.ui-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.cmb2-element .ui-datepicker .ui-timepicker-div,.cmb2-element.ui-datepicker .ui-timepicker-div{font-size:14px}.cmb2-element .ui-datepicker .ui-timepicker-div dl,.cmb2-element.ui-datepicker .ui-timepicker-div dl{text-align:right;padding:0 .6em}.cmb2-element .ui-datepicker .ui-timepicker-div dl dt,.cmb2-element.ui-datepicker .ui-timepicker-div dl dt{float:right;clear:right;padding:0 5px 0 0}.cmb2-element .ui-datepicker .ui-timepicker-div dl dd,.cmb2-element.ui-datepicker .ui-timepicker-div dl dd{margin:0 40% 10px 10px}.cmb2-element .ui-datepicker .ui-timepicker-div dl dd select,.cmb2-element.ui-datepicker .ui-timepicker-div dl dd select{width:100%}.cmb2-element .ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane,.cmb2-element.ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane{padding:.6em;text-align:right}.cmb2-element .ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-primary,.cmb2-element .ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-secondary,.cmb2-element.ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-primary,.cmb2-element.ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-secondary{padding:0 10px 1px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:0 .4em .4em .6em}.admin-color-fresh .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-fresh .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-fresh .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-fresh .cmb2-element.ui-datepicker .ui-widget-header{background:#00a0d2}.admin-color-fresh .cmb2-element .ui-datepicker thead,.admin-color-fresh .cmb2-element.ui-datepicker thead{background:#32373c}.admin-color-fresh .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-fresh .cmb2-element.ui-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.admin-color-blue .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-blue .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-blue .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-blue .cmb2-element.ui-datepicker .ui-widget-header{background:#52accc}.admin-color-blue .cmb2-element .ui-datepicker thead,.admin-color-blue .cmb2-element.ui-datepicker thead{background:#4796b3}.admin-color-blue .cmb2-element .ui-datepicker td .ui-state-active,.admin-color-blue .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-blue .cmb2-element.ui-datepicker td .ui-state-active,.admin-color-blue .cmb2-element.ui-datepicker td .ui-state-hover{background:#096484;color:#fff}.admin-color-blue .cmb2-element .ui-datepicker td.ui-datepicker-today,.admin-color-blue .cmb2-element.ui-datepicker td.ui-datepicker-today{background:#eee}.admin-color-coffee .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-coffee .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-coffee .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-coffee .cmb2-element.ui-datepicker .ui-widget-header{background:#59524c}.admin-color-coffee .cmb2-element .ui-datepicker thead,.admin-color-coffee .cmb2-element.ui-datepicker thead{background:#46403c}.admin-color-coffee .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-coffee .cmb2-element.ui-datepicker td .ui-state-hover{background:#c7a589;color:#fff}.admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-widget-header{background:#523f6d}.admin-color-ectoplasm .cmb2-element .ui-datepicker thead,.admin-color-ectoplasm .cmb2-element.ui-datepicker thead{background:#413256}.admin-color-ectoplasm .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-ectoplasm .cmb2-element.ui-datepicker td .ui-state-hover{background:#a3b745;color:#fff}.admin-color-midnight .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-midnight .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-midnight .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-midnight .cmb2-element.ui-datepicker .ui-widget-header{background:#363b3f}.admin-color-midnight .cmb2-element .ui-datepicker thead,.admin-color-midnight .cmb2-element.ui-datepicker thead{background:#26292c}.admin-color-midnight .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-midnight .cmb2-element.ui-datepicker td .ui-state-hover{background:#e14d43;color:#fff}.admin-color-ocean .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-ocean .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-ocean .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-ocean .cmb2-element.ui-datepicker .ui-widget-header{background:#738e96}.admin-color-ocean .cmb2-element .ui-datepicker thead,.admin-color-ocean .cmb2-element.ui-datepicker thead{background:#627c83}.admin-color-ocean .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-ocean .cmb2-element.ui-datepicker td .ui-state-hover{background:#9ebaa0;color:#fff}.admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover,.admin-color-sunrise .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover,.admin-color-sunrise .cmb2-element.ui-datepicker .ui-widget-header{background:#cf4944}.admin-color-sunrise .cmb2-element .ui-datepicker th,.admin-color-sunrise .cmb2-element.ui-datepicker th{border-color:#be3631;background:#be3631}.admin-color-sunrise .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-sunrise .cmb2-element.ui-datepicker td .ui-state-hover{background:#dd823b;color:#fff}.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-light .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-light .cmb2-element.ui-datepicker .ui-widget-header{background:#e5e5e5}.admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-month,.admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-year,.admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-month,.admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-year{color:#555}.admin-color-light .cmb2-element .ui-datepicker thead,.admin-color-light .cmb2-element.ui-datepicker thead{background:#888}.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-next:before,.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-prev:before,.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-title,.admin-color-light .cmb2-element .ui-datepicker td .ui-state-default,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-next:before,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-prev:before,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-title,.admin-color-light .cmb2-element.ui-datepicker td .ui-state-default{color:#555}.admin-color-light .cmb2-element .ui-datepicker td .ui-state-active,.admin-color-light .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-light .cmb2-element.ui-datepicker td .ui-state-active,.admin-color-light .cmb2-element.ui-datepicker td .ui-state-hover{background:#ccc}.admin-color-light .cmb2-element .ui-datepicker td.ui-datepicker-today,.admin-color-light .cmb2-element.ui-datepicker td.ui-datepicker-today{background:#eee}.admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-widget-header{background:#56b274}.admin-color-bbp-evergreen .cmb2-element .ui-datepicker thead,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker thead{background:#36533f}.admin-color-bbp-evergreen .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker td .ui-state-hover{background:#446950;color:#fff}.admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-widget-header{background:#4ca26a}.admin-color-bbp-mint .cmb2-element .ui-datepicker thead,.admin-color-bbp-mint .cmb2-element.ui-datepicker thead{background:#4f6d59}.admin-color-bbp-mint .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-bbp-mint .cmb2-element.ui-datepicker td .ui-state-hover{background:#5fb37c;color:#fff}.closed .inside{display:none}.cmb-repeatable-grouping{position:relative}.cmb-repeatable-grouping .cmb-group-title{margin-right:-1em;margin-left:-1em;min-height:1.5em}.cmb-repeatable-grouping h3{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}.cmb-repeatable-group.repeatable .cmb-group-title{padding-right:2.2em}.cmb-repeatable-group.non-repeatable .cmb-group-title{padding-right:12px}.cmb-type-group .cmb-row .cmbhandle{left:0;position:absolute}.cmb-spinner{background:url(/wp-admin/images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;display:none;float:left;vertical-align:middle;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:4px 10px 0}
 
trunk/vendor/webdevstudios/cmb2/css/cmb2-front.css DELETED
@@ -1,1545 +0,0 @@
1
- @charset "UTF-8";
2
- /**
3
- * CMB2 Styling
4
- */
5
- /*--------------------------------------------------------------
6
- Main Wrap
7
- --------------------------------------------------------------*/
8
- /* line 5, sass/partials/_main_wrap.scss */
9
- .cmb2-wrap {
10
- margin: 0;
11
- }
12
- /* line 8, sass/partials/_main_wrap.scss */
13
- .cmb2-wrap input,
14
- .cmb2-wrap textarea {
15
- font-size: 14px;
16
- max-width: 100%;
17
- padding: 5px;
18
- }
19
- /* line 18, sass/partials/_main_wrap.scss */
20
- .cmb2-wrap input[type=text].cmb2-oembed {
21
- width: 100%;
22
- }
23
- /* line 23, sass/partials/_main_wrap.scss */
24
- .cmb2-wrap textarea {
25
- width: 500px;
26
- }
27
- /* line 26, sass/partials/_main_wrap.scss */
28
- .cmb2-wrap textarea.cmb2-textarea-code {
29
- font-family: "Courier 10 Pitch", Courier, monospace;
30
- line-height: 16px;
31
- }
32
- /* line 34, sass/partials/_main_wrap.scss */
33
- .cmb2-wrap input.cmb2-text-small, .cmb2-wrap input.cmb2-timepicker {
34
- width: 100px;
35
- }
36
- /* line 40, sass/partials/_main_wrap.scss */
37
- .cmb2-wrap input.cmb2-text-money {
38
- width: 90px;
39
- }
40
- /* line 45, sass/partials/_main_wrap.scss */
41
- .cmb2-wrap input.cmb2-text-medium {
42
- width: 230px;
43
- }
44
- /* line 50, sass/partials/_main_wrap.scss */
45
- .cmb2-wrap input.cmb2-upload-file {
46
- width: 65%;
47
- }
48
- /* line 54, sass/partials/_main_wrap.scss */
49
- .cmb2-wrap input.ed_button {
50
- padding: 2px 4px;
51
- }
52
- /* line 59, sass/partials/_main_wrap.scss */
53
- .cmb2-wrap input:not([type="hidden"]) + input,
54
- .cmb2-wrap input:not([type="hidden"]) + .button-secondary,
55
- .cmb2-wrap input:not([type="hidden"]) + select {
56
- margin-left: 20px;
57
- }
58
- /* line 67, sass/partials/_main_wrap.scss */
59
- .cmb2-wrap ul {
60
- margin: 0;
61
- }
62
- /* line 71, sass/partials/_main_wrap.scss */
63
- .cmb2-wrap li {
64
- font-size: 14px;
65
- line-height: 16px;
66
- margin: 1px 0 5px 0;
67
- }
68
- /* line 82, sass/partials/_main_wrap.scss */
69
- .cmb2-wrap select {
70
- font-size: 14px;
71
- margin-top: 3px;
72
- }
73
- /* line 87, sass/partials/_main_wrap.scss */
74
- .cmb2-wrap input:focus,
75
- .cmb2-wrap textarea:focus {
76
- background: #fffff8;
77
- }
78
- /* line 92, sass/partials/_main_wrap.scss */
79
- .cmb2-wrap input[type="radio"] {
80
- margin: 0 5px 0 0;
81
- padding: 0;
82
- }
83
- /* line 97, sass/partials/_main_wrap.scss */
84
- .cmb2-wrap input[type="checkbox"] {
85
- margin: 0 5px 0 0;
86
- padding: 0;
87
- }
88
- /* line 102, sass/partials/_main_wrap.scss */
89
- .cmb2-wrap button,
90
- .cmb2-wrap .button-secondary {
91
- white-space: nowrap;
92
- }
93
- /* line 107, sass/partials/_main_wrap.scss */
94
- .cmb2-wrap .mceLayout {
95
- border: 1px solid #e9e9e9 !important;
96
- }
97
- /* line 111, sass/partials/_main_wrap.scss */
98
- .cmb2-wrap .mceIframeContainer {
99
- background: #fff;
100
- }
101
- /* line 115, sass/partials/_main_wrap.scss */
102
- .cmb2-wrap .meta_mce {
103
- width: 97%;
104
- }
105
- /* line 118, sass/partials/_main_wrap.scss */
106
- .cmb2-wrap .meta_mce textarea {
107
- width: 100%;
108
- }
109
- /* line 124, sass/partials/_main_wrap.scss */
110
- .cmb2-wrap .wp-color-result,
111
- .cmb2-wrap .wp-picker-input-wrap {
112
- vertical-align: middle;
113
- }
114
- /* line 129, sass/partials/_main_wrap.scss */
115
- .cmb2-wrap .wp-color-result,
116
- .cmb2-wrap .wp-picker-container {
117
- margin: 0 10px 0 0;
118
- }
119
- /* line 134, sass/partials/_main_wrap.scss */
120
- .cmb2-wrap .cmb-row {
121
- margin: 0;
122
- }
123
- /* line 137, sass/partials/_main_wrap.scss */
124
- .cmb2-wrap .cmb-row:after {
125
- content: '';
126
- clear: both;
127
- display: block;
128
- width: 100%;
129
- }
130
- /* line 144, sass/partials/_main_wrap.scss */
131
- .cmb2-wrap .cmb-row.cmb-repeat .cmb2-metabox-description {
132
- padding-top: 0;
133
- padding-bottom: 1em;
134
- }
135
-
136
- /* line 152, sass/partials/_main_wrap.scss */
137
- .cmb2-metabox {
138
- clear: both;
139
- margin: 0;
140
- }
141
- /* line 158, sass/partials/_main_wrap.scss */
142
- .cmb2-metabox > .cmb-row:first-of-type > .cmb-td,
143
- .cmb2-metabox > .cmb-row:first-of-type > .cmb-th,
144
- .cmb2-metabox .cmb-field-list > .cmb-row:first-of-type > .cmb-td,
145
- .cmb2-metabox .cmb-field-list > .cmb-row:first-of-type > .cmb-th {
146
- border: 0;
147
- }
148
-
149
- /* line 165, sass/partials/_main_wrap.scss */
150
- .cmb-add-row {
151
- margin: 1.8em 0 0;
152
- }
153
-
154
- /* line 169, sass/partials/_main_wrap.scss */
155
- .cmb-nested .cmb-td,
156
- .cmb-repeatable-group .cmb-th,
157
- .cmb-repeatable-group:first-of-type {
158
- border: 0;
159
- }
160
-
161
- /* line 175, sass/partials/_main_wrap.scss */
162
- .cmb-row:last-of-type,
163
- .cmb2-wrap .cmb-row:last-of-type,
164
- .cmb-repeatable-group:last-of-type {
165
- border-bottom: 0;
166
- }
167
-
168
- /* line 181, sass/partials/_main_wrap.scss */
169
- .cmb-repeatable-grouping {
170
- border: 1px solid #e9e9e9;
171
- padding: 0 1em;
172
- }
173
- /* line 185, sass/partials/_main_wrap.scss */
174
- .cmb-repeatable-grouping.cmb-row {
175
- margin: 0 0 0.8em;
176
- }
177
-
178
- /* line 193, sass/partials/_main_wrap.scss */
179
- .cmb-th {
180
- color: #222222;
181
- float: left;
182
- font-weight: 600;
183
- line-height: 1.3;
184
- padding: 20px 10px 20px 0;
185
- vertical-align: top;
186
- width: 200px;
187
- }
188
- @media (max-width: 450px) {
189
- /* line 193, sass/partials/_main_wrap.scss */
190
- .cmb-th {
191
- font-size: 1.2em;
192
- display: block;
193
- float: none;
194
- padding-bottom: 1em;
195
- text-align: left;
196
- width: 100%;
197
- }
198
- /* line 27, sass/partials/_mixins.scss */
199
- .cmb-th label {
200
- display: block;
201
- margin-top: 0;
202
- margin-bottom: 0.5em;
203
- }
204
- }
205
-
206
- /* line 207, sass/partials/_main_wrap.scss */
207
- .cmb-td {
208
- line-height: 1.3;
209
- max-width: 100%;
210
- padding: 15px 10px;
211
- vertical-align: middle;
212
- }
213
-
214
- /* line 216, sass/partials/_main_wrap.scss */
215
- .cmb-type-title .cmb-td {
216
- padding: 0;
217
- }
218
-
219
- /* line 221, sass/partials/_main_wrap.scss */
220
- .cmb-th label {
221
- display: block;
222
- padding: 5px 0;
223
- }
224
-
225
- /* line 226, sass/partials/_main_wrap.scss */
226
- .cmb-th + .cmb-td {
227
- float: left;
228
- }
229
-
230
- /* line 230, sass/partials/_main_wrap.scss */
231
- .cmb-td .cmb-td {
232
- padding-bottom: 1em;
233
- }
234
-
235
- /* line 234, sass/partials/_main_wrap.scss */
236
- .cmb-remove-row {
237
- text-align: right;
238
- }
239
-
240
- /* line 238, sass/partials/_main_wrap.scss */
241
- .empty-row.hidden {
242
- display: none;
243
- }
244
-
245
- /* line 243, sass/partials/_main_wrap.scss */
246
- .cmb-repeat-table {
247
- background-color: #fafafa;
248
- border: 1px solid #e1e1e1;
249
- }
250
- /* line 247, sass/partials/_main_wrap.scss */
251
- .cmb-repeat-table .cmb-row.cmb-repeat-row {
252
- position: relative;
253
- counter-increment: el;
254
- margin: 0;
255
- padding: 10px 10px 10px 50px;
256
- border-bottom: none !important;
257
- }
258
- /* line 255, sass/partials/_main_wrap.scss */
259
- .cmb-repeat-table .cmb-row.cmb-repeat-row + .cmb-repeat-row {
260
- border-top: solid 1px #e9e9e9;
261
- }
262
- /* line 259, sass/partials/_main_wrap.scss */
263
- .cmb-repeat-table .cmb-row.cmb-repeat-row:before {
264
- content: counter(el);
265
- display: block;
266
- top: 0;
267
- left: 0;
268
- position: absolute;
269
- width: 35px;
270
- height: 100%;
271
- line-height: 35px;
272
- color: #aaaaaa;
273
- text-align: center;
274
- border-right: solid 1px #e9e9e9;
275
- }
276
- /* line 276, sass/partials/_main_wrap.scss */
277
- .cmb-repeat-table .cmb-row.cmb-repeat-row .cmb-td {
278
- margin: 0;
279
- padding: 0;
280
- }
281
- /* line 283, sass/partials/_main_wrap.scss */
282
- .cmb-repeat-table + .cmb-add-row {
283
- margin: 0;
284
- }
285
- /* line 286, sass/partials/_main_wrap.scss */
286
- .cmb-repeat-table + .cmb-add-row:before {
287
- content: '';
288
- width: 1px;
289
- height: 1.6em;
290
- display: block;
291
- margin-left: 17px;
292
- background-color: gainsboro;
293
- }
294
- /* line 296, sass/partials/_main_wrap.scss */
295
- .cmb-repeat-table .cmb-remove-row {
296
- top: 7px;
297
- right: 7px;
298
- position: absolute;
299
- width: auto;
300
- margin-left: 0;
301
- padding: 0 !important;
302
- display: none;
303
- }
304
- /* line 307, sass/partials/_main_wrap.scss */
305
- .cmb-repeat-table .cmb-remove-row > .cmb-remove-row-button {
306
- font-size: 20px;
307
- text-indent: -1000px;
308
- overflow: hidden;
309
- position: relative;
310
- height: auto;
311
- line-height: 1;
312
- padding: 0 10px 0;
313
- }
314
- /* line 318, sass/partials/_main_wrap.scss */
315
- .cmb-repeat-table .cmb-remove-row > .cmb-remove-row-button:before {
316
- content: "";
317
- font-family: 'Dashicons';
318
- speak: none;
319
- font-weight: normal;
320
- font-variant: normal;
321
- text-transform: none;
322
- line-height: 1;
323
- -webkit-font-smoothing: antialiased;
324
- margin: 0;
325
- text-indent: 0;
326
- position: absolute;
327
- top: 0;
328
- left: 0;
329
- width: 100%;
330
- height: 100%;
331
- text-align: center;
332
- }
333
- /* line 324, sass/partials/_main_wrap.scss */
334
- .cmb-repeat-table .cmb-repeat-row:hover .cmb-remove-row {
335
- display: block;
336
- }
337
-
338
- /* line 332, sass/partials/_main_wrap.scss */
339
- .cmb-repeatable-group .cmb-th {
340
- padding: 5px;
341
- }
342
- /* line 336, sass/partials/_main_wrap.scss */
343
- .cmb-repeatable-group .cmb-group-title {
344
- background-color: #e9e9e9;
345
- padding: 8px 12px 8px 2.2em;
346
- margin: 0 -1em;
347
- min-height: 1.5em;
348
- font-size: 14px;
349
- line-height: 1.4;
350
- }
351
- /* line 344, sass/partials/_main_wrap.scss */
352
- .cmb-repeatable-group .cmb-group-title h4 {
353
- border: 0;
354
- margin: 0;
355
- font-size: 1.2em;
356
- font-weight: 500;
357
- padding: 0.5em 0.75em;
358
- }
359
- /* line 352, sass/partials/_main_wrap.scss */
360
- .cmb-repeatable-group .cmb-group-title .cmb-th {
361
- display: block;
362
- width: 100%;
363
- }
364
- /* line 358, sass/partials/_main_wrap.scss */
365
- .cmb-repeatable-group .cmb-group-description .cmb-th {
366
- font-size: 1.2em;
367
- display: block;
368
- float: none;
369
- padding-bottom: 1em;
370
- text-align: left;
371
- width: 100%;
372
- }
373
- /* line 27, sass/partials/_mixins.scss */
374
- .cmb-repeatable-group .cmb-group-description .cmb-th label {
375
- display: block;
376
- margin-top: 0;
377
- margin-bottom: 0.5em;
378
- }
379
- /* line 362, sass/partials/_main_wrap.scss */
380
- .cmb-repeatable-group .cmb-shift-rows {
381
- font-size: 1em;
382
- margin-right: 1em;
383
- text-decoration: none;
384
- }
385
- /* line 367, sass/partials/_main_wrap.scss */
386
- .cmb-repeatable-group .cmb-shift-rows .dashicons {
387
- font-size: 1.5em;
388
- height: 1.5em;
389
- line-height: 1.2em;
390
- width: 1em;
391
- }
392
- /* line 373, sass/partials/_main_wrap.scss */
393
- .cmb-repeatable-group .cmb-shift-rows .dashicons.dashicons-arrow-down-alt2 {
394
- line-height: 1.3em;
395
- }
396
- /* line 380, sass/partials/_main_wrap.scss */
397
- .cmb-repeatable-group .cmb2-upload-button {
398
- float: right;
399
- }
400
-
401
- /* line 386, sass/partials/_main_wrap.scss */
402
- p.cmb2-metabox-description {
403
- color: #aaaaaa;
404
- font-style: italic;
405
- margin: 0;
406
- padding-top: .5em;
407
- }
408
-
409
- /* line 393, sass/partials/_main_wrap.scss */
410
- span.cmb2-metabox-description {
411
- color: #aaaaaa;
412
- font-style: italic;
413
- }
414
-
415
- /* line 398, sass/partials/_main_wrap.scss */
416
- .cmb2-metabox-title {
417
- margin: 0 0 5px 0;
418
- padding: 5px 0 0 0;
419
- font-size: 14px;
420
- }
421
-
422
- /* line 404, sass/partials/_main_wrap.scss */
423
- .cmb-inline ul {
424
- padding: 4px 0 0 0;
425
- }
426
-
427
- /* line 408, sass/partials/_main_wrap.scss */
428
- .cmb-inline li {
429
- display: inline-block;
430
- padding-right: 18px;
431
- }
432
-
433
- /* line 413, sass/partials/_main_wrap.scss */
434
- .cmb-type-textarea-code pre {
435
- margin: 0;
436
- }
437
-
438
- /* line 419, sass/partials/_main_wrap.scss */
439
- .cmb2-media-status .img-status {
440
- clear: none;
441
- display: inline-block;
442
- vertical-align: middle;
443
- margin-right: 10px;
444
- width: auto;
445
- }
446
- /* line 426, sass/partials/_main_wrap.scss */
447
- .cmb2-media-status .img-status img {
448
- max-width: 350px;
449
- height: auto;
450
- }
451
- /* line 432, sass/partials/_main_wrap.scss */
452
- .cmb2-media-status .img-status img,
453
- .cmb2-media-status .embed-status {
454
- background: #ffffff;
455
- border: 1px solid #e9e9e9;
456
- border-radius: 2px;
457
- -moz-border-radius: 2px;
458
- margin: 15px 0 0 0;
459
- padding: 5px;
460
- }
461
- /* line 442, sass/partials/_main_wrap.scss */
462
- .cmb2-media-status .embed-status {
463
- float: left;
464
- max-width: 800px;
465
- }
466
- /* line 447, sass/partials/_main_wrap.scss */
467
- .cmb2-media-status .img-status, .cmb2-media-status .embed-status {
468
- position: relative;
469
- }
470
- /* line 450, sass/partials/_main_wrap.scss */
471
- .cmb2-media-status .img-status .cmb2-remove-file-button, .cmb2-media-status .embed-status .cmb2-remove-file-button {
472
- background: url(../images/ico-delete.png);
473
- height: 16px;
474
- left: -5px;
475
- position: absolute;
476
- text-indent: -9999px;
477
- top: -5px;
478
- width: 16px;
479
- }
480
- /* line 464, sass/partials/_main_wrap.scss */
481
- .cmb2-media-status .img-status .cmb2-remove-file-button {
482
- top: 10px;
483
- }
484
- /* line 469, sass/partials/_main_wrap.scss */
485
- .cmb2-media-status .img-status img, .cmb2-media-status .file-status > span {
486
- cursor: pointer;
487
- }
488
-
489
- /* line 475, sass/partials/_main_wrap.scss */
490
- .cmb-type-file-list .cmb2-media-status .img-status {
491
- clear: none;
492
- vertical-align: middle;
493
- width: auto;
494
- margin-right: 10px;
495
- margin-bottom: 10px;
496
- margin-top: 0;
497
- }
498
-
499
- /* line 484, sass/partials/_main_wrap.scss */
500
- .cmb-attach-list li {
501
- clear: both;
502
- display: inline-block;
503
- width: 100%;
504
- margin-top: 5px;
505
- margin-bottom: 10px;
506
- }
507
- /* line 491, sass/partials/_main_wrap.scss */
508
- .cmb-attach-list li img {
509
- cursor: move;
510
- float: left;
511
- margin-right: 10px;
512
- }
513
-
514
- /* line 498, sass/partials/_main_wrap.scss */
515
- .cmb2-remove-wrapper {
516
- margin: 0;
517
- }
518
-
519
- /* line 502, sass/partials/_main_wrap.scss */
520
- .child-cmb2 .cmb-th {
521
- text-align: left;
522
- }
523
-
524
- /* line 506, sass/partials/_main_wrap.scss */
525
- .cmb2-indented-hierarchy {
526
- padding-left: 1.5em;
527
- }
528
-
529
- @media (max-width: 450px) {
530
- /* line 511, sass/partials/_main_wrap.scss */
531
- .cmb-th,
532
- .cmb-td,
533
- .cmb-th + .cmb-td {
534
- display: block;
535
- float: none;
536
- width: 100%;
537
- }
538
- }
539
- /*--------------------------------------------------------------
540
- Post Metaboxes
541
- --------------------------------------------------------------*/
542
- /* line 4, sass/partials/_post_metaboxes.scss */
543
- #poststuff .cmb-group-title {
544
- margin-left: -1em;
545
- margin-right: -1em;
546
- min-height: 1.5em;
547
- }
548
-
549
- /* line 10, sass/partials/_post_metaboxes.scss */
550
- #poststuff .repeatable .cmb-group-title {
551
- padding-left: 2.2em;
552
- }
553
-
554
- /* line 16, sass/partials/_post_metaboxes.scss */
555
- .cmb2-postbox .cmb2-wrap, .cmb-type-group .cmb2-wrap {
556
- margin: 0;
557
- }
558
- /* line 19, sass/partials/_post_metaboxes.scss */
559
- .cmb2-postbox .cmb2-wrap > .cmb-field-list > .cmb-row, .cmb-type-group .cmb2-wrap > .cmb-field-list > .cmb-row {
560
- padding: 1.8em 0;
561
- }
562
- /* line 25, sass/partials/_post_metaboxes.scss */
563
- .cmb2-postbox .cmb2-wrap input[type=text].cmb2-oembed, .cmb-type-group .cmb2-wrap input[type=text].cmb2-oembed {
564
- width: 100%;
565
- }
566
- /* line 31, sass/partials/_post_metaboxes.scss */
567
- .cmb2-postbox .cmb-row, .cmb-type-group .cmb-row {
568
- padding: 0 0 1.8em;
569
- margin: 0 0 0.8em;
570
- }
571
- /* line 35, sass/partials/_post_metaboxes.scss */
572
- .cmb2-postbox .cmb-row .cmbhandle, .cmb-type-group .cmb-row .cmbhandle {
573
- right: -1em;
574
- position: relative;
575
- }
576
- /* line 41, sass/partials/_post_metaboxes.scss */
577
- .cmb2-postbox .cmb-repeatable-grouping, .cmb-type-group .cmb-repeatable-grouping {
578
- padding: 0 1em;
579
- max-width: 100%;
580
- min-width: 1px !important;
581
- }
582
- /* line 47, sass/partials/_post_metaboxes.scss */
583
- .cmb2-postbox .cmb-repeatable-group > .cmb-row, .cmb-type-group .cmb-repeatable-group > .cmb-row {
584
- padding-bottom: 0;
585
- }
586
- /* line 51, sass/partials/_post_metaboxes.scss */
587
- .cmb2-postbox .cmb-th, .cmb-type-group .cmb-th {
588
- width: 18%;
589
- padding: 0 2% 0 0;
590
- }
591
- /* line 57, sass/partials/_post_metaboxes.scss */
592
- .cmb2-postbox .cmb-td, .cmb-type-group .cmb-td {
593
- margin-bottom: 0;
594
- padding: 0;
595
- line-height: 1.3;
596
- }
597
- /* line 63, sass/partials/_post_metaboxes.scss */
598
- .cmb2-postbox .cmb-th + .cmb-td, .cmb-type-group .cmb-th + .cmb-td {
599
- width: 80%;
600
- float: right;
601
- }
602
- /* line 68, sass/partials/_post_metaboxes.scss */
603
- .cmb2-postbox .cmb-row:not(:last-of-type),
604
- .cmb2-postbox .cmb-repeatable-group:not(:last-of-type), .cmb-type-group .cmb-row:not(:last-of-type),
605
- .cmb-type-group .cmb-repeatable-group:not(:last-of-type) {
606
- border-bottom: 1px solid #e9e9e9;
607
- }
608
- @media (max-width: 450px) {
609
- /* line 68, sass/partials/_post_metaboxes.scss */
610
- .cmb2-postbox .cmb-row:not(:last-of-type),
611
- .cmb2-postbox .cmb-repeatable-group:not(:last-of-type), .cmb-type-group .cmb-row:not(:last-of-type),
612
- .cmb-type-group .cmb-repeatable-group:not(:last-of-type) {
613
- border-bottom: 0;
614
- }
615
- }
616
- /* line 77, sass/partials/_post_metaboxes.scss */
617
- .cmb2-postbox .cmb-repeat-group-field,
618
- .cmb2-postbox .cmb-remove-field-row, .cmb-type-group .cmb-repeat-group-field,
619
- .cmb-type-group .cmb-remove-field-row {
620
- padding-top: 1.8em;
621
- }
622
-
623
- /*--------------------------------------------------------------
624
- Context Metaboxes
625
- --------------------------------------------------------------*/
626
- /* Metabox collapse arrow indicators */
627
- /* line 9, sass/partials/_context_metaboxes.scss */
628
- .js .cmb2-postbox.context-box .toggle-indicator:before {
629
- content: "\f142";
630
- display: inline-block;
631
- font: normal 20px/1 dashicons;
632
- speak: none;
633
- -webkit-font-smoothing: antialiased;
634
- -moz-osx-font-smoothing: grayscale;
635
- text-decoration: none !important;
636
- }
637
- /* line 22, sass/partials/_context_metaboxes.scss */
638
- .js .cmb2-postbox.context-box.closed .toggle-indicator:before {
639
- content: "\f140";
640
- }
641
-
642
- /* line 30, sass/partials/_context_metaboxes.scss */
643
- .cmb2-postbox.context-box {
644
- margin-bottom: 10px;
645
- }
646
- /* line 34, sass/partials/_context_metaboxes.scss */
647
- .cmb2-postbox.context-box.context-before_permalink-box {
648
- margin-top: 10px;
649
- }
650
- /* line 38, sass/partials/_context_metaboxes.scss */
651
- .cmb2-postbox.context-box.context-after_title-box {
652
- margin-top: 10px;
653
- }
654
- /* line 42, sass/partials/_context_metaboxes.scss */
655
- .cmb2-postbox.context-box.context-after_editor-box {
656
- margin-top: 20px;
657
- margin-bottom: 0;
658
- }
659
- /* line 47, sass/partials/_context_metaboxes.scss */
660
- .cmb2-postbox.context-box.context-form_top-box {
661
- margin-top: 10px;
662
- }
663
- /* line 51, sass/partials/_context_metaboxes.scss */
664
- .cmb2-postbox.context-box.context-form_top-box .hndle {
665
- font-size: 14px;
666
- padding: 8px 12px;
667
- margin: 0;
668
- line-height: 1.4;
669
- }
670
- /* line 59, sass/partials/_context_metaboxes.scss */
671
- .cmb2-postbox.context-box .hndle {
672
- cursor: auto;
673
- }
674
-
675
- /* line 64, sass/partials/_context_metaboxes.scss */
676
- .cmb2-context-wrap {
677
- margin-top: 10px;
678
- }
679
- /* line 68, sass/partials/_context_metaboxes.scss */
680
- .cmb2-context-wrap.cmb2-context-wrap-form_top {
681
- margin-right: 300px;
682
- width: auto;
683
- }
684
- /* line 75, sass/partials/_context_metaboxes.scss */
685
- .cmb2-context-wrap.cmb2-context-wrap-no-title .cmb2-metabox {
686
- padding: 10px;
687
- }
688
- /* line 80, sass/partials/_context_metaboxes.scss */
689
- .cmb2-context-wrap .cmb-th {
690
- padding: 0 2% 0 0;
691
- width: 18%;
692
- }
693
- /* line 85, sass/partials/_context_metaboxes.scss */
694
- .cmb2-context-wrap .cmb-td {
695
- width: 80%;
696
- padding: 0;
697
- }
698
- /* line 90, sass/partials/_context_metaboxes.scss */
699
- .cmb2-context-wrap .cmb-row {
700
- margin-bottom: 10px;
701
- }
702
- /* line 93, sass/partials/_context_metaboxes.scss */
703
- .cmb2-context-wrap .cmb-row:last-of-type {
704
- margin-bottom: 0;
705
- }
706
-
707
- /* one column on the post write/edit screen */
708
- @media only screen and (max-width: 850px) {
709
- /* line 103, sass/partials/_context_metaboxes.scss */
710
- .cmb2-context-wrap.cmb2-context-wrap-form_top {
711
- margin-right: 0;
712
- }
713
- }
714
- /*--------------------------------------------------------------
715
- Options page
716
- --------------------------------------------------------------*/
717
- /* line 4, sass/partials/_options-page.scss */
718
- .cmb2-options-page {
719
- max-width: 1200px;
720
- }
721
- /* line 7, sass/partials/_options-page.scss */
722
- .cmb2-options-page.wrap > h2 {
723
- margin-bottom: 1em;
724
- }
725
- /* line 11, sass/partials/_options-page.scss */
726
- .cmb2-options-page .cmb2-metabox > .cmb-row {
727
- padding: 1em;
728
- margin-top: -1px;
729
- background: #ffffff;
730
- border: 1px solid #e9e9e9;
731
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
732
- }
733
- /* line 18, sass/partials/_options-page.scss */
734
- .cmb2-options-page .cmb2-metabox > .cmb-row > .cmb-th {
735
- padding: 0;
736
- font-weight: initial;
737
- }
738
- /* line 23, sass/partials/_options-page.scss */
739
- .cmb2-options-page .cmb2-metabox > .cmb-row > .cmb-th + .cmb-td {
740
- float: none;
741
- padding: 0 0 0 1em;
742
- margin-left: 200px;
743
- }
744
- @media (max-width: 450px) {
745
- /* line 23, sass/partials/_options-page.scss */
746
- .cmb2-options-page .cmb2-metabox > .cmb-row > .cmb-th + .cmb-td {
747
- padding: 0;
748
- margin-left: 0;
749
- }
750
- }
751
- /* line 36, sass/partials/_options-page.scss */
752
- .cmb2-options-page .cmb2-wrap .cmb-type-title {
753
- margin-top: 1em;
754
- padding: 0.6em 1em;
755
- background-color: #fafafa;
756
- }
757
- /* line 41, sass/partials/_options-page.scss */
758
- .cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-title {
759
- font-size: 12px;
760
- margin-top: 0;
761
- margin-bottom: 0;
762
- text-transform: uppercase;
763
- }
764
- /* line 48, sass/partials/_options-page.scss */
765
- .cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-description {
766
- padding-top: 0.25em;
767
- }
768
- /* line 54, sass/partials/_options-page.scss */
769
- .cmb2-options-page .cmb-repeatable-group .cmb-group-description .cmb-th {
770
- padding: 0 0 0.8em 0;
771
- }
772
- /* line 58, sass/partials/_options-page.scss */
773
- .cmb2-options-page .cmb-repeatable-group .cmb-group-name {
774
- font-size: 16px;
775
- margin-top: 0;
776
- margin-bottom: 0;
777
- }
778
- /* line 64, sass/partials/_options-page.scss */
779
- .cmb2-options-page .cmb-repeatable-group .cmb-th > .cmb2-metabox-description {
780
- font-weight: 400;
781
- padding-bottom: 0 !important;
782
- }
783
-
784
- /*--------------------------------------------------------------
785
- Misc.
786
- --------------------------------------------------------------*/
787
- /* line 5, sass/partials/_misc.scss */
788
- #poststuff .cmb-repeatable-group h2 {
789
- margin: 0;
790
- }
791
-
792
- /* line 12, sass/partials/_misc.scss */
793
- .edit-tags-php .cmb2-metabox-title,
794
- .profile-php .cmb2-metabox-title,
795
- .user-edit-php .cmb2-metabox-title {
796
- font-size: 1.4em;
797
- }
798
-
799
- /* line 18, sass/partials/_misc.scss */
800
- .cmb2-postbox .cmb-spinner, .cmb2-no-box-wrap .cmb-spinner {
801
- float: left;
802
- display: none;
803
- }
804
-
805
- /* line 24, sass/partials/_misc.scss */
806
- .cmb-spinner {
807
- display: none;
808
- }
809
- /* line 26, sass/partials/_misc.scss */
810
- .cmb-spinner.is-active {
811
- display: block;
812
- }
813
-
814
- /*--------------------------------------------------------------
815
- Sidebar Placement Adjustments
816
- --------------------------------------------------------------*/
817
- /* line 10, sass/partials/_sidebar_placements.scss */
818
- .inner-sidebar .cmb2-wrap > .cmb-field-list > .cmb-row,
819
- #side-sortables .cmb2-wrap > .cmb-field-list > .cmb-row {
820
- padding: 1.4em 0;
821
- }
822
- /* line 16, sass/partials/_sidebar_placements.scss */
823
- .inner-sidebar .cmb2-wrap input[type=text]:not(.wp-color-picker),
824
- #side-sortables .cmb2-wrap input[type=text]:not(.wp-color-picker) {
825
- width: 100%;
826
- }
827
- /* line 20, sass/partials/_sidebar_placements.scss */
828
- .inner-sidebar .cmb2-wrap input + input:not(.wp-picker-clear), .inner-sidebar .cmb2-wrap input + select,
829
- #side-sortables .cmb2-wrap input + input:not(.wp-picker-clear),
830
- #side-sortables .cmb2-wrap input + select {
831
- margin-left: 0;
832
- margin-top: 1em;
833
- display: block;
834
- }
835
- /* line 26, sass/partials/_sidebar_placements.scss */
836
- .inner-sidebar .cmb2-wrap input.cmb2-text-money,
837
- #side-sortables .cmb2-wrap input.cmb2-text-money {
838
- max-width: 70%;
839
- }
840
- /* line 28, sass/partials/_sidebar_placements.scss */
841
- .inner-sidebar .cmb2-wrap input.cmb2-text-money + .cmb2-metabox-description,
842
- #side-sortables .cmb2-wrap input.cmb2-text-money + .cmb2-metabox-description {
843
- display: block;
844
- }
845
- /* line 34, sass/partials/_sidebar_placements.scss */
846
- .inner-sidebar .cmb2-wrap label,
847
- #side-sortables .cmb2-wrap label {
848
- display: block;
849
- font-weight: 700;
850
- padding: 0 0 5px;
851
- }
852
- /* line 42, sass/partials/_sidebar_placements.scss */
853
- .inner-sidebar textarea,
854
- #side-sortables textarea {
855
- max-width: 99%;
856
- }
857
- /* line 46, sass/partials/_sidebar_placements.scss */
858
- .inner-sidebar .cmb-repeatable-group,
859
- #side-sortables .cmb-repeatable-group {
860
- border-bottom: 1px solid #e9e9e9;
861
- }
862
- /* line 50, sass/partials/_sidebar_placements.scss */
863
- .inner-sidebar .cmb-type-group > .cmb-td > .cmb-repeatable-group,
864
- #side-sortables .cmb-type-group > .cmb-td > .cmb-repeatable-group {
865
- border-bottom: 0;
866
- margin-bottom: -1.4em;
867
- }
868
- /* line 55, sass/partials/_sidebar_placements.scss */
869
- .inner-sidebar .cmb-th,
870
- .inner-sidebar .cmb-td:not(.cmb-remove-row),
871
- .inner-sidebar .cmb-th + .cmb-td,
872
- #side-sortables .cmb-th,
873
- #side-sortables .cmb-td:not(.cmb-remove-row),
874
- #side-sortables .cmb-th + .cmb-td {
875
- width: 100%;
876
- display: block;
877
- float: none;
878
- }
879
- /* line 63, sass/partials/_sidebar_placements.scss */
880
- .inner-sidebar .closed .inside,
881
- #side-sortables .closed .inside {
882
- display: none;
883
- }
884
- /* line 67, sass/partials/_sidebar_placements.scss */
885
- .inner-sidebar .cmb-th,
886
- #side-sortables .cmb-th {
887
- display: block;
888
- float: none;
889
- padding-bottom: 1em;
890
- text-align: left;
891
- width: 100%;
892
- padding-left: 0;
893
- padding-right: 0;
894
- }
895
- /* line 27, sass/partials/_mixins.scss */
896
- .inner-sidebar .cmb-th label,
897
- #side-sortables .cmb-th label {
898
- display: block;
899
- margin-top: 0;
900
- margin-bottom: 0.5em;
901
- }
902
- /* line 14, sass/partials/_mixins.scss */
903
- .inner-sidebar .cmb-th label,
904
- #side-sortables .cmb-th label {
905
- font-size: 14px;
906
- line-height: 1.4em;
907
- }
908
- /* line 74, sass/partials/_sidebar_placements.scss */
909
- .inner-sidebar .cmb-group-description .cmb-th,
910
- #side-sortables .cmb-group-description .cmb-th {
911
- padding-top: 0;
912
- }
913
- /* line 77, sass/partials/_sidebar_placements.scss */
914
- .inner-sidebar .cmb-group-description .cmb2-metabox-description,
915
- #side-sortables .cmb-group-description .cmb2-metabox-description {
916
- padding: 0;
917
- }
918
- /* line 84, sass/partials/_sidebar_placements.scss */
919
- .inner-sidebar .cmb-group-title .cmb-th,
920
- #side-sortables .cmb-group-title .cmb-th {
921
- padding: 0;
922
- }
923
- /* line 90, sass/partials/_sidebar_placements.scss */
924
- .inner-sidebar .cmb-repeatable-grouping + .cmb-repeatable-grouping,
925
- #side-sortables .cmb-repeatable-grouping + .cmb-repeatable-grouping {
926
- margin-top: 1em;
927
- }
928
- /* line 99, sass/partials/_sidebar_placements.scss */
929
- .inner-sidebar .cmb2-media-status .img-status img,
930
- .inner-sidebar .cmb2-media-status .embed-status img,
931
- #side-sortables .cmb2-media-status .img-status img,
932
- #side-sortables .cmb2-media-status .embed-status img {
933
- max-width: 90%;
934
- height: auto;
935
- }
936
- /* line 107, sass/partials/_sidebar_placements.scss */
937
- .inner-sidebar .cmb2-list label,
938
- #side-sortables .cmb2-list label {
939
- display: inline;
940
- font-weight: normal;
941
- }
942
- /* line 112, sass/partials/_sidebar_placements.scss */
943
- .inner-sidebar .cmb2-metabox-description,
944
- #side-sortables .cmb2-metabox-description {
945
- display: block;
946
- padding: 7px 0 0;
947
- }
948
- /* line 119, sass/partials/_sidebar_placements.scss */
949
- .inner-sidebar .cmb-type-checkbox .cmb-td label,
950
- .inner-sidebar .cmb-type-checkbox .cmb2-metabox-description,
951
- #side-sortables .cmb-type-checkbox .cmb-td label,
952
- #side-sortables .cmb-type-checkbox .cmb2-metabox-description {
953
- font-weight: normal;
954
- display: inline;
955
- }
956
- /* line 126, sass/partials/_sidebar_placements.scss */
957
- .inner-sidebar .cmb-row .cmb2-metabox-description,
958
- #side-sortables .cmb-row .cmb2-metabox-description {
959
- padding-bottom: 1.8em;
960
- }
961
- /* line 130, sass/partials/_sidebar_placements.scss */
962
- .inner-sidebar .cmb2-metabox-title,
963
- #side-sortables .cmb2-metabox-title {
964
- font-size: 1.2em;
965
- font-style: italic;
966
- }
967
- /* line 135, sass/partials/_sidebar_placements.scss */
968
- .inner-sidebar .cmb-remove-row,
969
- #side-sortables .cmb-remove-row {
970
- clear: both;
971
- padding-top: 12px;
972
- padding-bottom: 0;
973
- }
974
- /* line 141, sass/partials/_sidebar_placements.scss */
975
- .inner-sidebar .cmb2-upload-button,
976
- #side-sortables .cmb2-upload-button {
977
- clear: both;
978
- margin-top: 12px;
979
- }
980
-
981
- /* line 2, sass/partials/_collapsible_ui.scss */
982
- .cmb2-metabox .cmbhandle {
983
- color: #aaa;
984
- float: right;
985
- width: 27px;
986
- height: 30px;
987
- cursor: pointer;
988
- right: -1em;
989
- position: relative;
990
- }
991
- /* line 10, sass/partials/_collapsible_ui.scss */
992
- .cmb2-metabox .cmbhandle:before {
993
- content: '\f142';
994
- right: 12px;
995
- font: normal 20px/1 'dashicons';
996
- speak: none;
997
- display: inline-block;
998
- padding: 8px 10px;
999
- top: 0;
1000
- position: relative;
1001
- -webkit-font-smoothing: antialiased;
1002
- -moz-osx-font-smoothing: grayscale;
1003
- text-decoration: none !important;
1004
- }
1005
- /* line 27, sass/partials/_collapsible_ui.scss */
1006
- .cmb2-metabox .postbox.closed .cmbhandle:before {
1007
- content: '\f140';
1008
- }
1009
- /* line 33, sass/partials/_collapsible_ui.scss */
1010
- .cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row {
1011
- -webkit-appearance: none !important;
1012
- background: none !important;
1013
- border: none !important;
1014
- position: absolute;
1015
- left: 0;
1016
- top: .5em;
1017
- line-height: 1em;
1018
- padding: 2px 6px 3px;
1019
- opacity: .5;
1020
- }
1021
- /* line 43, sass/partials/_collapsible_ui.scss */
1022
- .cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]) {
1023
- cursor: pointer;
1024
- color: #a00;
1025
- opacity: 1;
1026
- }
1027
- /* line 47, sass/partials/_collapsible_ui.scss */
1028
- .cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]):hover {
1029
- color: #f00;
1030
- }
1031
-
1032
- /*
1033
- * jQuery UI CSS Framework 1.8.16
1034
- *
1035
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
1036
- * Dual licensed under the MIT or GPL Version 2 licenses.
1037
- * http://jquery.org/license
1038
- *
1039
- * http://docs.jquery.com/UI/Theming/API
1040
- *
1041
- * WordPress Styles adopted from "jQuery UI Datepicker CSS for WordPress"
1042
- * https://github.com/stuttter/wp-datepicker-styling
1043
- *
1044
- */
1045
- /* line 15, sass/partials/_jquery_ui.scss */
1046
- * html .cmb2-element.ui-helper-clearfix {
1047
- height: 1%;
1048
- }
1049
-
1050
- /* line 24, sass/partials/_jquery_ui.scss */
1051
- .cmb2-element.ui-datepicker, .cmb2-element .ui-datepicker {
1052
- padding: 0;
1053
- margin: 0;
1054
- -webkit-border-radius: 0;
1055
- -moz-border-radius: 0;
1056
- border-radius: 0;
1057
- background-color: #fff;
1058
- border: 1px solid #dfdfdf;
1059
- border-top: none;
1060
- -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075);
1061
- box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075);
1062
- min-width: 17em;
1063
- width: auto;
1064
- /* Default Color Scheme */
1065
- }
1066
- /* line 38, sass/partials/_jquery_ui.scss */
1067
- .cmb2-element.ui-datepicker *, .cmb2-element .ui-datepicker * {
1068
- padding: 0;
1069
- font-family: "Open Sans", sans-serif;
1070
- -webkit-border-radius: 0;
1071
- -moz-border-radius: 0;
1072
- border-radius: 0;
1073
- }
1074
- /* line 46, sass/partials/_jquery_ui.scss */
1075
- .cmb2-element.ui-datepicker table, .cmb2-element .ui-datepicker table {
1076
- font-size: 13px;
1077
- margin: 0;
1078
- border: none;
1079
- border-collapse: collapse;
1080
- }
1081
- /* line 53, sass/partials/_jquery_ui.scss */
1082
- .cmb2-element.ui-datepicker .ui-widget-header,
1083
- .cmb2-element.ui-datepicker .ui-datepicker-header, .cmb2-element .ui-datepicker .ui-widget-header,
1084
- .cmb2-element .ui-datepicker .ui-datepicker-header {
1085
- background-image: none;
1086
- border: none;
1087
- color: #fff;
1088
- font-weight: normal;
1089
- }
1090
- /* line 61, sass/partials/_jquery_ui.scss */
1091
- .cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover, .cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover {
1092
- background: transparent;
1093
- border-color: transparent;
1094
- cursor: pointer;
1095
- }
1096
- /* line 67, sass/partials/_jquery_ui.scss */
1097
- .cmb2-element.ui-datepicker .ui-datepicker-title, .cmb2-element .ui-datepicker .ui-datepicker-title {
1098
- margin: 0;
1099
- padding: 10px 0;
1100
- color: #fff;
1101
- font-size: 14px;
1102
- line-height: 14px;
1103
- text-align: center;
1104
- }
1105
- /* line 75, sass/partials/_jquery_ui.scss */
1106
- .cmb2-element.ui-datepicker .ui-datepicker-title select, .cmb2-element .ui-datepicker .ui-datepicker-title select {
1107
- margin-top: -8px;
1108
- margin-bottom: -8px;
1109
- }
1110
- /* line 81, sass/partials/_jquery_ui.scss */
1111
- .cmb2-element.ui-datepicker .ui-datepicker-prev,
1112
- .cmb2-element.ui-datepicker .ui-datepicker-next, .cmb2-element .ui-datepicker .ui-datepicker-prev,
1113
- .cmb2-element .ui-datepicker .ui-datepicker-next {
1114
- position: relative;
1115
- top: 0;
1116
- height: 34px;
1117
- width: 34px;
1118
- }
1119
- /* line 89, sass/partials/_jquery_ui.scss */
1120
- .cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-prev,
1121
- .cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-next, .cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-prev,
1122
- .cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-next {
1123
- border: none;
1124
- }
1125
- /* line 94, sass/partials/_jquery_ui.scss */
1126
- .cmb2-element.ui-datepicker .ui-datepicker-prev,
1127
- .cmb2-element.ui-datepicker .ui-datepicker-prev-hover, .cmb2-element .ui-datepicker .ui-datepicker-prev,
1128
- .cmb2-element .ui-datepicker .ui-datepicker-prev-hover {
1129
- left: 0;
1130
- }
1131
- /* line 99, sass/partials/_jquery_ui.scss */
1132
- .cmb2-element.ui-datepicker .ui-datepicker-next,
1133
- .cmb2-element.ui-datepicker .ui-datepicker-next-hover, .cmb2-element .ui-datepicker .ui-datepicker-next,
1134
- .cmb2-element .ui-datepicker .ui-datepicker-next-hover {
1135
- right: 0;
1136
- }
1137
- /* line 104, sass/partials/_jquery_ui.scss */
1138
- .cmb2-element.ui-datepicker .ui-datepicker-next span,
1139
- .cmb2-element.ui-datepicker .ui-datepicker-prev span, .cmb2-element .ui-datepicker .ui-datepicker-next span,
1140
- .cmb2-element .ui-datepicker .ui-datepicker-prev span {
1141
- display: none;
1142
- }
1143
- /* line 109, sass/partials/_jquery_ui.scss */
1144
- .cmb2-element.ui-datepicker .ui-datepicker-prev, .cmb2-element .ui-datepicker .ui-datepicker-prev {
1145
- float: left;
1146
- }
1147
- /* line 113, sass/partials/_jquery_ui.scss */
1148
- .cmb2-element.ui-datepicker .ui-datepicker-next, .cmb2-element .ui-datepicker .ui-datepicker-next {
1149
- float: right;
1150
- }
1151
- /* line 117, sass/partials/_jquery_ui.scss */
1152
- .cmb2-element.ui-datepicker .ui-datepicker-prev:before,
1153
- .cmb2-element.ui-datepicker .ui-datepicker-next:before, .cmb2-element .ui-datepicker .ui-datepicker-prev:before,
1154
- .cmb2-element .ui-datepicker .ui-datepicker-next:before {
1155
- font: normal 20px/34px 'dashicons';
1156
- padding-left: 7px;
1157
- color: #fff;
1158
- speak: none;
1159
- -webkit-font-smoothing: antialiased;
1160
- -moz-osx-font-smoothing: grayscale;
1161
- width: 34px;
1162
- height: 34px;
1163
- }
1164
- /* line 129, sass/partials/_jquery_ui.scss */
1165
- .cmb2-element.ui-datepicker .ui-datepicker-prev:before, .cmb2-element .ui-datepicker .ui-datepicker-prev:before {
1166
- content: '\f341';
1167
- }
1168
- /* line 133, sass/partials/_jquery_ui.scss */
1169
- .cmb2-element.ui-datepicker .ui-datepicker-next:before, .cmb2-element .ui-datepicker .ui-datepicker-next:before {
1170
- content: '\f345';
1171
- }
1172
- /* line 137, sass/partials/_jquery_ui.scss */
1173
- .cmb2-element.ui-datepicker .ui-datepicker-prev-hover:before,
1174
- .cmb2-element.ui-datepicker .ui-datepicker-next-hover:before, .cmb2-element .ui-datepicker .ui-datepicker-prev-hover:before,
1175
- .cmb2-element .ui-datepicker .ui-datepicker-next-hover:before {
1176
- opacity: 0.7;
1177
- }
1178
- /* line 142, sass/partials/_jquery_ui.scss */
1179
- .cmb2-element.ui-datepicker select.ui-datepicker-month,
1180
- .cmb2-element.ui-datepicker select.ui-datepicker-year, .cmb2-element .ui-datepicker select.ui-datepicker-month,
1181
- .cmb2-element .ui-datepicker select.ui-datepicker-year {
1182
- width: 33%;
1183
- background: transparent;
1184
- border-color: transparent;
1185
- box-shadow: none;
1186
- color: #fff;
1187
- }
1188
- /* line 149, sass/partials/_jquery_ui.scss */
1189
- .cmb2-element.ui-datepicker select.ui-datepicker-month option,
1190
- .cmb2-element.ui-datepicker select.ui-datepicker-year option, .cmb2-element .ui-datepicker select.ui-datepicker-month option,
1191
- .cmb2-element .ui-datepicker select.ui-datepicker-year option {
1192
- color: #333;
1193
- }
1194
- /* line 154, sass/partials/_jquery_ui.scss */
1195
- .cmb2-element.ui-datepicker thead, .cmb2-element .ui-datepicker thead {
1196
- color: #fff;
1197
- font-weight: 600;
1198
- }
1199
- /* line 157, sass/partials/_jquery_ui.scss */
1200
- .cmb2-element.ui-datepicker thead th, .cmb2-element .ui-datepicker thead th {
1201
- font-weight: normal;
1202
- }
1203
- /* line 162, sass/partials/_jquery_ui.scss */
1204
- .cmb2-element.ui-datepicker th, .cmb2-element .ui-datepicker th {
1205
- padding: 10px;
1206
- }
1207
- /* line 166, sass/partials/_jquery_ui.scss */
1208
- .cmb2-element.ui-datepicker td, .cmb2-element .ui-datepicker td {
1209
- padding: 0;
1210
- border: 1px solid #f4f4f4;
1211
- }
1212
- /* line 171, sass/partials/_jquery_ui.scss */
1213
- .cmb2-element.ui-datepicker td.ui-datepicker-other-month, .cmb2-element .ui-datepicker td.ui-datepicker-other-month {
1214
- border: transparent;
1215
- }
1216
- /* line 175, sass/partials/_jquery_ui.scss */
1217
- .cmb2-element.ui-datepicker td.ui-datepicker-week-end, .cmb2-element .ui-datepicker td.ui-datepicker-week-end {
1218
- background-color: #f4f4f4;
1219
- border: 1px solid #f4f4f4;
1220
- }
1221
- /* line 178, sass/partials/_jquery_ui.scss */
1222
- .cmb2-element.ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today, .cmb2-element .ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today {
1223
- -webkit-box-shadow: inset 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
1224
- -moz-box-shadow: inset 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
1225
- box-shadow: inset 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
1226
- }
1227
- /* line 185, sass/partials/_jquery_ui.scss */
1228
- .cmb2-element.ui-datepicker td.ui-datepicker-today, .cmb2-element .ui-datepicker td.ui-datepicker-today {
1229
- background-color: #f0f0c0;
1230
- }
1231
- /* line 189, sass/partials/_jquery_ui.scss */
1232
- .cmb2-element.ui-datepicker td.ui-datepicker-current-day, .cmb2-element .ui-datepicker td.ui-datepicker-current-day {
1233
- background: #bbdd88;
1234
- }
1235
- /* line 193, sass/partials/_jquery_ui.scss */
1236
- .cmb2-element.ui-datepicker td .ui-state-default, .cmb2-element .ui-datepicker td .ui-state-default {
1237
- background: transparent;
1238
- border: none;
1239
- text-align: center;
1240
- text-decoration: none;
1241
- width: auto;
1242
- display: block;
1243
- padding: 5px 10px;
1244
- font-weight: normal;
1245
- color: #444;
1246
- }
1247
- /* line 205, sass/partials/_jquery_ui.scss */
1248
- .cmb2-element.ui-datepicker td.ui-state-disabled .ui-state-default, .cmb2-element .ui-datepicker td.ui-state-disabled .ui-state-default {
1249
- opacity: 0.5;
1250
- }
1251
- /* line 210, sass/partials/_jquery_ui.scss */
1252
- .cmb2-element.ui-datepicker .ui-widget-header,
1253
- .cmb2-element.ui-datepicker .ui-datepicker-header, .cmb2-element .ui-datepicker .ui-widget-header,
1254
- .cmb2-element .ui-datepicker .ui-datepicker-header {
1255
- background: #00a0d2;
1256
- }
1257
- /* line 215, sass/partials/_jquery_ui.scss */
1258
- .cmb2-element.ui-datepicker thead, .cmb2-element .ui-datepicker thead {
1259
- background: #32373c;
1260
- }
1261
- /* line 219, sass/partials/_jquery_ui.scss */
1262
- .cmb2-element.ui-datepicker td .ui-state-hover, .cmb2-element.ui-datepicker td .ui-state-active, .cmb2-element .ui-datepicker td .ui-state-hover, .cmb2-element .ui-datepicker td .ui-state-active {
1263
- background: #0073aa;
1264
- color: #fff;
1265
- }
1266
- /* line 224, sass/partials/_jquery_ui.scss */
1267
- .cmb2-element.ui-datepicker .ui-timepicker-div, .cmb2-element .ui-datepicker .ui-timepicker-div {
1268
- font-size: 14px;
1269
- }
1270
- /* line 226, sass/partials/_jquery_ui.scss */
1271
- .cmb2-element.ui-datepicker .ui-timepicker-div dl, .cmb2-element .ui-datepicker .ui-timepicker-div dl {
1272
- text-align: left;
1273
- padding: 0 .6em;
1274
- }
1275
- /* line 229, sass/partials/_jquery_ui.scss */
1276
- .cmb2-element.ui-datepicker .ui-timepicker-div dl dt, .cmb2-element .ui-datepicker .ui-timepicker-div dl dt {
1277
- float: left;
1278
- clear: left;
1279
- padding: 0 0 0 5px;
1280
- }
1281
- /* line 234, sass/partials/_jquery_ui.scss */
1282
- .cmb2-element.ui-datepicker .ui-timepicker-div dl dd, .cmb2-element .ui-datepicker .ui-timepicker-div dl dd {
1283
- margin: 0 10px 10px 40%;
1284
- }
1285
- /* line 236, sass/partials/_jquery_ui.scss */
1286
- .cmb2-element.ui-datepicker .ui-timepicker-div dl dd select, .cmb2-element .ui-datepicker .ui-timepicker-div dl dd select {
1287
- width: 100%;
1288
- }
1289
- /* line 242, sass/partials/_jquery_ui.scss */
1290
- .cmb2-element.ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane, .cmb2-element .ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane {
1291
- padding: .6em;
1292
- text-align: left;
1293
- }
1294
- /* line 246, sass/partials/_jquery_ui.scss */
1295
- .cmb2-element.ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-primary, .cmb2-element.ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-secondary, .cmb2-element .ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-primary, .cmb2-element .ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-secondary {
1296
- padding: 0 10px 1px;
1297
- -webkit-border-radius: 3px;
1298
- -moz-border-radius: 3px;
1299
- border-radius: 3px;
1300
- margin: 0 .6em .4em .4em;
1301
- }
1302
-
1303
- /* line 260, sass/partials/_jquery_ui.scss */
1304
- .admin-color-fresh .cmb2-element.ui-datepicker .ui-widget-header,
1305
- .admin-color-fresh .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-fresh .cmb2-element .ui-datepicker .ui-widget-header,
1306
- .admin-color-fresh .cmb2-element .ui-datepicker .ui-datepicker-header {
1307
- background: #00a0d2;
1308
- }
1309
- /* line 265, sass/partials/_jquery_ui.scss */
1310
- .admin-color-fresh .cmb2-element.ui-datepicker thead, .admin-color-fresh .cmb2-element .ui-datepicker thead {
1311
- background: #32373c;
1312
- }
1313
- /* line 269, sass/partials/_jquery_ui.scss */
1314
- .admin-color-fresh .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-fresh .cmb2-element .ui-datepicker td .ui-state-hover {
1315
- background: #0073aa;
1316
- color: #fff;
1317
- }
1318
-
1319
- /* line 277, sass/partials/_jquery_ui.scss */
1320
- .admin-color-blue .cmb2-element.ui-datepicker .ui-widget-header,
1321
- .admin-color-blue .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-blue .cmb2-element .ui-datepicker .ui-widget-header,
1322
- .admin-color-blue .cmb2-element .ui-datepicker .ui-datepicker-header {
1323
- background: #52accc;
1324
- }
1325
- /* line 282, sass/partials/_jquery_ui.scss */
1326
- .admin-color-blue .cmb2-element.ui-datepicker thead, .admin-color-blue .cmb2-element .ui-datepicker thead {
1327
- background: #4796b3;
1328
- }
1329
- /* line 291, sass/partials/_jquery_ui.scss */
1330
- .admin-color-blue .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-blue .cmb2-element.ui-datepicker td .ui-state-active, .admin-color-blue .cmb2-element .ui-datepicker td .ui-state-hover, .admin-color-blue .cmb2-element .ui-datepicker td .ui-state-active {
1331
- background: #096484;
1332
- color: #fff;
1333
- }
1334
- /* line 296, sass/partials/_jquery_ui.scss */
1335
- .admin-color-blue .cmb2-element.ui-datepicker td.ui-datepicker-today, .admin-color-blue .cmb2-element .ui-datepicker td.ui-datepicker-today {
1336
- background: #eee;
1337
- }
1338
-
1339
- /* line 305, sass/partials/_jquery_ui.scss */
1340
- .admin-color-coffee .cmb2-element.ui-datepicker .ui-widget-header,
1341
- .admin-color-coffee .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-coffee .cmb2-element .ui-datepicker .ui-widget-header,
1342
- .admin-color-coffee .cmb2-element .ui-datepicker .ui-datepicker-header {
1343
- background: #59524c;
1344
- }
1345
- /* line 310, sass/partials/_jquery_ui.scss */
1346
- .admin-color-coffee .cmb2-element.ui-datepicker thead, .admin-color-coffee .cmb2-element .ui-datepicker thead {
1347
- background: #46403c;
1348
- }
1349
- /* line 314, sass/partials/_jquery_ui.scss */
1350
- .admin-color-coffee .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-coffee .cmb2-element .ui-datepicker td .ui-state-hover {
1351
- background: #c7a589;
1352
- color: #fff;
1353
- }
1354
-
1355
- /* line 322, sass/partials/_jquery_ui.scss */
1356
- .admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-widget-header,
1357
- .admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-widget-header,
1358
- .admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-datepicker-header {
1359
- background: #523f6d;
1360
- }
1361
- /* line 327, sass/partials/_jquery_ui.scss */
1362
- .admin-color-ectoplasm .cmb2-element.ui-datepicker thead, .admin-color-ectoplasm .cmb2-element .ui-datepicker thead {
1363
- background: #413256;
1364
- }
1365
- /* line 331, sass/partials/_jquery_ui.scss */
1366
- .admin-color-ectoplasm .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-ectoplasm .cmb2-element .ui-datepicker td .ui-state-hover {
1367
- background: #a3b745;
1368
- color: #fff;
1369
- }
1370
-
1371
- /* line 339, sass/partials/_jquery_ui.scss */
1372
- .admin-color-midnight .cmb2-element.ui-datepicker .ui-widget-header,
1373
- .admin-color-midnight .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-midnight .cmb2-element .ui-datepicker .ui-widget-header,
1374
- .admin-color-midnight .cmb2-element .ui-datepicker .ui-datepicker-header {
1375
- background: #363b3f;
1376
- }
1377
- /* line 344, sass/partials/_jquery_ui.scss */
1378
- .admin-color-midnight .cmb2-element.ui-datepicker thead, .admin-color-midnight .cmb2-element .ui-datepicker thead {
1379
- background: #26292c;
1380
- }
1381
- /* line 348, sass/partials/_jquery_ui.scss */
1382
- .admin-color-midnight .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-midnight .cmb2-element .ui-datepicker td .ui-state-hover {
1383
- background: #e14d43;
1384
- color: #fff;
1385
- }
1386
-
1387
- /* line 356, sass/partials/_jquery_ui.scss */
1388
- .admin-color-ocean .cmb2-element.ui-datepicker .ui-widget-header,
1389
- .admin-color-ocean .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-ocean .cmb2-element .ui-datepicker .ui-widget-header,
1390
- .admin-color-ocean .cmb2-element .ui-datepicker .ui-datepicker-header {
1391
- background: #738e96;
1392
- }
1393
- /* line 361, sass/partials/_jquery_ui.scss */
1394
- .admin-color-ocean .cmb2-element.ui-datepicker thead, .admin-color-ocean .cmb2-element .ui-datepicker thead {
1395
- background: #627c83;
1396
- }
1397
- /* line 365, sass/partials/_jquery_ui.scss */
1398
- .admin-color-ocean .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-ocean .cmb2-element .ui-datepicker td .ui-state-hover {
1399
- background: #9ebaa0;
1400
- color: #fff;
1401
- }
1402
-
1403
- /* line 373, sass/partials/_jquery_ui.scss */
1404
- .admin-color-sunrise .cmb2-element.ui-datepicker .ui-widget-header,
1405
- .admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header,
1406
- .admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover, .admin-color-sunrise .cmb2-element .ui-datepicker .ui-widget-header,
1407
- .admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header,
1408
- .admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover {
1409
- background: #cf4944;
1410
- }
1411
- /* line 379, sass/partials/_jquery_ui.scss */
1412
- .admin-color-sunrise .cmb2-element.ui-datepicker th, .admin-color-sunrise .cmb2-element .ui-datepicker th {
1413
- border-color: #be3631;
1414
- background: #be3631;
1415
- }
1416
- /* line 384, sass/partials/_jquery_ui.scss */
1417
- .admin-color-sunrise .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-sunrise .cmb2-element .ui-datepicker td .ui-state-hover {
1418
- background: #dd823b;
1419
- color: #fff;
1420
- }
1421
-
1422
- /* line 392, sass/partials/_jquery_ui.scss */
1423
- .admin-color-light .cmb2-element.ui-datepicker .ui-widget-header,
1424
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-light .cmb2-element .ui-datepicker .ui-widget-header,
1425
- .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-header {
1426
- background: #e5e5e5;
1427
- }
1428
- /* line 397, sass/partials/_jquery_ui.scss */
1429
- .admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-month,
1430
- .admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-year, .admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-month,
1431
- .admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-year {
1432
- color: #555;
1433
- }
1434
- /* line 402, sass/partials/_jquery_ui.scss */
1435
- .admin-color-light .cmb2-element.ui-datepicker thead, .admin-color-light .cmb2-element .ui-datepicker thead {
1436
- background: #888;
1437
- }
1438
- /* line 406, sass/partials/_jquery_ui.scss */
1439
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-title,
1440
- .admin-color-light .cmb2-element.ui-datepicker td .ui-state-default,
1441
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-prev:before,
1442
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-next:before, .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-title,
1443
- .admin-color-light .cmb2-element .ui-datepicker td .ui-state-default,
1444
- .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-prev:before,
1445
- .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-next:before {
1446
- color: #555;
1447
- }
1448
- /* line 414, sass/partials/_jquery_ui.scss */
1449
- .admin-color-light .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-light .cmb2-element.ui-datepicker td .ui-state-active, .admin-color-light .cmb2-element .ui-datepicker td .ui-state-hover, .admin-color-light .cmb2-element .ui-datepicker td .ui-state-active {
1450
- background: #ccc;
1451
- }
1452
- /* line 418, sass/partials/_jquery_ui.scss */
1453
- .admin-color-light .cmb2-element.ui-datepicker td.ui-datepicker-today, .admin-color-light .cmb2-element .ui-datepicker td.ui-datepicker-today {
1454
- background: #eee;
1455
- }
1456
-
1457
- /* line 426, sass/partials/_jquery_ui.scss */
1458
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-widget-header,
1459
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-widget-header,
1460
- .admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-datepicker-header {
1461
- background: #56b274;
1462
- }
1463
- /* line 431, sass/partials/_jquery_ui.scss */
1464
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker thead, .admin-color-bbp-evergreen .cmb2-element .ui-datepicker thead {
1465
- background: #36533f;
1466
- }
1467
- /* line 435, sass/partials/_jquery_ui.scss */
1468
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-bbp-evergreen .cmb2-element .ui-datepicker td .ui-state-hover {
1469
- background: #446950;
1470
- color: #fff;
1471
- }
1472
-
1473
- /* line 443, sass/partials/_jquery_ui.scss */
1474
- .admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-widget-header,
1475
- .admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-datepicker-header, .admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-widget-header,
1476
- .admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-datepicker-header {
1477
- background: #4ca26a;
1478
- }
1479
- /* line 448, sass/partials/_jquery_ui.scss */
1480
- .admin-color-bbp-mint .cmb2-element.ui-datepicker thead, .admin-color-bbp-mint .cmb2-element .ui-datepicker thead {
1481
- background: #4f6d59;
1482
- }
1483
- /* line 452, sass/partials/_jquery_ui.scss */
1484
- .admin-color-bbp-mint .cmb2-element.ui-datepicker td .ui-state-hover, .admin-color-bbp-mint .cmb2-element .ui-datepicker td .ui-state-hover {
1485
- background: #5fb37c;
1486
- color: #fff;
1487
- }
1488
-
1489
- /**
1490
- * CMB2 Frontend
1491
- */
1492
- /* line 1, sass/partials/_front.scss */
1493
- .closed .inside {
1494
- display: none;
1495
- }
1496
-
1497
- /* line 5, sass/partials/_front.scss */
1498
- .cmb-repeatable-grouping {
1499
- position: relative;
1500
- }
1501
- /* line 8, sass/partials/_front.scss */
1502
- .cmb-repeatable-grouping .cmb-group-title {
1503
- margin-left: -1em;
1504
- margin-right: -1em;
1505
- min-height: 1.5em;
1506
- }
1507
- /* line 14, sass/partials/_front.scss */
1508
- .cmb-repeatable-grouping h3 {
1509
- font-size: 14px;
1510
- padding: 8px 12px;
1511
- margin: 0;
1512
- line-height: 1.4;
1513
- }
1514
-
1515
- /* line 25, sass/partials/_front.scss */
1516
- .cmb-repeatable-group.repeatable .cmb-group-title {
1517
- padding-left: 2.2em;
1518
- }
1519
- /* line 29, sass/partials/_front.scss */
1520
- .cmb-repeatable-group.non-repeatable .cmb-group-title {
1521
- padding-left: 12px;
1522
- }
1523
-
1524
- /* line 35, sass/partials/_front.scss */
1525
- .cmb-type-group .cmb-row .cmbhandle {
1526
- right: 0;
1527
- position: absolute;
1528
- }
1529
-
1530
- /* line 40, sass/partials/_front.scss */
1531
- .cmb-spinner {
1532
- background: url(/wp-admin/images/spinner.gif) no-repeat;
1533
- -webkit-background-size: 20px 20px;
1534
- background-size: 20px 20px;
1535
- display: none;
1536
- float: right;
1537
- vertical-align: middle;
1538
- opacity: 0.7;
1539
- filter: alpha(opacity=70);
1540
- width: 20px;
1541
- height: 20px;
1542
- margin: 4px 10px 0;
1543
- }
1544
-
1545
- /*# sourceMappingURL=cmb2-front.css.map */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/cmb2-front.css.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "mappings": ";AAAA;;GAEG;ACFH;;gEAEgE;;AAEhE,UAAW;EACV,MAAM,EAAE,CAAC;;;AAET;mBACS;EACR,SAAS,ECEK,IAAI;EDDlB,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,GAAG;;;AAMZ,uCAAc;EACb,KAAK,EAAE,IAAI;;;AAIb,mBAAS;EACR,KAAK,EAAE,KAAK;;;AAEZ,sCAAqB;EACpB,WAAW,EChBE,sCAAsC;EDiBnD,WAAW,EAAE,IAAI;;;AAMlB,kEACkB;EACjB,KAAK,EAAE,KAAK;;;AAIb,gCAAkB;EACjB,KAAK,EAAE,IAAI;;;AAIZ,iCAAmB;EAClB,KAAK,EAAE,KAAK;;;AAIb,iCAAmB;EAClB,KAAK,EAAE,GAAG;;;AAGX,0BAAY;EACX,OAAO,EAAE,OAAO;;;AAIhB;;8CAES;EACR,WAAW,EAAE,IAAI;;;AAKpB,aAAG;EACF,MAAM,EAAE,CAAC;;;AAGV,aAAG;EACF,SAAS,EC5DK,IAAI;ED6DlB,WAAW,EAAE,IAAI;EACjB,MAAM,EAAE,WAAW;;;AAQpB,iBAAO;EACN,SAAS,ECvEK,IAAI;EDwElB,UAAU,EAAE,GAAG;;;AAGhB;yBACe;EACd,UAAU,ECtEI,OAAO;;;ADyEtB,8BAAoB;EACnB,MAAM,EAAE,SAAS;EACjB,OAAO,EAAE,CAAC;;;AAGX,iCAAuB;EACtB,MAAM,EAAE,SAAS;EACjB,OAAO,EAAE,CAAC;;;AAGX;4BACkB;EACjB,WAAW,EAAE,MAAM;;;AAGpB,qBAAW;EACV,MAAM,EAAE,4BAAgC;;;AAGzC,8BAAoB;EACnB,UAAU,EAAE,IAAI;;;AAGjB,oBAAU;EACT,KAAK,EAAE,GAAG;;;AAEV,6BAAS;EACR,KAAK,EAAE,IAAI;;;AAKb;gCACsB;EACrB,cAAc,EAAE,MAAM;;;AAGvB;+BACqB;EACpB,MAAM,EAAE,UAAU;;;AAGnB,mBAAS;EACR,MAAM,EAAE,CAAC;;;AAET,yBAAQ;EACP,OAAO,EAAE,EAAE;EACX,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;;;AAGZ,wDAAuC;EACtC,WAAW,EAAE,CAAC;EACd,cAAc,EAAE,GAAG;;;;AAMtB,aAAc;EACb,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,CAAC;;;AAIR;;;gEACQ;EACP,MAAM,EAAE,CAAC;;;;AAKZ,YAAa;EACZ,MAAM,EAAE,SAAS;;;;AAGlB;;mCAEoC;EACnC,MAAM,EAAE,CAAC;;;;AAGV;;kCAEmC;EAClC,aAAa,EAAE,CAAC;;;;AAGjB,wBAAyB;EACxB,MAAM,EAAE,iBAAqB;EAC7B,OAAO,EAAE,KAAK;;;AAEd,gCAAU;EACT,MAAM,EAAE,SAAS;;;;AAOnB,OAAQ;EACP,KAAK,ECnLU,OAAO;EDoLtB,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,GAAG;EAChB,WAAW,EAAE,GAAG;EAChB,OAAO,EAAE,gBAAgB;EACzB,cAAc,EAAE,GAAG;EACnB,KAAK,EAAE,KAAK;;AAEZ,yBAAkC;;EATnC,OAAQ;IE3LP,SAAS,EAAE,KAAK;IAehB,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,IAAI;IACX,cAAc,EAAE,GAAG;IACnB,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;;;EAEX,aAAM;IACL,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,CAAC;IACb,aAAa,EAAE,KAAK;;;;;AFiLtB,OAAQ;EACP,WAAW,EAAE,GAAG;EAChB,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,SAAS;EAClB,cAAc,EAAE,MAAM;;;;AAKtB,uBAAQ;EACP,OAAO,EAAE,CAAC;;;;AAIZ,aAAc;EACb,OAAO,EAAE,KAAK;EACd,OAAO,EAAE,KAAK;;;;AAGf,iBAAkB;EACjB,KAAK,EAAE,IAAI;;;;AAGZ,eAAgB;EACf,cAAc,EAAE,GAAG;;;;AAGpB,eAAgB;EACf,UAAU,EAAE,KAAK;;;;AAGlB,iBAAkB;EACjB,OAAO,EAAE,IAAI;;;;AAId,iBAAkB;EACjB,gBAAgB,EAAE,OAAO;EACzB,MAAM,EAAE,iBAAiC;;;AAEzC,yCAAwB;EACvB,QAAQ,EAAE,QAAQ;EAClB,iBAAiB,EAAE,EAAE;EAErB,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,mBAAmB;EAC5B,aAAa,EAAE,eAAe;;;AAE9B,2DAAoB;EACnB,UAAU,EAAE,iBAAqB;;;AAGlC,gDAAS;EACR,OAAO,EAAE,WAAW;EACpB,OAAO,EAAE,KAAK;EAEd,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;EACP,QAAQ,EAAE,QAAQ;EAElB,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,WAAW,EAAE,IAAI;EAEjB,KAAK,EC/PQ,OAAO;EDgQpB,UAAU,EAAE,MAAM;EAClB,YAAY,EAAE,iBAAqB;;;AAGpC,iDAAQ;EACP,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;;;AAKZ,gCAAe;EACd,MAAM,EAAE,CAAC;;;AAET,uCAAS;EACR,OAAO,EAAE,EAAE;EACX,KAAK,EAAE,GAAG;EACV,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,KAAK;EACd,WAAW,EAAE,IAAI;EACjB,gBAAgB,EAAE,SAAuB;;;AAI3C,iCAAgB;EACf,GAAG,EAAE,GAAG;EACR,KAAK,EAAE,GAAG;EACV,QAAQ,EAAE,QAAQ;EAElB,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,CAAC;EACd,OAAO,EAAE,YAAY;EAErB,OAAO,EAAE,IAAI;;;AAEb,0DAAyB;EACxB,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,OAAO;EAEpB,QAAQ,EAAE,MAAM;EAChB,QAAQ,EAAE,QAAQ;EAElB,MAAM,EAAE,IAAI;EACZ,WAAW,EAAE,CAAC;EACd,OAAO,EAAE,QAAQ;;;AAEjB,iEAAS;EE3RX,OAAO,EF4RsB,GAAO;EE3RpC,WAAW,EAAE,WAAW;EACxB,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,MAAM;EACnB,YAAY,EAAE,MAAM;EACpB,cAAc,EAAE,IAAI;EACpB,WAAW,EAAE,CAAC;EACd,sBAAsB,EAAE,WAAW;EACnC,MAAM,EAAE,CAAC;EACT,WAAW,EAAE,CAAC;EACd,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;EACP,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,MAAM;;;AFkRlB,uDAAsC;EACrC,OAAO,EAAE,KAAK;;;;AAOf,6BAAQ;EACP,OAAO,EAAE,GAAG;;;AAGb,sCAAiB;EAChB,gBAAgB,EChUF,OAAO;EDiUrB,OAAO,EAAE,kBAAkB;EAC3B,MAAM,EAAE,MAAM;EACd,UAAU,EAAE,KAAK;EACjB,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,GAAG;;;AAEhB,yCAAG;EACF,MAAM,EAAE,CAAC;EACT,MAAM,EAAE,CAAC;EACT,SAAS,EAAE,KAAK;EAChB,WAAW,EAAE,GAAG;EAChB,OAAO,EAAE,YAAY;;;AAGtB,8CAAQ;EACP,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;;;AAIb,oDAA+B;EEhW/B,SAAS,EAAE,KAAK;EAehB,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;EACX,cAAc,EAAE,GAAG;EACnB,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,IAAI;;;AAEX,0DAAM;EACL,OAAO,EAAE,KAAK;EACd,UAAU,EAAE,CAAC;EACb,aAAa,EAAE,KAAK;;;AF4UrB,qCAAgB;EACf,SAAS,EAAE,GAAG;EACd,YAAY,EAAE,GAAG;EACjB,eAAe,EAAE,IAAI;;;AAErB,gDAAW;EACV,SAAS,EAAE,KAAK;EAChB,MAAM,EAAE,KAAK;EACb,WAAW,EAAE,KAAK;EAClB,KAAK,EAAE,GAAG;;;AAEV,0EAA4B;EAC3B,WAAW,EAAE,KAAK;;;AAMrB,yCAAoB;EACnB,KAAK,EAAE,KAAK;;;;AAKd,0BAA2B;EAC1B,KAAK,ECnXU,OAAO;EDoXtB,UAAU,EAAE,MAAM;EAClB,MAAM,EAAE,CAAC;EACT,WAAW,EAAE,IAAI;;;;AAGlB,6BAA8B;EAC7B,KAAK,EC1XU,OAAO;ED2XtB,UAAU,EAAE,MAAM;;;;AAGnB,mBAAoB;EACnB,MAAM,EAAE,SAAS;EACjB,OAAO,EAAE,SAAS;EAClB,SAAS,EAAE,IAAI;;;;AAGhB,cAAe;EACd,OAAO,EAAE,SAAS;;;;AAGnB,cAAe;EACd,OAAO,EAAE,YAAY;EACrB,aAAa,EAAE,IAAI;;;;AAGpB,2BAA4B;EAC3B,MAAM,EAAE,CAAC;;;;AAKT,8BAAY;EACX,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,YAAY;EACrB,cAAc,EAAE,MAAM;EACtB,YAAY,EAAE,IAAI;EAClB,KAAK,EAAE,IAAI;;;AAEX,kCAAI;EACH,SAAS,EAAE,KAAK;EAChB,MAAM,EAAE,IAAI;;;AAId;gCACc;EACb,UAAU,EC9ZI,OAAO;ED+ZrB,MAAM,EAAE,iBAAqB;EAC7B,aAAa,EAAE,GAAG;EAClB,kBAAkB,EAAE,GAAG;EACtB,MAAM,EAAE,UAAU;EACnB,OAAO,EAAE,GAAG;;;AAGb,gCAAc;EACb,KAAK,EAAE,IAAI;EACX,SAAS,EAAE,KAAK;;;AAGjB,gEAA2B;EAC1B,QAAQ,EAAE,QAAQ;;;AAElB,kHAAyB;EACxB,UAAU,EAAE,6BAA6B;EACzC,MAAM,EAAE,IAAI;EACZ,IAAI,EAAE,IAAI;EACV,QAAQ,EAAE,QAAQ;EAClB,WAAW,EAAE,OAAO;EACpB,GAAG,EAAE,IAAI;EACT,KAAK,EAAE,IAAI;;;AAOZ,uDAAyB;EACxB,GAAG,EAAE,IAAI;;;AAIX,0EAAqC;EACpC,MAAM,EAAE,OAAO;;;;AAKjB,kDAAmD;EAClD,KAAK,EAAE,IAAI;EACX,cAAc,EAAE,MAAM;EACtB,KAAK,EAAE,IAAI;EACX,YAAY,EAAE,IAAI;EAClB,aAAa,EAAE,IAAI;EACnB,UAAU,EAAE,CAAC;;;;AAGd,mBAAoB;EACnB,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,YAAY;EACrB,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,GAAG;EACf,aAAa,EAAE,IAAI;;;AAEnB,uBAAI;EACH,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,IAAI;EACX,YAAY,EAAE,IAAI;;;;AAIpB,oBAAqB;EACpB,MAAM,EAAE,CAAC;;;;AAGV,mBAAoB;EACnB,UAAU,EAAE,IAAI;;;;AAGjB,wBAAyB;EACxB,YAAY,EAAE,KAAK;;;AAGpB,yBAAkC;;EACjC;;mBAEkB;IACjB,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;;;AGngBb;;gEAEgE;;AAChE,2BAA4B;EAC3B,WAAW,EAAE,IAAI;EACjB,YAAY,EAAE,IAAI;EAClB,UAAU,EAAE,KAAK;;;;AAGlB,uCAAwC;EACvC,YAAY,EAAE,KAAK;;;;AAKnB,oDAAW;EACV,MAAM,EAAE,CAAC;;;AAET,8GAA6B;EAC5B,OAAO,EAAE,OAAO;;;AAKhB,8GAAc;EACb,KAAK,EAAE,IAAI;;;AAKd,gDAAS;EACR,OAAO,EAAE,SAAS;EAClB,MAAM,EAAE,SAAS;;;AAEjB,sEAAW;EACV,KAAK,EAAE,IAAI;EACX,QAAQ,EAAE,QAAQ;;;AAIpB,gFAAyB;EACxB,OAAO,EAAE,KAAK;EACd,SAAS,EAAE,IAAI;EACf,SAAS,EAAE,cAAc;;;AAG1B,gGAAiC;EAChC,cAAc,EAAE,CAAC;;;AAGlB,8CAAQ;EACP,KAAK,EAAE,GAAG;EACV,OAAO,EAAE,QAAQ;;;AAIlB,8CAAQ;EACP,aAAa,EAAE,CAAC;EAChB,OAAO,EAAE,CAAC;EACV,WAAW,EAAE,GAAG;;;AAGjB,kEAAkB;EACjB,KAAK,EAAE,GAAG;EACV,KAAK,EAAE,KAAK;;;AAGb;;wDACyC;EACxC,aAAa,EAAE,iBAAqB;;AAEpC,yBAAkC;;EAJnC;;0DACyC;IAIvC,aAAa,EAAE,CAAC;;;;AAIlB;;qCACsB;EACrB,WAAW,EAAE,KAAK;;;AC9EpB;;gEAEgE;AAEhE,uCAAuC;;AAIrC,sDAAS;EACR,OAAO,EAAE,OAAO;EAChB,OAAO,EAAE,YAAY;EACrB,IAAI,EAAE,uBAAuB;EAC7B,KAAK,EAAE,IAAI;EACX,sBAAsB,EAAE,WAAW;EACnC,uBAAuB,EAAE,SAAS;EAClC,eAAe,EAAE,eAAe;;;AAMhC,6DAAS;EACR,OAAO,EAAE,OAAO;;;;AAOpB,yBAA0B;EAEzB,aAAa,EAAE,IAAI;;;AAEnB,sDAA+B;EAC9B,UAAU,EAAE,IAAI;;;AAGjB,iDAA0B;EACzB,UAAU,EAAE,IAAI;;;AAGjB,kDAA2B;EAC1B,UAAU,EAAE,IAAI;EAChB,aAAa,EAAE,CAAC;;;AAGjB,8CAAuB;EAEtB,UAAU,EAAE,IAAI;;;AAEhB,qDAAO;EACN,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,QAAQ;EACjB,MAAM,EAAE,CAAC;EACT,WAAW,EAAE,GAAG;;;AAIlB,gCAAO;EACN,MAAM,EAAE,IAAI;;;;AAId,kBAAmB;EAElB,UAAU,EAAE,IAAI;;;AAEhB,6CAA6B;EAC5B,YAAY,EAAE,KAAK;EACnB,KAAK,EAAE,IAAI;;;AAKX,2DAAc;EACb,OAAO,EAAE,IAAI;;;AAIf,0BAAQ;EACP,OAAO,EAAE,QAAQ;EACjB,KAAK,EAAE,GAAG;;;AAGX,0BAAQ;EACP,KAAK,EAAE,GAAG;EACV,OAAO,EAAE,CAAC;;;AAGX,2BAAS;EACR,aAAa,EAAE,IAAI;;;AAEnB,wCAAe;EACd,aAAa,EAAE,CAAC;;;AAMnB,8CAA8C;AAC9C,yCAA0C;;EAEzC,6CAA8C;IAC7C,YAAY,EAAE,CAAC;;;ACvGjB;;gEAEgE;;AAChE,kBAAmB;EAClB,SAAS,EAAE,MAAM;;;AAEjB,4BAAY;EACX,aAAa,EAAE,GAAG;;;AAGnB,2CAAyB;EACxB,OAAO,EAAE,GAAG;EACZ,UAAU,EAAE,IAAI;EAChB,UAAU,EJMI,OAAO;EILrB,MAAM,EAAE,iBAAqB;EAC7B,UAAU,EAAE,6BAA2B;;;AAEvC,qDAAU;EACT,OAAO,EAAE,CAAC;EACV,WAAW,EAAE,OAAO;;;AAGrB,+DAAoB;EACnB,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,SAAS;EAClB,WAAW,EAAE,KAAK;;AAElB,yBAAkC;;EALnC,+DAAoB;IAMlB,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,CAAC;;;;AAMjB,6CAA2B;EAC1B,UAAU,EAAE,GAAG;EACf,OAAO,EAAE,SAAS;EAClB,gBAAgB,EAAE,OAAO;;;AAEzB,iEAAoB;EACnB,SAAS,EAAE,IAAI;EACf,UAAU,EAAE,CAAC;EACb,aAAa,EAAE,CAAC;EAChB,cAAc,EAAE,SAAS;;;AAG1B,uEAA0B;EACzB,WAAW,EAAE,MAAM;;;AAKpB,uEAA+B;EAC9B,OAAO,EAAE,WAAW;;;AAGrB,wDAAgB;EACf,SAAS,EAAE,IAAI;EACf,UAAU,EAAE,CAAC;EACb,aAAa,EAAE,CAAC;;;AAGjB,4EAAoC;EACnC,WAAW,EAAE,GAAG;EAChB,cAAc,EAAE,YAAY;;;ACjE/B;;gEAEgE;;AAEhE,mCAAoC;EACnC,MAAM,EAAE,CAAC;;;;AAMT;;kCAAoB;EACnB,SAAS,EAAE,KAAK;;;;AAKjB,0DAAa;EACZ,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,IAAI;;;;AAIf,YAAa;EACZ,OAAO,EAAE,IAAI;;;AACb,sBAAY;EACX,OAAO,EAAE,KAAK;;;AC1BhB;;gEAEgE;;AAO9D;uDAA6B;EAC5B,OAAO,EAAE,OAAO;;;AAKhB;iEAAqC;EACpC,KAAK,EAAE,IAAI;;;AAGZ;;yCAA0C;EACzC,WAAW,EAAE,CAAC;EACd,UAAU,EAAE,GAAG;EACf,OAAO,EAAE,KAAK;;;AAGf;gDAAkB;EACjB,SAAS,EAAE,GAAG;;;AACd;4EAA4B;EAC3B,OAAO,EAAE,KAAK;;;AAKjB;gCAAM;EACL,OAAO,EAAE,KAAK;EACd,WAAW,EAAE,GAAG;EAChB,OAAO,EAAE,OAAO;;;AAKlB;wBAAS;EACR,SAAS,EAAE,GAAG;;;AAGf;qCAAsB;EACrB,aAAa,EAAE,iBAAqB;;;AAGrC;iEAAkD;EACjD,aAAa,EAAE,CAAC;EAChB,aAAa,EAAE,MAAM;;;AAGtB;;;;;iCAEkB;EACjB,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;;;AAGZ;+BAAgB;EACf,OAAO,EAAE,IAAI;;;AAGd;uBAAQ;EL9CR,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;EACX,cAAc,EAAE,GAAG;EACnB,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,IAAI;EK4CV,YAAY,EAAE,CAAC;EACf,aAAa,EAAE,CAAC;;;AL3CjB;6BAAM;EACL,OAAO,EAAE,KAAK;EACd,UAAU,EAAE,CAAC;EACb,aAAa,EAAE,KAAK;;;AAhBrB;6BAAM;EACL,SAAS,EDHK,IAAI;ECIlB,WAAW,EAAE,KAAK;;;AK0DlB;8CAAQ;EACP,WAAW,EAAE,CAAC;;;AAEf;gEAA0B;EACzB,OAAO,EAAE,CAAC;;;AAMX;wCAAQ;EACP,OAAO,EAAE,CAAC;;;AAKX;mEAA2B;EAC1B,UAAU,EAAE,GAAG;;;AAQf;;;oDAAI;EACH,SAAS,EAAE,GAAG;EAEd,MAAM,EAAE,IAAI;;;AAKf;gCAAiB;EAChB,OAAO,EAAE,MAAM;EACf,WAAW,EAAE,MAAM;;;AAGpB;yCAA0B;EACzB,OAAO,EAAE,KAAK;EACd,OAAO,EAAE,OAAO;;;AAKhB;;;4DAC0B;EACzB,WAAW,EAAE,MAAM;EACnB,OAAO,EAAE,MAAM;;;AAIjB;kDAAmC;EAClC,cAAc,EAAE,KAAK;;;AAGtB;mCAAoB;EACnB,SAAS,EAAE,KAAK;EAChB,UAAU,EAAE,MAAM;;;AAGnB;+BAAgB;EACf,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,CAAC;;;AAGlB;mCAAoB;EACnB,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,IAAI;;;;AC7IjB,wBAAW;EACV,KAAK,EAAE,IAAI;EACX,KAAK,EAAE,KAAK;EACZ,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,MAAM,EAAE,OAAO;EACf,KAAK,EAAE,IAAI;EACX,QAAQ,EAAE,QAAQ;;;AAClB,+BAAS;EACR,OAAO,EAAE,OAAO;EAChB,KAAK,EAAE,IAAI;EACX,IAAI,EAAE,yBAAyB;EAC/B,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,YAAY;EACrB,OAAO,EAAE,QAAQ;EACjB,GAAG,EAAE,CAAC;EACN,QAAQ,EAAE,QAAQ;EAClB,sBAAsB,EAAE,WAAW;EACnC,uBAAuB,EAAE,SAAS;EAClC,eAAe,EAAE,eAAe;;;AAMhC,+CAAS;EACR,OAAO,EAAE,OAAO;;;AAKnB,2EAA8D;EAC7D,kBAAkB,EAAE,eAAe;EACnC,UAAU,EAAE,eAAe;EAC3B,MAAM,EAAE,eAAe;EACvB,QAAQ,EAAE,QAAQ;EAClB,IAAI,EAAE,CAAC;EACP,GAAG,EAAE,IAAI;EACT,WAAW,EAAE,GAAG;EAChB,OAAO,EAAE,WAAW;EACpB,OAAO,EAAE,EAAE;;;AACX,2FAAkB;EACjB,MAAM,EAAE,OAAO;EACf,KAAK,EPvBQ,IAAI;EOwBjB,OAAO,EAAE,CAAC;;;AACV,iGAAQ;EACP,KAAK,EP3BO,IAAI;;;AQpBpB;;;;;;;;;;;;GAYG;;AAEH,uCAAwC;EACvC,MAAM,EAAC,EAAE;;;;AAQV,yDAA0D;EACzD,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CAAC;EACT,qBAAqB,EAAE,CAAC;EACxB,kBAAkB,EAAE,CAAC;EACrB,aAAa,EAAE,CAAC;EAChB,gBAAgB,EAAE,IAAI;EACtB,MAAM,EAAE,iBAAiB;EACzB,UAAU,EAAE,IAAI;EAChB,kBAAkB,EAAE,8BAA8B;EAClD,UAAU,EAAE,8BAA8B;EAC1C,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,IAAI;EA6KX,0BAA0B;;;AA3K1B,6DAAE;EACD,OAAO,EAAE,CAAC;EACV,WAAW,EAAE,uBAAuB;EACpC,qBAAqB,EAAE,CAAC;EACxB,kBAAkB,EAAE,CAAC;EACrB,aAAa,EAAE,CAAC;;;AAGjB,qEAAM;EACL,SAAS,EAAE,IAAI;EACf,MAAM,EAAE,CAAC;EACT,MAAM,EAAE,IAAI;EACZ,eAAe,EAAE,QAAQ;;;AAG1B;;kDACsB;EACrB,gBAAgB,EAAE,IAAI;EACtB,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,MAAM;;;AAGpB,qIAAsC;EACrC,UAAU,EAAE,WAAW;EACvB,YAAY,EAAE,WAAW;EACzB,MAAM,EAAE,OAAO;;;AAGhB,mGAAqB;EACpB,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,MAAM;EACf,KAAK,EAAE,IAAI;EACX,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,IAAI;EACjB,UAAU,EAAE,MAAM;;;AAElB,iHAAO;EACN,UAAU,EAAE,IAAI;EAChB,aAAa,EAAE,IAAI;;;AAIrB;;gDACoB;EACnB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,IAAI;;;AAGZ;;+DACmC;EAClC,MAAM,EAAE,IAAI;;;AAGb;;sDAC0B;EACzB,IAAI,EAAE,CAAC;;;AAGR;;sDAC0B;EACzB,KAAK,EAAE,CAAC;;;AAGT;;qDACyB;EACxB,OAAO,EAAE,IAAI;;;AAGd,iGAAoB;EACnB,KAAK,EAAE,IAAI;;;AAGZ,iGAAoB;EACnB,KAAK,EAAE,KAAK;;;AAGb;;uDAC2B;EAC1B,IAAI,EAAE,4BAA4B;EAClC,YAAY,EAAE,GAAG;EACjB,KAAK,EAAE,IAAI;EACX,KAAK,EAAE,IAAI;EACX,sBAAsB,EAAE,WAAW;EACnC,uBAAuB,EAAE,SAAS;EAClC,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;;;AAGb,+GAA2B;EAC1B,OAAO,EAAE,OAAO;;;AAGjB,+GAA2B;EAC1B,OAAO,EAAE,OAAO;;;AAGjB;;6DACiC;EAChC,OAAO,EAAE,GAAG;;;AAGb;;sDAC0B;EACzB,KAAK,EAAE,GAAG;EACV,UAAU,EAAE,WAAW;EACvB,YAAY,EAAE,WAAW;EACzB,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,IAAI;;;AACX;;6DAAO;EACN,KAAK,EAAE,IAAI;;;AAIb,qEAAM;EACL,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,GAAG;;;AAChB,2EAAG;EACF,WAAW,EAAE,MAAM;;;AAIrB,+DAAG;EACF,OAAO,EAAE,IAAI;;;AAGd,+DAAG;EACF,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,iBAAkB;;;AAG3B,mHAA6B;EAC5B,MAAM,EAAE,WAAW;;;AAGpB,6GAA0B;EACzB,gBAAgB,EA7JR,OAAO;EA8Jf,MAAM,EAAE,iBAAkB;;;AAC1B,qJAAsB;EACrB,kBAAkB,EAAE,wCAAwC;EAC5D,eAAe,EAAE,wCAAwC;EACzD,UAAU,EAAE,wCAAwC;;;AAItD,uGAAuB;EACtB,gBAAgB,EAAE,OAAO;;;AAG1B,mHAA6B;EAC5B,UAAU,EAAE,OAAO;;;AAGpB,mGAAqB;EACpB,UAAU,EAAE,WAAW;EACvB,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,MAAM;EAClB,eAAe,EAAE,IAAI;EACrB,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,KAAK;EACd,OAAO,EAAE,QAAQ;EACjB,WAAW,EAAE,MAAM;EACnB,KAAK,EAAE,IAAI;;;AAGZ,uIAAuC;EACtC,OAAO,EAAE,GAAG;;;AAIb;;kDACsB;EACrB,UAAU,EAhMA,OAAO;;;AAmMlB,qEAAM;EACL,UAAU,EAnMA,OAAO;;;AAsMlB,kMAAwC;EACvC,UAAU,EAtMI,OAAO;EAuMrB,KAAK,EAAE,IAAI;;;AAGZ,+FAAmB;EAClB,SAAS,EAAE,IAAI;;;AACf,qGAAG;EACF,UAAU,EAAE,IAAI;EAChB,OAAO,EAAE,MAAM;;;AACf,2GAAG;EACF,KAAK,EAAE,IAAI;EACX,KAAK,EAAC,IAAI;EACV,OAAO,EAAE,SAAS;;;AAEnB,2GAAG;EACF,MAAM,EAAE,eAAe;;;AACvB,yHAAO;EACN,KAAK,EAAE,IAAI;;;AAKd,uJAA4B;EAC3B,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,IAAI;;;AAEhB,oXAAmC;EAClC,OAAO,EAAE,UAAU;EACnB,qBAAqB,EAAE,GAAG;EAC1B,kBAAkB,EAAE,GAAG;EACvB,aAAa,EAAE,GAAG;EAClB,MAAM,EAAE,gBAAgB;;;;AAS1B;;qEACsB;EACrB,UAAU,EAlPD,OAAO;;;AAqPjB,2GAAM;EACL,UAAU,EArPD,OAAO;;;AAwPjB,qIAAmB;EAClB,UAAU,EAxPG,OAAO;EAyPpB,KAAK,EAAE,IAAI;;;;AAMZ;;oEACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB,yGAAM;EACL,UAAU,EAAE,OAAO;;;AAQnB,0QAAkC;EACjC,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;;AAGZ,2IAAsB;EACrB,UAAU,EAAE,IAAI;;;;AAQlB;;sEACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB,6GAAM;EACL,UAAU,EAAE,OAAO;;;AAGpB,uIAAmB;EAClB,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;;;AAMZ;;yEACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB,mHAAM;EACL,UAAU,EAAE,OAAO;;;AAGpB,6IAAmB;EAClB,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;;;AAMZ;;wEACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB,iHAAM;EACL,UAAU,EAAE,OAAO;;;AAGpB,2IAAmB;EAClB,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;;;AAMZ;;qEACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB,2GAAM;EACL,UAAU,EAAE,OAAO;;;AAGpB,qIAAmB;EAClB,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;;;AAMZ;;;;uFAEsC;EACrC,UAAU,EAAE,OAAO;;;AAGpB,yGAAG;EACF,YAAY,EAAE,OAAO;EACrB,UAAU,EAAE,OAAO;;;AAGpB,yIAAmB;EAClB,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;;;AAMZ;;qEACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB;;yEAC0B;EACzB,KAAK,EAAE,IAAI;;;AAGZ,2GAAM;EACL,UAAU,EAAE,IAAI;;;AAGjB;;;;;;0EAG2B;EAC1B,KAAK,EAAE,IAAI;;;AAIX,8QAAkC;EACjC,UAAU,EAAE,IAAI;;;AAGjB,6IAAsB;EACrB,UAAU,EAAE,IAAI;;;;AAOlB;;6EACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB,2HAAM;EACL,UAAU,EAAE,OAAO;;;AAGpB,qJAAmB;EAClB,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;;;AAMZ;;wEACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB,iHAAM;EACL,UAAU,EAAE,OAAO;;;AAGpB,2IAAmB;EAClB,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;;ACncd;;GAEG;;ACJH,eAAgB;EACf,OAAO,EAAE,IAAI;;;;AAGd,wBAAyB;EACxB,QAAQ,EAAE,QAAQ;;;AAElB,yCAAiB;EAChB,WAAW,EAAE,IAAI;EACjB,YAAY,EAAE,IAAI;EAClB,UAAU,EAAE,KAAK;;;AAGlB,2BAAG;EACF,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,QAAQ;EACjB,MAAM,EAAE,CAAC;EACT,WAAW,EAAE,GAAG;;;;AAOjB,iDAA8B;EAC7B,YAAY,EAAE,KAAK;;;AAGpB,qDAAkC;EACjC,YAAY,EAAE,IAAI;;;;AAKpB,mCAAoC;EACnC,KAAK,EAAE,CAAC;EACR,QAAQ,EAAE,QAAQ;;;;AAGnB,YAAa;EACZ,UAAU,EAAE,2CAA2C;EACvD,uBAAuB,EAAE,SAAS;EAClC,eAAe,EAAE,SAAS;EAC1B,OAAO,EAAE,IAAI;EACb,KAAK,EAAE,KAAK;EACZ,cAAc,EAAE,MAAM;EACtB,OAAO,EAAE,GAAG;EACZ,MAAM,EAAE,iBAAiB;EACzB,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,MAAM,EAAE,UAAU",
4
- "sources": ["sass/cmb2.scss","sass/partials/_main_wrap.scss","sass/partials/_variables.scss","sass/partials/_mixins.scss","sass/partials/_post_metaboxes.scss","sass/partials/_context_metaboxes.scss","sass/partials/_options-page.scss","sass/partials/_misc.scss","sass/partials/_sidebar_placements.scss","sass/partials/_collapsible_ui.scss","sass/partials/_jquery_ui.scss","sass/cmb2-front.scss","sass/partials/_front.scss"],
5
- "names": [],
6
- "file": "cmb2-front.css"
7
- }
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/cmb2-front.min.css DELETED
@@ -1 +0,0 @@
1
- @charset "UTF-8";.cmb2-wrap{margin:0}.cmb2-wrap input,.cmb2-wrap textarea{font-size:14px;max-width:100%;padding:5px}.cmb2-wrap input[type=text].cmb2-oembed{width:100%}.cmb2-wrap textarea{width:500px}.cmb2-wrap textarea.cmb2-textarea-code{font-family:"Courier 10 Pitch",Courier,monospace;line-height:16px}.cmb2-wrap input.cmb2-text-small,.cmb2-wrap input.cmb2-timepicker{width:100px}.cmb2-wrap input.cmb2-text-money{width:90px}.cmb2-wrap input.cmb2-text-medium{width:230px}.cmb2-wrap input.cmb2-upload-file{width:65%}.cmb2-wrap input.ed_button{padding:2px 4px}.cmb2-wrap input:not([type=hidden])+.button-secondary,.cmb2-wrap input:not([type=hidden])+input,.cmb2-wrap input:not([type=hidden])+select{margin-left:20px}.cmb2-wrap ul{margin:0}.cmb2-wrap li{font-size:14px;line-height:16px;margin:1px 0 5px}.cmb2-wrap select{font-size:14px;margin-top:3px}.cmb2-wrap input:focus,.cmb2-wrap textarea:focus{background:#fffff8}.cmb2-wrap input[type=checkbox],.cmb2-wrap input[type=radio]{margin:0 5px 0 0;padding:0}.cmb2-wrap .button-secondary,.cmb2-wrap button{white-space:nowrap}.cmb2-wrap .mceLayout{border:1px solid #e9e9e9!important}.cmb2-wrap .mceIframeContainer{background:#fff}.cmb2-wrap .meta_mce{width:97%}.cmb2-wrap .meta_mce textarea{width:100%}.cmb2-wrap .wp-color-result,.cmb2-wrap .wp-picker-input-wrap{vertical-align:middle}.cmb2-wrap .wp-color-result,.cmb2-wrap .wp-picker-container{margin:0 10px 0 0}.cmb2-wrap .cmb-row{margin:0}.cmb2-wrap .cmb-row:after{content:'';clear:both;display:block;width:100%}.cmb2-wrap .cmb-row.cmb-repeat .cmb2-metabox-description{padding-top:0;padding-bottom:1em}.cmb2-metabox{clear:both;margin:0}.cmb2-metabox .cmb-field-list>.cmb-row:first-of-type>.cmb-td,.cmb2-metabox .cmb-field-list>.cmb-row:first-of-type>.cmb-th,.cmb2-metabox>.cmb-row:first-of-type>.cmb-td,.cmb2-metabox>.cmb-row:first-of-type>.cmb-th{border:0}.cmb-add-row{margin:1.8em 0 0}.cmb-nested .cmb-td,.cmb-repeatable-group .cmb-th,.cmb-repeatable-group:first-of-type{border:0}.cmb-repeatable-group:last-of-type,.cmb-row:last-of-type,.cmb2-wrap .cmb-row:last-of-type{border-bottom:0}.cmb-repeatable-grouping{border:1px solid #e9e9e9;padding:0 1em}.cmb-repeatable-grouping.cmb-row{margin:0 0 .8em}.cmb-th{color:#222;float:left;font-weight:600;line-height:1.3;padding:20px 10px 20px 0;vertical-align:top;width:200px}@media (max-width:450px){.cmb-th{font-size:1.2em;display:block;float:none;padding-bottom:1em;text-align:left;width:100%}.cmb-th label{display:block;margin-top:0;margin-bottom:.5em}}.cmb-td{line-height:1.3;max-width:100%;padding:15px 10px;vertical-align:middle}.cmb-type-title .cmb-td{padding:0}.cmb-th label{display:block;padding:5px 0}.cmb-th+.cmb-td{float:left}.cmb-td .cmb-td{padding-bottom:1em}.cmb-remove-row{text-align:right}.empty-row.hidden{display:none}.cmb-repeat-table{background-color:#fafafa;border:1px solid #e1e1e1}.cmb-repeat-table .cmb-row.cmb-repeat-row{position:relative;counter-increment:el;margin:0;padding:10px 10px 10px 50px;border-bottom:none!important}.cmb-repeat-table .cmb-row.cmb-repeat-row+.cmb-repeat-row{border-top:solid 1px #e9e9e9}.cmb-repeat-table .cmb-row.cmb-repeat-row:before{content:counter(el);display:block;top:0;left:0;position:absolute;width:35px;height:100%;line-height:35px;color:#aaa;text-align:center;border-right:solid 1px #e9e9e9}.cmb-repeat-table .cmb-row.cmb-repeat-row .cmb-td{margin:0;padding:0}.cmb-repeat-table+.cmb-add-row{margin:0}.cmb-repeat-table+.cmb-add-row:before{content:'';width:1px;height:1.6em;display:block;margin-left:17px;background-color:#dcdcdc}.cmb-repeat-table .cmb-remove-row{top:7px;right:7px;position:absolute;width:auto;margin-left:0;padding:0!important;display:none}.cmb-repeat-table .cmb-remove-row>.cmb-remove-row-button{font-size:20px;text-indent:-1000px;overflow:hidden;position:relative;height:auto;line-height:1;padding:0 10px}.cmb-repeat-table .cmb-remove-row>.cmb-remove-row-button:before{content:"";font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}.cmb-repeat-table .cmb-repeat-row:hover .cmb-remove-row{display:block}.cmb-repeatable-group .cmb-th{padding:5px}.cmb-repeatable-group .cmb-group-title{background-color:#e9e9e9;padding:8px 12px 8px 2.2em;margin:0 -1em;min-height:1.5em;font-size:14px;line-height:1.4}.cmb-repeatable-group .cmb-group-title h4{border:0;margin:0;font-size:1.2em;font-weight:500;padding:.5em .75em}.cmb-repeatable-group .cmb-group-title .cmb-th{display:block;width:100%}.cmb-repeatable-group .cmb-group-description .cmb-th{font-size:1.2em;display:block;float:none;padding-bottom:1em;text-align:left;width:100%}.cmb-repeatable-group .cmb-group-description .cmb-th label{display:block;margin-top:0;margin-bottom:.5em}.cmb-repeatable-group .cmb-shift-rows{font-size:1em;margin-right:1em;text-decoration:none}.cmb-repeatable-group .cmb-shift-rows .dashicons{font-size:1.5em;height:1.5em;line-height:1.2em;width:1em}.cmb-repeatable-group .cmb-shift-rows .dashicons.dashicons-arrow-down-alt2{line-height:1.3em}.cmb-repeatable-group .cmb2-upload-button{float:right}p.cmb2-metabox-description{color:#aaa;font-style:italic;margin:0;padding-top:.5em}span.cmb2-metabox-description{color:#aaa;font-style:italic}.cmb2-metabox-title{margin:0 0 5px;padding:5px 0 0;font-size:14px}.cmb-inline ul{padding:4px 0 0}.cmb-inline li{display:inline-block;padding-right:18px}.cmb-type-textarea-code pre{margin:0}.cmb2-media-status .img-status{clear:none;display:inline-block;vertical-align:middle;margin-right:10px;width:auto}.cmb2-media-status .img-status img{max-width:350px;height:auto}.cmb2-media-status .embed-status,.cmb2-media-status .img-status img{background:#fff;border:1px solid #e9e9e9;border-radius:2px;-moz-border-radius:2px;margin:15px 0 0;padding:5px}.cmb2-media-status .embed-status{float:left;max-width:800px}.cmb2-media-status .embed-status,.cmb2-media-status .img-status{position:relative}.cmb2-media-status .embed-status .cmb2-remove-file-button,.cmb2-media-status .img-status .cmb2-remove-file-button{background:url(../images/ico-delete.png);height:16px;left:-5px;position:absolute;text-indent:-9999px;top:-5px;width:16px}.cmb2-media-status .img-status .cmb2-remove-file-button{top:10px}.cmb2-media-status .file-status>span,.cmb2-media-status .img-status img{cursor:pointer}.cmb-type-file-list .cmb2-media-status .img-status{clear:none;vertical-align:middle;width:auto;margin-right:10px;margin-bottom:10px;margin-top:0}.cmb-attach-list li{clear:both;display:inline-block;width:100%;margin-top:5px;margin-bottom:10px}.cmb-attach-list li img{cursor:move;float:left;margin-right:10px}.cmb2-remove-wrapper{margin:0}.child-cmb2 .cmb-th{text-align:left}.cmb2-indented-hierarchy{padding-left:1.5em}@media (max-width:450px){.cmb-td,.cmb-th,.cmb-th+.cmb-td{display:block;float:none;width:100%}}#poststuff .cmb-group-title{margin-left:-1em;margin-right:-1em;min-height:1.5em}#poststuff .repeatable .cmb-group-title{padding-left:2.2em}.cmb-type-group .cmb2-wrap,.cmb2-postbox .cmb2-wrap{margin:0}.cmb-type-group .cmb2-wrap>.cmb-field-list>.cmb-row,.cmb2-postbox .cmb2-wrap>.cmb-field-list>.cmb-row{padding:1.8em 0}.cmb-type-group .cmb2-wrap input[type=text].cmb2-oembed,.cmb2-postbox .cmb2-wrap input[type=text].cmb2-oembed{width:100%}.cmb-type-group .cmb-row,.cmb2-postbox .cmb-row{padding:0 0 1.8em;margin:0 0 .8em}.cmb-type-group .cmb-row .cmbhandle,.cmb2-postbox .cmb-row .cmbhandle{right:-1em;position:relative}.cmb-type-group .cmb-repeatable-grouping,.cmb2-postbox .cmb-repeatable-grouping{padding:0 1em;max-width:100%;min-width:1px!important}.cmb-type-group .cmb-repeatable-group>.cmb-row,.cmb2-postbox .cmb-repeatable-group>.cmb-row{padding-bottom:0}.cmb-type-group .cmb-th,.cmb2-postbox .cmb-th{width:18%;padding:0 2% 0 0}.cmb-type-group .cmb-td,.cmb2-postbox .cmb-td{margin-bottom:0;padding:0;line-height:1.3}.cmb-type-group .cmb-th+.cmb-td,.cmb2-postbox .cmb-th+.cmb-td{width:80%;float:right}.cmb-type-group .cmb-repeatable-group:not(:last-of-type),.cmb-type-group .cmb-row:not(:last-of-type),.cmb2-postbox .cmb-repeatable-group:not(:last-of-type),.cmb2-postbox .cmb-row:not(:last-of-type){border-bottom:1px solid #e9e9e9}@media (max-width:450px){.cmb-type-group .cmb-repeatable-group:not(:last-of-type),.cmb-type-group .cmb-row:not(:last-of-type),.cmb2-postbox .cmb-repeatable-group:not(:last-of-type),.cmb2-postbox .cmb-row:not(:last-of-type){border-bottom:0}}.cmb-type-group .cmb-remove-field-row,.cmb-type-group .cmb-repeat-group-field,.cmb2-postbox .cmb-remove-field-row,.cmb2-postbox .cmb-repeat-group-field{padding-top:1.8em}.js .cmb2-postbox.context-box .toggle-indicator:before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.js .cmb2-postbox.context-box.closed .toggle-indicator:before{content:"\f140"}.cmb2-postbox.context-box{margin-bottom:10px}.cmb2-postbox.context-box.context-after_title-box,.cmb2-postbox.context-box.context-before_permalink-box{margin-top:10px}.cmb2-postbox.context-box.context-after_editor-box{margin-top:20px;margin-bottom:0}.cmb2-postbox.context-box.context-form_top-box{margin-top:10px}.cmb2-postbox.context-box.context-form_top-box .hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}.cmb2-postbox.context-box .hndle{cursor:auto}.cmb2-context-wrap{margin-top:10px}.cmb2-context-wrap.cmb2-context-wrap-form_top{margin-right:300px;width:auto}.cmb2-context-wrap.cmb2-context-wrap-no-title .cmb2-metabox{padding:10px}.cmb2-context-wrap .cmb-th{padding:0 2% 0 0;width:18%}.cmb2-context-wrap .cmb-td{width:80%;padding:0}.cmb2-context-wrap .cmb-row{margin-bottom:10px}.cmb2-context-wrap .cmb-row:last-of-type{margin-bottom:0}@media only screen and (max-width:850px){.cmb2-context-wrap.cmb2-context-wrap-form_top{margin-right:0}}.cmb2-options-page{max-width:1200px}.cmb2-options-page.wrap>h2{margin-bottom:1em}.cmb2-options-page .cmb2-metabox>.cmb-row{padding:1em;margin-top:-1px;background:#fff;border:1px solid #e9e9e9;box-shadow:0 1px 1px rgba(0,0,0,.05)}.cmb2-options-page .cmb2-metabox>.cmb-row>.cmb-th{padding:0;font-weight:initial}.cmb2-options-page .cmb2-metabox>.cmb-row>.cmb-th+.cmb-td{float:none;padding:0 0 0 1em;margin-left:200px}@media (max-width:450px){.cmb2-options-page .cmb2-metabox>.cmb-row>.cmb-th+.cmb-td{padding:0;margin-left:0}}.cmb2-options-page .cmb2-wrap .cmb-type-title{margin-top:1em;padding:.6em 1em;background-color:#fafafa}.cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-title{font-size:12px;margin-top:0;margin-bottom:0;text-transform:uppercase}.cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-description{padding-top:.25em}.cmb2-options-page .cmb-repeatable-group .cmb-group-description .cmb-th{padding:0 0 .8em}.cmb2-options-page .cmb-repeatable-group .cmb-group-name{font-size:16px;margin-top:0;margin-bottom:0}.cmb2-options-page .cmb-repeatable-group .cmb-th>.cmb2-metabox-description{font-weight:400;padding-bottom:0!important}#poststuff .cmb-repeatable-group h2{margin:0}.edit-tags-php .cmb2-metabox-title,.profile-php .cmb2-metabox-title,.user-edit-php .cmb2-metabox-title{font-size:1.4em}.cmb2-no-box-wrap .cmb-spinner,.cmb2-postbox .cmb-spinner{float:left;display:none}.cmb-spinner.is-active{display:block}#side-sortables .cmb2-wrap>.cmb-field-list>.cmb-row,.inner-sidebar .cmb2-wrap>.cmb-field-list>.cmb-row{padding:1.4em 0}#side-sortables .cmb2-wrap input[type=text]:not(.wp-color-picker),.inner-sidebar .cmb2-wrap input[type=text]:not(.wp-color-picker){width:100%}#side-sortables .cmb2-wrap input+input:not(.wp-picker-clear),#side-sortables .cmb2-wrap input+select,.inner-sidebar .cmb2-wrap input+input:not(.wp-picker-clear),.inner-sidebar .cmb2-wrap input+select{margin-left:0;margin-top:1em;display:block}#side-sortables .cmb2-wrap input.cmb2-text-money,.inner-sidebar .cmb2-wrap input.cmb2-text-money{max-width:70%}#side-sortables .cmb2-wrap input.cmb2-text-money+.cmb2-metabox-description,.inner-sidebar .cmb2-wrap input.cmb2-text-money+.cmb2-metabox-description{display:block}#side-sortables .cmb2-wrap label,.inner-sidebar .cmb2-wrap label{display:block;font-weight:700;padding:0 0 5px}#side-sortables textarea,.inner-sidebar textarea{max-width:99%}#side-sortables .cmb-repeatable-group,.inner-sidebar .cmb-repeatable-group{border-bottom:1px solid #e9e9e9}#side-sortables .cmb-type-group>.cmb-td>.cmb-repeatable-group,.inner-sidebar .cmb-type-group>.cmb-td>.cmb-repeatable-group{border-bottom:0;margin-bottom:-1.4em}#side-sortables .cmb-td:not(.cmb-remove-row),#side-sortables .cmb-th,#side-sortables .cmb-th+.cmb-td,.inner-sidebar .cmb-td:not(.cmb-remove-row),.inner-sidebar .cmb-th,.inner-sidebar .cmb-th+.cmb-td{width:100%;display:block;float:none}#side-sortables .closed .inside,.inner-sidebar .closed .inside{display:none}#side-sortables .cmb-th,.inner-sidebar .cmb-th{display:block;float:none;padding-bottom:1em;text-align:left;width:100%;padding-left:0;padding-right:0}#side-sortables .cmb-th label,.inner-sidebar .cmb-th label{display:block;margin-top:0;margin-bottom:.5em;font-size:14px;line-height:1.4em}#side-sortables .cmb-group-description .cmb-th,.inner-sidebar .cmb-group-description .cmb-th{padding-top:0}#side-sortables .cmb-group-description .cmb2-metabox-description,#side-sortables .cmb-group-title .cmb-th,.inner-sidebar .cmb-group-description .cmb2-metabox-description,.inner-sidebar .cmb-group-title .cmb-th{padding:0}#side-sortables .cmb-repeatable-grouping+.cmb-repeatable-grouping,.inner-sidebar .cmb-repeatable-grouping+.cmb-repeatable-grouping{margin-top:1em}#side-sortables .cmb2-media-status .embed-status img,#side-sortables .cmb2-media-status .img-status img,.inner-sidebar .cmb2-media-status .embed-status img,.inner-sidebar .cmb2-media-status .img-status img{max-width:90%;height:auto}#side-sortables .cmb2-list label,.inner-sidebar .cmb2-list label{display:inline;font-weight:400}#side-sortables .cmb2-metabox-description,.inner-sidebar .cmb2-metabox-description{display:block;padding:7px 0 0}#side-sortables .cmb-type-checkbox .cmb-td label,#side-sortables .cmb-type-checkbox .cmb2-metabox-description,.inner-sidebar .cmb-type-checkbox .cmb-td label,.inner-sidebar .cmb-type-checkbox .cmb2-metabox-description{font-weight:400;display:inline}#side-sortables .cmb-row .cmb2-metabox-description,.inner-sidebar .cmb-row .cmb2-metabox-description{padding-bottom:1.8em}#side-sortables .cmb2-metabox-title,.inner-sidebar .cmb2-metabox-title{font-size:1.2em;font-style:italic}#side-sortables .cmb-remove-row,.inner-sidebar .cmb-remove-row{clear:both;padding-top:12px;padding-bottom:0}#side-sortables .cmb2-upload-button,.inner-sidebar .cmb2-upload-button{clear:both;margin-top:12px}.cmb2-metabox .cmbhandle{color:#aaa;float:right;width:27px;height:30px;cursor:pointer;right:-1em;position:relative}.cmb2-metabox .cmbhandle:before{content:'\f142';right:12px;font:400 20px/1 dashicons;speak:none;display:inline-block;padding:8px 10px;top:0;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.cmb2-metabox .postbox.closed .cmbhandle:before{content:'\f140'}.cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row{-webkit-appearance:none!important;background:none!important;border:none!important;position:absolute;left:0;top:.5em;line-height:1em;padding:2px 6px 3px;opacity:.5}.cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]){cursor:pointer;color:#a00;opacity:1}.cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]):hover{color:red}* html .cmb2-element.ui-helper-clearfix{height:1%}.cmb2-element .ui-datepicker,.cmb2-element.ui-datepicker{padding:0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:#fff;border:1px solid #dfdfdf;border-top:none;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.075);box-shadow:0 3px 6px rgba(0,0,0,.075);min-width:17em;width:auto}.cmb2-element .ui-datepicker *,.cmb2-element.ui-datepicker *{padding:0;font-family:"Open Sans",sans-serif;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.cmb2-element .ui-datepicker table,.cmb2-element.ui-datepicker table{font-size:13px;margin:0;border:none;border-collapse:collapse}.cmb2-element .ui-datepicker .ui-datepicker-header,.cmb2-element .ui-datepicker .ui-widget-header,.cmb2-element.ui-datepicker .ui-datepicker-header,.cmb2-element.ui-datepicker .ui-widget-header{border:none;color:#fff;font-weight:400}.cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover,.cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover{background:0 0;border-color:transparent;cursor:pointer}.cmb2-element .ui-datepicker .ui-datepicker-title,.cmb2-element.ui-datepicker .ui-datepicker-title{margin:0;padding:10px 0;color:#fff;font-size:14px;line-height:14px;text-align:center}.cmb2-element .ui-datepicker .ui-datepicker-title select,.cmb2-element.ui-datepicker .ui-datepicker-title select{margin-top:-8px;margin-bottom:-8px}.cmb2-element .ui-datepicker .ui-datepicker-next,.cmb2-element .ui-datepicker .ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-datepicker-next,.cmb2-element.ui-datepicker .ui-datepicker-prev{position:relative;top:0;height:34px;width:34px}.cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-next,.cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-next,.cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-prev{border:none}.cmb2-element .ui-datepicker .ui-datepicker-prev,.cmb2-element .ui-datepicker .ui-datepicker-prev-hover,.cmb2-element.ui-datepicker .ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-datepicker-prev-hover{left:0}.cmb2-element .ui-datepicker .ui-datepicker-next,.cmb2-element .ui-datepicker .ui-datepicker-next-hover,.cmb2-element.ui-datepicker .ui-datepicker-next,.cmb2-element.ui-datepicker .ui-datepicker-next-hover{right:0}.cmb2-element .ui-datepicker .ui-datepicker-next span,.cmb2-element .ui-datepicker .ui-datepicker-prev span,.cmb2-element.ui-datepicker .ui-datepicker-next span,.cmb2-element.ui-datepicker .ui-datepicker-prev span{display:none}.cmb2-element .ui-datepicker .ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-datepicker-prev{float:left}.cmb2-element .ui-datepicker .ui-datepicker-next,.cmb2-element.ui-datepicker .ui-datepicker-next{float:right}.cmb2-element .ui-datepicker .ui-datepicker-next:before,.cmb2-element .ui-datepicker .ui-datepicker-prev:before,.cmb2-element.ui-datepicker .ui-datepicker-next:before,.cmb2-element.ui-datepicker .ui-datepicker-prev:before{font:400 20px/34px dashicons;padding-left:7px;color:#fff;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:34px;height:34px}.cmb2-element .ui-datepicker .ui-datepicker-prev:before,.cmb2-element.ui-datepicker .ui-datepicker-prev:before{content:'\f341'}.cmb2-element .ui-datepicker .ui-datepicker-next:before,.cmb2-element.ui-datepicker .ui-datepicker-next:before{content:'\f345'}.cmb2-element .ui-datepicker .ui-datepicker-next-hover:before,.cmb2-element .ui-datepicker .ui-datepicker-prev-hover:before,.cmb2-element.ui-datepicker .ui-datepicker-next-hover:before,.cmb2-element.ui-datepicker .ui-datepicker-prev-hover:before{opacity:.7}.cmb2-element .ui-datepicker select.ui-datepicker-month,.cmb2-element .ui-datepicker select.ui-datepicker-year,.cmb2-element.ui-datepicker select.ui-datepicker-month,.cmb2-element.ui-datepicker select.ui-datepicker-year{width:33%;background:0 0;border-color:transparent;box-shadow:none;color:#fff}.cmb2-element .ui-datepicker select.ui-datepicker-month option,.cmb2-element .ui-datepicker select.ui-datepicker-year option,.cmb2-element.ui-datepicker select.ui-datepicker-month option,.cmb2-element.ui-datepicker select.ui-datepicker-year option{color:#333}.cmb2-element .ui-datepicker thead,.cmb2-element.ui-datepicker thead{color:#fff;font-weight:600}.cmb2-element .ui-datepicker thead th,.cmb2-element.ui-datepicker thead th{font-weight:400}.cmb2-element .ui-datepicker th,.cmb2-element.ui-datepicker th{padding:10px}.cmb2-element .ui-datepicker td,.cmb2-element.ui-datepicker td{padding:0;border:1px solid #f4f4f4}.cmb2-element .ui-datepicker td.ui-datepicker-other-month,.cmb2-element.ui-datepicker td.ui-datepicker-other-month{border:transparent}.cmb2-element .ui-datepicker td.ui-datepicker-week-end,.cmb2-element.ui-datepicker td.ui-datepicker-week-end{background-color:#f4f4f4;border:1px solid #f4f4f4}.cmb2-element .ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today,.cmb2-element.ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today{-webkit-box-shadow:inset 0 0 1px 0 rgba(0,0,0,.1);-moz-box-shadow:inset 0 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 0 1px 0 rgba(0,0,0,.1)}.cmb2-element .ui-datepicker td.ui-datepicker-today,.cmb2-element.ui-datepicker td.ui-datepicker-today{background-color:#f0f0c0}.cmb2-element .ui-datepicker td.ui-datepicker-current-day,.cmb2-element.ui-datepicker td.ui-datepicker-current-day{background:#bd8}.cmb2-element .ui-datepicker td .ui-state-default,.cmb2-element.ui-datepicker td .ui-state-default{background:0 0;border:none;text-align:center;text-decoration:none;width:auto;display:block;padding:5px 10px;font-weight:400;color:#444}.cmb2-element .ui-datepicker td.ui-state-disabled .ui-state-default,.cmb2-element.ui-datepicker td.ui-state-disabled .ui-state-default{opacity:.5}.cmb2-element .ui-datepicker .ui-datepicker-header,.cmb2-element .ui-datepicker .ui-widget-header,.cmb2-element.ui-datepicker .ui-datepicker-header,.cmb2-element.ui-datepicker .ui-widget-header{background:#00a0d2}.cmb2-element .ui-datepicker thead,.cmb2-element.ui-datepicker thead{background:#32373c}.cmb2-element .ui-datepicker td .ui-state-active,.cmb2-element .ui-datepicker td .ui-state-hover,.cmb2-element.ui-datepicker td .ui-state-active,.cmb2-element.ui-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.cmb2-element .ui-datepicker .ui-timepicker-div,.cmb2-element.ui-datepicker .ui-timepicker-div{font-size:14px}.cmb2-element .ui-datepicker .ui-timepicker-div dl,.cmb2-element.ui-datepicker .ui-timepicker-div dl{text-align:left;padding:0 .6em}.cmb2-element .ui-datepicker .ui-timepicker-div dl dt,.cmb2-element.ui-datepicker .ui-timepicker-div dl dt{float:left;clear:left;padding:0 0 0 5px}.cmb2-element .ui-datepicker .ui-timepicker-div dl dd,.cmb2-element.ui-datepicker .ui-timepicker-div dl dd{margin:0 10px 10px 40%}.cmb2-element .ui-datepicker .ui-timepicker-div dl dd select,.cmb2-element.ui-datepicker .ui-timepicker-div dl dd select{width:100%}.cmb2-element .ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane,.cmb2-element.ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane{padding:.6em;text-align:left}.cmb2-element .ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-primary,.cmb2-element .ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-secondary,.cmb2-element.ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-primary,.cmb2-element.ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-secondary{padding:0 10px 1px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:0 .6em .4em .4em}.admin-color-fresh .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-fresh .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-fresh .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-fresh .cmb2-element.ui-datepicker .ui-widget-header{background:#00a0d2}.admin-color-fresh .cmb2-element .ui-datepicker thead,.admin-color-fresh .cmb2-element.ui-datepicker thead{background:#32373c}.admin-color-fresh .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-fresh .cmb2-element.ui-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.admin-color-blue .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-blue .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-blue .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-blue .cmb2-element.ui-datepicker .ui-widget-header{background:#52accc}.admin-color-blue .cmb2-element .ui-datepicker thead,.admin-color-blue .cmb2-element.ui-datepicker thead{background:#4796b3}.admin-color-blue .cmb2-element .ui-datepicker td .ui-state-active,.admin-color-blue .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-blue .cmb2-element.ui-datepicker td .ui-state-active,.admin-color-blue .cmb2-element.ui-datepicker td .ui-state-hover{background:#096484;color:#fff}.admin-color-blue .cmb2-element .ui-datepicker td.ui-datepicker-today,.admin-color-blue .cmb2-element.ui-datepicker td.ui-datepicker-today{background:#eee}.admin-color-coffee .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-coffee .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-coffee .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-coffee .cmb2-element.ui-datepicker .ui-widget-header{background:#59524c}.admin-color-coffee .cmb2-element .ui-datepicker thead,.admin-color-coffee .cmb2-element.ui-datepicker thead{background:#46403c}.admin-color-coffee .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-coffee .cmb2-element.ui-datepicker td .ui-state-hover{background:#c7a589;color:#fff}.admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-widget-header{background:#523f6d}.admin-color-ectoplasm .cmb2-element .ui-datepicker thead,.admin-color-ectoplasm .cmb2-element.ui-datepicker thead{background:#413256}.admin-color-ectoplasm .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-ectoplasm .cmb2-element.ui-datepicker td .ui-state-hover{background:#a3b745;color:#fff}.admin-color-midnight .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-midnight .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-midnight .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-midnight .cmb2-element.ui-datepicker .ui-widget-header{background:#363b3f}.admin-color-midnight .cmb2-element .ui-datepicker thead,.admin-color-midnight .cmb2-element.ui-datepicker thead{background:#26292c}.admin-color-midnight .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-midnight .cmb2-element.ui-datepicker td .ui-state-hover{background:#e14d43;color:#fff}.admin-color-ocean .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-ocean .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-ocean .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-ocean .cmb2-element.ui-datepicker .ui-widget-header{background:#738e96}.admin-color-ocean .cmb2-element .ui-datepicker thead,.admin-color-ocean .cmb2-element.ui-datepicker thead{background:#627c83}.admin-color-ocean .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-ocean .cmb2-element.ui-datepicker td .ui-state-hover{background:#9ebaa0;color:#fff}.admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover,.admin-color-sunrise .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover,.admin-color-sunrise .cmb2-element.ui-datepicker .ui-widget-header{background:#cf4944}.admin-color-sunrise .cmb2-element .ui-datepicker th,.admin-color-sunrise .cmb2-element.ui-datepicker th{border-color:#be3631;background:#be3631}.admin-color-sunrise .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-sunrise .cmb2-element.ui-datepicker td .ui-state-hover{background:#dd823b;color:#fff}.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-light .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-light .cmb2-element.ui-datepicker .ui-widget-header{background:#e5e5e5}.admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-month,.admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-year,.admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-month,.admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-year{color:#555}.admin-color-light .cmb2-element .ui-datepicker thead,.admin-color-light .cmb2-element.ui-datepicker thead{background:#888}.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-next:before,.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-prev:before,.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-title,.admin-color-light .cmb2-element .ui-datepicker td .ui-state-default,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-next:before,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-prev:before,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-title,.admin-color-light .cmb2-element.ui-datepicker td .ui-state-default{color:#555}.admin-color-light .cmb2-element .ui-datepicker td .ui-state-active,.admin-color-light .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-light .cmb2-element.ui-datepicker td .ui-state-active,.admin-color-light .cmb2-element.ui-datepicker td .ui-state-hover{background:#ccc}.admin-color-light .cmb2-element .ui-datepicker td.ui-datepicker-today,.admin-color-light .cmb2-element.ui-datepicker td.ui-datepicker-today{background:#eee}.admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-widget-header{background:#56b274}.admin-color-bbp-evergreen .cmb2-element .ui-datepicker thead,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker thead{background:#36533f}.admin-color-bbp-evergreen .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker td .ui-state-hover{background:#446950;color:#fff}.admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-widget-header{background:#4ca26a}.admin-color-bbp-mint .cmb2-element .ui-datepicker thead,.admin-color-bbp-mint .cmb2-element.ui-datepicker thead{background:#4f6d59}.admin-color-bbp-mint .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-bbp-mint .cmb2-element.ui-datepicker td .ui-state-hover{background:#5fb37c;color:#fff}.closed .inside{display:none}.cmb-repeatable-grouping{position:relative}.cmb-repeatable-grouping .cmb-group-title{margin-left:-1em;margin-right:-1em;min-height:1.5em}.cmb-repeatable-grouping h3{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}.cmb-repeatable-group.repeatable .cmb-group-title{padding-left:2.2em}.cmb-repeatable-group.non-repeatable .cmb-group-title{padding-left:12px}.cmb-type-group .cmb-row .cmbhandle{right:0;position:absolute}.cmb-spinner{background:url(/wp-admin/images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;display:none;float:right;vertical-align:middle;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:4px 10px 0}
 
trunk/vendor/webdevstudios/cmb2/css/cmb2-rtl.css DELETED
@@ -1,2031 +0,0 @@
1
- /**
2
- * CMB2 Styling
3
- */
4
-
5
- /*--------------------------------------------------------------
6
- Main Wrap
7
- --------------------------------------------------------------*/
8
-
9
- /* line 5, sass/partials/_main_wrap.scss */
10
-
11
- .cmb2-wrap {
12
- margin: 0;
13
- }
14
-
15
- /* line 8, sass/partials/_main_wrap.scss */
16
-
17
- .cmb2-wrap input,
18
- .cmb2-wrap textarea {
19
- font-size: 14px;
20
- max-width: 100%;
21
- padding: 5px;
22
- }
23
-
24
- /* line 18, sass/partials/_main_wrap.scss */
25
-
26
- .cmb2-wrap input[type=text].cmb2-oembed {
27
- width: 100%;
28
- }
29
-
30
- /* line 23, sass/partials/_main_wrap.scss */
31
-
32
- .cmb2-wrap textarea {
33
- width: 500px;
34
- }
35
-
36
- /* line 26, sass/partials/_main_wrap.scss */
37
-
38
- .cmb2-wrap textarea.cmb2-textarea-code {
39
- font-family: "Courier 10 Pitch", Courier, monospace;
40
- line-height: 16px;
41
- }
42
-
43
- /* line 34, sass/partials/_main_wrap.scss */
44
-
45
- .cmb2-wrap input.cmb2-text-small,
46
- .cmb2-wrap input.cmb2-timepicker {
47
- width: 100px;
48
- }
49
-
50
- /* line 40, sass/partials/_main_wrap.scss */
51
-
52
- .cmb2-wrap input.cmb2-text-money {
53
- width: 90px;
54
- }
55
-
56
- /* line 45, sass/partials/_main_wrap.scss */
57
-
58
- .cmb2-wrap input.cmb2-text-medium {
59
- width: 230px;
60
- }
61
-
62
- /* line 50, sass/partials/_main_wrap.scss */
63
-
64
- .cmb2-wrap input.cmb2-upload-file {
65
- width: 65%;
66
- }
67
-
68
- /* line 54, sass/partials/_main_wrap.scss */
69
-
70
- .cmb2-wrap input.ed_button {
71
- padding: 2px 4px;
72
- }
73
-
74
- /* line 59, sass/partials/_main_wrap.scss */
75
-
76
- .cmb2-wrap input:not([type="hidden"]) + input,
77
- .cmb2-wrap input:not([type="hidden"]) + .button-secondary,
78
- .cmb2-wrap input:not([type="hidden"]) + select {
79
- margin-right: 20px;
80
- }
81
-
82
- /* line 67, sass/partials/_main_wrap.scss */
83
-
84
- .cmb2-wrap ul {
85
- margin: 0;
86
- }
87
-
88
- /* line 71, sass/partials/_main_wrap.scss */
89
-
90
- .cmb2-wrap li {
91
- font-size: 14px;
92
- line-height: 16px;
93
- margin: 1px 0 5px 0;
94
- }
95
-
96
- /* line 82, sass/partials/_main_wrap.scss */
97
-
98
- .cmb2-wrap select {
99
- font-size: 14px;
100
- margin-top: 3px;
101
- }
102
-
103
- /* line 87, sass/partials/_main_wrap.scss */
104
-
105
- .cmb2-wrap input:focus,
106
- .cmb2-wrap textarea:focus {
107
- background: #fffff8;
108
- }
109
-
110
- /* line 92, sass/partials/_main_wrap.scss */
111
-
112
- .cmb2-wrap input[type="radio"] {
113
- margin: 0 0 0 5px;
114
- padding: 0;
115
- }
116
-
117
- /* line 97, sass/partials/_main_wrap.scss */
118
-
119
- .cmb2-wrap input[type="checkbox"] {
120
- margin: 0 0 0 5px;
121
- padding: 0;
122
- }
123
-
124
- /* line 102, sass/partials/_main_wrap.scss */
125
-
126
- .cmb2-wrap button,
127
- .cmb2-wrap .button-secondary {
128
- white-space: nowrap;
129
- }
130
-
131
- /* line 107, sass/partials/_main_wrap.scss */
132
-
133
- .cmb2-wrap .mceLayout {
134
- border: 1px solid #e9e9e9 !important;
135
- }
136
-
137
- /* line 111, sass/partials/_main_wrap.scss */
138
-
139
- .cmb2-wrap .mceIframeContainer {
140
- background: #fff;
141
- }
142
-
143
- /* line 115, sass/partials/_main_wrap.scss */
144
-
145
- .cmb2-wrap .meta_mce {
146
- width: 97%;
147
- }
148
-
149
- /* line 118, sass/partials/_main_wrap.scss */
150
-
151
- .cmb2-wrap .meta_mce textarea {
152
- width: 100%;
153
- }
154
-
155
- /* line 124, sass/partials/_main_wrap.scss */
156
-
157
- .cmb2-wrap .wp-color-result,
158
- .cmb2-wrap .wp-picker-input-wrap {
159
- vertical-align: middle;
160
- }
161
-
162
- /* line 129, sass/partials/_main_wrap.scss */
163
-
164
- .cmb2-wrap .wp-color-result,
165
- .cmb2-wrap .wp-picker-container {
166
- margin: 0 0 0 10px;
167
- }
168
-
169
- /* line 134, sass/partials/_main_wrap.scss */
170
-
171
- .cmb2-wrap .cmb-row {
172
- margin: 0;
173
- }
174
-
175
- /* line 137, sass/partials/_main_wrap.scss */
176
-
177
- .cmb2-wrap .cmb-row:after {
178
- content: '';
179
- clear: both;
180
- display: block;
181
- width: 100%;
182
- }
183
-
184
- /* line 144, sass/partials/_main_wrap.scss */
185
-
186
- .cmb2-wrap .cmb-row.cmb-repeat .cmb2-metabox-description {
187
- padding-top: 0;
188
- padding-bottom: 1em;
189
- }
190
-
191
- /* line 152, sass/partials/_main_wrap.scss */
192
-
193
- .cmb2-metabox {
194
- clear: both;
195
- margin: 0;
196
- }
197
-
198
- /* line 158, sass/partials/_main_wrap.scss */
199
-
200
- .cmb2-metabox > .cmb-row:first-of-type > .cmb-td,
201
- .cmb2-metabox > .cmb-row:first-of-type > .cmb-th,
202
- .cmb2-metabox .cmb-field-list > .cmb-row:first-of-type > .cmb-td,
203
- .cmb2-metabox .cmb-field-list > .cmb-row:first-of-type > .cmb-th {
204
- border: 0;
205
- }
206
-
207
- /* line 165, sass/partials/_main_wrap.scss */
208
-
209
- .cmb-add-row {
210
- margin: 1.8em 0 0;
211
- }
212
-
213
- /* line 169, sass/partials/_main_wrap.scss */
214
-
215
- .cmb-nested .cmb-td,
216
- .cmb-repeatable-group .cmb-th,
217
- .cmb-repeatable-group:first-of-type {
218
- border: 0;
219
- }
220
-
221
- /* line 175, sass/partials/_main_wrap.scss */
222
-
223
- .cmb-row:last-of-type,
224
- .cmb2-wrap .cmb-row:last-of-type,
225
- .cmb-repeatable-group:last-of-type {
226
- border-bottom: 0;
227
- }
228
-
229
- /* line 181, sass/partials/_main_wrap.scss */
230
-
231
- .cmb-repeatable-grouping {
232
- border: 1px solid #e9e9e9;
233
- padding: 0 1em;
234
- }
235
-
236
- /* line 185, sass/partials/_main_wrap.scss */
237
-
238
- .cmb-repeatable-grouping.cmb-row {
239
- margin: 0 0 0.8em;
240
- }
241
-
242
- /* line 193, sass/partials/_main_wrap.scss */
243
-
244
- .cmb-th {
245
- color: #222222;
246
- float: right;
247
- font-weight: 600;
248
- line-height: 1.3;
249
- padding: 20px 0 20px 10px;
250
- vertical-align: top;
251
- width: 200px;
252
- }
253
-
254
- /* line 207, sass/partials/_main_wrap.scss */
255
-
256
- .cmb-td {
257
- line-height: 1.3;
258
- max-width: 100%;
259
- padding: 15px 10px;
260
- vertical-align: middle;
261
- }
262
-
263
- /* line 216, sass/partials/_main_wrap.scss */
264
-
265
- .cmb-type-title .cmb-td {
266
- padding: 0;
267
- }
268
-
269
- /* line 221, sass/partials/_main_wrap.scss */
270
-
271
- .cmb-th label {
272
- display: block;
273
- padding: 5px 0;
274
- }
275
-
276
- /* line 226, sass/partials/_main_wrap.scss */
277
-
278
- .cmb-th + .cmb-td {
279
- float: right;
280
- }
281
-
282
- /* line 230, sass/partials/_main_wrap.scss */
283
-
284
- .cmb-td .cmb-td {
285
- padding-bottom: 1em;
286
- }
287
-
288
- /* line 234, sass/partials/_main_wrap.scss */
289
-
290
- .cmb-remove-row {
291
- text-align: left;
292
- }
293
-
294
- /* line 238, sass/partials/_main_wrap.scss */
295
-
296
- .empty-row.hidden {
297
- display: none;
298
- }
299
-
300
- /* line 243, sass/partials/_main_wrap.scss */
301
-
302
- .cmb-repeat-table {
303
- background-color: #fafafa;
304
- border: 1px solid #e1e1e1;
305
- }
306
-
307
- /* line 247, sass/partials/_main_wrap.scss */
308
-
309
- .cmb-repeat-table .cmb-row.cmb-repeat-row {
310
- position: relative;
311
- counter-increment: el;
312
- margin: 0;
313
- padding: 10px 50px 10px 10px;
314
- border-bottom: none !important;
315
- }
316
-
317
- /* line 255, sass/partials/_main_wrap.scss */
318
-
319
- .cmb-repeat-table .cmb-row.cmb-repeat-row + .cmb-repeat-row {
320
- border-top: solid 1px #e9e9e9;
321
- }
322
-
323
- /* line 259, sass/partials/_main_wrap.scss */
324
-
325
- .cmb-repeat-table .cmb-row.cmb-repeat-row:before {
326
- content: counter(el);
327
- display: block;
328
- top: 0;
329
- right: 0;
330
- position: absolute;
331
- width: 35px;
332
- height: 100%;
333
- line-height: 35px;
334
- color: #aaaaaa;
335
- text-align: center;
336
- border-left: solid 1px #e9e9e9;
337
- }
338
-
339
- /* line 276, sass/partials/_main_wrap.scss */
340
-
341
- .cmb-repeat-table .cmb-row.cmb-repeat-row .cmb-td {
342
- margin: 0;
343
- padding: 0;
344
- }
345
-
346
- /* line 283, sass/partials/_main_wrap.scss */
347
-
348
- .cmb-repeat-table + .cmb-add-row {
349
- margin: 0;
350
- }
351
-
352
- /* line 286, sass/partials/_main_wrap.scss */
353
-
354
- .cmb-repeat-table + .cmb-add-row:before {
355
- content: '';
356
- width: 1px;
357
- height: 1.6em;
358
- display: block;
359
- margin-right: 17px;
360
- background-color: gainsboro;
361
- }
362
-
363
- /* line 296, sass/partials/_main_wrap.scss */
364
-
365
- .cmb-repeat-table .cmb-remove-row {
366
- top: 7px;
367
- left: 7px;
368
- position: absolute;
369
- width: auto;
370
- margin-right: 0;
371
- padding: 0 !important;
372
- display: none;
373
- }
374
-
375
- /* line 307, sass/partials/_main_wrap.scss */
376
-
377
- .cmb-repeat-table .cmb-remove-row > .cmb-remove-row-button {
378
- font-size: 20px;
379
- text-indent: -1000px;
380
- overflow: hidden;
381
- position: relative;
382
- height: auto;
383
- line-height: 1;
384
- padding: 0 10px 0;
385
- }
386
-
387
- /* line 318, sass/partials/_main_wrap.scss */
388
-
389
- .cmb-repeat-table .cmb-remove-row > .cmb-remove-row-button:before {
390
- content: "";
391
- font-family: 'Dashicons';
392
- speak: none;
393
- font-weight: normal;
394
- font-variant: normal;
395
- text-transform: none;
396
- line-height: 1;
397
- -webkit-font-smoothing: antialiased;
398
- margin: 0;
399
- text-indent: 0;
400
- position: absolute;
401
- top: 0;
402
- right: 0;
403
- width: 100%;
404
- height: 100%;
405
- text-align: center;
406
- }
407
-
408
- /* line 324, sass/partials/_main_wrap.scss */
409
-
410
- .cmb-repeat-table .cmb-repeat-row:hover .cmb-remove-row {
411
- display: block;
412
- }
413
-
414
- /* line 332, sass/partials/_main_wrap.scss */
415
-
416
- .cmb-repeatable-group .cmb-th {
417
- padding: 5px;
418
- }
419
-
420
- /* line 336, sass/partials/_main_wrap.scss */
421
-
422
- .cmb-repeatable-group .cmb-group-title {
423
- background-color: #e9e9e9;
424
- padding: 8px 2.2em 8px 12px;
425
- margin: 0 -1em;
426
- min-height: 1.5em;
427
- font-size: 14px;
428
- line-height: 1.4;
429
- }
430
-
431
- /* line 344, sass/partials/_main_wrap.scss */
432
-
433
- .cmb-repeatable-group .cmb-group-title h4 {
434
- border: 0;
435
- margin: 0;
436
- font-size: 1.2em;
437
- font-weight: 500;
438
- padding: 0.5em 0.75em;
439
- }
440
-
441
- /* line 352, sass/partials/_main_wrap.scss */
442
-
443
- .cmb-repeatable-group .cmb-group-title .cmb-th {
444
- display: block;
445
- width: 100%;
446
- }
447
-
448
- /* line 358, sass/partials/_main_wrap.scss */
449
-
450
- .cmb-repeatable-group .cmb-group-description .cmb-th {
451
- font-size: 1.2em;
452
- display: block;
453
- float: none;
454
- padding-bottom: 1em;
455
- text-align: right;
456
- width: 100%;
457
- }
458
-
459
- /* line 27, sass/partials/_mixins.scss */
460
-
461
- .cmb-repeatable-group .cmb-group-description .cmb-th label {
462
- display: block;
463
- margin-top: 0;
464
- margin-bottom: 0.5em;
465
- }
466
-
467
- /* line 362, sass/partials/_main_wrap.scss */
468
-
469
- .cmb-repeatable-group .cmb-shift-rows {
470
- font-size: 1em;
471
- margin-left: 1em;
472
- text-decoration: none;
473
- }
474
-
475
- /* line 367, sass/partials/_main_wrap.scss */
476
-
477
- .cmb-repeatable-group .cmb-shift-rows .dashicons {
478
- font-size: 1.5em;
479
- height: 1.5em;
480
- line-height: 1.2em;
481
- width: 1em;
482
- }
483
-
484
- /* line 373, sass/partials/_main_wrap.scss */
485
-
486
- .cmb-repeatable-group .cmb-shift-rows .dashicons.dashicons-arrow-down-alt2 {
487
- line-height: 1.3em;
488
- }
489
-
490
- /* line 380, sass/partials/_main_wrap.scss */
491
-
492
- .cmb-repeatable-group .cmb2-upload-button {
493
- float: left;
494
- }
495
-
496
- /* line 386, sass/partials/_main_wrap.scss */
497
-
498
- p.cmb2-metabox-description {
499
- color: #aaaaaa;
500
- font-style: italic;
501
- margin: 0;
502
- padding-top: .5em;
503
- }
504
-
505
- /* line 393, sass/partials/_main_wrap.scss */
506
-
507
- span.cmb2-metabox-description {
508
- color: #aaaaaa;
509
- font-style: italic;
510
- }
511
-
512
- /* line 398, sass/partials/_main_wrap.scss */
513
-
514
- .cmb2-metabox-title {
515
- margin: 0 0 5px 0;
516
- padding: 5px 0 0 0;
517
- font-size: 14px;
518
- }
519
-
520
- /* line 404, sass/partials/_main_wrap.scss */
521
-
522
- .cmb-inline ul {
523
- padding: 4px 0 0 0;
524
- }
525
-
526
- /* line 408, sass/partials/_main_wrap.scss */
527
-
528
- .cmb-inline li {
529
- display: inline-block;
530
- padding-left: 18px;
531
- }
532
-
533
- /* line 413, sass/partials/_main_wrap.scss */
534
-
535
- .cmb-type-textarea-code pre {
536
- margin: 0;
537
- }
538
-
539
- /* line 419, sass/partials/_main_wrap.scss */
540
-
541
- .cmb2-media-status .img-status {
542
- clear: none;
543
- display: inline-block;
544
- vertical-align: middle;
545
- margin-left: 10px;
546
- width: auto;
547
- }
548
-
549
- /* line 426, sass/partials/_main_wrap.scss */
550
-
551
- .cmb2-media-status .img-status img {
552
- max-width: 350px;
553
- height: auto;
554
- }
555
-
556
- /* line 432, sass/partials/_main_wrap.scss */
557
-
558
- .cmb2-media-status .img-status img,
559
- .cmb2-media-status .embed-status {
560
- background: #ffffff;
561
- border: 1px solid #e9e9e9;
562
- border-radius: 2px;
563
- -moz-border-radius: 2px;
564
- margin: 15px 0 0 0;
565
- padding: 5px;
566
- }
567
-
568
- /* line 442, sass/partials/_main_wrap.scss */
569
-
570
- .cmb2-media-status .embed-status {
571
- float: right;
572
- max-width: 800px;
573
- }
574
-
575
- /* line 447, sass/partials/_main_wrap.scss */
576
-
577
- .cmb2-media-status .img-status,
578
- .cmb2-media-status .embed-status {
579
- position: relative;
580
- }
581
-
582
- /* line 450, sass/partials/_main_wrap.scss */
583
-
584
- .cmb2-media-status .img-status .cmb2-remove-file-button,
585
- .cmb2-media-status .embed-status .cmb2-remove-file-button {
586
- background: url(../images/ico-delete.png);
587
- height: 16px;
588
- right: -5px;
589
- position: absolute;
590
- text-indent: -9999px;
591
- top: -5px;
592
- width: 16px;
593
- }
594
-
595
- /* line 464, sass/partials/_main_wrap.scss */
596
-
597
- .cmb2-media-status .img-status .cmb2-remove-file-button {
598
- top: 10px;
599
- }
600
-
601
- /* line 469, sass/partials/_main_wrap.scss */
602
-
603
- .cmb2-media-status .img-status img,
604
- .cmb2-media-status .file-status > span {
605
- cursor: pointer;
606
- }
607
-
608
- /* line 475, sass/partials/_main_wrap.scss */
609
-
610
- .cmb-type-file-list .cmb2-media-status .img-status {
611
- clear: none;
612
- vertical-align: middle;
613
- width: auto;
614
- margin-left: 10px;
615
- margin-bottom: 10px;
616
- margin-top: 0;
617
- }
618
-
619
- /* line 484, sass/partials/_main_wrap.scss */
620
-
621
- .cmb-attach-list li {
622
- clear: both;
623
- display: inline-block;
624
- width: 100%;
625
- margin-top: 5px;
626
- margin-bottom: 10px;
627
- }
628
-
629
- /* line 491, sass/partials/_main_wrap.scss */
630
-
631
- .cmb-attach-list li img {
632
- cursor: move;
633
- float: right;
634
- margin-left: 10px;
635
- }
636
-
637
- /* line 498, sass/partials/_main_wrap.scss */
638
-
639
- .cmb2-remove-wrapper {
640
- margin: 0;
641
- }
642
-
643
- /* line 502, sass/partials/_main_wrap.scss */
644
-
645
- .child-cmb2 .cmb-th {
646
- text-align: right;
647
- }
648
-
649
- /* line 506, sass/partials/_main_wrap.scss */
650
-
651
- .cmb2-indented-hierarchy {
652
- padding-right: 1.5em;
653
- }
654
-
655
- /*--------------------------------------------------------------
656
- Post Metaboxes
657
- --------------------------------------------------------------*/
658
-
659
- /* line 4, sass/partials/_post_metaboxes.scss */
660
-
661
- #poststuff .cmb-group-title {
662
- margin-right: -1em;
663
- margin-left: -1em;
664
- min-height: 1.5em;
665
- }
666
-
667
- /* line 10, sass/partials/_post_metaboxes.scss */
668
-
669
- #poststuff .repeatable .cmb-group-title {
670
- padding-right: 2.2em;
671
- }
672
-
673
- /* line 16, sass/partials/_post_metaboxes.scss */
674
-
675
- .cmb2-postbox .cmb2-wrap,
676
- .cmb-type-group .cmb2-wrap {
677
- margin: 0;
678
- }
679
-
680
- /* line 19, sass/partials/_post_metaboxes.scss */
681
-
682
- .cmb2-postbox .cmb2-wrap > .cmb-field-list > .cmb-row,
683
- .cmb-type-group .cmb2-wrap > .cmb-field-list > .cmb-row {
684
- padding: 1.8em 0;
685
- }
686
-
687
- /* line 25, sass/partials/_post_metaboxes.scss */
688
-
689
- .cmb2-postbox .cmb2-wrap input[type=text].cmb2-oembed,
690
- .cmb-type-group .cmb2-wrap input[type=text].cmb2-oembed {
691
- width: 100%;
692
- }
693
-
694
- /* line 31, sass/partials/_post_metaboxes.scss */
695
-
696
- .cmb2-postbox .cmb-row,
697
- .cmb-type-group .cmb-row {
698
- padding: 0 0 1.8em;
699
- margin: 0 0 0.8em;
700
- }
701
-
702
- /* line 35, sass/partials/_post_metaboxes.scss */
703
-
704
- .cmb2-postbox .cmb-row .cmbhandle,
705
- .cmb-type-group .cmb-row .cmbhandle {
706
- left: -1em;
707
- position: relative;
708
- }
709
-
710
- /* line 41, sass/partials/_post_metaboxes.scss */
711
-
712
- .cmb2-postbox .cmb-repeatable-grouping,
713
- .cmb-type-group .cmb-repeatable-grouping {
714
- padding: 0 1em;
715
- max-width: 100%;
716
- min-width: 1px !important;
717
- }
718
-
719
- /* line 47, sass/partials/_post_metaboxes.scss */
720
-
721
- .cmb2-postbox .cmb-repeatable-group > .cmb-row,
722
- .cmb-type-group .cmb-repeatable-group > .cmb-row {
723
- padding-bottom: 0;
724
- }
725
-
726
- /* line 51, sass/partials/_post_metaboxes.scss */
727
-
728
- .cmb2-postbox .cmb-th,
729
- .cmb-type-group .cmb-th {
730
- width: 18%;
731
- padding: 0 0 0 2%;
732
- }
733
-
734
- /* line 57, sass/partials/_post_metaboxes.scss */
735
-
736
- .cmb2-postbox .cmb-td,
737
- .cmb-type-group .cmb-td {
738
- margin-bottom: 0;
739
- padding: 0;
740
- line-height: 1.3;
741
- }
742
-
743
- /* line 63, sass/partials/_post_metaboxes.scss */
744
-
745
- .cmb2-postbox .cmb-th + .cmb-td,
746
- .cmb-type-group .cmb-th + .cmb-td {
747
- width: 80%;
748
- float: left;
749
- }
750
-
751
- /* line 68, sass/partials/_post_metaboxes.scss */
752
-
753
- .cmb2-postbox .cmb-row:not(:last-of-type),
754
- .cmb2-postbox .cmb-repeatable-group:not(:last-of-type),
755
- .cmb-type-group .cmb-row:not(:last-of-type),
756
- .cmb-type-group .cmb-repeatable-group:not(:last-of-type) {
757
- border-bottom: 1px solid #e9e9e9;
758
- }
759
-
760
- /* line 77, sass/partials/_post_metaboxes.scss */
761
-
762
- .cmb2-postbox .cmb-repeat-group-field,
763
- .cmb2-postbox .cmb-remove-field-row,
764
- .cmb-type-group .cmb-repeat-group-field,
765
- .cmb-type-group .cmb-remove-field-row {
766
- padding-top: 1.8em;
767
- }
768
-
769
- /*--------------------------------------------------------------
770
- Context Metaboxes
771
- --------------------------------------------------------------*/
772
-
773
- /* Metabox collapse arrow indicators */
774
-
775
- /* line 9, sass/partials/_context_metaboxes.scss */
776
-
777
- .js .cmb2-postbox.context-box .toggle-indicator:before {
778
- content: "\f142";
779
- display: inline-block;
780
- font: normal 20px/1 dashicons;
781
- speak: none;
782
- -webkit-font-smoothing: antialiased;
783
- -moz-osx-font-smoothing: grayscale;
784
- text-decoration: none !important;
785
- }
786
-
787
- /* line 22, sass/partials/_context_metaboxes.scss */
788
-
789
- .js .cmb2-postbox.context-box.closed .toggle-indicator:before {
790
- content: "\f140";
791
- }
792
-
793
- /* line 30, sass/partials/_context_metaboxes.scss */
794
-
795
- .cmb2-postbox.context-box {
796
- margin-bottom: 10px;
797
- }
798
-
799
- /* line 34, sass/partials/_context_metaboxes.scss */
800
-
801
- .cmb2-postbox.context-box.context-before_permalink-box {
802
- margin-top: 10px;
803
- }
804
-
805
- /* line 38, sass/partials/_context_metaboxes.scss */
806
-
807
- .cmb2-postbox.context-box.context-after_title-box {
808
- margin-top: 10px;
809
- }
810
-
811
- /* line 42, sass/partials/_context_metaboxes.scss */
812
-
813
- .cmb2-postbox.context-box.context-after_editor-box {
814
- margin-top: 20px;
815
- margin-bottom: 0;
816
- }
817
-
818
- /* line 47, sass/partials/_context_metaboxes.scss */
819
-
820
- .cmb2-postbox.context-box.context-form_top-box {
821
- margin-top: 10px;
822
- }
823
-
824
- /* line 51, sass/partials/_context_metaboxes.scss */
825
-
826
- .cmb2-postbox.context-box.context-form_top-box .hndle {
827
- font-size: 14px;
828
- padding: 8px 12px;
829
- margin: 0;
830
- line-height: 1.4;
831
- }
832
-
833
- /* line 59, sass/partials/_context_metaboxes.scss */
834
-
835
- .cmb2-postbox.context-box .hndle {
836
- cursor: auto;
837
- }
838
-
839
- /* line 64, sass/partials/_context_metaboxes.scss */
840
-
841
- .cmb2-context-wrap {
842
- margin-top: 10px;
843
- }
844
-
845
- /* line 68, sass/partials/_context_metaboxes.scss */
846
-
847
- .cmb2-context-wrap.cmb2-context-wrap-form_top {
848
- margin-left: 300px;
849
- width: auto;
850
- }
851
-
852
- /* line 75, sass/partials/_context_metaboxes.scss */
853
-
854
- .cmb2-context-wrap.cmb2-context-wrap-no-title .cmb2-metabox {
855
- padding: 10px;
856
- }
857
-
858
- /* line 80, sass/partials/_context_metaboxes.scss */
859
-
860
- .cmb2-context-wrap .cmb-th {
861
- padding: 0 0 0 2%;
862
- width: 18%;
863
- }
864
-
865
- /* line 85, sass/partials/_context_metaboxes.scss */
866
-
867
- .cmb2-context-wrap .cmb-td {
868
- width: 80%;
869
- padding: 0;
870
- }
871
-
872
- /* line 90, sass/partials/_context_metaboxes.scss */
873
-
874
- .cmb2-context-wrap .cmb-row {
875
- margin-bottom: 10px;
876
- }
877
-
878
- /* line 93, sass/partials/_context_metaboxes.scss */
879
-
880
- .cmb2-context-wrap .cmb-row:last-of-type {
881
- margin-bottom: 0;
882
- }
883
-
884
- /* one column on the post write/edit screen */
885
-
886
- /*--------------------------------------------------------------
887
- Options page
888
- --------------------------------------------------------------*/
889
-
890
- /* line 4, sass/partials/_options-page.scss */
891
-
892
- .cmb2-options-page {
893
- max-width: 1200px;
894
- }
895
-
896
- /* line 7, sass/partials/_options-page.scss */
897
-
898
- .cmb2-options-page.wrap > h2 {
899
- margin-bottom: 1em;
900
- }
901
-
902
- /* line 11, sass/partials/_options-page.scss */
903
-
904
- .cmb2-options-page .cmb2-metabox > .cmb-row {
905
- padding: 1em;
906
- margin-top: -1px;
907
- background: #ffffff;
908
- border: 1px solid #e9e9e9;
909
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
910
- }
911
-
912
- /* line 18, sass/partials/_options-page.scss */
913
-
914
- .cmb2-options-page .cmb2-metabox > .cmb-row > .cmb-th {
915
- padding: 0;
916
- font-weight: initial;
917
- }
918
-
919
- /* line 23, sass/partials/_options-page.scss */
920
-
921
- .cmb2-options-page .cmb2-metabox > .cmb-row > .cmb-th + .cmb-td {
922
- float: none;
923
- padding: 0 1em 0 0;
924
- margin-right: 200px;
925
- }
926
-
927
- /* line 36, sass/partials/_options-page.scss */
928
-
929
- .cmb2-options-page .cmb2-wrap .cmb-type-title {
930
- margin-top: 1em;
931
- padding: 0.6em 1em;
932
- background-color: #fafafa;
933
- }
934
-
935
- /* line 41, sass/partials/_options-page.scss */
936
-
937
- .cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-title {
938
- font-size: 12px;
939
- margin-top: 0;
940
- margin-bottom: 0;
941
- text-transform: uppercase;
942
- }
943
-
944
- /* line 48, sass/partials/_options-page.scss */
945
-
946
- .cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-description {
947
- padding-top: 0.25em;
948
- }
949
-
950
- /* line 54, sass/partials/_options-page.scss */
951
-
952
- .cmb2-options-page .cmb-repeatable-group .cmb-group-description .cmb-th {
953
- padding: 0 0 0.8em 0;
954
- }
955
-
956
- /* line 58, sass/partials/_options-page.scss */
957
-
958
- .cmb2-options-page .cmb-repeatable-group .cmb-group-name {
959
- font-size: 16px;
960
- margin-top: 0;
961
- margin-bottom: 0;
962
- }
963
-
964
- /* line 64, sass/partials/_options-page.scss */
965
-
966
- .cmb2-options-page .cmb-repeatable-group .cmb-th > .cmb2-metabox-description {
967
- font-weight: 400;
968
- padding-bottom: 0 !important;
969
- }
970
-
971
- /*--------------------------------------------------------------
972
- Misc.
973
- --------------------------------------------------------------*/
974
-
975
- /* line 5, sass/partials/_misc.scss */
976
-
977
- #poststuff .cmb-repeatable-group h2 {
978
- margin: 0;
979
- }
980
-
981
- /* line 12, sass/partials/_misc.scss */
982
-
983
- .edit-tags-php .cmb2-metabox-title,
984
- .profile-php .cmb2-metabox-title,
985
- .user-edit-php .cmb2-metabox-title {
986
- font-size: 1.4em;
987
- }
988
-
989
- /* line 18, sass/partials/_misc.scss */
990
-
991
- .cmb2-postbox .cmb-spinner,
992
- .cmb2-no-box-wrap .cmb-spinner {
993
- float: right;
994
- display: none;
995
- }
996
-
997
- /* line 24, sass/partials/_misc.scss */
998
-
999
- .cmb-spinner {
1000
- display: none;
1001
- }
1002
-
1003
- /* line 26, sass/partials/_misc.scss */
1004
-
1005
- .cmb-spinner.is-active {
1006
- display: block;
1007
- }
1008
-
1009
- /*--------------------------------------------------------------
1010
- Sidebar Placement Adjustments
1011
- --------------------------------------------------------------*/
1012
-
1013
- /* line 10, sass/partials/_sidebar_placements.scss */
1014
-
1015
- .inner-sidebar .cmb2-wrap > .cmb-field-list > .cmb-row,
1016
- #side-sortables .cmb2-wrap > .cmb-field-list > .cmb-row {
1017
- padding: 1.4em 0;
1018
- }
1019
-
1020
- /* line 16, sass/partials/_sidebar_placements.scss */
1021
-
1022
- .inner-sidebar .cmb2-wrap input[type=text]:not(.wp-color-picker),
1023
- #side-sortables .cmb2-wrap input[type=text]:not(.wp-color-picker) {
1024
- width: 100%;
1025
- }
1026
-
1027
- /* line 20, sass/partials/_sidebar_placements.scss */
1028
-
1029
- .inner-sidebar .cmb2-wrap input + input:not(.wp-picker-clear),
1030
- .inner-sidebar .cmb2-wrap input + select,
1031
- #side-sortables .cmb2-wrap input + input:not(.wp-picker-clear),
1032
- #side-sortables .cmb2-wrap input + select {
1033
- margin-right: 0;
1034
- margin-top: 1em;
1035
- display: block;
1036
- }
1037
-
1038
- /* line 26, sass/partials/_sidebar_placements.scss */
1039
-
1040
- .inner-sidebar .cmb2-wrap input.cmb2-text-money,
1041
- #side-sortables .cmb2-wrap input.cmb2-text-money {
1042
- max-width: 70%;
1043
- }
1044
-
1045
- /* line 28, sass/partials/_sidebar_placements.scss */
1046
-
1047
- .inner-sidebar .cmb2-wrap input.cmb2-text-money + .cmb2-metabox-description,
1048
- #side-sortables .cmb2-wrap input.cmb2-text-money + .cmb2-metabox-description {
1049
- display: block;
1050
- }
1051
-
1052
- /* line 34, sass/partials/_sidebar_placements.scss */
1053
-
1054
- .inner-sidebar .cmb2-wrap label,
1055
- #side-sortables .cmb2-wrap label {
1056
- display: block;
1057
- font-weight: 700;
1058
- padding: 0 0 5px;
1059
- }
1060
-
1061
- /* line 42, sass/partials/_sidebar_placements.scss */
1062
-
1063
- .inner-sidebar textarea,
1064
- #side-sortables textarea {
1065
- max-width: 99%;
1066
- }
1067
-
1068
- /* line 46, sass/partials/_sidebar_placements.scss */
1069
-
1070
- .inner-sidebar .cmb-repeatable-group,
1071
- #side-sortables .cmb-repeatable-group {
1072
- border-bottom: 1px solid #e9e9e9;
1073
- }
1074
-
1075
- /* line 50, sass/partials/_sidebar_placements.scss */
1076
-
1077
- .inner-sidebar .cmb-type-group > .cmb-td > .cmb-repeatable-group,
1078
- #side-sortables .cmb-type-group > .cmb-td > .cmb-repeatable-group {
1079
- border-bottom: 0;
1080
- margin-bottom: -1.4em;
1081
- }
1082
-
1083
- /* line 55, sass/partials/_sidebar_placements.scss */
1084
-
1085
- .inner-sidebar .cmb-th,
1086
- .inner-sidebar .cmb-td:not(.cmb-remove-row),
1087
- .inner-sidebar .cmb-th + .cmb-td,
1088
- #side-sortables .cmb-th,
1089
- #side-sortables .cmb-td:not(.cmb-remove-row),
1090
- #side-sortables .cmb-th + .cmb-td {
1091
- width: 100%;
1092
- display: block;
1093
- float: none;
1094
- }
1095
-
1096
- /* line 63, sass/partials/_sidebar_placements.scss */
1097
-
1098
- .inner-sidebar .closed .inside,
1099
- #side-sortables .closed .inside {
1100
- display: none;
1101
- }
1102
-
1103
- /* line 67, sass/partials/_sidebar_placements.scss */
1104
-
1105
- .inner-sidebar .cmb-th,
1106
- #side-sortables .cmb-th {
1107
- display: block;
1108
- float: none;
1109
- padding-bottom: 1em;
1110
- text-align: right;
1111
- width: 100%;
1112
- padding-right: 0;
1113
- padding-left: 0;
1114
- }
1115
-
1116
- /* line 27, sass/partials/_mixins.scss */
1117
-
1118
- .inner-sidebar .cmb-th label,
1119
- #side-sortables .cmb-th label {
1120
- display: block;
1121
- margin-top: 0;
1122
- margin-bottom: 0.5em;
1123
- }
1124
-
1125
- /* line 14, sass/partials/_mixins.scss */
1126
-
1127
- .inner-sidebar .cmb-th label,
1128
- #side-sortables .cmb-th label {
1129
- font-size: 14px;
1130
- line-height: 1.4em;
1131
- }
1132
-
1133
- /* line 74, sass/partials/_sidebar_placements.scss */
1134
-
1135
- .inner-sidebar .cmb-group-description .cmb-th,
1136
- #side-sortables .cmb-group-description .cmb-th {
1137
- padding-top: 0;
1138
- }
1139
-
1140
- /* line 77, sass/partials/_sidebar_placements.scss */
1141
-
1142
- .inner-sidebar .cmb-group-description .cmb2-metabox-description,
1143
- #side-sortables .cmb-group-description .cmb2-metabox-description {
1144
- padding: 0;
1145
- }
1146
-
1147
- /* line 84, sass/partials/_sidebar_placements.scss */
1148
-
1149
- .inner-sidebar .cmb-group-title .cmb-th,
1150
- #side-sortables .cmb-group-title .cmb-th {
1151
- padding: 0;
1152
- }
1153
-
1154
- /* line 90, sass/partials/_sidebar_placements.scss */
1155
-
1156
- .inner-sidebar .cmb-repeatable-grouping + .cmb-repeatable-grouping,
1157
- #side-sortables .cmb-repeatable-grouping + .cmb-repeatable-grouping {
1158
- margin-top: 1em;
1159
- }
1160
-
1161
- /* line 99, sass/partials/_sidebar_placements.scss */
1162
-
1163
- .inner-sidebar .cmb2-media-status .img-status img,
1164
- .inner-sidebar .cmb2-media-status .embed-status img,
1165
- #side-sortables .cmb2-media-status .img-status img,
1166
- #side-sortables .cmb2-media-status .embed-status img {
1167
- max-width: 90%;
1168
- height: auto;
1169
- }
1170
-
1171
- /* line 107, sass/partials/_sidebar_placements.scss */
1172
-
1173
- .inner-sidebar .cmb2-list label,
1174
- #side-sortables .cmb2-list label {
1175
- display: inline;
1176
- font-weight: normal;
1177
- }
1178
-
1179
- /* line 112, sass/partials/_sidebar_placements.scss */
1180
-
1181
- .inner-sidebar .cmb2-metabox-description,
1182
- #side-sortables .cmb2-metabox-description {
1183
- display: block;
1184
- padding: 7px 0 0;
1185
- }
1186
-
1187
- /* line 119, sass/partials/_sidebar_placements.scss */
1188
-
1189
- .inner-sidebar .cmb-type-checkbox .cmb-td label,
1190
- .inner-sidebar .cmb-type-checkbox .cmb2-metabox-description,
1191
- #side-sortables .cmb-type-checkbox .cmb-td label,
1192
- #side-sortables .cmb-type-checkbox .cmb2-metabox-description {
1193
- font-weight: normal;
1194
- display: inline;
1195
- }
1196
-
1197
- /* line 126, sass/partials/_sidebar_placements.scss */
1198
-
1199
- .inner-sidebar .cmb-row .cmb2-metabox-description,
1200
- #side-sortables .cmb-row .cmb2-metabox-description {
1201
- padding-bottom: 1.8em;
1202
- }
1203
-
1204
- /* line 130, sass/partials/_sidebar_placements.scss */
1205
-
1206
- .inner-sidebar .cmb2-metabox-title,
1207
- #side-sortables .cmb2-metabox-title {
1208
- font-size: 1.2em;
1209
- font-style: italic;
1210
- }
1211
-
1212
- /* line 135, sass/partials/_sidebar_placements.scss */
1213
-
1214
- .inner-sidebar .cmb-remove-row,
1215
- #side-sortables .cmb-remove-row {
1216
- clear: both;
1217
- padding-top: 12px;
1218
- padding-bottom: 0;
1219
- }
1220
-
1221
- /* line 141, sass/partials/_sidebar_placements.scss */
1222
-
1223
- .inner-sidebar .cmb2-upload-button,
1224
- #side-sortables .cmb2-upload-button {
1225
- clear: both;
1226
- margin-top: 12px;
1227
- }
1228
-
1229
- /* line 2, sass/partials/_collapsible_ui.scss */
1230
-
1231
- .cmb2-metabox .cmbhandle {
1232
- color: #aaa;
1233
- float: left;
1234
- width: 27px;
1235
- height: 30px;
1236
- cursor: pointer;
1237
- left: -1em;
1238
- position: relative;
1239
- }
1240
-
1241
- /* line 10, sass/partials/_collapsible_ui.scss */
1242
-
1243
- .cmb2-metabox .cmbhandle:before {
1244
- content: '\f142';
1245
- left: 12px;
1246
- font: normal 20px/1 'dashicons';
1247
- speak: none;
1248
- display: inline-block;
1249
- padding: 8px 10px;
1250
- top: 0;
1251
- position: relative;
1252
- -webkit-font-smoothing: antialiased;
1253
- -moz-osx-font-smoothing: grayscale;
1254
- text-decoration: none !important;
1255
- }
1256
-
1257
- /* line 27, sass/partials/_collapsible_ui.scss */
1258
-
1259
- .cmb2-metabox .postbox.closed .cmbhandle:before {
1260
- content: '\f140';
1261
- }
1262
-
1263
- /* line 33, sass/partials/_collapsible_ui.scss */
1264
-
1265
- .cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row {
1266
- -webkit-appearance: none !important;
1267
- background: none !important;
1268
- border: none !important;
1269
- position: absolute;
1270
- right: 0;
1271
- top: .5em;
1272
- line-height: 1em;
1273
- padding: 2px 6px 3px;
1274
- opacity: .5;
1275
- }
1276
-
1277
- /* line 43, sass/partials/_collapsible_ui.scss */
1278
-
1279
- .cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]) {
1280
- cursor: pointer;
1281
- color: #a00;
1282
- opacity: 1;
1283
- }
1284
-
1285
- /* line 47, sass/partials/_collapsible_ui.scss */
1286
-
1287
- .cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]):hover {
1288
- color: #f00;
1289
- }
1290
-
1291
- /*
1292
- * jQuery UI CSS Framework 1.8.16
1293
- *
1294
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
1295
- * Dual licensed under the MIT or GPL Version 2 licenses.
1296
- * http://jquery.org/license
1297
- *
1298
- * http://docs.jquery.com/UI/Theming/API
1299
- *
1300
- * WordPress Styles adopted from "jQuery UI Datepicker CSS for WordPress"
1301
- * https://github.com/stuttter/wp-datepicker-styling
1302
- *
1303
- */
1304
-
1305
- /* line 15, sass/partials/_jquery_ui.scss */
1306
-
1307
- * html .cmb2-element.ui-helper-clearfix {
1308
- height: 1%;
1309
- }
1310
-
1311
- /* line 24, sass/partials/_jquery_ui.scss */
1312
-
1313
- .cmb2-element.ui-datepicker,
1314
- .cmb2-element .ui-datepicker {
1315
- padding: 0;
1316
- margin: 0;
1317
- -webkit-border-radius: 0;
1318
- -moz-border-radius: 0;
1319
- border-radius: 0;
1320
- background-color: #fff;
1321
- border: 1px solid #dfdfdf;
1322
- border-top: none;
1323
- -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075);
1324
- box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075);
1325
- min-width: 17em;
1326
- width: auto; /* Default Color Scheme */
1327
- }
1328
-
1329
- /* line 38, sass/partials/_jquery_ui.scss */
1330
-
1331
- .cmb2-element.ui-datepicker *,
1332
- .cmb2-element .ui-datepicker * {
1333
- padding: 0;
1334
- font-family: "Open Sans", sans-serif;
1335
- -webkit-border-radius: 0;
1336
- -moz-border-radius: 0;
1337
- border-radius: 0;
1338
- }
1339
-
1340
- /* line 46, sass/partials/_jquery_ui.scss */
1341
-
1342
- .cmb2-element.ui-datepicker table,
1343
- .cmb2-element .ui-datepicker table {
1344
- font-size: 13px;
1345
- margin: 0;
1346
- border: none;
1347
- border-collapse: collapse;
1348
- }
1349
-
1350
- /* line 53, sass/partials/_jquery_ui.scss */
1351
-
1352
- .cmb2-element.ui-datepicker .ui-widget-header,
1353
- .cmb2-element.ui-datepicker .ui-datepicker-header,
1354
- .cmb2-element .ui-datepicker .ui-widget-header,
1355
- .cmb2-element .ui-datepicker .ui-datepicker-header {
1356
- background-image: none;
1357
- border: none;
1358
- color: #fff;
1359
- font-weight: normal;
1360
- }
1361
-
1362
- /* line 61, sass/partials/_jquery_ui.scss */
1363
-
1364
- .cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover,
1365
- .cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover {
1366
- background: transparent;
1367
- border-color: transparent;
1368
- cursor: pointer;
1369
- }
1370
-
1371
- /* line 67, sass/partials/_jquery_ui.scss */
1372
-
1373
- .cmb2-element.ui-datepicker .ui-datepicker-title,
1374
- .cmb2-element .ui-datepicker .ui-datepicker-title {
1375
- margin: 0;
1376
- padding: 10px 0;
1377
- color: #fff;
1378
- font-size: 14px;
1379
- line-height: 14px;
1380
- text-align: center;
1381
- }
1382
-
1383
- /* line 75, sass/partials/_jquery_ui.scss */
1384
-
1385
- .cmb2-element.ui-datepicker .ui-datepicker-title select,
1386
- .cmb2-element .ui-datepicker .ui-datepicker-title select {
1387
- margin-top: -8px;
1388
- margin-bottom: -8px;
1389
- }
1390
-
1391
- /* line 81, sass/partials/_jquery_ui.scss */
1392
-
1393
- .cmb2-element.ui-datepicker .ui-datepicker-prev,
1394
- .cmb2-element.ui-datepicker .ui-datepicker-next,
1395
- .cmb2-element .ui-datepicker .ui-datepicker-prev,
1396
- .cmb2-element .ui-datepicker .ui-datepicker-next {
1397
- position: relative;
1398
- top: 0;
1399
- height: 34px;
1400
- width: 34px;
1401
- }
1402
-
1403
- /* line 89, sass/partials/_jquery_ui.scss */
1404
-
1405
- .cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-prev,
1406
- .cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-next,
1407
- .cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-prev,
1408
- .cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-next {
1409
- border: none;
1410
- }
1411
-
1412
- /* line 94, sass/partials/_jquery_ui.scss */
1413
-
1414
- .cmb2-element.ui-datepicker .ui-datepicker-prev,
1415
- .cmb2-element.ui-datepicker .ui-datepicker-prev-hover,
1416
- .cmb2-element .ui-datepicker .ui-datepicker-prev,
1417
- .cmb2-element .ui-datepicker .ui-datepicker-prev-hover {
1418
- right: 0;
1419
- }
1420
-
1421
- /* line 99, sass/partials/_jquery_ui.scss */
1422
-
1423
- .cmb2-element.ui-datepicker .ui-datepicker-next,
1424
- .cmb2-element.ui-datepicker .ui-datepicker-next-hover,
1425
- .cmb2-element .ui-datepicker .ui-datepicker-next,
1426
- .cmb2-element .ui-datepicker .ui-datepicker-next-hover {
1427
- left: 0;
1428
- }
1429
-
1430
- /* line 104, sass/partials/_jquery_ui.scss */
1431
-
1432
- .cmb2-element.ui-datepicker .ui-datepicker-next span,
1433
- .cmb2-element.ui-datepicker .ui-datepicker-prev span,
1434
- .cmb2-element .ui-datepicker .ui-datepicker-next span,
1435
- .cmb2-element .ui-datepicker .ui-datepicker-prev span {
1436
- display: none;
1437
- }
1438
-
1439
- /* line 109, sass/partials/_jquery_ui.scss */
1440
-
1441
- .cmb2-element.ui-datepicker .ui-datepicker-prev,
1442
- .cmb2-element .ui-datepicker .ui-datepicker-prev {
1443
- float: right;
1444
- }
1445
-
1446
- /* line 113, sass/partials/_jquery_ui.scss */
1447
-
1448
- .cmb2-element.ui-datepicker .ui-datepicker-next,
1449
- .cmb2-element .ui-datepicker .ui-datepicker-next {
1450
- float: left;
1451
- }
1452
-
1453
- /* line 117, sass/partials/_jquery_ui.scss */
1454
-
1455
- .cmb2-element.ui-datepicker .ui-datepicker-prev:before,
1456
- .cmb2-element.ui-datepicker .ui-datepicker-next:before,
1457
- .cmb2-element .ui-datepicker .ui-datepicker-prev:before,
1458
- .cmb2-element .ui-datepicker .ui-datepicker-next:before {
1459
- font: normal 20px/34px 'dashicons';
1460
- padding-right: 7px;
1461
- color: #fff;
1462
- speak: none;
1463
- -webkit-font-smoothing: antialiased;
1464
- -moz-osx-font-smoothing: grayscale;
1465
- width: 34px;
1466
- height: 34px;
1467
- }
1468
-
1469
- /* line 129, sass/partials/_jquery_ui.scss */
1470
-
1471
- .cmb2-element.ui-datepicker .ui-datepicker-prev:before,
1472
- .cmb2-element .ui-datepicker .ui-datepicker-prev:before {
1473
- content: '\f341';
1474
- }
1475
-
1476
- /* line 133, sass/partials/_jquery_ui.scss */
1477
-
1478
- .cmb2-element.ui-datepicker .ui-datepicker-next:before,
1479
- .cmb2-element .ui-datepicker .ui-datepicker-next:before {
1480
- content: '\f345';
1481
- }
1482
-
1483
- /* line 137, sass/partials/_jquery_ui.scss */
1484
-
1485
- .cmb2-element.ui-datepicker .ui-datepicker-prev-hover:before,
1486
- .cmb2-element.ui-datepicker .ui-datepicker-next-hover:before,
1487
- .cmb2-element .ui-datepicker .ui-datepicker-prev-hover:before,
1488
- .cmb2-element .ui-datepicker .ui-datepicker-next-hover:before {
1489
- opacity: 0.7;
1490
- }
1491
-
1492
- /* line 142, sass/partials/_jquery_ui.scss */
1493
-
1494
- .cmb2-element.ui-datepicker select.ui-datepicker-month,
1495
- .cmb2-element.ui-datepicker select.ui-datepicker-year,
1496
- .cmb2-element .ui-datepicker select.ui-datepicker-month,
1497
- .cmb2-element .ui-datepicker select.ui-datepicker-year {
1498
- width: 33%;
1499
- background: transparent;
1500
- border-color: transparent;
1501
- box-shadow: none;
1502
- color: #fff;
1503
- }
1504
-
1505
- /* line 149, sass/partials/_jquery_ui.scss */
1506
-
1507
- .cmb2-element.ui-datepicker select.ui-datepicker-month option,
1508
- .cmb2-element.ui-datepicker select.ui-datepicker-year option,
1509
- .cmb2-element .ui-datepicker select.ui-datepicker-month option,
1510
- .cmb2-element .ui-datepicker select.ui-datepicker-year option {
1511
- color: #333;
1512
- }
1513
-
1514
- /* line 154, sass/partials/_jquery_ui.scss */
1515
-
1516
- .cmb2-element.ui-datepicker thead,
1517
- .cmb2-element .ui-datepicker thead {
1518
- color: #fff;
1519
- font-weight: 600;
1520
- }
1521
-
1522
- /* line 157, sass/partials/_jquery_ui.scss */
1523
-
1524
- .cmb2-element.ui-datepicker thead th,
1525
- .cmb2-element .ui-datepicker thead th {
1526
- font-weight: normal;
1527
- }
1528
-
1529
- /* line 162, sass/partials/_jquery_ui.scss */
1530
-
1531
- .cmb2-element.ui-datepicker th,
1532
- .cmb2-element .ui-datepicker th {
1533
- padding: 10px;
1534
- }
1535
-
1536
- /* line 166, sass/partials/_jquery_ui.scss */
1537
-
1538
- .cmb2-element.ui-datepicker td,
1539
- .cmb2-element .ui-datepicker td {
1540
- padding: 0;
1541
- border: 1px solid #f4f4f4;
1542
- }
1543
-
1544
- /* line 171, sass/partials/_jquery_ui.scss */
1545
-
1546
- .cmb2-element.ui-datepicker td.ui-datepicker-other-month,
1547
- .cmb2-element .ui-datepicker td.ui-datepicker-other-month {
1548
- border: transparent;
1549
- }
1550
-
1551
- /* line 175, sass/partials/_jquery_ui.scss */
1552
-
1553
- .cmb2-element.ui-datepicker td.ui-datepicker-week-end,
1554
- .cmb2-element .ui-datepicker td.ui-datepicker-week-end {
1555
- background-color: #f4f4f4;
1556
- border: 1px solid #f4f4f4;
1557
- }
1558
-
1559
- /* line 178, sass/partials/_jquery_ui.scss */
1560
-
1561
- .cmb2-element.ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today,
1562
- .cmb2-element .ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today {
1563
- -webkit-box-shadow: inset 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
1564
- -moz-box-shadow: inset 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
1565
- box-shadow: inset 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
1566
- }
1567
-
1568
- /* line 185, sass/partials/_jquery_ui.scss */
1569
-
1570
- .cmb2-element.ui-datepicker td.ui-datepicker-today,
1571
- .cmb2-element .ui-datepicker td.ui-datepicker-today {
1572
- background-color: #f0f0c0;
1573
- }
1574
-
1575
- /* line 189, sass/partials/_jquery_ui.scss */
1576
-
1577
- .cmb2-element.ui-datepicker td.ui-datepicker-current-day,
1578
- .cmb2-element .ui-datepicker td.ui-datepicker-current-day {
1579
- background: #bbdd88;
1580
- }
1581
-
1582
- /* line 193, sass/partials/_jquery_ui.scss */
1583
-
1584
- .cmb2-element.ui-datepicker td .ui-state-default,
1585
- .cmb2-element .ui-datepicker td .ui-state-default {
1586
- background: transparent;
1587
- border: none;
1588
- text-align: center;
1589
- text-decoration: none;
1590
- width: auto;
1591
- display: block;
1592
- padding: 5px 10px;
1593
- font-weight: normal;
1594
- color: #444;
1595
- }
1596
-
1597
- /* line 205, sass/partials/_jquery_ui.scss */
1598
-
1599
- .cmb2-element.ui-datepicker td.ui-state-disabled .ui-state-default,
1600
- .cmb2-element .ui-datepicker td.ui-state-disabled .ui-state-default {
1601
- opacity: 0.5;
1602
- }
1603
-
1604
- /* line 210, sass/partials/_jquery_ui.scss */
1605
-
1606
- .cmb2-element.ui-datepicker .ui-widget-header,
1607
- .cmb2-element.ui-datepicker .ui-datepicker-header,
1608
- .cmb2-element .ui-datepicker .ui-widget-header,
1609
- .cmb2-element .ui-datepicker .ui-datepicker-header {
1610
- background: #00a0d2;
1611
- }
1612
-
1613
- /* line 215, sass/partials/_jquery_ui.scss */
1614
-
1615
- .cmb2-element.ui-datepicker thead,
1616
- .cmb2-element .ui-datepicker thead {
1617
- background: #32373c;
1618
- }
1619
-
1620
- /* line 219, sass/partials/_jquery_ui.scss */
1621
-
1622
- .cmb2-element.ui-datepicker td .ui-state-hover,
1623
- .cmb2-element.ui-datepicker td .ui-state-active,
1624
- .cmb2-element .ui-datepicker td .ui-state-hover,
1625
- .cmb2-element .ui-datepicker td .ui-state-active {
1626
- background: #0073aa;
1627
- color: #fff;
1628
- }
1629
-
1630
- /* line 224, sass/partials/_jquery_ui.scss */
1631
-
1632
- .cmb2-element.ui-datepicker .ui-timepicker-div,
1633
- .cmb2-element .ui-datepicker .ui-timepicker-div {
1634
- font-size: 14px;
1635
- }
1636
-
1637
- /* line 226, sass/partials/_jquery_ui.scss */
1638
-
1639
- .cmb2-element.ui-datepicker .ui-timepicker-div dl,
1640
- .cmb2-element .ui-datepicker .ui-timepicker-div dl {
1641
- text-align: right;
1642
- padding: 0 .6em;
1643
- }
1644
-
1645
- /* line 229, sass/partials/_jquery_ui.scss */
1646
-
1647
- .cmb2-element.ui-datepicker .ui-timepicker-div dl dt,
1648
- .cmb2-element .ui-datepicker .ui-timepicker-div dl dt {
1649
- float: right;
1650
- clear: right;
1651
- padding: 0 5px 0 0;
1652
- }
1653
-
1654
- /* line 234, sass/partials/_jquery_ui.scss */
1655
-
1656
- .cmb2-element.ui-datepicker .ui-timepicker-div dl dd,
1657
- .cmb2-element .ui-datepicker .ui-timepicker-div dl dd {
1658
- margin: 0 40% 10px 10px;
1659
- }
1660
-
1661
- /* line 236, sass/partials/_jquery_ui.scss */
1662
-
1663
- .cmb2-element.ui-datepicker .ui-timepicker-div dl dd select,
1664
- .cmb2-element .ui-datepicker .ui-timepicker-div dl dd select {
1665
- width: 100%;
1666
- }
1667
-
1668
- /* line 242, sass/partials/_jquery_ui.scss */
1669
-
1670
- .cmb2-element.ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane,
1671
- .cmb2-element .ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane {
1672
- padding: .6em;
1673
- text-align: right;
1674
- }
1675
-
1676
- /* line 246, sass/partials/_jquery_ui.scss */
1677
-
1678
- .cmb2-element.ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-primary,
1679
- .cmb2-element.ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-secondary,
1680
- .cmb2-element .ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-primary,
1681
- .cmb2-element .ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-secondary {
1682
- padding: 0 10px 1px;
1683
- -webkit-border-radius: 3px;
1684
- -moz-border-radius: 3px;
1685
- border-radius: 3px;
1686
- margin: 0 .4em .4em .6em;
1687
- }
1688
-
1689
- /* line 260, sass/partials/_jquery_ui.scss */
1690
-
1691
- .admin-color-fresh .cmb2-element.ui-datepicker .ui-widget-header,
1692
- .admin-color-fresh .cmb2-element.ui-datepicker .ui-datepicker-header,
1693
- .admin-color-fresh .cmb2-element .ui-datepicker .ui-widget-header,
1694
- .admin-color-fresh .cmb2-element .ui-datepicker .ui-datepicker-header {
1695
- background: #00a0d2;
1696
- }
1697
-
1698
- /* line 265, sass/partials/_jquery_ui.scss */
1699
-
1700
- .admin-color-fresh .cmb2-element.ui-datepicker thead,
1701
- .admin-color-fresh .cmb2-element .ui-datepicker thead {
1702
- background: #32373c;
1703
- }
1704
-
1705
- /* line 269, sass/partials/_jquery_ui.scss */
1706
-
1707
- .admin-color-fresh .cmb2-element.ui-datepicker td .ui-state-hover,
1708
- .admin-color-fresh .cmb2-element .ui-datepicker td .ui-state-hover {
1709
- background: #0073aa;
1710
- color: #fff;
1711
- }
1712
-
1713
- /* line 277, sass/partials/_jquery_ui.scss */
1714
-
1715
- .admin-color-blue .cmb2-element.ui-datepicker .ui-widget-header,
1716
- .admin-color-blue .cmb2-element.ui-datepicker .ui-datepicker-header,
1717
- .admin-color-blue .cmb2-element .ui-datepicker .ui-widget-header,
1718
- .admin-color-blue .cmb2-element .ui-datepicker .ui-datepicker-header {
1719
- background: #52accc;
1720
- }
1721
-
1722
- /* line 282, sass/partials/_jquery_ui.scss */
1723
-
1724
- .admin-color-blue .cmb2-element.ui-datepicker thead,
1725
- .admin-color-blue .cmb2-element .ui-datepicker thead {
1726
- background: #4796b3;
1727
- }
1728
-
1729
- /* line 291, sass/partials/_jquery_ui.scss */
1730
-
1731
- .admin-color-blue .cmb2-element.ui-datepicker td .ui-state-hover,
1732
- .admin-color-blue .cmb2-element.ui-datepicker td .ui-state-active,
1733
- .admin-color-blue .cmb2-element .ui-datepicker td .ui-state-hover,
1734
- .admin-color-blue .cmb2-element .ui-datepicker td .ui-state-active {
1735
- background: #096484;
1736
- color: #fff;
1737
- }
1738
-
1739
- /* line 296, sass/partials/_jquery_ui.scss */
1740
-
1741
- .admin-color-blue .cmb2-element.ui-datepicker td.ui-datepicker-today,
1742
- .admin-color-blue .cmb2-element .ui-datepicker td.ui-datepicker-today {
1743
- background: #eee;
1744
- }
1745
-
1746
- /* line 305, sass/partials/_jquery_ui.scss */
1747
-
1748
- .admin-color-coffee .cmb2-element.ui-datepicker .ui-widget-header,
1749
- .admin-color-coffee .cmb2-element.ui-datepicker .ui-datepicker-header,
1750
- .admin-color-coffee .cmb2-element .ui-datepicker .ui-widget-header,
1751
- .admin-color-coffee .cmb2-element .ui-datepicker .ui-datepicker-header {
1752
- background: #59524c;
1753
- }
1754
-
1755
- /* line 310, sass/partials/_jquery_ui.scss */
1756
-
1757
- .admin-color-coffee .cmb2-element.ui-datepicker thead,
1758
- .admin-color-coffee .cmb2-element .ui-datepicker thead {
1759
- background: #46403c;
1760
- }
1761
-
1762
- /* line 314, sass/partials/_jquery_ui.scss */
1763
-
1764
- .admin-color-coffee .cmb2-element.ui-datepicker td .ui-state-hover,
1765
- .admin-color-coffee .cmb2-element .ui-datepicker td .ui-state-hover {
1766
- background: #c7a589;
1767
- color: #fff;
1768
- }
1769
-
1770
- /* line 322, sass/partials/_jquery_ui.scss */
1771
-
1772
- .admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-widget-header,
1773
- .admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-datepicker-header,
1774
- .admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-widget-header,
1775
- .admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-datepicker-header {
1776
- background: #523f6d;
1777
- }
1778
-
1779
- /* line 327, sass/partials/_jquery_ui.scss */
1780
-
1781
- .admin-color-ectoplasm .cmb2-element.ui-datepicker thead,
1782
- .admin-color-ectoplasm .cmb2-element .ui-datepicker thead {
1783
- background: #413256;
1784
- }
1785
-
1786
- /* line 331, sass/partials/_jquery_ui.scss */
1787
-
1788
- .admin-color-ectoplasm .cmb2-element.ui-datepicker td .ui-state-hover,
1789
- .admin-color-ectoplasm .cmb2-element .ui-datepicker td .ui-state-hover {
1790
- background: #a3b745;
1791
- color: #fff;
1792
- }
1793
-
1794
- /* line 339, sass/partials/_jquery_ui.scss */
1795
-
1796
- .admin-color-midnight .cmb2-element.ui-datepicker .ui-widget-header,
1797
- .admin-color-midnight .cmb2-element.ui-datepicker .ui-datepicker-header,
1798
- .admin-color-midnight .cmb2-element .ui-datepicker .ui-widget-header,
1799
- .admin-color-midnight .cmb2-element .ui-datepicker .ui-datepicker-header {
1800
- background: #363b3f;
1801
- }
1802
-
1803
- /* line 344, sass/partials/_jquery_ui.scss */
1804
-
1805
- .admin-color-midnight .cmb2-element.ui-datepicker thead,
1806
- .admin-color-midnight .cmb2-element .ui-datepicker thead {
1807
- background: #26292c;
1808
- }
1809
-
1810
- /* line 348, sass/partials/_jquery_ui.scss */
1811
-
1812
- .admin-color-midnight .cmb2-element.ui-datepicker td .ui-state-hover,
1813
- .admin-color-midnight .cmb2-element .ui-datepicker td .ui-state-hover {
1814
- background: #e14d43;
1815
- color: #fff;
1816
- }
1817
-
1818
- /* line 356, sass/partials/_jquery_ui.scss */
1819
-
1820
- .admin-color-ocean .cmb2-element.ui-datepicker .ui-widget-header,
1821
- .admin-color-ocean .cmb2-element.ui-datepicker .ui-datepicker-header,
1822
- .admin-color-ocean .cmb2-element .ui-datepicker .ui-widget-header,
1823
- .admin-color-ocean .cmb2-element .ui-datepicker .ui-datepicker-header {
1824
- background: #738e96;
1825
- }
1826
-
1827
- /* line 361, sass/partials/_jquery_ui.scss */
1828
-
1829
- .admin-color-ocean .cmb2-element.ui-datepicker thead,
1830
- .admin-color-ocean .cmb2-element .ui-datepicker thead {
1831
- background: #627c83;
1832
- }
1833
-
1834
- /* line 365, sass/partials/_jquery_ui.scss */
1835
-
1836
- .admin-color-ocean .cmb2-element.ui-datepicker td .ui-state-hover,
1837
- .admin-color-ocean .cmb2-element .ui-datepicker td .ui-state-hover {
1838
- background: #9ebaa0;
1839
- color: #fff;
1840
- }
1841
-
1842
- /* line 373, sass/partials/_jquery_ui.scss */
1843
-
1844
- .admin-color-sunrise .cmb2-element.ui-datepicker .ui-widget-header,
1845
- .admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header,
1846
- .admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover,
1847
- .admin-color-sunrise .cmb2-element .ui-datepicker .ui-widget-header,
1848
- .admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header,
1849
- .admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover {
1850
- background: #cf4944;
1851
- }
1852
-
1853
- /* line 379, sass/partials/_jquery_ui.scss */
1854
-
1855
- .admin-color-sunrise .cmb2-element.ui-datepicker th,
1856
- .admin-color-sunrise .cmb2-element .ui-datepicker th {
1857
- border-color: #be3631;
1858
- background: #be3631;
1859
- }
1860
-
1861
- /* line 384, sass/partials/_jquery_ui.scss */
1862
-
1863
- .admin-color-sunrise .cmb2-element.ui-datepicker td .ui-state-hover,
1864
- .admin-color-sunrise .cmb2-element .ui-datepicker td .ui-state-hover {
1865
- background: #dd823b;
1866
- color: #fff;
1867
- }
1868
-
1869
- /* line 392, sass/partials/_jquery_ui.scss */
1870
-
1871
- .admin-color-light .cmb2-element.ui-datepicker .ui-widget-header,
1872
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-header,
1873
- .admin-color-light .cmb2-element .ui-datepicker .ui-widget-header,
1874
- .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-header {
1875
- background: #e5e5e5;
1876
- }
1877
-
1878
- /* line 397, sass/partials/_jquery_ui.scss */
1879
-
1880
- .admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-month,
1881
- .admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-year,
1882
- .admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-month,
1883
- .admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-year {
1884
- color: #555;
1885
- }
1886
-
1887
- /* line 402, sass/partials/_jquery_ui.scss */
1888
-
1889
- .admin-color-light .cmb2-element.ui-datepicker thead,
1890
- .admin-color-light .cmb2-element .ui-datepicker thead {
1891
- background: #888;
1892
- }
1893
-
1894
- /* line 406, sass/partials/_jquery_ui.scss */
1895
-
1896
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-title,
1897
- .admin-color-light .cmb2-element.ui-datepicker td .ui-state-default,
1898
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-prev:before,
1899
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-next:before,
1900
- .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-title,
1901
- .admin-color-light .cmb2-element .ui-datepicker td .ui-state-default,
1902
- .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-prev:before,
1903
- .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-next:before {
1904
- color: #555;
1905
- }
1906
-
1907
- /* line 414, sass/partials/_jquery_ui.scss */
1908
-
1909
- .admin-color-light .cmb2-element.ui-datepicker td .ui-state-hover,
1910
- .admin-color-light .cmb2-element.ui-datepicker td .ui-state-active,
1911
- .admin-color-light .cmb2-element .ui-datepicker td .ui-state-hover,
1912
- .admin-color-light .cmb2-element .ui-datepicker td .ui-state-active {
1913
- background: #ccc;
1914
- }
1915
-
1916
- /* line 418, sass/partials/_jquery_ui.scss */
1917
-
1918
- .admin-color-light .cmb2-element.ui-datepicker td.ui-datepicker-today,
1919
- .admin-color-light .cmb2-element .ui-datepicker td.ui-datepicker-today {
1920
- background: #eee;
1921
- }
1922
-
1923
- /* line 426, sass/partials/_jquery_ui.scss */
1924
-
1925
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-widget-header,
1926
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-datepicker-header,
1927
- .admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-widget-header,
1928
- .admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-datepicker-header {
1929
- background: #56b274;
1930
- }
1931
-
1932
- /* line 431, sass/partials/_jquery_ui.scss */
1933
-
1934
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker thead,
1935
- .admin-color-bbp-evergreen .cmb2-element .ui-datepicker thead {
1936
- background: #36533f;
1937
- }
1938
-
1939
- /* line 435, sass/partials/_jquery_ui.scss */
1940
-
1941
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker td .ui-state-hover,
1942
- .admin-color-bbp-evergreen .cmb2-element .ui-datepicker td .ui-state-hover {
1943
- background: #446950;
1944
- color: #fff;
1945
- }
1946
-
1947
- /* line 443, sass/partials/_jquery_ui.scss */
1948
-
1949
- .admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-widget-header,
1950
- .admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-datepicker-header,
1951
- .admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-widget-header,
1952
- .admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-datepicker-header {
1953
- background: #4ca26a;
1954
- }
1955
-
1956
- /* line 448, sass/partials/_jquery_ui.scss */
1957
-
1958
- .admin-color-bbp-mint .cmb2-element.ui-datepicker thead,
1959
- .admin-color-bbp-mint .cmb2-element .ui-datepicker thead {
1960
- background: #4f6d59;
1961
- }
1962
-
1963
- /* line 452, sass/partials/_jquery_ui.scss */
1964
-
1965
- .admin-color-bbp-mint .cmb2-element.ui-datepicker td .ui-state-hover,
1966
- .admin-color-bbp-mint .cmb2-element .ui-datepicker td .ui-state-hover {
1967
- background: #5fb37c;
1968
- color: #fff;
1969
- }
1970
-
1971
- /*# sourceMappingURL=cmb2.css.map */
1972
-
1973
- @media only screen and (max-width: 850px) {
1974
-
1975
- /* line 103, sass/partials/_context_metaboxes.scss */
1976
-
1977
- .cmb2-context-wrap.cmb2-context-wrap-form_top {
1978
- margin-left: 0;
1979
- }
1980
-
1981
- }
1982
-
1983
- @media (max-width: 450px) {
1984
-
1985
- /* line 193, sass/partials/_main_wrap.scss */
1986
-
1987
- .cmb-th {
1988
- font-size: 1.2em;
1989
- display: block;
1990
- float: none;
1991
- padding-bottom: 1em;
1992
- text-align: right;
1993
- width: 100%;
1994
- }
1995
-
1996
- /* line 27, sass/partials/_mixins.scss */
1997
-
1998
- .cmb-th label {
1999
- display: block;
2000
- margin-top: 0;
2001
- margin-bottom: 0.5em;
2002
- }
2003
-
2004
- /* line 511, sass/partials/_main_wrap.scss */
2005
-
2006
- .cmb-th,
2007
- .cmb-td,
2008
- .cmb-th + .cmb-td {
2009
- display: block;
2010
- float: none;
2011
- width: 100%;
2012
- }
2013
-
2014
- /* line 68, sass/partials/_post_metaboxes.scss */
2015
-
2016
- .cmb2-postbox .cmb-row:not(:last-of-type),
2017
- .cmb2-postbox .cmb-repeatable-group:not(:last-of-type),
2018
- .cmb-type-group .cmb-row:not(:last-of-type),
2019
- .cmb-type-group .cmb-repeatable-group:not(:last-of-type) {
2020
- border-bottom: 0;
2021
- }
2022
-
2023
- /* line 23, sass/partials/_options-page.scss */
2024
-
2025
- .cmb2-options-page .cmb2-metabox > .cmb-row > .cmb-th + .cmb-td {
2026
- padding: 0;
2027
- margin-right: 0;
2028
- }
2029
-
2030
- }
2031
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/cmb2-rtl.min.css DELETED
@@ -1 +0,0 @@
1
- .cmb2-wrap{margin:0}.cmb2-wrap input,.cmb2-wrap textarea{font-size:14px;max-width:100%;padding:5px}.cmb2-wrap input[type=text].cmb2-oembed{width:100%}.cmb2-wrap textarea{width:500px}.cmb2-wrap textarea.cmb2-textarea-code{font-family:"Courier 10 Pitch",Courier,monospace;line-height:16px}.cmb2-wrap input.cmb2-text-small,.cmb2-wrap input.cmb2-timepicker{width:100px}.cmb2-wrap input.cmb2-text-money{width:90px}.cmb2-wrap input.cmb2-text-medium{width:230px}.cmb2-wrap input.cmb2-upload-file{width:65%}.cmb2-wrap input.ed_button{padding:2px 4px}.cmb2-wrap input:not([type=hidden])+.button-secondary,.cmb2-wrap input:not([type=hidden])+input,.cmb2-wrap input:not([type=hidden])+select{margin-right:20px}.cmb2-wrap ul{margin:0}.cmb2-wrap li{font-size:14px;line-height:16px;margin:1px 0 5px}.cmb2-wrap select{font-size:14px;margin-top:3px}.cmb2-wrap input:focus,.cmb2-wrap textarea:focus{background:#fffff8}.cmb2-wrap input[type=checkbox],.cmb2-wrap input[type=radio]{margin:0 0 0 5px;padding:0}.cmb2-wrap .button-secondary,.cmb2-wrap button{white-space:nowrap}.cmb2-wrap .mceLayout{border:1px solid #e9e9e9!important}.cmb2-wrap .mceIframeContainer{background:#fff}.cmb2-wrap .meta_mce{width:97%}.cmb2-wrap .meta_mce textarea{width:100%}.cmb2-wrap .wp-color-result,.cmb2-wrap .wp-picker-input-wrap{vertical-align:middle}.cmb2-wrap .wp-color-result,.cmb2-wrap .wp-picker-container{margin:0 0 0 10px}.cmb2-wrap .cmb-row{margin:0}.cmb2-wrap .cmb-row:after{content:'';clear:both;display:block;width:100%}.cmb2-wrap .cmb-row.cmb-repeat .cmb2-metabox-description{padding-top:0;padding-bottom:1em}.cmb2-metabox{clear:both;margin:0}.cmb2-metabox .cmb-field-list>.cmb-row:first-of-type>.cmb-td,.cmb2-metabox .cmb-field-list>.cmb-row:first-of-type>.cmb-th,.cmb2-metabox>.cmb-row:first-of-type>.cmb-td,.cmb2-metabox>.cmb-row:first-of-type>.cmb-th{border:0}.cmb-add-row{margin:1.8em 0 0}.cmb-nested .cmb-td,.cmb-repeatable-group .cmb-th,.cmb-repeatable-group:first-of-type{border:0}.cmb-repeatable-group:last-of-type,.cmb-row:last-of-type,.cmb2-wrap .cmb-row:last-of-type{border-bottom:0}.cmb-repeatable-grouping{border:1px solid #e9e9e9;padding:0 1em}.cmb-repeatable-grouping.cmb-row{margin:0 0 .8em}.cmb-th{color:#222;float:right;font-weight:600;line-height:1.3;padding:20px 0 20px 10px;vertical-align:top;width:200px}.cmb-td{line-height:1.3;max-width:100%;padding:15px 10px;vertical-align:middle}.cmb-type-title .cmb-td{padding:0}.cmb-th label{display:block;padding:5px 0}.cmb-th+.cmb-td{float:right}.cmb-td .cmb-td{padding-bottom:1em}.cmb-remove-row{text-align:left}.empty-row.hidden{display:none}.cmb-repeat-table{background-color:#fafafa;border:1px solid #e1e1e1}.cmb-repeat-table .cmb-row.cmb-repeat-row{position:relative;counter-increment:el;margin:0;padding:10px 50px 10px 10px;border-bottom:none!important}.cmb-repeat-table .cmb-row.cmb-repeat-row+.cmb-repeat-row{border-top:solid 1px #e9e9e9}.cmb-repeat-table .cmb-row.cmb-repeat-row:before{content:counter(el);display:block;top:0;right:0;position:absolute;width:35px;height:100%;line-height:35px;color:#aaa;text-align:center;border-left:solid 1px #e9e9e9}.cmb-repeat-table .cmb-row.cmb-repeat-row .cmb-td{margin:0;padding:0}.cmb-repeat-table+.cmb-add-row{margin:0}.cmb-repeat-table+.cmb-add-row:before{content:'';width:1px;height:1.6em;display:block;margin-right:17px;background-color:#dcdcdc}.cmb-repeat-table .cmb-remove-row{top:7px;left:7px;position:absolute;width:auto;margin-right:0;padding:0!important;display:none}.cmb-repeat-table .cmb-remove-row>.cmb-remove-row-button{font-size:20px;text-indent:-1000px;overflow:hidden;position:relative;height:auto;line-height:1;padding:0 10px}.cmb-repeat-table .cmb-remove-row>.cmb-remove-row-button:before{content:"";font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;right:0;width:100%;height:100%;text-align:center}.cmb-repeat-table .cmb-repeat-row:hover .cmb-remove-row{display:block}.cmb-repeatable-group .cmb-th{padding:5px}.cmb-repeatable-group .cmb-group-title{background-color:#e9e9e9;padding:8px 2.2em 8px 12px;margin:0 -1em;min-height:1.5em;font-size:14px;line-height:1.4}.cmb-repeatable-group .cmb-group-title h4{border:0;margin:0;font-size:1.2em;font-weight:500;padding:.5em .75em}.cmb-repeatable-group .cmb-group-title .cmb-th{display:block;width:100%}.cmb-repeatable-group .cmb-group-description .cmb-th{font-size:1.2em;display:block;float:none;padding-bottom:1em;text-align:right;width:100%}.cmb-repeatable-group .cmb-group-description .cmb-th label{display:block;margin-top:0;margin-bottom:.5em}.cmb-repeatable-group .cmb-shift-rows{font-size:1em;margin-left:1em;text-decoration:none}.cmb-repeatable-group .cmb-shift-rows .dashicons{font-size:1.5em;height:1.5em;line-height:1.2em;width:1em}.cmb-repeatable-group .cmb-shift-rows .dashicons.dashicons-arrow-down-alt2{line-height:1.3em}.cmb-repeatable-group .cmb2-upload-button{float:left}p.cmb2-metabox-description{color:#aaa;font-style:italic;margin:0;padding-top:.5em}span.cmb2-metabox-description{color:#aaa;font-style:italic}.cmb2-metabox-title{margin:0 0 5px;padding:5px 0 0;font-size:14px}.cmb-inline ul{padding:4px 0 0}.cmb-inline li{display:inline-block;padding-left:18px}.cmb-type-textarea-code pre{margin:0}.cmb2-media-status .img-status{clear:none;display:inline-block;vertical-align:middle;margin-left:10px;width:auto}.cmb2-media-status .img-status img{max-width:350px;height:auto}.cmb2-media-status .embed-status,.cmb2-media-status .img-status img{background:#fff;border:1px solid #e9e9e9;border-radius:2px;-moz-border-radius:2px;margin:15px 0 0;padding:5px}.cmb2-media-status .embed-status{float:right;max-width:800px}.cmb2-media-status .embed-status,.cmb2-media-status .img-status{position:relative}.cmb2-media-status .embed-status .cmb2-remove-file-button,.cmb2-media-status .img-status .cmb2-remove-file-button{background:url(../images/ico-delete.png);height:16px;right:-5px;position:absolute;text-indent:-9999px;top:-5px;width:16px}.cmb2-media-status .img-status .cmb2-remove-file-button{top:10px}.cmb2-media-status .file-status>span,.cmb2-media-status .img-status img{cursor:pointer}.cmb-type-file-list .cmb2-media-status .img-status{clear:none;vertical-align:middle;width:auto;margin-left:10px;margin-bottom:10px;margin-top:0}.cmb-attach-list li{clear:both;display:inline-block;width:100%;margin-top:5px;margin-bottom:10px}.cmb-attach-list li img{cursor:move;float:right;margin-left:10px}.cmb2-remove-wrapper{margin:0}.child-cmb2 .cmb-th{text-align:right}.cmb2-indented-hierarchy{padding-right:1.5em}#poststuff .cmb-group-title{margin-right:-1em;margin-left:-1em;min-height:1.5em}#poststuff .repeatable .cmb-group-title{padding-right:2.2em}.cmb-type-group .cmb2-wrap,.cmb2-postbox .cmb2-wrap{margin:0}.cmb-type-group .cmb2-wrap>.cmb-field-list>.cmb-row,.cmb2-postbox .cmb2-wrap>.cmb-field-list>.cmb-row{padding:1.8em 0}.cmb-type-group .cmb2-wrap input[type=text].cmb2-oembed,.cmb2-postbox .cmb2-wrap input[type=text].cmb2-oembed{width:100%}.cmb-type-group .cmb-row,.cmb2-postbox .cmb-row{padding:0 0 1.8em;margin:0 0 .8em}.cmb-type-group .cmb-row .cmbhandle,.cmb2-postbox .cmb-row .cmbhandle{left:-1em;position:relative}.cmb-type-group .cmb-repeatable-grouping,.cmb2-postbox .cmb-repeatable-grouping{padding:0 1em;max-width:100%;min-width:1px!important}.cmb-type-group .cmb-repeatable-group>.cmb-row,.cmb2-postbox .cmb-repeatable-group>.cmb-row{padding-bottom:0}.cmb-type-group .cmb-th,.cmb2-postbox .cmb-th{width:18%;padding:0 0 0 2%}.cmb-type-group .cmb-td,.cmb2-postbox .cmb-td{margin-bottom:0;padding:0;line-height:1.3}.cmb-type-group .cmb-th+.cmb-td,.cmb2-postbox .cmb-th+.cmb-td{width:80%;float:left}.cmb-type-group .cmb-repeatable-group:not(:last-of-type),.cmb-type-group .cmb-row:not(:last-of-type),.cmb2-postbox .cmb-repeatable-group:not(:last-of-type),.cmb2-postbox .cmb-row:not(:last-of-type){border-bottom:1px solid #e9e9e9}.cmb-type-group .cmb-remove-field-row,.cmb-type-group .cmb-repeat-group-field,.cmb2-postbox .cmb-remove-field-row,.cmb2-postbox .cmb-repeat-group-field{padding-top:1.8em}.js .cmb2-postbox.context-box .toggle-indicator:before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.js .cmb2-postbox.context-box.closed .toggle-indicator:before{content:"\f140"}.cmb2-postbox.context-box{margin-bottom:10px}.cmb2-postbox.context-box.context-after_title-box,.cmb2-postbox.context-box.context-before_permalink-box{margin-top:10px}.cmb2-postbox.context-box.context-after_editor-box{margin-top:20px;margin-bottom:0}.cmb2-postbox.context-box.context-form_top-box{margin-top:10px}.cmb2-postbox.context-box.context-form_top-box .hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}.cmb2-postbox.context-box .hndle{cursor:auto}.cmb2-context-wrap{margin-top:10px}.cmb2-context-wrap.cmb2-context-wrap-form_top{margin-left:300px;width:auto}.cmb2-context-wrap.cmb2-context-wrap-no-title .cmb2-metabox{padding:10px}.cmb2-context-wrap .cmb-th{padding:0 0 0 2%;width:18%}.cmb2-context-wrap .cmb-td{width:80%;padding:0}.cmb2-context-wrap .cmb-row{margin-bottom:10px}.cmb2-context-wrap .cmb-row:last-of-type{margin-bottom:0}.cmb2-options-page{max-width:1200px}.cmb2-options-page.wrap>h2{margin-bottom:1em}.cmb2-options-page .cmb2-metabox>.cmb-row{padding:1em;margin-top:-1px;background:#fff;border:1px solid #e9e9e9;box-shadow:0 1px 1px rgba(0,0,0,.05)}.cmb2-options-page .cmb2-metabox>.cmb-row>.cmb-th{padding:0;font-weight:initial}.cmb2-options-page .cmb2-metabox>.cmb-row>.cmb-th+.cmb-td{float:none;padding:0 1em 0 0;margin-right:200px}.cmb2-options-page .cmb2-wrap .cmb-type-title{margin-top:1em;padding:.6em 1em;background-color:#fafafa}.cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-title{font-size:12px;margin-top:0;margin-bottom:0;text-transform:uppercase}.cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-description{padding-top:.25em}.cmb2-options-page .cmb-repeatable-group .cmb-group-description .cmb-th{padding:0 0 .8em}.cmb2-options-page .cmb-repeatable-group .cmb-group-name{font-size:16px;margin-top:0;margin-bottom:0}.cmb2-options-page .cmb-repeatable-group .cmb-th>.cmb2-metabox-description{font-weight:400;padding-bottom:0!important}#poststuff .cmb-repeatable-group h2{margin:0}.edit-tags-php .cmb2-metabox-title,.profile-php .cmb2-metabox-title,.user-edit-php .cmb2-metabox-title{font-size:1.4em}.cmb2-no-box-wrap .cmb-spinner,.cmb2-postbox .cmb-spinner{float:right;display:none}.cmb-spinner{display:none}.cmb-spinner.is-active{display:block}#side-sortables .cmb2-wrap>.cmb-field-list>.cmb-row,.inner-sidebar .cmb2-wrap>.cmb-field-list>.cmb-row{padding:1.4em 0}#side-sortables .cmb2-wrap input[type=text]:not(.wp-color-picker),.inner-sidebar .cmb2-wrap input[type=text]:not(.wp-color-picker){width:100%}#side-sortables .cmb2-wrap input+input:not(.wp-picker-clear),#side-sortables .cmb2-wrap input+select,.inner-sidebar .cmb2-wrap input+input:not(.wp-picker-clear),.inner-sidebar .cmb2-wrap input+select{margin-right:0;margin-top:1em;display:block}#side-sortables .cmb2-wrap input.cmb2-text-money,.inner-sidebar .cmb2-wrap input.cmb2-text-money{max-width:70%}#side-sortables .cmb2-wrap input.cmb2-text-money+.cmb2-metabox-description,.inner-sidebar .cmb2-wrap input.cmb2-text-money+.cmb2-metabox-description{display:block}#side-sortables .cmb2-wrap label,.inner-sidebar .cmb2-wrap label{display:block;font-weight:700;padding:0 0 5px}#side-sortables textarea,.inner-sidebar textarea{max-width:99%}#side-sortables .cmb-repeatable-group,.inner-sidebar .cmb-repeatable-group{border-bottom:1px solid #e9e9e9}#side-sortables .cmb-type-group>.cmb-td>.cmb-repeatable-group,.inner-sidebar .cmb-type-group>.cmb-td>.cmb-repeatable-group{border-bottom:0;margin-bottom:-1.4em}#side-sortables .cmb-td:not(.cmb-remove-row),#side-sortables .cmb-th,#side-sortables .cmb-th+.cmb-td,.inner-sidebar .cmb-td:not(.cmb-remove-row),.inner-sidebar .cmb-th,.inner-sidebar .cmb-th+.cmb-td{width:100%;display:block;float:none}#side-sortables .closed .inside,.inner-sidebar .closed .inside{display:none}#side-sortables .cmb-th,.inner-sidebar .cmb-th{display:block;float:none;padding-bottom:1em;text-align:right;width:100%;padding-right:0;padding-left:0}#side-sortables .cmb-th label,.inner-sidebar .cmb-th label{display:block;margin-top:0;margin-bottom:.5em;font-size:14px;line-height:1.4em}#side-sortables .cmb-group-description .cmb-th,.inner-sidebar .cmb-group-description .cmb-th{padding-top:0}#side-sortables .cmb-group-description .cmb2-metabox-description,#side-sortables .cmb-group-title .cmb-th,.inner-sidebar .cmb-group-description .cmb2-metabox-description,.inner-sidebar .cmb-group-title .cmb-th{padding:0}#side-sortables .cmb-repeatable-grouping+.cmb-repeatable-grouping,.inner-sidebar .cmb-repeatable-grouping+.cmb-repeatable-grouping{margin-top:1em}#side-sortables .cmb2-media-status .embed-status img,#side-sortables .cmb2-media-status .img-status img,.inner-sidebar .cmb2-media-status .embed-status img,.inner-sidebar .cmb2-media-status .img-status img{max-width:90%;height:auto}#side-sortables .cmb2-list label,.inner-sidebar .cmb2-list label{display:inline;font-weight:400}#side-sortables .cmb2-metabox-description,.inner-sidebar .cmb2-metabox-description{display:block;padding:7px 0 0}#side-sortables .cmb-type-checkbox .cmb-td label,#side-sortables .cmb-type-checkbox .cmb2-metabox-description,.inner-sidebar .cmb-type-checkbox .cmb-td label,.inner-sidebar .cmb-type-checkbox .cmb2-metabox-description{font-weight:400;display:inline}#side-sortables .cmb-row .cmb2-metabox-description,.inner-sidebar .cmb-row .cmb2-metabox-description{padding-bottom:1.8em}#side-sortables .cmb2-metabox-title,.inner-sidebar .cmb2-metabox-title{font-size:1.2em;font-style:italic}#side-sortables .cmb-remove-row,.inner-sidebar .cmb-remove-row{clear:both;padding-top:12px;padding-bottom:0}#side-sortables .cmb2-upload-button,.inner-sidebar .cmb2-upload-button{clear:both;margin-top:12px}.cmb2-metabox .cmbhandle{color:#aaa;float:left;width:27px;height:30px;cursor:pointer;left:-1em;position:relative}.cmb2-metabox .cmbhandle:before{content:'\f142';left:12px;font:400 20px/1 dashicons;speak:none;display:inline-block;padding:8px 10px;top:0;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.cmb2-metabox .postbox.closed .cmbhandle:before{content:'\f140'}.cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row{-webkit-appearance:none!important;background:none!important;border:none!important;position:absolute;right:0;top:.5em;line-height:1em;padding:2px 6px 3px;opacity:.5}.cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]){cursor:pointer;color:#a00;opacity:1}.cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]):hover{color:red}* html .cmb2-element.ui-helper-clearfix{height:1%}.cmb2-element .ui-datepicker,.cmb2-element.ui-datepicker{padding:0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:#fff;border:1px solid #dfdfdf;border-top:none;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.075);box-shadow:0 3px 6px rgba(0,0,0,.075);min-width:17em;width:auto}.cmb2-element .ui-datepicker *,.cmb2-element.ui-datepicker *{padding:0;font-family:"Open Sans",sans-serif;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.cmb2-element .ui-datepicker table,.cmb2-element.ui-datepicker table{font-size:13px;margin:0;border:none;border-collapse:collapse}.cmb2-element .ui-datepicker .ui-datepicker-header,.cmb2-element .ui-datepicker .ui-widget-header,.cmb2-element.ui-datepicker .ui-datepicker-header,.cmb2-element.ui-datepicker .ui-widget-header{border:none;color:#fff;font-weight:400}.cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover,.cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover{background:0 0;border-color:transparent;cursor:pointer}.cmb2-element .ui-datepicker .ui-datepicker-title,.cmb2-element.ui-datepicker .ui-datepicker-title{margin:0;padding:10px 0;color:#fff;font-size:14px;line-height:14px;text-align:center}.cmb2-element .ui-datepicker .ui-datepicker-title select,.cmb2-element.ui-datepicker .ui-datepicker-title select{margin-top:-8px;margin-bottom:-8px}.cmb2-element .ui-datepicker .ui-datepicker-next,.cmb2-element .ui-datepicker .ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-datepicker-next,.cmb2-element.ui-datepicker .ui-datepicker-prev{position:relative;top:0;height:34px;width:34px}.cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-next,.cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-next,.cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-prev{border:none}.cmb2-element .ui-datepicker .ui-datepicker-prev,.cmb2-element .ui-datepicker .ui-datepicker-prev-hover,.cmb2-element.ui-datepicker .ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-datepicker-prev-hover{right:0}.cmb2-element .ui-datepicker .ui-datepicker-next,.cmb2-element .ui-datepicker .ui-datepicker-next-hover,.cmb2-element.ui-datepicker .ui-datepicker-next,.cmb2-element.ui-datepicker .ui-datepicker-next-hover{left:0}.cmb2-element .ui-datepicker .ui-datepicker-next span,.cmb2-element .ui-datepicker .ui-datepicker-prev span,.cmb2-element.ui-datepicker .ui-datepicker-next span,.cmb2-element.ui-datepicker .ui-datepicker-prev span{display:none}.cmb2-element .ui-datepicker .ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-datepicker-prev{float:right}.cmb2-element .ui-datepicker .ui-datepicker-next,.cmb2-element.ui-datepicker .ui-datepicker-next{float:left}.cmb2-element .ui-datepicker .ui-datepicker-next:before,.cmb2-element .ui-datepicker .ui-datepicker-prev:before,.cmb2-element.ui-datepicker .ui-datepicker-next:before,.cmb2-element.ui-datepicker .ui-datepicker-prev:before{font:400 20px/34px dashicons;padding-right:7px;color:#fff;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:34px;height:34px}.cmb2-element .ui-datepicker .ui-datepicker-prev:before,.cmb2-element.ui-datepicker .ui-datepicker-prev:before{content:'\f341'}.cmb2-element .ui-datepicker .ui-datepicker-next:before,.cmb2-element.ui-datepicker .ui-datepicker-next:before{content:'\f345'}.cmb2-element .ui-datepicker .ui-datepicker-next-hover:before,.cmb2-element .ui-datepicker .ui-datepicker-prev-hover:before,.cmb2-element.ui-datepicker .ui-datepicker-next-hover:before,.cmb2-element.ui-datepicker .ui-datepicker-prev-hover:before{opacity:.7}.cmb2-element .ui-datepicker select.ui-datepicker-month,.cmb2-element .ui-datepicker select.ui-datepicker-year,.cmb2-element.ui-datepicker select.ui-datepicker-month,.cmb2-element.ui-datepicker select.ui-datepicker-year{width:33%;background:0 0;border-color:transparent;box-shadow:none;color:#fff}.cmb2-element .ui-datepicker select.ui-datepicker-month option,.cmb2-element .ui-datepicker select.ui-datepicker-year option,.cmb2-element.ui-datepicker select.ui-datepicker-month option,.cmb2-element.ui-datepicker select.ui-datepicker-year option{color:#333}.cmb2-element .ui-datepicker thead,.cmb2-element.ui-datepicker thead{color:#fff;font-weight:600}.cmb2-element .ui-datepicker thead th,.cmb2-element.ui-datepicker thead th{font-weight:400}.cmb2-element .ui-datepicker th,.cmb2-element.ui-datepicker th{padding:10px}.cmb2-element .ui-datepicker td,.cmb2-element.ui-datepicker td{padding:0;border:1px solid #f4f4f4}.cmb2-element .ui-datepicker td.ui-datepicker-other-month,.cmb2-element.ui-datepicker td.ui-datepicker-other-month{border:transparent}.cmb2-element .ui-datepicker td.ui-datepicker-week-end,.cmb2-element.ui-datepicker td.ui-datepicker-week-end{background-color:#f4f4f4;border:1px solid #f4f4f4}.cmb2-element .ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today,.cmb2-element.ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today{-webkit-box-shadow:inset 0 0 1px 0 rgba(0,0,0,.1);-moz-box-shadow:inset 0 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 0 1px 0 rgba(0,0,0,.1)}.cmb2-element .ui-datepicker td.ui-datepicker-today,.cmb2-element.ui-datepicker td.ui-datepicker-today{background-color:#f0f0c0}.cmb2-element .ui-datepicker td.ui-datepicker-current-day,.cmb2-element.ui-datepicker td.ui-datepicker-current-day{background:#bd8}.cmb2-element .ui-datepicker td .ui-state-default,.cmb2-element.ui-datepicker td .ui-state-default{background:0 0;border:none;text-align:center;text-decoration:none;width:auto;display:block;padding:5px 10px;font-weight:400;color:#444}.cmb2-element .ui-datepicker td.ui-state-disabled .ui-state-default,.cmb2-element.ui-datepicker td.ui-state-disabled .ui-state-default{opacity:.5}.cmb2-element .ui-datepicker .ui-datepicker-header,.cmb2-element .ui-datepicker .ui-widget-header,.cmb2-element.ui-datepicker .ui-datepicker-header,.cmb2-element.ui-datepicker .ui-widget-header{background:#00a0d2}.cmb2-element .ui-datepicker thead,.cmb2-element.ui-datepicker thead{background:#32373c}.cmb2-element .ui-datepicker td .ui-state-active,.cmb2-element .ui-datepicker td .ui-state-hover,.cmb2-element.ui-datepicker td .ui-state-active,.cmb2-element.ui-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.cmb2-element .ui-datepicker .ui-timepicker-div,.cmb2-element.ui-datepicker .ui-timepicker-div{font-size:14px}.cmb2-element .ui-datepicker .ui-timepicker-div dl,.cmb2-element.ui-datepicker .ui-timepicker-div dl{text-align:right;padding:0 .6em}.cmb2-element .ui-datepicker .ui-timepicker-div dl dt,.cmb2-element.ui-datepicker .ui-timepicker-div dl dt{float:right;clear:right;padding:0 5px 0 0}.cmb2-element .ui-datepicker .ui-timepicker-div dl dd,.cmb2-element.ui-datepicker .ui-timepicker-div dl dd{margin:0 40% 10px 10px}.cmb2-element .ui-datepicker .ui-timepicker-div dl dd select,.cmb2-element.ui-datepicker .ui-timepicker-div dl dd select{width:100%}.cmb2-element .ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane,.cmb2-element.ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane{padding:.6em;text-align:right}.cmb2-element .ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-primary,.cmb2-element .ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-secondary,.cmb2-element.ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-primary,.cmb2-element.ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-secondary{padding:0 10px 1px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:0 .4em .4em .6em}.admin-color-fresh .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-fresh .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-fresh .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-fresh .cmb2-element.ui-datepicker .ui-widget-header{background:#00a0d2}.admin-color-fresh .cmb2-element .ui-datepicker thead,.admin-color-fresh .cmb2-element.ui-datepicker thead{background:#32373c}.admin-color-fresh .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-fresh .cmb2-element.ui-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.admin-color-blue .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-blue .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-blue .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-blue .cmb2-element.ui-datepicker .ui-widget-header{background:#52accc}.admin-color-blue .cmb2-element .ui-datepicker thead,.admin-color-blue .cmb2-element.ui-datepicker thead{background:#4796b3}.admin-color-blue .cmb2-element .ui-datepicker td .ui-state-active,.admin-color-blue .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-blue .cmb2-element.ui-datepicker td .ui-state-active,.admin-color-blue .cmb2-element.ui-datepicker td .ui-state-hover{background:#096484;color:#fff}.admin-color-blue .cmb2-element .ui-datepicker td.ui-datepicker-today,.admin-color-blue .cmb2-element.ui-datepicker td.ui-datepicker-today{background:#eee}.admin-color-coffee .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-coffee .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-coffee .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-coffee .cmb2-element.ui-datepicker .ui-widget-header{background:#59524c}.admin-color-coffee .cmb2-element .ui-datepicker thead,.admin-color-coffee .cmb2-element.ui-datepicker thead{background:#46403c}.admin-color-coffee .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-coffee .cmb2-element.ui-datepicker td .ui-state-hover{background:#c7a589;color:#fff}.admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-widget-header{background:#523f6d}.admin-color-ectoplasm .cmb2-element .ui-datepicker thead,.admin-color-ectoplasm .cmb2-element.ui-datepicker thead{background:#413256}.admin-color-ectoplasm .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-ectoplasm .cmb2-element.ui-datepicker td .ui-state-hover{background:#a3b745;color:#fff}.admin-color-midnight .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-midnight .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-midnight .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-midnight .cmb2-element.ui-datepicker .ui-widget-header{background:#363b3f}.admin-color-midnight .cmb2-element .ui-datepicker thead,.admin-color-midnight .cmb2-element.ui-datepicker thead{background:#26292c}.admin-color-midnight .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-midnight .cmb2-element.ui-datepicker td .ui-state-hover{background:#e14d43;color:#fff}.admin-color-ocean .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-ocean .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-ocean .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-ocean .cmb2-element.ui-datepicker .ui-widget-header{background:#738e96}.admin-color-ocean .cmb2-element .ui-datepicker thead,.admin-color-ocean .cmb2-element.ui-datepicker thead{background:#627c83}.admin-color-ocean .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-ocean .cmb2-element.ui-datepicker td .ui-state-hover{background:#9ebaa0;color:#fff}.admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover,.admin-color-sunrise .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover,.admin-color-sunrise .cmb2-element.ui-datepicker .ui-widget-header{background:#cf4944}.admin-color-sunrise .cmb2-element .ui-datepicker th,.admin-color-sunrise .cmb2-element.ui-datepicker th{border-color:#be3631;background:#be3631}.admin-color-sunrise .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-sunrise .cmb2-element.ui-datepicker td .ui-state-hover{background:#dd823b;color:#fff}.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-light .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-light .cmb2-element.ui-datepicker .ui-widget-header{background:#e5e5e5}.admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-month,.admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-year,.admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-month,.admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-year{color:#555}.admin-color-light .cmb2-element .ui-datepicker thead,.admin-color-light .cmb2-element.ui-datepicker thead{background:#888}.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-next:before,.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-prev:before,.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-title,.admin-color-light .cmb2-element .ui-datepicker td .ui-state-default,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-next:before,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-prev:before,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-title,.admin-color-light .cmb2-element.ui-datepicker td .ui-state-default{color:#555}.admin-color-light .cmb2-element .ui-datepicker td .ui-state-active,.admin-color-light .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-light .cmb2-element.ui-datepicker td .ui-state-active,.admin-color-light .cmb2-element.ui-datepicker td .ui-state-hover{background:#ccc}.admin-color-light .cmb2-element .ui-datepicker td.ui-datepicker-today,.admin-color-light .cmb2-element.ui-datepicker td.ui-datepicker-today{background:#eee}.admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-widget-header{background:#56b274}.admin-color-bbp-evergreen .cmb2-element .ui-datepicker thead,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker thead{background:#36533f}.admin-color-bbp-evergreen .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker td .ui-state-hover{background:#446950;color:#fff}.admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-widget-header{background:#4ca26a}.admin-color-bbp-mint .cmb2-element .ui-datepicker thead,.admin-color-bbp-mint .cmb2-element.ui-datepicker thead{background:#4f6d59}.admin-color-bbp-mint .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-bbp-mint .cmb2-element.ui-datepicker td .ui-state-hover{background:#5fb37c;color:#fff}@media only screen and (max-width:850px){.cmb2-context-wrap.cmb2-context-wrap-form_top{margin-left:0}}@media (max-width:450px){.cmb-th{font-size:1.2em;padding-bottom:1em;text-align:right}.cmb-th label{display:block;margin-top:0;margin-bottom:.5em}.cmb-td,.cmb-th,.cmb-th+.cmb-td{display:block;float:none;width:100%}.cmb-type-group .cmb-repeatable-group:not(:last-of-type),.cmb-type-group .cmb-row:not(:last-of-type),.cmb2-postbox .cmb-repeatable-group:not(:last-of-type),.cmb2-postbox .cmb-row:not(:last-of-type){border-bottom:0}.cmb2-options-page .cmb2-metabox>.cmb-row>.cmb-th+.cmb-td{padding:0;margin-right:0}}
 
trunk/vendor/webdevstudios/cmb2/css/cmb2.css DELETED
@@ -1,2031 +0,0 @@
1
- /**
2
- * CMB2 Styling
3
- */
4
-
5
- /*--------------------------------------------------------------
6
- Main Wrap
7
- --------------------------------------------------------------*/
8
-
9
- /* line 5, sass/partials/_main_wrap.scss */
10
-
11
- .cmb2-wrap {
12
- margin: 0;
13
- }
14
-
15
- /* line 8, sass/partials/_main_wrap.scss */
16
-
17
- .cmb2-wrap input,
18
- .cmb2-wrap textarea {
19
- font-size: 14px;
20
- max-width: 100%;
21
- padding: 5px;
22
- }
23
-
24
- /* line 18, sass/partials/_main_wrap.scss */
25
-
26
- .cmb2-wrap input[type=text].cmb2-oembed {
27
- width: 100%;
28
- }
29
-
30
- /* line 23, sass/partials/_main_wrap.scss */
31
-
32
- .cmb2-wrap textarea {
33
- width: 500px;
34
- }
35
-
36
- /* line 26, sass/partials/_main_wrap.scss */
37
-
38
- .cmb2-wrap textarea.cmb2-textarea-code {
39
- font-family: "Courier 10 Pitch", Courier, monospace;
40
- line-height: 16px;
41
- }
42
-
43
- /* line 34, sass/partials/_main_wrap.scss */
44
-
45
- .cmb2-wrap input.cmb2-text-small,
46
- .cmb2-wrap input.cmb2-timepicker {
47
- width: 100px;
48
- }
49
-
50
- /* line 40, sass/partials/_main_wrap.scss */
51
-
52
- .cmb2-wrap input.cmb2-text-money {
53
- width: 90px;
54
- }
55
-
56
- /* line 45, sass/partials/_main_wrap.scss */
57
-
58
- .cmb2-wrap input.cmb2-text-medium {
59
- width: 230px;
60
- }
61
-
62
- /* line 50, sass/partials/_main_wrap.scss */
63
-
64
- .cmb2-wrap input.cmb2-upload-file {
65
- width: 65%;
66
- }
67
-
68
- /* line 54, sass/partials/_main_wrap.scss */
69
-
70
- .cmb2-wrap input.ed_button {
71
- padding: 2px 4px;
72
- }
73
-
74
- /* line 59, sass/partials/_main_wrap.scss */
75
-
76
- .cmb2-wrap input:not([type="hidden"]) + input,
77
- .cmb2-wrap input:not([type="hidden"]) + .button-secondary,
78
- .cmb2-wrap input:not([type="hidden"]) + select {
79
- margin-left: 20px;
80
- }
81
-
82
- /* line 67, sass/partials/_main_wrap.scss */
83
-
84
- .cmb2-wrap ul {
85
- margin: 0;
86
- }
87
-
88
- /* line 71, sass/partials/_main_wrap.scss */
89
-
90
- .cmb2-wrap li {
91
- font-size: 14px;
92
- line-height: 16px;
93
- margin: 1px 0 5px 0;
94
- }
95
-
96
- /* line 82, sass/partials/_main_wrap.scss */
97
-
98
- .cmb2-wrap select {
99
- font-size: 14px;
100
- margin-top: 3px;
101
- }
102
-
103
- /* line 87, sass/partials/_main_wrap.scss */
104
-
105
- .cmb2-wrap input:focus,
106
- .cmb2-wrap textarea:focus {
107
- background: #fffff8;
108
- }
109
-
110
- /* line 92, sass/partials/_main_wrap.scss */
111
-
112
- .cmb2-wrap input[type="radio"] {
113
- margin: 0 5px 0 0;
114
- padding: 0;
115
- }
116
-
117
- /* line 97, sass/partials/_main_wrap.scss */
118
-
119
- .cmb2-wrap input[type="checkbox"] {
120
- margin: 0 5px 0 0;
121
- padding: 0;
122
- }
123
-
124
- /* line 102, sass/partials/_main_wrap.scss */
125
-
126
- .cmb2-wrap button,
127
- .cmb2-wrap .button-secondary {
128
- white-space: nowrap;
129
- }
130
-
131
- /* line 107, sass/partials/_main_wrap.scss */
132
-
133
- .cmb2-wrap .mceLayout {
134
- border: 1px solid #e9e9e9 !important;
135
- }
136
-
137
- /* line 111, sass/partials/_main_wrap.scss */
138
-
139
- .cmb2-wrap .mceIframeContainer {
140
- background: #fff;
141
- }
142
-
143
- /* line 115, sass/partials/_main_wrap.scss */
144
-
145
- .cmb2-wrap .meta_mce {
146
- width: 97%;
147
- }
148
-
149
- /* line 118, sass/partials/_main_wrap.scss */
150
-
151
- .cmb2-wrap .meta_mce textarea {
152
- width: 100%;
153
- }
154
-
155
- /* line 124, sass/partials/_main_wrap.scss */
156
-
157
- .cmb2-wrap .wp-color-result,
158
- .cmb2-wrap .wp-picker-input-wrap {
159
- vertical-align: middle;
160
- }
161
-
162
- /* line 129, sass/partials/_main_wrap.scss */
163
-
164
- .cmb2-wrap .wp-color-result,
165
- .cmb2-wrap .wp-picker-container {
166
- margin: 0 10px 0 0;
167
- }
168
-
169
- /* line 134, sass/partials/_main_wrap.scss */
170
-
171
- .cmb2-wrap .cmb-row {
172
- margin: 0;
173
- }
174
-
175
- /* line 137, sass/partials/_main_wrap.scss */
176
-
177
- .cmb2-wrap .cmb-row:after {
178
- content: '';
179
- clear: both;
180
- display: block;
181
- width: 100%;
182
- }
183
-
184
- /* line 144, sass/partials/_main_wrap.scss */
185
-
186
- .cmb2-wrap .cmb-row.cmb-repeat .cmb2-metabox-description {
187
- padding-top: 0;
188
- padding-bottom: 1em;
189
- }
190
-
191
- /* line 152, sass/partials/_main_wrap.scss */
192
-
193
- .cmb2-metabox {
194
- clear: both;
195
- margin: 0;
196
- }
197
-
198
- /* line 158, sass/partials/_main_wrap.scss */
199
-
200
- .cmb2-metabox > .cmb-row:first-of-type > .cmb-td,
201
- .cmb2-metabox > .cmb-row:first-of-type > .cmb-th,
202
- .cmb2-metabox .cmb-field-list > .cmb-row:first-of-type > .cmb-td,
203
- .cmb2-metabox .cmb-field-list > .cmb-row:first-of-type > .cmb-th {
204
- border: 0;
205
- }
206
-
207
- /* line 165, sass/partials/_main_wrap.scss */
208
-
209
- .cmb-add-row {
210
- margin: 1.8em 0 0;
211
- }
212
-
213
- /* line 169, sass/partials/_main_wrap.scss */
214
-
215
- .cmb-nested .cmb-td,
216
- .cmb-repeatable-group .cmb-th,
217
- .cmb-repeatable-group:first-of-type {
218
- border: 0;
219
- }
220
-
221
- /* line 175, sass/partials/_main_wrap.scss */
222
-
223
- .cmb-row:last-of-type,
224
- .cmb2-wrap .cmb-row:last-of-type,
225
- .cmb-repeatable-group:last-of-type {
226
- border-bottom: 0;
227
- }
228
-
229
- /* line 181, sass/partials/_main_wrap.scss */
230
-
231
- .cmb-repeatable-grouping {
232
- border: 1px solid #e9e9e9;
233
- padding: 0 1em;
234
- }
235
-
236
- /* line 185, sass/partials/_main_wrap.scss */
237
-
238
- .cmb-repeatable-grouping.cmb-row {
239
- margin: 0 0 0.8em;
240
- }
241
-
242
- /* line 193, sass/partials/_main_wrap.scss */
243
-
244
- .cmb-th {
245
- color: #222222;
246
- float: left;
247
- font-weight: 600;
248
- line-height: 1.3;
249
- padding: 20px 10px 20px 0;
250
- vertical-align: top;
251
- width: 200px;
252
- }
253
-
254
- /* line 207, sass/partials/_main_wrap.scss */
255
-
256
- .cmb-td {
257
- line-height: 1.3;
258
- max-width: 100%;
259
- padding: 15px 10px;
260
- vertical-align: middle;
261
- }
262
-
263
- /* line 216, sass/partials/_main_wrap.scss */
264
-
265
- .cmb-type-title .cmb-td {
266
- padding: 0;
267
- }
268
-
269
- /* line 221, sass/partials/_main_wrap.scss */
270
-
271
- .cmb-th label {
272
- display: block;
273
- padding: 5px 0;
274
- }
275
-
276
- /* line 226, sass/partials/_main_wrap.scss */
277
-
278
- .cmb-th + .cmb-td {
279
- float: left;
280
- }
281
-
282
- /* line 230, sass/partials/_main_wrap.scss */
283
-
284
- .cmb-td .cmb-td {
285
- padding-bottom: 1em;
286
- }
287
-
288
- /* line 234, sass/partials/_main_wrap.scss */
289
-
290
- .cmb-remove-row {
291
- text-align: right;
292
- }
293
-
294
- /* line 238, sass/partials/_main_wrap.scss */
295
-
296
- .empty-row.hidden {
297
- display: none;
298
- }
299
-
300
- /* line 243, sass/partials/_main_wrap.scss */
301
-
302
- .cmb-repeat-table {
303
- background-color: #fafafa;
304
- border: 1px solid #e1e1e1;
305
- }
306
-
307
- /* line 247, sass/partials/_main_wrap.scss */
308
-
309
- .cmb-repeat-table .cmb-row.cmb-repeat-row {
310
- position: relative;
311
- counter-increment: el;
312
- margin: 0;
313
- padding: 10px 10px 10px 50px;
314
- border-bottom: none !important;
315
- }
316
-
317
- /* line 255, sass/partials/_main_wrap.scss */
318
-
319
- .cmb-repeat-table .cmb-row.cmb-repeat-row + .cmb-repeat-row {
320
- border-top: solid 1px #e9e9e9;
321
- }
322
-
323
- /* line 259, sass/partials/_main_wrap.scss */
324
-
325
- .cmb-repeat-table .cmb-row.cmb-repeat-row:before {
326
- content: counter(el);
327
- display: block;
328
- top: 0;
329
- left: 0;
330
- position: absolute;
331
- width: 35px;
332
- height: 100%;
333
- line-height: 35px;
334
- color: #aaaaaa;
335
- text-align: center;
336
- border-right: solid 1px #e9e9e9;
337
- }
338
-
339
- /* line 276, sass/partials/_main_wrap.scss */
340
-
341
- .cmb-repeat-table .cmb-row.cmb-repeat-row .cmb-td {
342
- margin: 0;
343
- padding: 0;
344
- }
345
-
346
- /* line 283, sass/partials/_main_wrap.scss */
347
-
348
- .cmb-repeat-table + .cmb-add-row {
349
- margin: 0;
350
- }
351
-
352
- /* line 286, sass/partials/_main_wrap.scss */
353
-
354
- .cmb-repeat-table + .cmb-add-row:before {
355
- content: '';
356
- width: 1px;
357
- height: 1.6em;
358
- display: block;
359
- margin-left: 17px;
360
- background-color: gainsboro;
361
- }
362
-
363
- /* line 296, sass/partials/_main_wrap.scss */
364
-
365
- .cmb-repeat-table .cmb-remove-row {
366
- top: 7px;
367
- right: 7px;
368
- position: absolute;
369
- width: auto;
370
- margin-left: 0;
371
- padding: 0 !important;
372
- display: none;
373
- }
374
-
375
- /* line 307, sass/partials/_main_wrap.scss */
376
-
377
- .cmb-repeat-table .cmb-remove-row > .cmb-remove-row-button {
378
- font-size: 20px;
379
- text-indent: -1000px;
380
- overflow: hidden;
381
- position: relative;
382
- height: auto;
383
- line-height: 1;
384
- padding: 0 10px 0;
385
- }
386
-
387
- /* line 318, sass/partials/_main_wrap.scss */
388
-
389
- .cmb-repeat-table .cmb-remove-row > .cmb-remove-row-button:before {
390
- content: "";
391
- font-family: 'Dashicons';
392
- speak: none;
393
- font-weight: normal;
394
- font-variant: normal;
395
- text-transform: none;
396
- line-height: 1;
397
- -webkit-font-smoothing: antialiased;
398
- margin: 0;
399
- text-indent: 0;
400
- position: absolute;
401
- top: 0;
402
- left: 0;
403
- width: 100%;
404
- height: 100%;
405
- text-align: center;
406
- }
407
-
408
- /* line 324, sass/partials/_main_wrap.scss */
409
-
410
- .cmb-repeat-table .cmb-repeat-row:hover .cmb-remove-row {
411
- display: block;
412
- }
413
-
414
- /* line 332, sass/partials/_main_wrap.scss */
415
-
416
- .cmb-repeatable-group .cmb-th {
417
- padding: 5px;
418
- }
419
-
420
- /* line 336, sass/partials/_main_wrap.scss */
421
-
422
- .cmb-repeatable-group .cmb-group-title {
423
- background-color: #e9e9e9;
424
- padding: 8px 12px 8px 2.2em;
425
- margin: 0 -1em;
426
- min-height: 1.5em;
427
- font-size: 14px;
428
- line-height: 1.4;
429
- }
430
-
431
- /* line 344, sass/partials/_main_wrap.scss */
432
-
433
- .cmb-repeatable-group .cmb-group-title h4 {
434
- border: 0;
435
- margin: 0;
436
- font-size: 1.2em;
437
- font-weight: 500;
438
- padding: 0.5em 0.75em;
439
- }
440
-
441
- /* line 352, sass/partials/_main_wrap.scss */
442
-
443
- .cmb-repeatable-group .cmb-group-title .cmb-th {
444
- display: block;
445
- width: 100%;
446
- }
447
-
448
- /* line 358, sass/partials/_main_wrap.scss */
449
-
450
- .cmb-repeatable-group .cmb-group-description .cmb-th {
451
- font-size: 1.2em;
452
- display: block;
453
- float: none;
454
- padding-bottom: 1em;
455
- text-align: left;
456
- width: 100%;
457
- }
458
-
459
- /* line 27, sass/partials/_mixins.scss */
460
-
461
- .cmb-repeatable-group .cmb-group-description .cmb-th label {
462
- display: block;
463
- margin-top: 0;
464
- margin-bottom: 0.5em;
465
- }
466
-
467
- /* line 362, sass/partials/_main_wrap.scss */
468
-
469
- .cmb-repeatable-group .cmb-shift-rows {
470
- font-size: 1em;
471
- margin-right: 1em;
472
- text-decoration: none;
473
- }
474
-
475
- /* line 367, sass/partials/_main_wrap.scss */
476
-
477
- .cmb-repeatable-group .cmb-shift-rows .dashicons {
478
- font-size: 1.5em;
479
- height: 1.5em;
480
- line-height: 1.2em;
481
- width: 1em;
482
- }
483
-
484
- /* line 373, sass/partials/_main_wrap.scss */
485
-
486
- .cmb-repeatable-group .cmb-shift-rows .dashicons.dashicons-arrow-down-alt2 {
487
- line-height: 1.3em;
488
- }
489
-
490
- /* line 380, sass/partials/_main_wrap.scss */
491
-
492
- .cmb-repeatable-group .cmb2-upload-button {
493
- float: right;
494
- }
495
-
496
- /* line 386, sass/partials/_main_wrap.scss */
497
-
498
- p.cmb2-metabox-description {
499
- color: #aaaaaa;
500
- font-style: italic;
501
- margin: 0;
502
- padding-top: .5em;
503
- }
504
-
505
- /* line 393, sass/partials/_main_wrap.scss */
506
-
507
- span.cmb2-metabox-description {
508
- color: #aaaaaa;
509
- font-style: italic;
510
- }
511
-
512
- /* line 398, sass/partials/_main_wrap.scss */
513
-
514
- .cmb2-metabox-title {
515
- margin: 0 0 5px 0;
516
- padding: 5px 0 0 0;
517
- font-size: 14px;
518
- }
519
-
520
- /* line 404, sass/partials/_main_wrap.scss */
521
-
522
- .cmb-inline ul {
523
- padding: 4px 0 0 0;
524
- }
525
-
526
- /* line 408, sass/partials/_main_wrap.scss */
527
-
528
- .cmb-inline li {
529
- display: inline-block;
530
- padding-right: 18px;
531
- }
532
-
533
- /* line 413, sass/partials/_main_wrap.scss */
534
-
535
- .cmb-type-textarea-code pre {
536
- margin: 0;
537
- }
538
-
539
- /* line 419, sass/partials/_main_wrap.scss */
540
-
541
- .cmb2-media-status .img-status {
542
- clear: none;
543
- display: inline-block;
544
- vertical-align: middle;
545
- margin-right: 10px;
546
- width: auto;
547
- }
548
-
549
- /* line 426, sass/partials/_main_wrap.scss */
550
-
551
- .cmb2-media-status .img-status img {
552
- max-width: 350px;
553
- height: auto;
554
- }
555
-
556
- /* line 432, sass/partials/_main_wrap.scss */
557
-
558
- .cmb2-media-status .img-status img,
559
- .cmb2-media-status .embed-status {
560
- background: #ffffff;
561
- border: 1px solid #e9e9e9;
562
- border-radius: 2px;
563
- -moz-border-radius: 2px;
564
- margin: 15px 0 0 0;
565
- padding: 5px;
566
- }
567
-
568
- /* line 442, sass/partials/_main_wrap.scss */
569
-
570
- .cmb2-media-status .embed-status {
571
- float: left;
572
- max-width: 800px;
573
- }
574
-
575
- /* line 447, sass/partials/_main_wrap.scss */
576
-
577
- .cmb2-media-status .img-status,
578
- .cmb2-media-status .embed-status {
579
- position: relative;
580
- }
581
-
582
- /* line 450, sass/partials/_main_wrap.scss */
583
-
584
- .cmb2-media-status .img-status .cmb2-remove-file-button,
585
- .cmb2-media-status .embed-status .cmb2-remove-file-button {
586
- background: url(../images/ico-delete.png);
587
- height: 16px;
588
- left: -5px;
589
- position: absolute;
590
- text-indent: -9999px;
591
- top: -5px;
592
- width: 16px;
593
- }
594
-
595
- /* line 464, sass/partials/_main_wrap.scss */
596
-
597
- .cmb2-media-status .img-status .cmb2-remove-file-button {
598
- top: 10px;
599
- }
600
-
601
- /* line 469, sass/partials/_main_wrap.scss */
602
-
603
- .cmb2-media-status .img-status img,
604
- .cmb2-media-status .file-status > span {
605
- cursor: pointer;
606
- }
607
-
608
- /* line 475, sass/partials/_main_wrap.scss */
609
-
610
- .cmb-type-file-list .cmb2-media-status .img-status {
611
- clear: none;
612
- vertical-align: middle;
613
- width: auto;
614
- margin-right: 10px;
615
- margin-bottom: 10px;
616
- margin-top: 0;
617
- }
618
-
619
- /* line 484, sass/partials/_main_wrap.scss */
620
-
621
- .cmb-attach-list li {
622
- clear: both;
623
- display: inline-block;
624
- width: 100%;
625
- margin-top: 5px;
626
- margin-bottom: 10px;
627
- }
628
-
629
- /* line 491, sass/partials/_main_wrap.scss */
630
-
631
- .cmb-attach-list li img {
632
- cursor: move;
633
- float: left;
634
- margin-right: 10px;
635
- }
636
-
637
- /* line 498, sass/partials/_main_wrap.scss */
638
-
639
- .cmb2-remove-wrapper {
640
- margin: 0;
641
- }
642
-
643
- /* line 502, sass/partials/_main_wrap.scss */
644
-
645
- .child-cmb2 .cmb-th {
646
- text-align: left;
647
- }
648
-
649
- /* line 506, sass/partials/_main_wrap.scss */
650
-
651
- .cmb2-indented-hierarchy {
652
- padding-left: 1.5em;
653
- }
654
-
655
- /*--------------------------------------------------------------
656
- Post Metaboxes
657
- --------------------------------------------------------------*/
658
-
659
- /* line 4, sass/partials/_post_metaboxes.scss */
660
-
661
- #poststuff .cmb-group-title {
662
- margin-left: -1em;
663
- margin-right: -1em;
664
- min-height: 1.5em;
665
- }
666
-
667
- /* line 10, sass/partials/_post_metaboxes.scss */
668
-
669
- #poststuff .repeatable .cmb-group-title {
670
- padding-left: 2.2em;
671
- }
672
-
673
- /* line 16, sass/partials/_post_metaboxes.scss */
674
-
675
- .cmb2-postbox .cmb2-wrap,
676
- .cmb-type-group .cmb2-wrap {
677
- margin: 0;
678
- }
679
-
680
- /* line 19, sass/partials/_post_metaboxes.scss */
681
-
682
- .cmb2-postbox .cmb2-wrap > .cmb-field-list > .cmb-row,
683
- .cmb-type-group .cmb2-wrap > .cmb-field-list > .cmb-row {
684
- padding: 1.8em 0;
685
- }
686
-
687
- /* line 25, sass/partials/_post_metaboxes.scss */
688
-
689
- .cmb2-postbox .cmb2-wrap input[type=text].cmb2-oembed,
690
- .cmb-type-group .cmb2-wrap input[type=text].cmb2-oembed {
691
- width: 100%;
692
- }
693
-
694
- /* line 31, sass/partials/_post_metaboxes.scss */
695
-
696
- .cmb2-postbox .cmb-row,
697
- .cmb-type-group .cmb-row {
698
- padding: 0 0 1.8em;
699
- margin: 0 0 0.8em;
700
- }
701
-
702
- /* line 35, sass/partials/_post_metaboxes.scss */
703
-
704
- .cmb2-postbox .cmb-row .cmbhandle,
705
- .cmb-type-group .cmb-row .cmbhandle {
706
- right: -1em;
707
- position: relative;
708
- }
709
-
710
- /* line 41, sass/partials/_post_metaboxes.scss */
711
-
712
- .cmb2-postbox .cmb-repeatable-grouping,
713
- .cmb-type-group .cmb-repeatable-grouping {
714
- padding: 0 1em;
715
- max-width: 100%;
716
- min-width: 1px !important;
717
- }
718
-
719
- /* line 47, sass/partials/_post_metaboxes.scss */
720
-
721
- .cmb2-postbox .cmb-repeatable-group > .cmb-row,
722
- .cmb-type-group .cmb-repeatable-group > .cmb-row {
723
- padding-bottom: 0;
724
- }
725
-
726
- /* line 51, sass/partials/_post_metaboxes.scss */
727
-
728
- .cmb2-postbox .cmb-th,
729
- .cmb-type-group .cmb-th {
730
- width: 18%;
731
- padding: 0 2% 0 0;
732
- }
733
-
734
- /* line 57, sass/partials/_post_metaboxes.scss */
735
-
736
- .cmb2-postbox .cmb-td,
737
- .cmb-type-group .cmb-td {
738
- margin-bottom: 0;
739
- padding: 0;
740
- line-height: 1.3;
741
- }
742
-
743
- /* line 63, sass/partials/_post_metaboxes.scss */
744
-
745
- .cmb2-postbox .cmb-th + .cmb-td,
746
- .cmb-type-group .cmb-th + .cmb-td {
747
- width: 80%;
748
- float: right;
749
- }
750
-
751
- /* line 68, sass/partials/_post_metaboxes.scss */
752
-
753
- .cmb2-postbox .cmb-row:not(:last-of-type),
754
- .cmb2-postbox .cmb-repeatable-group:not(:last-of-type),
755
- .cmb-type-group .cmb-row:not(:last-of-type),
756
- .cmb-type-group .cmb-repeatable-group:not(:last-of-type) {
757
- border-bottom: 1px solid #e9e9e9;
758
- }
759
-
760
- /* line 77, sass/partials/_post_metaboxes.scss */
761
-
762
- .cmb2-postbox .cmb-repeat-group-field,
763
- .cmb2-postbox .cmb-remove-field-row,
764
- .cmb-type-group .cmb-repeat-group-field,
765
- .cmb-type-group .cmb-remove-field-row {
766
- padding-top: 1.8em;
767
- }
768
-
769
- /*--------------------------------------------------------------
770
- Context Metaboxes
771
- --------------------------------------------------------------*/
772
-
773
- /* Metabox collapse arrow indicators */
774
-
775
- /* line 9, sass/partials/_context_metaboxes.scss */
776
-
777
- .js .cmb2-postbox.context-box .toggle-indicator:before {
778
- content: "\f142";
779
- display: inline-block;
780
- font: normal 20px/1 dashicons;
781
- speak: none;
782
- -webkit-font-smoothing: antialiased;
783
- -moz-osx-font-smoothing: grayscale;
784
- text-decoration: none !important;
785
- }
786
-
787
- /* line 22, sass/partials/_context_metaboxes.scss */
788
-
789
- .js .cmb2-postbox.context-box.closed .toggle-indicator:before {
790
- content: "\f140";
791
- }
792
-
793
- /* line 30, sass/partials/_context_metaboxes.scss */
794
-
795
- .cmb2-postbox.context-box {
796
- margin-bottom: 10px;
797
- }
798
-
799
- /* line 34, sass/partials/_context_metaboxes.scss */
800
-
801
- .cmb2-postbox.context-box.context-before_permalink-box {
802
- margin-top: 10px;
803
- }
804
-
805
- /* line 38, sass/partials/_context_metaboxes.scss */
806
-
807
- .cmb2-postbox.context-box.context-after_title-box {
808
- margin-top: 10px;
809
- }
810
-
811
- /* line 42, sass/partials/_context_metaboxes.scss */
812
-
813
- .cmb2-postbox.context-box.context-after_editor-box {
814
- margin-top: 20px;
815
- margin-bottom: 0;
816
- }
817
-
818
- /* line 47, sass/partials/_context_metaboxes.scss */
819
-
820
- .cmb2-postbox.context-box.context-form_top-box {
821
- margin-top: 10px;
822
- }
823
-
824
- /* line 51, sass/partials/_context_metaboxes.scss */
825
-
826
- .cmb2-postbox.context-box.context-form_top-box .hndle {
827
- font-size: 14px;
828
- padding: 8px 12px;
829
- margin: 0;
830
- line-height: 1.4;
831
- }
832
-
833
- /* line 59, sass/partials/_context_metaboxes.scss */
834
-
835
- .cmb2-postbox.context-box .hndle {
836
- cursor: auto;
837
- }
838
-
839
- /* line 64, sass/partials/_context_metaboxes.scss */
840
-
841
- .cmb2-context-wrap {
842
- margin-top: 10px;
843
- }
844
-
845
- /* line 68, sass/partials/_context_metaboxes.scss */
846
-
847
- .cmb2-context-wrap.cmb2-context-wrap-form_top {
848
- margin-right: 300px;
849
- width: auto;
850
- }
851
-
852
- /* line 75, sass/partials/_context_metaboxes.scss */
853
-
854
- .cmb2-context-wrap.cmb2-context-wrap-no-title .cmb2-metabox {
855
- padding: 10px;
856
- }
857
-
858
- /* line 80, sass/partials/_context_metaboxes.scss */
859
-
860
- .cmb2-context-wrap .cmb-th {
861
- padding: 0 2% 0 0;
862
- width: 18%;
863
- }
864
-
865
- /* line 85, sass/partials/_context_metaboxes.scss */
866
-
867
- .cmb2-context-wrap .cmb-td {
868
- width: 80%;
869
- padding: 0;
870
- }
871
-
872
- /* line 90, sass/partials/_context_metaboxes.scss */
873
-
874
- .cmb2-context-wrap .cmb-row {
875
- margin-bottom: 10px;
876
- }
877
-
878
- /* line 93, sass/partials/_context_metaboxes.scss */
879
-
880
- .cmb2-context-wrap .cmb-row:last-of-type {
881
- margin-bottom: 0;
882
- }
883
-
884
- /* one column on the post write/edit screen */
885
-
886
- /*--------------------------------------------------------------
887
- Options page
888
- --------------------------------------------------------------*/
889
-
890
- /* line 4, sass/partials/_options-page.scss */
891
-
892
- .cmb2-options-page {
893
- max-width: 1200px;
894
- }
895
-
896
- /* line 7, sass/partials/_options-page.scss */
897
-
898
- .cmb2-options-page.wrap > h2 {
899
- margin-bottom: 1em;
900
- }
901
-
902
- /* line 11, sass/partials/_options-page.scss */
903
-
904
- .cmb2-options-page .cmb2-metabox > .cmb-row {
905
- padding: 1em;
906
- margin-top: -1px;
907
- background: #ffffff;
908
- border: 1px solid #e9e9e9;
909
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
910
- }
911
-
912
- /* line 18, sass/partials/_options-page.scss */
913
-
914
- .cmb2-options-page .cmb2-metabox > .cmb-row > .cmb-th {
915
- padding: 0;
916
- font-weight: initial;
917
- }
918
-
919
- /* line 23, sass/partials/_options-page.scss */
920
-
921
- .cmb2-options-page .cmb2-metabox > .cmb-row > .cmb-th + .cmb-td {
922
- float: none;
923
- padding: 0 0 0 1em;
924
- margin-left: 200px;
925
- }
926
-
927
- /* line 36, sass/partials/_options-page.scss */
928
-
929
- .cmb2-options-page .cmb2-wrap .cmb-type-title {
930
- margin-top: 1em;
931
- padding: 0.6em 1em;
932
- background-color: #fafafa;
933
- }
934
-
935
- /* line 41, sass/partials/_options-page.scss */
936
-
937
- .cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-title {
938
- font-size: 12px;
939
- margin-top: 0;
940
- margin-bottom: 0;
941
- text-transform: uppercase;
942
- }
943
-
944
- /* line 48, sass/partials/_options-page.scss */
945
-
946
- .cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-description {
947
- padding-top: 0.25em;
948
- }
949
-
950
- /* line 54, sass/partials/_options-page.scss */
951
-
952
- .cmb2-options-page .cmb-repeatable-group .cmb-group-description .cmb-th {
953
- padding: 0 0 0.8em 0;
954
- }
955
-
956
- /* line 58, sass/partials/_options-page.scss */
957
-
958
- .cmb2-options-page .cmb-repeatable-group .cmb-group-name {
959
- font-size: 16px;
960
- margin-top: 0;
961
- margin-bottom: 0;
962
- }
963
-
964
- /* line 64, sass/partials/_options-page.scss */
965
-
966
- .cmb2-options-page .cmb-repeatable-group .cmb-th > .cmb2-metabox-description {
967
- font-weight: 400;
968
- padding-bottom: 0 !important;
969
- }
970
-
971
- /*--------------------------------------------------------------
972
- Misc.
973
- --------------------------------------------------------------*/
974
-
975
- /* line 5, sass/partials/_misc.scss */
976
-
977
- #poststuff .cmb-repeatable-group h2 {
978
- margin: 0;
979
- }
980
-
981
- /* line 12, sass/partials/_misc.scss */
982
-
983
- .edit-tags-php .cmb2-metabox-title,
984
- .profile-php .cmb2-metabox-title,
985
- .user-edit-php .cmb2-metabox-title {
986
- font-size: 1.4em;
987
- }
988
-
989
- /* line 18, sass/partials/_misc.scss */
990
-
991
- .cmb2-postbox .cmb-spinner,
992
- .cmb2-no-box-wrap .cmb-spinner {
993
- float: left;
994
- display: none;
995
- }
996
-
997
- /* line 24, sass/partials/_misc.scss */
998
-
999
- .cmb-spinner {
1000
- display: none;
1001
- }
1002
-
1003
- /* line 26, sass/partials/_misc.scss */
1004
-
1005
- .cmb-spinner.is-active {
1006
- display: block;
1007
- }
1008
-
1009
- /*--------------------------------------------------------------
1010
- Sidebar Placement Adjustments
1011
- --------------------------------------------------------------*/
1012
-
1013
- /* line 10, sass/partials/_sidebar_placements.scss */
1014
-
1015
- .inner-sidebar .cmb2-wrap > .cmb-field-list > .cmb-row,
1016
- #side-sortables .cmb2-wrap > .cmb-field-list > .cmb-row {
1017
- padding: 1.4em 0;
1018
- }
1019
-
1020
- /* line 16, sass/partials/_sidebar_placements.scss */
1021
-
1022
- .inner-sidebar .cmb2-wrap input[type=text]:not(.wp-color-picker),
1023
- #side-sortables .cmb2-wrap input[type=text]:not(.wp-color-picker) {
1024
- width: 100%;
1025
- }
1026
-
1027
- /* line 20, sass/partials/_sidebar_placements.scss */
1028
-
1029
- .inner-sidebar .cmb2-wrap input + input:not(.wp-picker-clear),
1030
- .inner-sidebar .cmb2-wrap input + select,
1031
- #side-sortables .cmb2-wrap input + input:not(.wp-picker-clear),
1032
- #side-sortables .cmb2-wrap input + select {
1033
- margin-left: 0;
1034
- margin-top: 1em;
1035
- display: block;
1036
- }
1037
-
1038
- /* line 26, sass/partials/_sidebar_placements.scss */
1039
-
1040
- .inner-sidebar .cmb2-wrap input.cmb2-text-money,
1041
- #side-sortables .cmb2-wrap input.cmb2-text-money {
1042
- max-width: 70%;
1043
- }
1044
-
1045
- /* line 28, sass/partials/_sidebar_placements.scss */
1046
-
1047
- .inner-sidebar .cmb2-wrap input.cmb2-text-money + .cmb2-metabox-description,
1048
- #side-sortables .cmb2-wrap input.cmb2-text-money + .cmb2-metabox-description {
1049
- display: block;
1050
- }
1051
-
1052
- /* line 34, sass/partials/_sidebar_placements.scss */
1053
-
1054
- .inner-sidebar .cmb2-wrap label,
1055
- #side-sortables .cmb2-wrap label {
1056
- display: block;
1057
- font-weight: 700;
1058
- padding: 0 0 5px;
1059
- }
1060
-
1061
- /* line 42, sass/partials/_sidebar_placements.scss */
1062
-
1063
- .inner-sidebar textarea,
1064
- #side-sortables textarea {
1065
- max-width: 99%;
1066
- }
1067
-
1068
- /* line 46, sass/partials/_sidebar_placements.scss */
1069
-
1070
- .inner-sidebar .cmb-repeatable-group,
1071
- #side-sortables .cmb-repeatable-group {
1072
- border-bottom: 1px solid #e9e9e9;
1073
- }
1074
-
1075
- /* line 50, sass/partials/_sidebar_placements.scss */
1076
-
1077
- .inner-sidebar .cmb-type-group > .cmb-td > .cmb-repeatable-group,
1078
- #side-sortables .cmb-type-group > .cmb-td > .cmb-repeatable-group {
1079
- border-bottom: 0;
1080
- margin-bottom: -1.4em;
1081
- }
1082
-
1083
- /* line 55, sass/partials/_sidebar_placements.scss */
1084
-
1085
- .inner-sidebar .cmb-th,
1086
- .inner-sidebar .cmb-td:not(.cmb-remove-row),
1087
- .inner-sidebar .cmb-th + .cmb-td,
1088
- #side-sortables .cmb-th,
1089
- #side-sortables .cmb-td:not(.cmb-remove-row),
1090
- #side-sortables .cmb-th + .cmb-td {
1091
- width: 100%;
1092
- display: block;
1093
- float: none;
1094
- }
1095
-
1096
- /* line 63, sass/partials/_sidebar_placements.scss */
1097
-
1098
- .inner-sidebar .closed .inside,
1099
- #side-sortables .closed .inside {
1100
- display: none;
1101
- }
1102
-
1103
- /* line 67, sass/partials/_sidebar_placements.scss */
1104
-
1105
- .inner-sidebar .cmb-th,
1106
- #side-sortables .cmb-th {
1107
- display: block;
1108
- float: none;
1109
- padding-bottom: 1em;
1110
- text-align: left;
1111
- width: 100%;
1112
- padding-left: 0;
1113
- padding-right: 0;
1114
- }
1115
-
1116
- /* line 27, sass/partials/_mixins.scss */
1117
-
1118
- .inner-sidebar .cmb-th label,
1119
- #side-sortables .cmb-th label {
1120
- display: block;
1121
- margin-top: 0;
1122
- margin-bottom: 0.5em;
1123
- }
1124
-
1125
- /* line 14, sass/partials/_mixins.scss */
1126
-
1127
- .inner-sidebar .cmb-th label,
1128
- #side-sortables .cmb-th label {
1129
- font-size: 14px;
1130
- line-height: 1.4em;
1131
- }
1132
-
1133
- /* line 74, sass/partials/_sidebar_placements.scss */
1134
-
1135
- .inner-sidebar .cmb-group-description .cmb-th,
1136
- #side-sortables .cmb-group-description .cmb-th {
1137
- padding-top: 0;
1138
- }
1139
-
1140
- /* line 77, sass/partials/_sidebar_placements.scss */
1141
-
1142
- .inner-sidebar .cmb-group-description .cmb2-metabox-description,
1143
- #side-sortables .cmb-group-description .cmb2-metabox-description {
1144
- padding: 0;
1145
- }
1146
-
1147
- /* line 84, sass/partials/_sidebar_placements.scss */
1148
-
1149
- .inner-sidebar .cmb-group-title .cmb-th,
1150
- #side-sortables .cmb-group-title .cmb-th {
1151
- padding: 0;
1152
- }
1153
-
1154
- /* line 90, sass/partials/_sidebar_placements.scss */
1155
-
1156
- .inner-sidebar .cmb-repeatable-grouping + .cmb-repeatable-grouping,
1157
- #side-sortables .cmb-repeatable-grouping + .cmb-repeatable-grouping {
1158
- margin-top: 1em;
1159
- }
1160
-
1161
- /* line 99, sass/partials/_sidebar_placements.scss */
1162
-
1163
- .inner-sidebar .cmb2-media-status .img-status img,
1164
- .inner-sidebar .cmb2-media-status .embed-status img,
1165
- #side-sortables .cmb2-media-status .img-status img,
1166
- #side-sortables .cmb2-media-status .embed-status img {
1167
- max-width: 90%;
1168
- height: auto;
1169
- }
1170
-
1171
- /* line 107, sass/partials/_sidebar_placements.scss */
1172
-
1173
- .inner-sidebar .cmb2-list label,
1174
- #side-sortables .cmb2-list label {
1175
- display: inline;
1176
- font-weight: normal;
1177
- }
1178
-
1179
- /* line 112, sass/partials/_sidebar_placements.scss */
1180
-
1181
- .inner-sidebar .cmb2-metabox-description,
1182
- #side-sortables .cmb2-metabox-description {
1183
- display: block;
1184
- padding: 7px 0 0;
1185
- }
1186
-
1187
- /* line 119, sass/partials/_sidebar_placements.scss */
1188
-
1189
- .inner-sidebar .cmb-type-checkbox .cmb-td label,
1190
- .inner-sidebar .cmb-type-checkbox .cmb2-metabox-description,
1191
- #side-sortables .cmb-type-checkbox .cmb-td label,
1192
- #side-sortables .cmb-type-checkbox .cmb2-metabox-description {
1193
- font-weight: normal;
1194
- display: inline;
1195
- }
1196
-
1197
- /* line 126, sass/partials/_sidebar_placements.scss */
1198
-
1199
- .inner-sidebar .cmb-row .cmb2-metabox-description,
1200
- #side-sortables .cmb-row .cmb2-metabox-description {
1201
- padding-bottom: 1.8em;
1202
- }
1203
-
1204
- /* line 130, sass/partials/_sidebar_placements.scss */
1205
-
1206
- .inner-sidebar .cmb2-metabox-title,
1207
- #side-sortables .cmb2-metabox-title {
1208
- font-size: 1.2em;
1209
- font-style: italic;
1210
- }
1211
-
1212
- /* line 135, sass/partials/_sidebar_placements.scss */
1213
-
1214
- .inner-sidebar .cmb-remove-row,
1215
- #side-sortables .cmb-remove-row {
1216
- clear: both;
1217
- padding-top: 12px;
1218
- padding-bottom: 0;
1219
- }
1220
-
1221
- /* line 141, sass/partials/_sidebar_placements.scss */
1222
-
1223
- .inner-sidebar .cmb2-upload-button,
1224
- #side-sortables .cmb2-upload-button {
1225
- clear: both;
1226
- margin-top: 12px;
1227
- }
1228
-
1229
- /* line 2, sass/partials/_collapsible_ui.scss */
1230
-
1231
- .cmb2-metabox .cmbhandle {
1232
- color: #aaa;
1233
- float: right;
1234
- width: 27px;
1235
- height: 30px;
1236
- cursor: pointer;
1237
- right: -1em;
1238
- position: relative;
1239
- }
1240
-
1241
- /* line 10, sass/partials/_collapsible_ui.scss */
1242
-
1243
- .cmb2-metabox .cmbhandle:before {
1244
- content: '\f142';
1245
- right: 12px;
1246
- font: normal 20px/1 'dashicons';
1247
- speak: none;
1248
- display: inline-block;
1249
- padding: 8px 10px;
1250
- top: 0;
1251
- position: relative;
1252
- -webkit-font-smoothing: antialiased;
1253
- -moz-osx-font-smoothing: grayscale;
1254
- text-decoration: none !important;
1255
- }
1256
-
1257
- /* line 27, sass/partials/_collapsible_ui.scss */
1258
-
1259
- .cmb2-metabox .postbox.closed .cmbhandle:before {
1260
- content: '\f140';
1261
- }
1262
-
1263
- /* line 33, sass/partials/_collapsible_ui.scss */
1264
-
1265
- .cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row {
1266
- -webkit-appearance: none !important;
1267
- background: none !important;
1268
- border: none !important;
1269
- position: absolute;
1270
- left: 0;
1271
- top: .5em;
1272
- line-height: 1em;
1273
- padding: 2px 6px 3px;
1274
- opacity: .5;
1275
- }
1276
-
1277
- /* line 43, sass/partials/_collapsible_ui.scss */
1278
-
1279
- .cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]) {
1280
- cursor: pointer;
1281
- color: #a00;
1282
- opacity: 1;
1283
- }
1284
-
1285
- /* line 47, sass/partials/_collapsible_ui.scss */
1286
-
1287
- .cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]):hover {
1288
- color: #f00;
1289
- }
1290
-
1291
- /*
1292
- * jQuery UI CSS Framework 1.8.16
1293
- *
1294
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
1295
- * Dual licensed under the MIT or GPL Version 2 licenses.
1296
- * http://jquery.org/license
1297
- *
1298
- * http://docs.jquery.com/UI/Theming/API
1299
- *
1300
- * WordPress Styles adopted from "jQuery UI Datepicker CSS for WordPress"
1301
- * https://github.com/stuttter/wp-datepicker-styling
1302
- *
1303
- */
1304
-
1305
- /* line 15, sass/partials/_jquery_ui.scss */
1306
-
1307
- * html .cmb2-element.ui-helper-clearfix {
1308
- height: 1%;
1309
- }
1310
-
1311
- /* line 24, sass/partials/_jquery_ui.scss */
1312
-
1313
- .cmb2-element.ui-datepicker,
1314
- .cmb2-element .ui-datepicker {
1315
- padding: 0;
1316
- margin: 0;
1317
- -webkit-border-radius: 0;
1318
- -moz-border-radius: 0;
1319
- border-radius: 0;
1320
- background-color: #fff;
1321
- border: 1px solid #dfdfdf;
1322
- border-top: none;
1323
- -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075);
1324
- box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075);
1325
- min-width: 17em;
1326
- width: auto; /* Default Color Scheme */
1327
- }
1328
-
1329
- /* line 38, sass/partials/_jquery_ui.scss */
1330
-
1331
- .cmb2-element.ui-datepicker *,
1332
- .cmb2-element .ui-datepicker * {
1333
- padding: 0;
1334
- font-family: "Open Sans", sans-serif;
1335
- -webkit-border-radius: 0;
1336
- -moz-border-radius: 0;
1337
- border-radius: 0;
1338
- }
1339
-
1340
- /* line 46, sass/partials/_jquery_ui.scss */
1341
-
1342
- .cmb2-element.ui-datepicker table,
1343
- .cmb2-element .ui-datepicker table {
1344
- font-size: 13px;
1345
- margin: 0;
1346
- border: none;
1347
- border-collapse: collapse;
1348
- }
1349
-
1350
- /* line 53, sass/partials/_jquery_ui.scss */
1351
-
1352
- .cmb2-element.ui-datepicker .ui-widget-header,
1353
- .cmb2-element.ui-datepicker .ui-datepicker-header,
1354
- .cmb2-element .ui-datepicker .ui-widget-header,
1355
- .cmb2-element .ui-datepicker .ui-datepicker-header {
1356
- background-image: none;
1357
- border: none;
1358
- color: #fff;
1359
- font-weight: normal;
1360
- }
1361
-
1362
- /* line 61, sass/partials/_jquery_ui.scss */
1363
-
1364
- .cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover,
1365
- .cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover {
1366
- background: transparent;
1367
- border-color: transparent;
1368
- cursor: pointer;
1369
- }
1370
-
1371
- /* line 67, sass/partials/_jquery_ui.scss */
1372
-
1373
- .cmb2-element.ui-datepicker .ui-datepicker-title,
1374
- .cmb2-element .ui-datepicker .ui-datepicker-title {
1375
- margin: 0;
1376
- padding: 10px 0;
1377
- color: #fff;
1378
- font-size: 14px;
1379
- line-height: 14px;
1380
- text-align: center;
1381
- }
1382
-
1383
- /* line 75, sass/partials/_jquery_ui.scss */
1384
-
1385
- .cmb2-element.ui-datepicker .ui-datepicker-title select,
1386
- .cmb2-element .ui-datepicker .ui-datepicker-title select {
1387
- margin-top: -8px;
1388
- margin-bottom: -8px;
1389
- }
1390
-
1391
- /* line 81, sass/partials/_jquery_ui.scss */
1392
-
1393
- .cmb2-element.ui-datepicker .ui-datepicker-prev,
1394
- .cmb2-element.ui-datepicker .ui-datepicker-next,
1395
- .cmb2-element .ui-datepicker .ui-datepicker-prev,
1396
- .cmb2-element .ui-datepicker .ui-datepicker-next {
1397
- position: relative;
1398
- top: 0;
1399
- height: 34px;
1400
- width: 34px;
1401
- }
1402
-
1403
- /* line 89, sass/partials/_jquery_ui.scss */
1404
-
1405
- .cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-prev,
1406
- .cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-next,
1407
- .cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-prev,
1408
- .cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-next {
1409
- border: none;
1410
- }
1411
-
1412
- /* line 94, sass/partials/_jquery_ui.scss */
1413
-
1414
- .cmb2-element.ui-datepicker .ui-datepicker-prev,
1415
- .cmb2-element.ui-datepicker .ui-datepicker-prev-hover,
1416
- .cmb2-element .ui-datepicker .ui-datepicker-prev,
1417
- .cmb2-element .ui-datepicker .ui-datepicker-prev-hover {
1418
- left: 0;
1419
- }
1420
-
1421
- /* line 99, sass/partials/_jquery_ui.scss */
1422
-
1423
- .cmb2-element.ui-datepicker .ui-datepicker-next,
1424
- .cmb2-element.ui-datepicker .ui-datepicker-next-hover,
1425
- .cmb2-element .ui-datepicker .ui-datepicker-next,
1426
- .cmb2-element .ui-datepicker .ui-datepicker-next-hover {
1427
- right: 0;
1428
- }
1429
-
1430
- /* line 104, sass/partials/_jquery_ui.scss */
1431
-
1432
- .cmb2-element.ui-datepicker .ui-datepicker-next span,
1433
- .cmb2-element.ui-datepicker .ui-datepicker-prev span,
1434
- .cmb2-element .ui-datepicker .ui-datepicker-next span,
1435
- .cmb2-element .ui-datepicker .ui-datepicker-prev span {
1436
- display: none;
1437
- }
1438
-
1439
- /* line 109, sass/partials/_jquery_ui.scss */
1440
-
1441
- .cmb2-element.ui-datepicker .ui-datepicker-prev,
1442
- .cmb2-element .ui-datepicker .ui-datepicker-prev {
1443
- float: left;
1444
- }
1445
-
1446
- /* line 113, sass/partials/_jquery_ui.scss */
1447
-
1448
- .cmb2-element.ui-datepicker .ui-datepicker-next,
1449
- .cmb2-element .ui-datepicker .ui-datepicker-next {
1450
- float: right;
1451
- }
1452
-
1453
- /* line 117, sass/partials/_jquery_ui.scss */
1454
-
1455
- .cmb2-element.ui-datepicker .ui-datepicker-prev:before,
1456
- .cmb2-element.ui-datepicker .ui-datepicker-next:before,
1457
- .cmb2-element .ui-datepicker .ui-datepicker-prev:before,
1458
- .cmb2-element .ui-datepicker .ui-datepicker-next:before {
1459
- font: normal 20px/34px 'dashicons';
1460
- padding-left: 7px;
1461
- color: #fff;
1462
- speak: none;
1463
- -webkit-font-smoothing: antialiased;
1464
- -moz-osx-font-smoothing: grayscale;
1465
- width: 34px;
1466
- height: 34px;
1467
- }
1468
-
1469
- /* line 129, sass/partials/_jquery_ui.scss */
1470
-
1471
- .cmb2-element.ui-datepicker .ui-datepicker-prev:before,
1472
- .cmb2-element .ui-datepicker .ui-datepicker-prev:before {
1473
- content: '\f341';
1474
- }
1475
-
1476
- /* line 133, sass/partials/_jquery_ui.scss */
1477
-
1478
- .cmb2-element.ui-datepicker .ui-datepicker-next:before,
1479
- .cmb2-element .ui-datepicker .ui-datepicker-next:before {
1480
- content: '\f345';
1481
- }
1482
-
1483
- /* line 137, sass/partials/_jquery_ui.scss */
1484
-
1485
- .cmb2-element.ui-datepicker .ui-datepicker-prev-hover:before,
1486
- .cmb2-element.ui-datepicker .ui-datepicker-next-hover:before,
1487
- .cmb2-element .ui-datepicker .ui-datepicker-prev-hover:before,
1488
- .cmb2-element .ui-datepicker .ui-datepicker-next-hover:before {
1489
- opacity: 0.7;
1490
- }
1491
-
1492
- /* line 142, sass/partials/_jquery_ui.scss */
1493
-
1494
- .cmb2-element.ui-datepicker select.ui-datepicker-month,
1495
- .cmb2-element.ui-datepicker select.ui-datepicker-year,
1496
- .cmb2-element .ui-datepicker select.ui-datepicker-month,
1497
- .cmb2-element .ui-datepicker select.ui-datepicker-year {
1498
- width: 33%;
1499
- background: transparent;
1500
- border-color: transparent;
1501
- box-shadow: none;
1502
- color: #fff;
1503
- }
1504
-
1505
- /* line 149, sass/partials/_jquery_ui.scss */
1506
-
1507
- .cmb2-element.ui-datepicker select.ui-datepicker-month option,
1508
- .cmb2-element.ui-datepicker select.ui-datepicker-year option,
1509
- .cmb2-element .ui-datepicker select.ui-datepicker-month option,
1510
- .cmb2-element .ui-datepicker select.ui-datepicker-year option {
1511
- color: #333;
1512
- }
1513
-
1514
- /* line 154, sass/partials/_jquery_ui.scss */
1515
-
1516
- .cmb2-element.ui-datepicker thead,
1517
- .cmb2-element .ui-datepicker thead {
1518
- color: #fff;
1519
- font-weight: 600;
1520
- }
1521
-
1522
- /* line 157, sass/partials/_jquery_ui.scss */
1523
-
1524
- .cmb2-element.ui-datepicker thead th,
1525
- .cmb2-element .ui-datepicker thead th {
1526
- font-weight: normal;
1527
- }
1528
-
1529
- /* line 162, sass/partials/_jquery_ui.scss */
1530
-
1531
- .cmb2-element.ui-datepicker th,
1532
- .cmb2-element .ui-datepicker th {
1533
- padding: 10px;
1534
- }
1535
-
1536
- /* line 166, sass/partials/_jquery_ui.scss */
1537
-
1538
- .cmb2-element.ui-datepicker td,
1539
- .cmb2-element .ui-datepicker td {
1540
- padding: 0;
1541
- border: 1px solid #f4f4f4;
1542
- }
1543
-
1544
- /* line 171, sass/partials/_jquery_ui.scss */
1545
-
1546
- .cmb2-element.ui-datepicker td.ui-datepicker-other-month,
1547
- .cmb2-element .ui-datepicker td.ui-datepicker-other-month {
1548
- border: transparent;
1549
- }
1550
-
1551
- /* line 175, sass/partials/_jquery_ui.scss */
1552
-
1553
- .cmb2-element.ui-datepicker td.ui-datepicker-week-end,
1554
- .cmb2-element .ui-datepicker td.ui-datepicker-week-end {
1555
- background-color: #f4f4f4;
1556
- border: 1px solid #f4f4f4;
1557
- }
1558
-
1559
- /* line 178, sass/partials/_jquery_ui.scss */
1560
-
1561
- .cmb2-element.ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today,
1562
- .cmb2-element .ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today {
1563
- -webkit-box-shadow: inset 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
1564
- -moz-box-shadow: inset 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
1565
- box-shadow: inset 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
1566
- }
1567
-
1568
- /* line 185, sass/partials/_jquery_ui.scss */
1569
-
1570
- .cmb2-element.ui-datepicker td.ui-datepicker-today,
1571
- .cmb2-element .ui-datepicker td.ui-datepicker-today {
1572
- background-color: #f0f0c0;
1573
- }
1574
-
1575
- /* line 189, sass/partials/_jquery_ui.scss */
1576
-
1577
- .cmb2-element.ui-datepicker td.ui-datepicker-current-day,
1578
- .cmb2-element .ui-datepicker td.ui-datepicker-current-day {
1579
- background: #bbdd88;
1580
- }
1581
-
1582
- /* line 193, sass/partials/_jquery_ui.scss */
1583
-
1584
- .cmb2-element.ui-datepicker td .ui-state-default,
1585
- .cmb2-element .ui-datepicker td .ui-state-default {
1586
- background: transparent;
1587
- border: none;
1588
- text-align: center;
1589
- text-decoration: none;
1590
- width: auto;
1591
- display: block;
1592
- padding: 5px 10px;
1593
- font-weight: normal;
1594
- color: #444;
1595
- }
1596
-
1597
- /* line 205, sass/partials/_jquery_ui.scss */
1598
-
1599
- .cmb2-element.ui-datepicker td.ui-state-disabled .ui-state-default,
1600
- .cmb2-element .ui-datepicker td.ui-state-disabled .ui-state-default {
1601
- opacity: 0.5;
1602
- }
1603
-
1604
- /* line 210, sass/partials/_jquery_ui.scss */
1605
-
1606
- .cmb2-element.ui-datepicker .ui-widget-header,
1607
- .cmb2-element.ui-datepicker .ui-datepicker-header,
1608
- .cmb2-element .ui-datepicker .ui-widget-header,
1609
- .cmb2-element .ui-datepicker .ui-datepicker-header {
1610
- background: #00a0d2;
1611
- }
1612
-
1613
- /* line 215, sass/partials/_jquery_ui.scss */
1614
-
1615
- .cmb2-element.ui-datepicker thead,
1616
- .cmb2-element .ui-datepicker thead {
1617
- background: #32373c;
1618
- }
1619
-
1620
- /* line 219, sass/partials/_jquery_ui.scss */
1621
-
1622
- .cmb2-element.ui-datepicker td .ui-state-hover,
1623
- .cmb2-element.ui-datepicker td .ui-state-active,
1624
- .cmb2-element .ui-datepicker td .ui-state-hover,
1625
- .cmb2-element .ui-datepicker td .ui-state-active {
1626
- background: #0073aa;
1627
- color: #fff;
1628
- }
1629
-
1630
- /* line 224, sass/partials/_jquery_ui.scss */
1631
-
1632
- .cmb2-element.ui-datepicker .ui-timepicker-div,
1633
- .cmb2-element .ui-datepicker .ui-timepicker-div {
1634
- font-size: 14px;
1635
- }
1636
-
1637
- /* line 226, sass/partials/_jquery_ui.scss */
1638
-
1639
- .cmb2-element.ui-datepicker .ui-timepicker-div dl,
1640
- .cmb2-element .ui-datepicker .ui-timepicker-div dl {
1641
- text-align: left;
1642
- padding: 0 .6em;
1643
- }
1644
-
1645
- /* line 229, sass/partials/_jquery_ui.scss */
1646
-
1647
- .cmb2-element.ui-datepicker .ui-timepicker-div dl dt,
1648
- .cmb2-element .ui-datepicker .ui-timepicker-div dl dt {
1649
- float: left;
1650
- clear: left;
1651
- padding: 0 0 0 5px;
1652
- }
1653
-
1654
- /* line 234, sass/partials/_jquery_ui.scss */
1655
-
1656
- .cmb2-element.ui-datepicker .ui-timepicker-div dl dd,
1657
- .cmb2-element .ui-datepicker .ui-timepicker-div dl dd {
1658
- margin: 0 10px 10px 40%;
1659
- }
1660
-
1661
- /* line 236, sass/partials/_jquery_ui.scss */
1662
-
1663
- .cmb2-element.ui-datepicker .ui-timepicker-div dl dd select,
1664
- .cmb2-element .ui-datepicker .ui-timepicker-div dl dd select {
1665
- width: 100%;
1666
- }
1667
-
1668
- /* line 242, sass/partials/_jquery_ui.scss */
1669
-
1670
- .cmb2-element.ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane,
1671
- .cmb2-element .ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane {
1672
- padding: .6em;
1673
- text-align: left;
1674
- }
1675
-
1676
- /* line 246, sass/partials/_jquery_ui.scss */
1677
-
1678
- .cmb2-element.ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-primary,
1679
- .cmb2-element.ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-secondary,
1680
- .cmb2-element .ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-primary,
1681
- .cmb2-element .ui-datepicker .ui-timepicker-div + .ui-datepicker-buttonpane .button-secondary {
1682
- padding: 0 10px 1px;
1683
- -webkit-border-radius: 3px;
1684
- -moz-border-radius: 3px;
1685
- border-radius: 3px;
1686
- margin: 0 .6em .4em .4em;
1687
- }
1688
-
1689
- /* line 260, sass/partials/_jquery_ui.scss */
1690
-
1691
- .admin-color-fresh .cmb2-element.ui-datepicker .ui-widget-header,
1692
- .admin-color-fresh .cmb2-element.ui-datepicker .ui-datepicker-header,
1693
- .admin-color-fresh .cmb2-element .ui-datepicker .ui-widget-header,
1694
- .admin-color-fresh .cmb2-element .ui-datepicker .ui-datepicker-header {
1695
- background: #00a0d2;
1696
- }
1697
-
1698
- /* line 265, sass/partials/_jquery_ui.scss */
1699
-
1700
- .admin-color-fresh .cmb2-element.ui-datepicker thead,
1701
- .admin-color-fresh .cmb2-element .ui-datepicker thead {
1702
- background: #32373c;
1703
- }
1704
-
1705
- /* line 269, sass/partials/_jquery_ui.scss */
1706
-
1707
- .admin-color-fresh .cmb2-element.ui-datepicker td .ui-state-hover,
1708
- .admin-color-fresh .cmb2-element .ui-datepicker td .ui-state-hover {
1709
- background: #0073aa;
1710
- color: #fff;
1711
- }
1712
-
1713
- /* line 277, sass/partials/_jquery_ui.scss */
1714
-
1715
- .admin-color-blue .cmb2-element.ui-datepicker .ui-widget-header,
1716
- .admin-color-blue .cmb2-element.ui-datepicker .ui-datepicker-header,
1717
- .admin-color-blue .cmb2-element .ui-datepicker .ui-widget-header,
1718
- .admin-color-blue .cmb2-element .ui-datepicker .ui-datepicker-header {
1719
- background: #52accc;
1720
- }
1721
-
1722
- /* line 282, sass/partials/_jquery_ui.scss */
1723
-
1724
- .admin-color-blue .cmb2-element.ui-datepicker thead,
1725
- .admin-color-blue .cmb2-element .ui-datepicker thead {
1726
- background: #4796b3;
1727
- }
1728
-
1729
- /* line 291, sass/partials/_jquery_ui.scss */
1730
-
1731
- .admin-color-blue .cmb2-element.ui-datepicker td .ui-state-hover,
1732
- .admin-color-blue .cmb2-element.ui-datepicker td .ui-state-active,
1733
- .admin-color-blue .cmb2-element .ui-datepicker td .ui-state-hover,
1734
- .admin-color-blue .cmb2-element .ui-datepicker td .ui-state-active {
1735
- background: #096484;
1736
- color: #fff;
1737
- }
1738
-
1739
- /* line 296, sass/partials/_jquery_ui.scss */
1740
-
1741
- .admin-color-blue .cmb2-element.ui-datepicker td.ui-datepicker-today,
1742
- .admin-color-blue .cmb2-element .ui-datepicker td.ui-datepicker-today {
1743
- background: #eee;
1744
- }
1745
-
1746
- /* line 305, sass/partials/_jquery_ui.scss */
1747
-
1748
- .admin-color-coffee .cmb2-element.ui-datepicker .ui-widget-header,
1749
- .admin-color-coffee .cmb2-element.ui-datepicker .ui-datepicker-header,
1750
- .admin-color-coffee .cmb2-element .ui-datepicker .ui-widget-header,
1751
- .admin-color-coffee .cmb2-element .ui-datepicker .ui-datepicker-header {
1752
- background: #59524c;
1753
- }
1754
-
1755
- /* line 310, sass/partials/_jquery_ui.scss */
1756
-
1757
- .admin-color-coffee .cmb2-element.ui-datepicker thead,
1758
- .admin-color-coffee .cmb2-element .ui-datepicker thead {
1759
- background: #46403c;
1760
- }
1761
-
1762
- /* line 314, sass/partials/_jquery_ui.scss */
1763
-
1764
- .admin-color-coffee .cmb2-element.ui-datepicker td .ui-state-hover,
1765
- .admin-color-coffee .cmb2-element .ui-datepicker td .ui-state-hover {
1766
- background: #c7a589;
1767
- color: #fff;
1768
- }
1769
-
1770
- /* line 322, sass/partials/_jquery_ui.scss */
1771
-
1772
- .admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-widget-header,
1773
- .admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-datepicker-header,
1774
- .admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-widget-header,
1775
- .admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-datepicker-header {
1776
- background: #523f6d;
1777
- }
1778
-
1779
- /* line 327, sass/partials/_jquery_ui.scss */
1780
-
1781
- .admin-color-ectoplasm .cmb2-element.ui-datepicker thead,
1782
- .admin-color-ectoplasm .cmb2-element .ui-datepicker thead {
1783
- background: #413256;
1784
- }
1785
-
1786
- /* line 331, sass/partials/_jquery_ui.scss */
1787
-
1788
- .admin-color-ectoplasm .cmb2-element.ui-datepicker td .ui-state-hover,
1789
- .admin-color-ectoplasm .cmb2-element .ui-datepicker td .ui-state-hover {
1790
- background: #a3b745;
1791
- color: #fff;
1792
- }
1793
-
1794
- /* line 339, sass/partials/_jquery_ui.scss */
1795
-
1796
- .admin-color-midnight .cmb2-element.ui-datepicker .ui-widget-header,
1797
- .admin-color-midnight .cmb2-element.ui-datepicker .ui-datepicker-header,
1798
- .admin-color-midnight .cmb2-element .ui-datepicker .ui-widget-header,
1799
- .admin-color-midnight .cmb2-element .ui-datepicker .ui-datepicker-header {
1800
- background: #363b3f;
1801
- }
1802
-
1803
- /* line 344, sass/partials/_jquery_ui.scss */
1804
-
1805
- .admin-color-midnight .cmb2-element.ui-datepicker thead,
1806
- .admin-color-midnight .cmb2-element .ui-datepicker thead {
1807
- background: #26292c;
1808
- }
1809
-
1810
- /* line 348, sass/partials/_jquery_ui.scss */
1811
-
1812
- .admin-color-midnight .cmb2-element.ui-datepicker td .ui-state-hover,
1813
- .admin-color-midnight .cmb2-element .ui-datepicker td .ui-state-hover {
1814
- background: #e14d43;
1815
- color: #fff;
1816
- }
1817
-
1818
- /* line 356, sass/partials/_jquery_ui.scss */
1819
-
1820
- .admin-color-ocean .cmb2-element.ui-datepicker .ui-widget-header,
1821
- .admin-color-ocean .cmb2-element.ui-datepicker .ui-datepicker-header,
1822
- .admin-color-ocean .cmb2-element .ui-datepicker .ui-widget-header,
1823
- .admin-color-ocean .cmb2-element .ui-datepicker .ui-datepicker-header {
1824
- background: #738e96;
1825
- }
1826
-
1827
- /* line 361, sass/partials/_jquery_ui.scss */
1828
-
1829
- .admin-color-ocean .cmb2-element.ui-datepicker thead,
1830
- .admin-color-ocean .cmb2-element .ui-datepicker thead {
1831
- background: #627c83;
1832
- }
1833
-
1834
- /* line 365, sass/partials/_jquery_ui.scss */
1835
-
1836
- .admin-color-ocean .cmb2-element.ui-datepicker td .ui-state-hover,
1837
- .admin-color-ocean .cmb2-element .ui-datepicker td .ui-state-hover {
1838
- background: #9ebaa0;
1839
- color: #fff;
1840
- }
1841
-
1842
- /* line 373, sass/partials/_jquery_ui.scss */
1843
-
1844
- .admin-color-sunrise .cmb2-element.ui-datepicker .ui-widget-header,
1845
- .admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header,
1846
- .admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover,
1847
- .admin-color-sunrise .cmb2-element .ui-datepicker .ui-widget-header,
1848
- .admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header,
1849
- .admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover {
1850
- background: #cf4944;
1851
- }
1852
-
1853
- /* line 379, sass/partials/_jquery_ui.scss */
1854
-
1855
- .admin-color-sunrise .cmb2-element.ui-datepicker th,
1856
- .admin-color-sunrise .cmb2-element .ui-datepicker th {
1857
- border-color: #be3631;
1858
- background: #be3631;
1859
- }
1860
-
1861
- /* line 384, sass/partials/_jquery_ui.scss */
1862
-
1863
- .admin-color-sunrise .cmb2-element.ui-datepicker td .ui-state-hover,
1864
- .admin-color-sunrise .cmb2-element .ui-datepicker td .ui-state-hover {
1865
- background: #dd823b;
1866
- color: #fff;
1867
- }
1868
-
1869
- /* line 392, sass/partials/_jquery_ui.scss */
1870
-
1871
- .admin-color-light .cmb2-element.ui-datepicker .ui-widget-header,
1872
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-header,
1873
- .admin-color-light .cmb2-element .ui-datepicker .ui-widget-header,
1874
- .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-header {
1875
- background: #e5e5e5;
1876
- }
1877
-
1878
- /* line 397, sass/partials/_jquery_ui.scss */
1879
-
1880
- .admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-month,
1881
- .admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-year,
1882
- .admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-month,
1883
- .admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-year {
1884
- color: #555;
1885
- }
1886
-
1887
- /* line 402, sass/partials/_jquery_ui.scss */
1888
-
1889
- .admin-color-light .cmb2-element.ui-datepicker thead,
1890
- .admin-color-light .cmb2-element .ui-datepicker thead {
1891
- background: #888;
1892
- }
1893
-
1894
- /* line 406, sass/partials/_jquery_ui.scss */
1895
-
1896
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-title,
1897
- .admin-color-light .cmb2-element.ui-datepicker td .ui-state-default,
1898
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-prev:before,
1899
- .admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-next:before,
1900
- .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-title,
1901
- .admin-color-light .cmb2-element .ui-datepicker td .ui-state-default,
1902
- .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-prev:before,
1903
- .admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-next:before {
1904
- color: #555;
1905
- }
1906
-
1907
- /* line 414, sass/partials/_jquery_ui.scss */
1908
-
1909
- .admin-color-light .cmb2-element.ui-datepicker td .ui-state-hover,
1910
- .admin-color-light .cmb2-element.ui-datepicker td .ui-state-active,
1911
- .admin-color-light .cmb2-element .ui-datepicker td .ui-state-hover,
1912
- .admin-color-light .cmb2-element .ui-datepicker td .ui-state-active {
1913
- background: #ccc;
1914
- }
1915
-
1916
- /* line 418, sass/partials/_jquery_ui.scss */
1917
-
1918
- .admin-color-light .cmb2-element.ui-datepicker td.ui-datepicker-today,
1919
- .admin-color-light .cmb2-element .ui-datepicker td.ui-datepicker-today {
1920
- background: #eee;
1921
- }
1922
-
1923
- /* line 426, sass/partials/_jquery_ui.scss */
1924
-
1925
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-widget-header,
1926
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-datepicker-header,
1927
- .admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-widget-header,
1928
- .admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-datepicker-header {
1929
- background: #56b274;
1930
- }
1931
-
1932
- /* line 431, sass/partials/_jquery_ui.scss */
1933
-
1934
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker thead,
1935
- .admin-color-bbp-evergreen .cmb2-element .ui-datepicker thead {
1936
- background: #36533f;
1937
- }
1938
-
1939
- /* line 435, sass/partials/_jquery_ui.scss */
1940
-
1941
- .admin-color-bbp-evergreen .cmb2-element.ui-datepicker td .ui-state-hover,
1942
- .admin-color-bbp-evergreen .cmb2-element .ui-datepicker td .ui-state-hover {
1943
- background: #446950;
1944
- color: #fff;
1945
- }
1946
-
1947
- /* line 443, sass/partials/_jquery_ui.scss */
1948
-
1949
- .admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-widget-header,
1950
- .admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-datepicker-header,
1951
- .admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-widget-header,
1952
- .admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-datepicker-header {
1953
- background: #4ca26a;
1954
- }
1955
-
1956
- /* line 448, sass/partials/_jquery_ui.scss */
1957
-
1958
- .admin-color-bbp-mint .cmb2-element.ui-datepicker thead,
1959
- .admin-color-bbp-mint .cmb2-element .ui-datepicker thead {
1960
- background: #4f6d59;
1961
- }
1962
-
1963
- /* line 452, sass/partials/_jquery_ui.scss */
1964
-
1965
- .admin-color-bbp-mint .cmb2-element.ui-datepicker td .ui-state-hover,
1966
- .admin-color-bbp-mint .cmb2-element .ui-datepicker td .ui-state-hover {
1967
- background: #5fb37c;
1968
- color: #fff;
1969
- }
1970
-
1971
- /*# sourceMappingURL=cmb2.css.map */
1972
-
1973
- @media only screen and (max-width: 850px) {
1974
-
1975
- /* line 103, sass/partials/_context_metaboxes.scss */
1976
-
1977
- .cmb2-context-wrap.cmb2-context-wrap-form_top {
1978
- margin-right: 0;
1979
- }
1980
-
1981
- }
1982
-
1983
- @media (max-width: 450px) {
1984
-
1985
- /* line 193, sass/partials/_main_wrap.scss */
1986
-
1987
- .cmb-th {
1988
- font-size: 1.2em;
1989
- display: block;
1990
- float: none;
1991
- padding-bottom: 1em;
1992
- text-align: left;
1993
- width: 100%;
1994
- }
1995
-
1996
- /* line 27, sass/partials/_mixins.scss */
1997
-
1998
- .cmb-th label {
1999
- display: block;
2000
- margin-top: 0;
2001
- margin-bottom: 0.5em;
2002
- }
2003
-
2004
- /* line 511, sass/partials/_main_wrap.scss */
2005
-
2006
- .cmb-th,
2007
- .cmb-td,
2008
- .cmb-th + .cmb-td {
2009
- display: block;
2010
- float: none;
2011
- width: 100%;
2012
- }
2013
-
2014
- /* line 68, sass/partials/_post_metaboxes.scss */
2015
-
2016
- .cmb2-postbox .cmb-row:not(:last-of-type),
2017
- .cmb2-postbox .cmb-repeatable-group:not(:last-of-type),
2018
- .cmb-type-group .cmb-row:not(:last-of-type),
2019
- .cmb-type-group .cmb-repeatable-group:not(:last-of-type) {
2020
- border-bottom: 0;
2021
- }
2022
-
2023
- /* line 23, sass/partials/_options-page.scss */
2024
-
2025
- .cmb2-options-page .cmb2-metabox > .cmb-row > .cmb-th + .cmb-td {
2026
- padding: 0;
2027
- margin-left: 0;
2028
- }
2029
-
2030
- }
2031
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/cmb2.css.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "mappings": ";AAAA;;GAEG;ACFH;;gEAEgE;;AAEhE,UAAW;EACV,MAAM,EAAE,CAAC;;;AAET;mBACS;EACR,SAAS,ECEK,IAAI;EDDlB,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,GAAG;;;AAMZ,uCAAc;EACb,KAAK,EAAE,IAAI;;;AAIb,mBAAS;EACR,KAAK,EAAE,KAAK;;;AAEZ,sCAAqB;EACpB,WAAW,EChBE,sCAAsC;EDiBnD,WAAW,EAAE,IAAI;;;AAMlB,kEACkB;EACjB,KAAK,EAAE,KAAK;;;AAIb,gCAAkB;EACjB,KAAK,EAAE,IAAI;;;AAIZ,iCAAmB;EAClB,KAAK,EAAE,KAAK;;;AAIb,iCAAmB;EAClB,KAAK,EAAE,GAAG;;;AAGX,0BAAY;EACX,OAAO,EAAE,OAAO;;;AAIhB;;8CAES;EACR,WAAW,EAAE,IAAI;;;AAKpB,aAAG;EACF,MAAM,EAAE,CAAC;;;AAGV,aAAG;EACF,SAAS,EC5DK,IAAI;ED6DlB,WAAW,EAAE,IAAI;EACjB,MAAM,EAAE,WAAW;;;AAQpB,iBAAO;EACN,SAAS,ECvEK,IAAI;EDwElB,UAAU,EAAE,GAAG;;;AAGhB;yBACe;EACd,UAAU,ECtEI,OAAO;;;ADyEtB,8BAAoB;EACnB,MAAM,EAAE,SAAS;EACjB,OAAO,EAAE,CAAC;;;AAGX,iCAAuB;EACtB,MAAM,EAAE,SAAS;EACjB,OAAO,EAAE,CAAC;;;AAGX;4BACkB;EACjB,WAAW,EAAE,MAAM;;;AAGpB,qBAAW;EACV,MAAM,EAAE,4BAAgC;;;AAGzC,8BAAoB;EACnB,UAAU,EAAE,IAAI;;;AAGjB,oBAAU;EACT,KAAK,EAAE,GAAG;;;AAEV,6BAAS;EACR,KAAK,EAAE,IAAI;;;AAKb;gCACsB;EACrB,cAAc,EAAE,MAAM;;;AAGvB;+BACqB;EACpB,MAAM,EAAE,UAAU;;;AAGnB,mBAAS;EACR,MAAM,EAAE,CAAC;;;AAET,yBAAQ;EACP,OAAO,EAAE,EAAE;EACX,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;;;AAGZ,wDAAuC;EACtC,WAAW,EAAE,CAAC;EACd,cAAc,EAAE,GAAG;;;;AAMtB,aAAc;EACb,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,CAAC;;;AAIR;;;gEACQ;EACP,MAAM,EAAE,CAAC;;;;AAKZ,YAAa;EACZ,MAAM,EAAE,SAAS;;;;AAGlB;;mCAEoC;EACnC,MAAM,EAAE,CAAC;;;;AAGV;;kCAEmC;EAClC,aAAa,EAAE,CAAC;;;;AAGjB,wBAAyB;EACxB,MAAM,EAAE,iBAAqB;EAC7B,OAAO,EAAE,KAAK;;;AAEd,gCAAU;EACT,MAAM,EAAE,SAAS;;;;AAOnB,OAAQ;EACP,KAAK,ECnLU,OAAO;EDoLtB,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,GAAG;EAChB,WAAW,EAAE,GAAG;EAChB,OAAO,EAAE,gBAAgB;EACzB,cAAc,EAAE,GAAG;EACnB,KAAK,EAAE,KAAK;;AAEZ,yBAAkC;;EATnC,OAAQ;IE3LP,SAAS,EAAE,KAAK;IAehB,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,IAAI;IACX,cAAc,EAAE,GAAG;IACnB,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;;;EAEX,aAAM;IACL,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,CAAC;IACb,aAAa,EAAE,KAAK;;;;;AFiLtB,OAAQ;EACP,WAAW,EAAE,GAAG;EAChB,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,SAAS;EAClB,cAAc,EAAE,MAAM;;;;AAKtB,uBAAQ;EACP,OAAO,EAAE,CAAC;;;;AAIZ,aAAc;EACb,OAAO,EAAE,KAAK;EACd,OAAO,EAAE,KAAK;;;;AAGf,iBAAkB;EACjB,KAAK,EAAE,IAAI;;;;AAGZ,eAAgB;EACf,cAAc,EAAE,GAAG;;;;AAGpB,eAAgB;EACf,UAAU,EAAE,KAAK;;;;AAGlB,iBAAkB;EACjB,OAAO,EAAE,IAAI;;;;AAId,iBAAkB;EACjB,gBAAgB,EAAE,OAAO;EACzB,MAAM,EAAE,iBAAiC;;;AAEzC,yCAAwB;EACvB,QAAQ,EAAE,QAAQ;EAClB,iBAAiB,EAAE,EAAE;EAErB,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,mBAAmB;EAC5B,aAAa,EAAE,eAAe;;;AAE9B,2DAAoB;EACnB,UAAU,EAAE,iBAAqB;;;AAGlC,gDAAS;EACR,OAAO,EAAE,WAAW;EACpB,OAAO,EAAE,KAAK;EAEd,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;EACP,QAAQ,EAAE,QAAQ;EAElB,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,WAAW,EAAE,IAAI;EAEjB,KAAK,EC/PQ,OAAO;EDgQpB,UAAU,EAAE,MAAM;EAClB,YAAY,EAAE,iBAAqB;;;AAGpC,iDAAQ;EACP,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;;;AAKZ,gCAAe;EACd,MAAM,EAAE,CAAC;;;AAET,uCAAS;EACR,OAAO,EAAE,EAAE;EACX,KAAK,EAAE,GAAG;EACV,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,KAAK;EACd,WAAW,EAAE,IAAI;EACjB,gBAAgB,EAAE,SAAuB;;;AAI3C,iCAAgB;EACf,GAAG,EAAE,GAAG;EACR,KAAK,EAAE,GAAG;EACV,QAAQ,EAAE,QAAQ;EAElB,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,CAAC;EACd,OAAO,EAAE,YAAY;EAErB,OAAO,EAAE,IAAI;;;AAEb,0DAAyB;EACxB,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,OAAO;EAEpB,QAAQ,EAAE,MAAM;EAChB,QAAQ,EAAE,QAAQ;EAElB,MAAM,EAAE,IAAI;EACZ,WAAW,EAAE,CAAC;EACd,OAAO,EAAE,QAAQ;;;AAEjB,iEAAS;EE3RX,OAAO,EF4RsB,GAAO;EE3RpC,WAAW,EAAE,WAAW;EACxB,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,MAAM;EACnB,YAAY,EAAE,MAAM;EACpB,cAAc,EAAE,IAAI;EACpB,WAAW,EAAE,CAAC;EACd,sBAAsB,EAAE,WAAW;EACnC,MAAM,EAAE,CAAC;EACT,WAAW,EAAE,CAAC;EACd,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;EACP,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,MAAM;;;AFkRlB,uDAAsC;EACrC,OAAO,EAAE,KAAK;;;;AAOf,6BAAQ;EACP,OAAO,EAAE,GAAG;;;AAGb,sCAAiB;EAChB,gBAAgB,EChUF,OAAO;EDiUrB,OAAO,EAAE,kBAAkB;EAC3B,MAAM,EAAE,MAAM;EACd,UAAU,EAAE,KAAK;EACjB,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,GAAG;;;AAEhB,yCAAG;EACF,MAAM,EAAE,CAAC;EACT,MAAM,EAAE,CAAC;EACT,SAAS,EAAE,KAAK;EAChB,WAAW,EAAE,GAAG;EAChB,OAAO,EAAE,YAAY;;;AAGtB,8CAAQ;EACP,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;;;AAIb,oDAA+B;EEhW/B,SAAS,EAAE,KAAK;EAehB,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;EACX,cAAc,EAAE,GAAG;EACnB,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,IAAI;;;AAEX,0DAAM;EACL,OAAO,EAAE,KAAK;EACd,UAAU,EAAE,CAAC;EACb,aAAa,EAAE,KAAK;;;AF4UrB,qCAAgB;EACf,SAAS,EAAE,GAAG;EACd,YAAY,EAAE,GAAG;EACjB,eAAe,EAAE,IAAI;;;AAErB,gDAAW;EACV,SAAS,EAAE,KAAK;EAChB,MAAM,EAAE,KAAK;EACb,WAAW,EAAE,KAAK;EAClB,KAAK,EAAE,GAAG;;;AAEV,0EAA4B;EAC3B,WAAW,EAAE,KAAK;;;AAMrB,yCAAoB;EACnB,KAAK,EAAE,KAAK;;;;AAKd,0BAA2B;EAC1B,KAAK,ECnXU,OAAO;EDoXtB,UAAU,EAAE,MAAM;EAClB,MAAM,EAAE,CAAC;EACT,WAAW,EAAE,IAAI;;;;AAGlB,6BAA8B;EAC7B,KAAK,EC1XU,OAAO;ED2XtB,UAAU,EAAE,MAAM;;;;AAGnB,mBAAoB;EACnB,MAAM,EAAE,SAAS;EACjB,OAAO,EAAE,SAAS;EAClB,SAAS,EAAE,IAAI;;;;AAGhB,cAAe;EACd,OAAO,EAAE,SAAS;;;;AAGnB,cAAe;EACd,OAAO,EAAE,YAAY;EACrB,aAAa,EAAE,IAAI;;;;AAGpB,2BAA4B;EAC3B,MAAM,EAAE,CAAC;;;;AAKT,8BAAY;EACX,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,YAAY;EACrB,cAAc,EAAE,MAAM;EACtB,YAAY,EAAE,IAAI;EAClB,KAAK,EAAE,IAAI;;;AAEX,kCAAI;EACH,SAAS,EAAE,KAAK;EAChB,MAAM,EAAE,IAAI;;;AAId;gCACc;EACb,UAAU,EC9ZI,OAAO;ED+ZrB,MAAM,EAAE,iBAAqB;EAC7B,aAAa,EAAE,GAAG;EAClB,kBAAkB,EAAE,GAAG;EACtB,MAAM,EAAE,UAAU;EACnB,OAAO,EAAE,GAAG;;;AAGb,gCAAc;EACb,KAAK,EAAE,IAAI;EACX,SAAS,EAAE,KAAK;;;AAGjB,gEAA2B;EAC1B,QAAQ,EAAE,QAAQ;;;AAElB,kHAAyB;EACxB,UAAU,EAAE,6BAA6B;EACzC,MAAM,EAAE,IAAI;EACZ,IAAI,EAAE,IAAI;EACV,QAAQ,EAAE,QAAQ;EAClB,WAAW,EAAE,OAAO;EACpB,GAAG,EAAE,IAAI;EACT,KAAK,EAAE,IAAI;;;AAOZ,uDAAyB;EACxB,GAAG,EAAE,IAAI;;;AAIX,0EAAqC;EACpC,MAAM,EAAE,OAAO;;;;AAKjB,kDAAmD;EAClD,KAAK,EAAE,IAAI;EACX,cAAc,EAAE,MAAM;EACtB,KAAK,EAAE,IAAI;EACX,YAAY,EAAE,IAAI;EAClB,aAAa,EAAE,IAAI;EACnB,UAAU,EAAE,CAAC;;;;AAGd,mBAAoB;EACnB,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,YAAY;EACrB,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,GAAG;EACf,aAAa,EAAE,IAAI;;;AAEnB,uBAAI;EACH,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,IAAI;EACX,YAAY,EAAE,IAAI;;;;AAIpB,oBAAqB;EACpB,MAAM,EAAE,CAAC;;;;AAGV,mBAAoB;EACnB,UAAU,EAAE,IAAI;;;;AAGjB,wBAAyB;EACxB,YAAY,EAAE,KAAK;;;AAGpB,yBAAkC;;EACjC;;mBAEkB;IACjB,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;;;AGngBb;;gEAEgE;;AAChE,2BAA4B;EAC3B,WAAW,EAAE,IAAI;EACjB,YAAY,EAAE,IAAI;EAClB,UAAU,EAAE,KAAK;;;;AAGlB,uCAAwC;EACvC,YAAY,EAAE,KAAK;;;;AAKnB,oDAAW;EACV,MAAM,EAAE,CAAC;;;AAET,8GAA6B;EAC5B,OAAO,EAAE,OAAO;;;AAKhB,8GAAc;EACb,KAAK,EAAE,IAAI;;;AAKd,gDAAS;EACR,OAAO,EAAE,SAAS;EAClB,MAAM,EAAE,SAAS;;;AAEjB,sEAAW;EACV,KAAK,EAAE,IAAI;EACX,QAAQ,EAAE,QAAQ;;;AAIpB,gFAAyB;EACxB,OAAO,EAAE,KAAK;EACd,SAAS,EAAE,IAAI;EACf,SAAS,EAAE,cAAc;;;AAG1B,gGAAiC;EAChC,cAAc,EAAE,CAAC;;;AAGlB,8CAAQ;EACP,KAAK,EAAE,GAAG;EACV,OAAO,EAAE,QAAQ;;;AAIlB,8CAAQ;EACP,aAAa,EAAE,CAAC;EAChB,OAAO,EAAE,CAAC;EACV,WAAW,EAAE,GAAG;;;AAGjB,kEAAkB;EACjB,KAAK,EAAE,GAAG;EACV,KAAK,EAAE,KAAK;;;AAGb;;wDACyC;EACxC,aAAa,EAAE,iBAAqB;;AAEpC,yBAAkC;;EAJnC;;0DACyC;IAIvC,aAAa,EAAE,CAAC;;;;AAIlB;;qCACsB;EACrB,WAAW,EAAE,KAAK;;;AC9EpB;;gEAEgE;AAEhE,uCAAuC;;AAIrC,sDAAS;EACR,OAAO,EAAE,OAAO;EAChB,OAAO,EAAE,YAAY;EACrB,IAAI,EAAE,uBAAuB;EAC7B,KAAK,EAAE,IAAI;EACX,sBAAsB,EAAE,WAAW;EACnC,uBAAuB,EAAE,SAAS;EAClC,eAAe,EAAE,eAAe;;;AAMhC,6DAAS;EACR,OAAO,EAAE,OAAO;;;;AAOpB,yBAA0B;EAEzB,aAAa,EAAE,IAAI;;;AAEnB,sDAA+B;EAC9B,UAAU,EAAE,IAAI;;;AAGjB,iDAA0B;EACzB,UAAU,EAAE,IAAI;;;AAGjB,kDAA2B;EAC1B,UAAU,EAAE,IAAI;EAChB,aAAa,EAAE,CAAC;;;AAGjB,8CAAuB;EAEtB,UAAU,EAAE,IAAI;;;AAEhB,qDAAO;EACN,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,QAAQ;EACjB,MAAM,EAAE,CAAC;EACT,WAAW,EAAE,GAAG;;;AAIlB,gCAAO;EACN,MAAM,EAAE,IAAI;;;;AAId,kBAAmB;EAElB,UAAU,EAAE,IAAI;;;AAEhB,6CAA6B;EAC5B,YAAY,EAAE,KAAK;EACnB,KAAK,EAAE,IAAI;;;AAKX,2DAAc;EACb,OAAO,EAAE,IAAI;;;AAIf,0BAAQ;EACP,OAAO,EAAE,QAAQ;EACjB,KAAK,EAAE,GAAG;;;AAGX,0BAAQ;EACP,KAAK,EAAE,GAAG;EACV,OAAO,EAAE,CAAC;;;AAGX,2BAAS;EACR,aAAa,EAAE,IAAI;;;AAEnB,wCAAe;EACd,aAAa,EAAE,CAAC;;;AAMnB,8CAA8C;AAC9C,yCAA0C;;EAEzC,6CAA8C;IAC7C,YAAY,EAAE,CAAC;;;ACvGjB;;gEAEgE;;AAChE,kBAAmB;EAClB,SAAS,EAAE,MAAM;;;AAEjB,4BAAY;EACX,aAAa,EAAE,GAAG;;;AAGnB,2CAAyB;EACxB,OAAO,EAAE,GAAG;EACZ,UAAU,EAAE,IAAI;EAChB,UAAU,EJMI,OAAO;EILrB,MAAM,EAAE,iBAAqB;EAC7B,UAAU,EAAE,6BAA2B;;;AAEvC,qDAAU;EACT,OAAO,EAAE,CAAC;EACV,WAAW,EAAE,OAAO;;;AAGrB,+DAAoB;EACnB,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,SAAS;EAClB,WAAW,EAAE,KAAK;;AAElB,yBAAkC;;EALnC,+DAAoB;IAMlB,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,CAAC;;;;AAMjB,6CAA2B;EAC1B,UAAU,EAAE,GAAG;EACf,OAAO,EAAE,SAAS;EAClB,gBAAgB,EAAE,OAAO;;;AAEzB,iEAAoB;EACnB,SAAS,EAAE,IAAI;EACf,UAAU,EAAE,CAAC;EACb,aAAa,EAAE,CAAC;EAChB,cAAc,EAAE,SAAS;;;AAG1B,uEAA0B;EACzB,WAAW,EAAE,MAAM;;;AAKpB,uEAA+B;EAC9B,OAAO,EAAE,WAAW;;;AAGrB,wDAAgB;EACf,SAAS,EAAE,IAAI;EACf,UAAU,EAAE,CAAC;EACb,aAAa,EAAE,CAAC;;;AAGjB,4EAAoC;EACnC,WAAW,EAAE,GAAG;EAChB,cAAc,EAAE,YAAY;;;ACjE/B;;gEAEgE;;AAEhE,mCAAoC;EACnC,MAAM,EAAE,CAAC;;;;AAMT;;kCAAoB;EACnB,SAAS,EAAE,KAAK;;;;AAKjB,0DAAa;EACZ,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,IAAI;;;;AAIf,YAAa;EACZ,OAAO,EAAE,IAAI;;;AACb,sBAAY;EACX,OAAO,EAAE,KAAK;;;AC1BhB;;gEAEgE;;AAO9D;uDAA6B;EAC5B,OAAO,EAAE,OAAO;;;AAKhB;iEAAqC;EACpC,KAAK,EAAE,IAAI;;;AAGZ;;yCAA0C;EACzC,WAAW,EAAE,CAAC;EACd,UAAU,EAAE,GAAG;EACf,OAAO,EAAE,KAAK;;;AAGf;gDAAkB;EACjB,SAAS,EAAE,GAAG;;;AACd;4EAA4B;EAC3B,OAAO,EAAE,KAAK;;;AAKjB;gCAAM;EACL,OAAO,EAAE,KAAK;EACd,WAAW,EAAE,GAAG;EAChB,OAAO,EAAE,OAAO;;;AAKlB;wBAAS;EACR,SAAS,EAAE,GAAG;;;AAGf;qCAAsB;EACrB,aAAa,EAAE,iBAAqB;;;AAGrC;iEAAkD;EACjD,aAAa,EAAE,CAAC;EAChB,aAAa,EAAE,MAAM;;;AAGtB;;;;;iCAEkB;EACjB,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;;;AAGZ;+BAAgB;EACf,OAAO,EAAE,IAAI;;;AAGd;uBAAQ;EL9CR,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;EACX,cAAc,EAAE,GAAG;EACnB,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,IAAI;EK4CV,YAAY,EAAE,CAAC;EACf,aAAa,EAAE,CAAC;;;AL3CjB;6BAAM;EACL,OAAO,EAAE,KAAK;EACd,UAAU,EAAE,CAAC;EACb,aAAa,EAAE,KAAK;;;AAhBrB;6BAAM;EACL,SAAS,EDHK,IAAI;ECIlB,WAAW,EAAE,KAAK;;;AK0DlB;8CAAQ;EACP,WAAW,EAAE,CAAC;;;AAEf;gEAA0B;EACzB,OAAO,EAAE,CAAC;;;AAMX;wCAAQ;EACP,OAAO,EAAE,CAAC;;;AAKX;mEAA2B;EAC1B,UAAU,EAAE,GAAG;;;AAQf;;;oDAAI;EACH,SAAS,EAAE,GAAG;EAEd,MAAM,EAAE,IAAI;;;AAKf;gCAAiB;EAChB,OAAO,EAAE,MAAM;EACf,WAAW,EAAE,MAAM;;;AAGpB;yCAA0B;EACzB,OAAO,EAAE,KAAK;EACd,OAAO,EAAE,OAAO;;;AAKhB;;;4DAC0B;EACzB,WAAW,EAAE,MAAM;EACnB,OAAO,EAAE,MAAM;;;AAIjB;kDAAmC;EAClC,cAAc,EAAE,KAAK;;;AAGtB;mCAAoB;EACnB,SAAS,EAAE,KAAK;EAChB,UAAU,EAAE,MAAM;;;AAGnB;+BAAgB;EACf,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,CAAC;;;AAGlB;mCAAoB;EACnB,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,IAAI;;;;AC7IjB,wBAAW;EACV,KAAK,EAAE,IAAI;EACX,KAAK,EAAE,KAAK;EACZ,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,MAAM,EAAE,OAAO;EACf,KAAK,EAAE,IAAI;EACX,QAAQ,EAAE,QAAQ;;;AAClB,+BAAS;EACR,OAAO,EAAE,OAAO;EAChB,KAAK,EAAE,IAAI;EACX,IAAI,EAAE,yBAAyB;EAC/B,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,YAAY;EACrB,OAAO,EAAE,QAAQ;EACjB,GAAG,EAAE,CAAC;EACN,QAAQ,EAAE,QAAQ;EAClB,sBAAsB,EAAE,WAAW;EACnC,uBAAuB,EAAE,SAAS;EAClC,eAAe,EAAE,eAAe;;;AAMhC,+CAAS;EACR,OAAO,EAAE,OAAO;;;AAKnB,2EAA8D;EAC7D,kBAAkB,EAAE,eAAe;EACnC,UAAU,EAAE,eAAe;EAC3B,MAAM,EAAE,eAAe;EACvB,QAAQ,EAAE,QAAQ;EAClB,IAAI,EAAE,CAAC;EACP,GAAG,EAAE,IAAI;EACT,WAAW,EAAE,GAAG;EAChB,OAAO,EAAE,WAAW;EACpB,OAAO,EAAE,EAAE;;;AACX,2FAAkB;EACjB,MAAM,EAAE,OAAO;EACf,KAAK,EPvBQ,IAAI;EOwBjB,OAAO,EAAE,CAAC;;;AACV,iGAAQ;EACP,KAAK,EP3BO,IAAI;;;AQpBpB;;;;;;;;;;;;GAYG;;AAEH,uCAAwC;EACvC,MAAM,EAAC,EAAE;;;;AAQV,yDAA0D;EACzD,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CAAC;EACT,qBAAqB,EAAE,CAAC;EACxB,kBAAkB,EAAE,CAAC;EACrB,aAAa,EAAE,CAAC;EAChB,gBAAgB,EAAE,IAAI;EACtB,MAAM,EAAE,iBAAiB;EACzB,UAAU,EAAE,IAAI;EAChB,kBAAkB,EAAE,8BAA8B;EAClD,UAAU,EAAE,8BAA8B;EAC1C,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,IAAI;EA6KX,0BAA0B;;;AA3K1B,6DAAE;EACD,OAAO,EAAE,CAAC;EACV,WAAW,EAAE,uBAAuB;EACpC,qBAAqB,EAAE,CAAC;EACxB,kBAAkB,EAAE,CAAC;EACrB,aAAa,EAAE,CAAC;;;AAGjB,qEAAM;EACL,SAAS,EAAE,IAAI;EACf,MAAM,EAAE,CAAC;EACT,MAAM,EAAE,IAAI;EACZ,eAAe,EAAE,QAAQ;;;AAG1B;;kDACsB;EACrB,gBAAgB,EAAE,IAAI;EACtB,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,MAAM;;;AAGpB,qIAAsC;EACrC,UAAU,EAAE,WAAW;EACvB,YAAY,EAAE,WAAW;EACzB,MAAM,EAAE,OAAO;;;AAGhB,mGAAqB;EACpB,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,MAAM;EACf,KAAK,EAAE,IAAI;EACX,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,IAAI;EACjB,UAAU,EAAE,MAAM;;;AAElB,iHAAO;EACN,UAAU,EAAE,IAAI;EAChB,aAAa,EAAE,IAAI;;;AAIrB;;gDACoB;EACnB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,IAAI;;;AAGZ;;+DACmC;EAClC,MAAM,EAAE,IAAI;;;AAGb;;sDAC0B;EACzB,IAAI,EAAE,CAAC;;;AAGR;;sDAC0B;EACzB,KAAK,EAAE,CAAC;;;AAGT;;qDACyB;EACxB,OAAO,EAAE,IAAI;;;AAGd,iGAAoB;EACnB,KAAK,EAAE,IAAI;;;AAGZ,iGAAoB;EACnB,KAAK,EAAE,KAAK;;;AAGb;;uDAC2B;EAC1B,IAAI,EAAE,4BAA4B;EAClC,YAAY,EAAE,GAAG;EACjB,KAAK,EAAE,IAAI;EACX,KAAK,EAAE,IAAI;EACX,sBAAsB,EAAE,WAAW;EACnC,uBAAuB,EAAE,SAAS;EAClC,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;;;AAGb,+GAA2B;EAC1B,OAAO,EAAE,OAAO;;;AAGjB,+GAA2B;EAC1B,OAAO,EAAE,OAAO;;;AAGjB;;6DACiC;EAChC,OAAO,EAAE,GAAG;;;AAGb;;sDAC0B;EACzB,KAAK,EAAE,GAAG;EACV,UAAU,EAAE,WAAW;EACvB,YAAY,EAAE,WAAW;EACzB,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,IAAI;;;AACX;;6DAAO;EACN,KAAK,EAAE,IAAI;;;AAIb,qEAAM;EACL,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,GAAG;;;AAChB,2EAAG;EACF,WAAW,EAAE,MAAM;;;AAIrB,+DAAG;EACF,OAAO,EAAE,IAAI;;;AAGd,+DAAG;EACF,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,iBAAkB;;;AAG3B,mHAA6B;EAC5B,MAAM,EAAE,WAAW;;;AAGpB,6GAA0B;EACzB,gBAAgB,EA7JR,OAAO;EA8Jf,MAAM,EAAE,iBAAkB;;;AAC1B,qJAAsB;EACrB,kBAAkB,EAAE,wCAAwC;EAC5D,eAAe,EAAE,wCAAwC;EACzD,UAAU,EAAE,wCAAwC;;;AAItD,uGAAuB;EACtB,gBAAgB,EAAE,OAAO;;;AAG1B,mHAA6B;EAC5B,UAAU,EAAE,OAAO;;;AAGpB,mGAAqB;EACpB,UAAU,EAAE,WAAW;EACvB,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,MAAM;EAClB,eAAe,EAAE,IAAI;EACrB,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,KAAK;EACd,OAAO,EAAE,QAAQ;EACjB,WAAW,EAAE,MAAM;EACnB,KAAK,EAAE,IAAI;;;AAGZ,uIAAuC;EACtC,OAAO,EAAE,GAAG;;;AAIb;;kDACsB;EACrB,UAAU,EAhMA,OAAO;;;AAmMlB,qEAAM;EACL,UAAU,EAnMA,OAAO;;;AAsMlB,kMAAwC;EACvC,UAAU,EAtMI,OAAO;EAuMrB,KAAK,EAAE,IAAI;;;AAGZ,+FAAmB;EAClB,SAAS,EAAE,IAAI;;;AACf,qGAAG;EACF,UAAU,EAAE,IAAI;EAChB,OAAO,EAAE,MAAM;;;AACf,2GAAG;EACF,KAAK,EAAE,IAAI;EACX,KAAK,EAAC,IAAI;EACV,OAAO,EAAE,SAAS;;;AAEnB,2GAAG;EACF,MAAM,EAAE,eAAe;;;AACvB,yHAAO;EACN,KAAK,EAAE,IAAI;;;AAKd,uJAA4B;EAC3B,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,IAAI;;;AAEhB,oXAAmC;EAClC,OAAO,EAAE,UAAU;EACnB,qBAAqB,EAAE,GAAG;EAC1B,kBAAkB,EAAE,GAAG;EACvB,aAAa,EAAE,GAAG;EAClB,MAAM,EAAE,gBAAgB;;;;AAS1B;;qEACsB;EACrB,UAAU,EAlPD,OAAO;;;AAqPjB,2GAAM;EACL,UAAU,EArPD,OAAO;;;AAwPjB,qIAAmB;EAClB,UAAU,EAxPG,OAAO;EAyPpB,KAAK,EAAE,IAAI;;;;AAMZ;;oEACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB,yGAAM;EACL,UAAU,EAAE,OAAO;;;AAQnB,0QAAkC;EACjC,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;;AAGZ,2IAAsB;EACrB,UAAU,EAAE,IAAI;;;;AAQlB;;sEACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB,6GAAM;EACL,UAAU,EAAE,OAAO;;;AAGpB,uIAAmB;EAClB,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;;;AAMZ;;yEACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB,mHAAM;EACL,UAAU,EAAE,OAAO;;;AAGpB,6IAAmB;EAClB,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;;;AAMZ;;wEACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB,iHAAM;EACL,UAAU,EAAE,OAAO;;;AAGpB,2IAAmB;EAClB,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;;;AAMZ;;qEACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB,2GAAM;EACL,UAAU,EAAE,OAAO;;;AAGpB,qIAAmB;EAClB,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;;;AAMZ;;;;uFAEsC;EACrC,UAAU,EAAE,OAAO;;;AAGpB,yGAAG;EACF,YAAY,EAAE,OAAO;EACrB,UAAU,EAAE,OAAO;;;AAGpB,yIAAmB;EAClB,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;;;AAMZ;;qEACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB;;yEAC0B;EACzB,KAAK,EAAE,IAAI;;;AAGZ,2GAAM;EACL,UAAU,EAAE,IAAI;;;AAGjB;;;;;;0EAG2B;EAC1B,KAAK,EAAE,IAAI;;;AAIX,8QAAkC;EACjC,UAAU,EAAE,IAAI;;;AAGjB,6IAAsB;EACrB,UAAU,EAAE,IAAI;;;;AAOlB;;6EACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB,2HAAM;EACL,UAAU,EAAE,OAAO;;;AAGpB,qJAAmB;EAClB,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;;;AAMZ;;wEACsB;EACrB,UAAU,EAAE,OAAO;;;AAGpB,iHAAM;EACL,UAAU,EAAE,OAAO;;;AAGpB,2IAAmB;EAClB,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI",
4
- "sources": ["sass/cmb2.scss","sass/partials/_main_wrap.scss","sass/partials/_variables.scss","sass/partials/_mixins.scss","sass/partials/_post_metaboxes.scss","sass/partials/_context_metaboxes.scss","sass/partials/_options-page.scss","sass/partials/_misc.scss","sass/partials/_sidebar_placements.scss","sass/partials/_collapsible_ui.scss","sass/partials/_jquery_ui.scss"],
5
- "names": [],
6
- "file": "cmb2.css"
7
- }
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/cmb2.min.css DELETED
@@ -1 +0,0 @@
1
- .cmb2-wrap{margin:0}.cmb2-wrap input,.cmb2-wrap textarea{font-size:14px;max-width:100%;padding:5px}.cmb2-wrap input[type=text].cmb2-oembed{width:100%}.cmb2-wrap textarea{width:500px}.cmb2-wrap textarea.cmb2-textarea-code{font-family:"Courier 10 Pitch",Courier,monospace;line-height:16px}.cmb2-wrap input.cmb2-text-small,.cmb2-wrap input.cmb2-timepicker{width:100px}.cmb2-wrap input.cmb2-text-money{width:90px}.cmb2-wrap input.cmb2-text-medium{width:230px}.cmb2-wrap input.cmb2-upload-file{width:65%}.cmb2-wrap input.ed_button{padding:2px 4px}.cmb2-wrap input:not([type=hidden])+.button-secondary,.cmb2-wrap input:not([type=hidden])+input,.cmb2-wrap input:not([type=hidden])+select{margin-left:20px}.cmb2-wrap ul{margin:0}.cmb2-wrap li{font-size:14px;line-height:16px;margin:1px 0 5px}.cmb2-wrap select{font-size:14px;margin-top:3px}.cmb2-wrap input:focus,.cmb2-wrap textarea:focus{background:#fffff8}.cmb2-wrap input[type=checkbox],.cmb2-wrap input[type=radio]{margin:0 5px 0 0;padding:0}.cmb2-wrap .button-secondary,.cmb2-wrap button{white-space:nowrap}.cmb2-wrap .mceLayout{border:1px solid #e9e9e9!important}.cmb2-wrap .mceIframeContainer{background:#fff}.cmb2-wrap .meta_mce{width:97%}.cmb2-wrap .meta_mce textarea{width:100%}.cmb2-wrap .wp-color-result,.cmb2-wrap .wp-picker-input-wrap{vertical-align:middle}.cmb2-wrap .wp-color-result,.cmb2-wrap .wp-picker-container{margin:0 10px 0 0}.cmb2-wrap .cmb-row{margin:0}.cmb2-wrap .cmb-row:after{content:'';clear:both;display:block;width:100%}.cmb2-wrap .cmb-row.cmb-repeat .cmb2-metabox-description{padding-top:0;padding-bottom:1em}.cmb2-metabox{clear:both;margin:0}.cmb2-metabox .cmb-field-list>.cmb-row:first-of-type>.cmb-td,.cmb2-metabox .cmb-field-list>.cmb-row:first-of-type>.cmb-th,.cmb2-metabox>.cmb-row:first-of-type>.cmb-td,.cmb2-metabox>.cmb-row:first-of-type>.cmb-th{border:0}.cmb-add-row{margin:1.8em 0 0}.cmb-nested .cmb-td,.cmb-repeatable-group .cmb-th,.cmb-repeatable-group:first-of-type{border:0}.cmb-repeatable-group:last-of-type,.cmb-row:last-of-type,.cmb2-wrap .cmb-row:last-of-type{border-bottom:0}.cmb-repeatable-grouping{border:1px solid #e9e9e9;padding:0 1em}.cmb-repeatable-grouping.cmb-row{margin:0 0 .8em}.cmb-th{color:#222;float:left;font-weight:600;line-height:1.3;padding:20px 10px 20px 0;vertical-align:top;width:200px}.cmb-td{line-height:1.3;max-width:100%;padding:15px 10px;vertical-align:middle}.cmb-type-title .cmb-td{padding:0}.cmb-th label{display:block;padding:5px 0}.cmb-th+.cmb-td{float:left}.cmb-td .cmb-td{padding-bottom:1em}.cmb-remove-row{text-align:right}.empty-row.hidden{display:none}.cmb-repeat-table{background-color:#fafafa;border:1px solid #e1e1e1}.cmb-repeat-table .cmb-row.cmb-repeat-row{position:relative;counter-increment:el;margin:0;padding:10px 10px 10px 50px;border-bottom:none!important}.cmb-repeat-table .cmb-row.cmb-repeat-row+.cmb-repeat-row{border-top:solid 1px #e9e9e9}.cmb-repeat-table .cmb-row.cmb-repeat-row:before{content:counter(el);display:block;top:0;left:0;position:absolute;width:35px;height:100%;line-height:35px;color:#aaa;text-align:center;border-right:solid 1px #e9e9e9}.cmb-repeat-table .cmb-row.cmb-repeat-row .cmb-td{margin:0;padding:0}.cmb-repeat-table+.cmb-add-row{margin:0}.cmb-repeat-table+.cmb-add-row:before{content:'';width:1px;height:1.6em;display:block;margin-left:17px;background-color:#dcdcdc}.cmb-repeat-table .cmb-remove-row{top:7px;right:7px;position:absolute;width:auto;margin-left:0;padding:0!important;display:none}.cmb-repeat-table .cmb-remove-row>.cmb-remove-row-button{font-size:20px;text-indent:-1000px;overflow:hidden;position:relative;height:auto;line-height:1;padding:0 10px}.cmb-repeat-table .cmb-remove-row>.cmb-remove-row-button:before{content:"";font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}.cmb-repeat-table .cmb-repeat-row:hover .cmb-remove-row{display:block}.cmb-repeatable-group .cmb-th{padding:5px}.cmb-repeatable-group .cmb-group-title{background-color:#e9e9e9;padding:8px 12px 8px 2.2em;margin:0 -1em;min-height:1.5em;font-size:14px;line-height:1.4}.cmb-repeatable-group .cmb-group-title h4{border:0;margin:0;font-size:1.2em;font-weight:500;padding:.5em .75em}.cmb-repeatable-group .cmb-group-title .cmb-th{display:block;width:100%}.cmb-repeatable-group .cmb-group-description .cmb-th{font-size:1.2em;display:block;float:none;padding-bottom:1em;text-align:left;width:100%}.cmb-repeatable-group .cmb-group-description .cmb-th label{display:block;margin-top:0;margin-bottom:.5em}.cmb-repeatable-group .cmb-shift-rows{font-size:1em;margin-right:1em;text-decoration:none}.cmb-repeatable-group .cmb-shift-rows .dashicons{font-size:1.5em;height:1.5em;line-height:1.2em;width:1em}.cmb-repeatable-group .cmb-shift-rows .dashicons.dashicons-arrow-down-alt2{line-height:1.3em}.cmb-repeatable-group .cmb2-upload-button{float:right}p.cmb2-metabox-description{color:#aaa;font-style:italic;margin:0;padding-top:.5em}span.cmb2-metabox-description{color:#aaa;font-style:italic}.cmb2-metabox-title{margin:0 0 5px;padding:5px 0 0;font-size:14px}.cmb-inline ul{padding:4px 0 0}.cmb-inline li{display:inline-block;padding-right:18px}.cmb-type-textarea-code pre{margin:0}.cmb2-media-status .img-status{clear:none;display:inline-block;vertical-align:middle;margin-right:10px;width:auto}.cmb2-media-status .img-status img{max-width:350px;height:auto}.cmb2-media-status .embed-status,.cmb2-media-status .img-status img{background:#fff;border:1px solid #e9e9e9;border-radius:2px;-moz-border-radius:2px;margin:15px 0 0;padding:5px}.cmb2-media-status .embed-status{float:left;max-width:800px}.cmb2-media-status .embed-status,.cmb2-media-status .img-status{position:relative}.cmb2-media-status .embed-status .cmb2-remove-file-button,.cmb2-media-status .img-status .cmb2-remove-file-button{background:url(../images/ico-delete.png);height:16px;left:-5px;position:absolute;text-indent:-9999px;top:-5px;width:16px}.cmb2-media-status .img-status .cmb2-remove-file-button{top:10px}.cmb2-media-status .file-status>span,.cmb2-media-status .img-status img{cursor:pointer}.cmb-type-file-list .cmb2-media-status .img-status{clear:none;vertical-align:middle;width:auto;margin-right:10px;margin-bottom:10px;margin-top:0}.cmb-attach-list li{clear:both;display:inline-block;width:100%;margin-top:5px;margin-bottom:10px}.cmb-attach-list li img{cursor:move;float:left;margin-right:10px}.cmb2-remove-wrapper{margin:0}.child-cmb2 .cmb-th{text-align:left}.cmb2-indented-hierarchy{padding-left:1.5em}#poststuff .cmb-group-title{margin-left:-1em;margin-right:-1em;min-height:1.5em}#poststuff .repeatable .cmb-group-title{padding-left:2.2em}.cmb-type-group .cmb2-wrap,.cmb2-postbox .cmb2-wrap{margin:0}.cmb-type-group .cmb2-wrap>.cmb-field-list>.cmb-row,.cmb2-postbox .cmb2-wrap>.cmb-field-list>.cmb-row{padding:1.8em 0}.cmb-type-group .cmb2-wrap input[type=text].cmb2-oembed,.cmb2-postbox .cmb2-wrap input[type=text].cmb2-oembed{width:100%}.cmb-type-group .cmb-row,.cmb2-postbox .cmb-row{padding:0 0 1.8em;margin:0 0 .8em}.cmb-type-group .cmb-row .cmbhandle,.cmb2-postbox .cmb-row .cmbhandle{right:-1em;position:relative}.cmb-type-group .cmb-repeatable-grouping,.cmb2-postbox .cmb-repeatable-grouping{padding:0 1em;max-width:100%;min-width:1px!important}.cmb-type-group .cmb-repeatable-group>.cmb-row,.cmb2-postbox .cmb-repeatable-group>.cmb-row{padding-bottom:0}.cmb-type-group .cmb-th,.cmb2-postbox .cmb-th{width:18%;padding:0 2% 0 0}.cmb-type-group .cmb-td,.cmb2-postbox .cmb-td{margin-bottom:0;padding:0;line-height:1.3}.cmb-type-group .cmb-th+.cmb-td,.cmb2-postbox .cmb-th+.cmb-td{width:80%;float:right}.cmb-type-group .cmb-repeatable-group:not(:last-of-type),.cmb-type-group .cmb-row:not(:last-of-type),.cmb2-postbox .cmb-repeatable-group:not(:last-of-type),.cmb2-postbox .cmb-row:not(:last-of-type){border-bottom:1px solid #e9e9e9}.cmb-type-group .cmb-remove-field-row,.cmb-type-group .cmb-repeat-group-field,.cmb2-postbox .cmb-remove-field-row,.cmb2-postbox .cmb-repeat-group-field{padding-top:1.8em}.js .cmb2-postbox.context-box .toggle-indicator:before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.js .cmb2-postbox.context-box.closed .toggle-indicator:before{content:"\f140"}.cmb2-postbox.context-box{margin-bottom:10px}.cmb2-postbox.context-box.context-after_title-box,.cmb2-postbox.context-box.context-before_permalink-box{margin-top:10px}.cmb2-postbox.context-box.context-after_editor-box{margin-top:20px;margin-bottom:0}.cmb2-postbox.context-box.context-form_top-box{margin-top:10px}.cmb2-postbox.context-box.context-form_top-box .hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}.cmb2-postbox.context-box .hndle{cursor:auto}.cmb2-context-wrap{margin-top:10px}.cmb2-context-wrap.cmb2-context-wrap-form_top{margin-right:300px;width:auto}.cmb2-context-wrap.cmb2-context-wrap-no-title .cmb2-metabox{padding:10px}.cmb2-context-wrap .cmb-th{padding:0 2% 0 0;width:18%}.cmb2-context-wrap .cmb-td{width:80%;padding:0}.cmb2-context-wrap .cmb-row{margin-bottom:10px}.cmb2-context-wrap .cmb-row:last-of-type{margin-bottom:0}.cmb2-options-page{max-width:1200px}.cmb2-options-page.wrap>h2{margin-bottom:1em}.cmb2-options-page .cmb2-metabox>.cmb-row{padding:1em;margin-top:-1px;background:#fff;border:1px solid #e9e9e9;box-shadow:0 1px 1px rgba(0,0,0,.05)}.cmb2-options-page .cmb2-metabox>.cmb-row>.cmb-th{padding:0;font-weight:initial}.cmb2-options-page .cmb2-metabox>.cmb-row>.cmb-th+.cmb-td{float:none;padding:0 0 0 1em;margin-left:200px}.cmb2-options-page .cmb2-wrap .cmb-type-title{margin-top:1em;padding:.6em 1em;background-color:#fafafa}.cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-title{font-size:12px;margin-top:0;margin-bottom:0;text-transform:uppercase}.cmb2-options-page .cmb2-wrap .cmb-type-title .cmb2-metabox-description{padding-top:.25em}.cmb2-options-page .cmb-repeatable-group .cmb-group-description .cmb-th{padding:0 0 .8em}.cmb2-options-page .cmb-repeatable-group .cmb-group-name{font-size:16px;margin-top:0;margin-bottom:0}.cmb2-options-page .cmb-repeatable-group .cmb-th>.cmb2-metabox-description{font-weight:400;padding-bottom:0!important}#poststuff .cmb-repeatable-group h2{margin:0}.edit-tags-php .cmb2-metabox-title,.profile-php .cmb2-metabox-title,.user-edit-php .cmb2-metabox-title{font-size:1.4em}.cmb2-no-box-wrap .cmb-spinner,.cmb2-postbox .cmb-spinner{float:left;display:none}.cmb-spinner{display:none}.cmb-spinner.is-active{display:block}#side-sortables .cmb2-wrap>.cmb-field-list>.cmb-row,.inner-sidebar .cmb2-wrap>.cmb-field-list>.cmb-row{padding:1.4em 0}#side-sortables .cmb2-wrap input[type=text]:not(.wp-color-picker),.inner-sidebar .cmb2-wrap input[type=text]:not(.wp-color-picker){width:100%}#side-sortables .cmb2-wrap input+input:not(.wp-picker-clear),#side-sortables .cmb2-wrap input+select,.inner-sidebar .cmb2-wrap input+input:not(.wp-picker-clear),.inner-sidebar .cmb2-wrap input+select{margin-left:0;margin-top:1em;display:block}#side-sortables .cmb2-wrap input.cmb2-text-money,.inner-sidebar .cmb2-wrap input.cmb2-text-money{max-width:70%}#side-sortables .cmb2-wrap input.cmb2-text-money+.cmb2-metabox-description,.inner-sidebar .cmb2-wrap input.cmb2-text-money+.cmb2-metabox-description{display:block}#side-sortables .cmb2-wrap label,.inner-sidebar .cmb2-wrap label{display:block;font-weight:700;padding:0 0 5px}#side-sortables textarea,.inner-sidebar textarea{max-width:99%}#side-sortables .cmb-repeatable-group,.inner-sidebar .cmb-repeatable-group{border-bottom:1px solid #e9e9e9}#side-sortables .cmb-type-group>.cmb-td>.cmb-repeatable-group,.inner-sidebar .cmb-type-group>.cmb-td>.cmb-repeatable-group{border-bottom:0;margin-bottom:-1.4em}#side-sortables .cmb-td:not(.cmb-remove-row),#side-sortables .cmb-th,#side-sortables .cmb-th+.cmb-td,.inner-sidebar .cmb-td:not(.cmb-remove-row),.inner-sidebar .cmb-th,.inner-sidebar .cmb-th+.cmb-td{width:100%;display:block;float:none}#side-sortables .closed .inside,.inner-sidebar .closed .inside{display:none}#side-sortables .cmb-th,.inner-sidebar .cmb-th{display:block;float:none;padding-bottom:1em;text-align:left;width:100%;padding-left:0;padding-right:0}#side-sortables .cmb-th label,.inner-sidebar .cmb-th label{display:block;margin-top:0;margin-bottom:.5em;font-size:14px;line-height:1.4em}#side-sortables .cmb-group-description .cmb-th,.inner-sidebar .cmb-group-description .cmb-th{padding-top:0}#side-sortables .cmb-group-description .cmb2-metabox-description,#side-sortables .cmb-group-title .cmb-th,.inner-sidebar .cmb-group-description .cmb2-metabox-description,.inner-sidebar .cmb-group-title .cmb-th{padding:0}#side-sortables .cmb-repeatable-grouping+.cmb-repeatable-grouping,.inner-sidebar .cmb-repeatable-grouping+.cmb-repeatable-grouping{margin-top:1em}#side-sortables .cmb2-media-status .embed-status img,#side-sortables .cmb2-media-status .img-status img,.inner-sidebar .cmb2-media-status .embed-status img,.inner-sidebar .cmb2-media-status .img-status img{max-width:90%;height:auto}#side-sortables .cmb2-list label,.inner-sidebar .cmb2-list label{display:inline;font-weight:400}#side-sortables .cmb2-metabox-description,.inner-sidebar .cmb2-metabox-description{display:block;padding:7px 0 0}#side-sortables .cmb-type-checkbox .cmb-td label,#side-sortables .cmb-type-checkbox .cmb2-metabox-description,.inner-sidebar .cmb-type-checkbox .cmb-td label,.inner-sidebar .cmb-type-checkbox .cmb2-metabox-description{font-weight:400;display:inline}#side-sortables .cmb-row .cmb2-metabox-description,.inner-sidebar .cmb-row .cmb2-metabox-description{padding-bottom:1.8em}#side-sortables .cmb2-metabox-title,.inner-sidebar .cmb2-metabox-title{font-size:1.2em;font-style:italic}#side-sortables .cmb-remove-row,.inner-sidebar .cmb-remove-row{clear:both;padding-top:12px;padding-bottom:0}#side-sortables .cmb2-upload-button,.inner-sidebar .cmb2-upload-button{clear:both;margin-top:12px}.cmb2-metabox .cmbhandle{color:#aaa;float:right;width:27px;height:30px;cursor:pointer;right:-1em;position:relative}.cmb2-metabox .cmbhandle:before{content:'\f142';right:12px;font:400 20px/1 dashicons;speak:none;display:inline-block;padding:8px 10px;top:0;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.cmb2-metabox .postbox.closed .cmbhandle:before{content:'\f140'}.cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row{-webkit-appearance:none!important;background:none!important;border:none!important;position:absolute;left:0;top:.5em;line-height:1em;padding:2px 6px 3px;opacity:.5}.cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]){cursor:pointer;color:#a00;opacity:1}.cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row:not([disabled]):hover{color:red}* html .cmb2-element.ui-helper-clearfix{height:1%}.cmb2-element .ui-datepicker,.cmb2-element.ui-datepicker{padding:0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:#fff;border:1px solid #dfdfdf;border-top:none;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.075);box-shadow:0 3px 6px rgba(0,0,0,.075);min-width:17em;width:auto}.cmb2-element .ui-datepicker *,.cmb2-element.ui-datepicker *{padding:0;font-family:"Open Sans",sans-serif;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.cmb2-element .ui-datepicker table,.cmb2-element.ui-datepicker table{font-size:13px;margin:0;border:none;border-collapse:collapse}.cmb2-element .ui-datepicker .ui-datepicker-header,.cmb2-element .ui-datepicker .ui-widget-header,.cmb2-element.ui-datepicker .ui-datepicker-header,.cmb2-element.ui-datepicker .ui-widget-header{border:none;color:#fff;font-weight:400}.cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover,.cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover{background:0 0;border-color:transparent;cursor:pointer}.cmb2-element .ui-datepicker .ui-datepicker-title,.cmb2-element.ui-datepicker .ui-datepicker-title{margin:0;padding:10px 0;color:#fff;font-size:14px;line-height:14px;text-align:center}.cmb2-element .ui-datepicker .ui-datepicker-title select,.cmb2-element.ui-datepicker .ui-datepicker-title select{margin-top:-8px;margin-bottom:-8px}.cmb2-element .ui-datepicker .ui-datepicker-next,.cmb2-element .ui-datepicker .ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-datepicker-next,.cmb2-element.ui-datepicker .ui-datepicker-prev{position:relative;top:0;height:34px;width:34px}.cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-next,.cmb2-element .ui-datepicker .ui-state-hover.ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-next,.cmb2-element.ui-datepicker .ui-state-hover.ui-datepicker-prev{border:none}.cmb2-element .ui-datepicker .ui-datepicker-prev,.cmb2-element .ui-datepicker .ui-datepicker-prev-hover,.cmb2-element.ui-datepicker .ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-datepicker-prev-hover{left:0}.cmb2-element .ui-datepicker .ui-datepicker-next,.cmb2-element .ui-datepicker .ui-datepicker-next-hover,.cmb2-element.ui-datepicker .ui-datepicker-next,.cmb2-element.ui-datepicker .ui-datepicker-next-hover{right:0}.cmb2-element .ui-datepicker .ui-datepicker-next span,.cmb2-element .ui-datepicker .ui-datepicker-prev span,.cmb2-element.ui-datepicker .ui-datepicker-next span,.cmb2-element.ui-datepicker .ui-datepicker-prev span{display:none}.cmb2-element .ui-datepicker .ui-datepicker-prev,.cmb2-element.ui-datepicker .ui-datepicker-prev{float:left}.cmb2-element .ui-datepicker .ui-datepicker-next,.cmb2-element.ui-datepicker .ui-datepicker-next{float:right}.cmb2-element .ui-datepicker .ui-datepicker-next:before,.cmb2-element .ui-datepicker .ui-datepicker-prev:before,.cmb2-element.ui-datepicker .ui-datepicker-next:before,.cmb2-element.ui-datepicker .ui-datepicker-prev:before{font:400 20px/34px dashicons;padding-left:7px;color:#fff;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:34px;height:34px}.cmb2-element .ui-datepicker .ui-datepicker-prev:before,.cmb2-element.ui-datepicker .ui-datepicker-prev:before{content:'\f341'}.cmb2-element .ui-datepicker .ui-datepicker-next:before,.cmb2-element.ui-datepicker .ui-datepicker-next:before{content:'\f345'}.cmb2-element .ui-datepicker .ui-datepicker-next-hover:before,.cmb2-element .ui-datepicker .ui-datepicker-prev-hover:before,.cmb2-element.ui-datepicker .ui-datepicker-next-hover:before,.cmb2-element.ui-datepicker .ui-datepicker-prev-hover:before{opacity:.7}.cmb2-element .ui-datepicker select.ui-datepicker-month,.cmb2-element .ui-datepicker select.ui-datepicker-year,.cmb2-element.ui-datepicker select.ui-datepicker-month,.cmb2-element.ui-datepicker select.ui-datepicker-year{width:33%;background:0 0;border-color:transparent;box-shadow:none;color:#fff}.cmb2-element .ui-datepicker select.ui-datepicker-month option,.cmb2-element .ui-datepicker select.ui-datepicker-year option,.cmb2-element.ui-datepicker select.ui-datepicker-month option,.cmb2-element.ui-datepicker select.ui-datepicker-year option{color:#333}.cmb2-element .ui-datepicker thead,.cmb2-element.ui-datepicker thead{color:#fff;font-weight:600}.cmb2-element .ui-datepicker thead th,.cmb2-element.ui-datepicker thead th{font-weight:400}.cmb2-element .ui-datepicker th,.cmb2-element.ui-datepicker th{padding:10px}.cmb2-element .ui-datepicker td,.cmb2-element.ui-datepicker td{padding:0;border:1px solid #f4f4f4}.cmb2-element .ui-datepicker td.ui-datepicker-other-month,.cmb2-element.ui-datepicker td.ui-datepicker-other-month{border:transparent}.cmb2-element .ui-datepicker td.ui-datepicker-week-end,.cmb2-element.ui-datepicker td.ui-datepicker-week-end{background-color:#f4f4f4;border:1px solid #f4f4f4}.cmb2-element .ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today,.cmb2-element.ui-datepicker td.ui-datepicker-week-end.ui-datepicker-today{-webkit-box-shadow:inset 0 0 1px 0 rgba(0,0,0,.1);-moz-box-shadow:inset 0 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 0 1px 0 rgba(0,0,0,.1)}.cmb2-element .ui-datepicker td.ui-datepicker-today,.cmb2-element.ui-datepicker td.ui-datepicker-today{background-color:#f0f0c0}.cmb2-element .ui-datepicker td.ui-datepicker-current-day,.cmb2-element.ui-datepicker td.ui-datepicker-current-day{background:#bd8}.cmb2-element .ui-datepicker td .ui-state-default,.cmb2-element.ui-datepicker td .ui-state-default{background:0 0;border:none;text-align:center;text-decoration:none;width:auto;display:block;padding:5px 10px;font-weight:400;color:#444}.cmb2-element .ui-datepicker td.ui-state-disabled .ui-state-default,.cmb2-element.ui-datepicker td.ui-state-disabled .ui-state-default{opacity:.5}.cmb2-element .ui-datepicker .ui-datepicker-header,.cmb2-element .ui-datepicker .ui-widget-header,.cmb2-element.ui-datepicker .ui-datepicker-header,.cmb2-element.ui-datepicker .ui-widget-header{background:#00a0d2}.cmb2-element .ui-datepicker thead,.cmb2-element.ui-datepicker thead{background:#32373c}.cmb2-element .ui-datepicker td .ui-state-active,.cmb2-element .ui-datepicker td .ui-state-hover,.cmb2-element.ui-datepicker td .ui-state-active,.cmb2-element.ui-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.cmb2-element .ui-datepicker .ui-timepicker-div,.cmb2-element.ui-datepicker .ui-timepicker-div{font-size:14px}.cmb2-element .ui-datepicker .ui-timepicker-div dl,.cmb2-element.ui-datepicker .ui-timepicker-div dl{text-align:left;padding:0 .6em}.cmb2-element .ui-datepicker .ui-timepicker-div dl dt,.cmb2-element.ui-datepicker .ui-timepicker-div dl dt{float:left;clear:left;padding:0 0 0 5px}.cmb2-element .ui-datepicker .ui-timepicker-div dl dd,.cmb2-element.ui-datepicker .ui-timepicker-div dl dd{margin:0 10px 10px 40%}.cmb2-element .ui-datepicker .ui-timepicker-div dl dd select,.cmb2-element.ui-datepicker .ui-timepicker-div dl dd select{width:100%}.cmb2-element .ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane,.cmb2-element.ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane{padding:.6em;text-align:left}.cmb2-element .ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-primary,.cmb2-element .ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-secondary,.cmb2-element.ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-primary,.cmb2-element.ui-datepicker .ui-timepicker-div+.ui-datepicker-buttonpane .button-secondary{padding:0 10px 1px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:0 .6em .4em .4em}.admin-color-fresh .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-fresh .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-fresh .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-fresh .cmb2-element.ui-datepicker .ui-widget-header{background:#00a0d2}.admin-color-fresh .cmb2-element .ui-datepicker thead,.admin-color-fresh .cmb2-element.ui-datepicker thead{background:#32373c}.admin-color-fresh .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-fresh .cmb2-element.ui-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.admin-color-blue .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-blue .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-blue .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-blue .cmb2-element.ui-datepicker .ui-widget-header{background:#52accc}.admin-color-blue .cmb2-element .ui-datepicker thead,.admin-color-blue .cmb2-element.ui-datepicker thead{background:#4796b3}.admin-color-blue .cmb2-element .ui-datepicker td .ui-state-active,.admin-color-blue .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-blue .cmb2-element.ui-datepicker td .ui-state-active,.admin-color-blue .cmb2-element.ui-datepicker td .ui-state-hover{background:#096484;color:#fff}.admin-color-blue .cmb2-element .ui-datepicker td.ui-datepicker-today,.admin-color-blue .cmb2-element.ui-datepicker td.ui-datepicker-today{background:#eee}.admin-color-coffee .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-coffee .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-coffee .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-coffee .cmb2-element.ui-datepicker .ui-widget-header{background:#59524c}.admin-color-coffee .cmb2-element .ui-datepicker thead,.admin-color-coffee .cmb2-element.ui-datepicker thead{background:#46403c}.admin-color-coffee .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-coffee .cmb2-element.ui-datepicker td .ui-state-hover{background:#c7a589;color:#fff}.admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-ectoplasm .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-ectoplasm .cmb2-element.ui-datepicker .ui-widget-header{background:#523f6d}.admin-color-ectoplasm .cmb2-element .ui-datepicker thead,.admin-color-ectoplasm .cmb2-element.ui-datepicker thead{background:#413256}.admin-color-ectoplasm .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-ectoplasm .cmb2-element.ui-datepicker td .ui-state-hover{background:#a3b745;color:#fff}.admin-color-midnight .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-midnight .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-midnight .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-midnight .cmb2-element.ui-datepicker .ui-widget-header{background:#363b3f}.admin-color-midnight .cmb2-element .ui-datepicker thead,.admin-color-midnight .cmb2-element.ui-datepicker thead{background:#26292c}.admin-color-midnight .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-midnight .cmb2-element.ui-datepicker td .ui-state-hover{background:#e14d43;color:#fff}.admin-color-ocean .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-ocean .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-ocean .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-ocean .cmb2-element.ui-datepicker .ui-widget-header{background:#738e96}.admin-color-ocean .cmb2-element .ui-datepicker thead,.admin-color-ocean .cmb2-element.ui-datepicker thead{background:#627c83}.admin-color-ocean .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-ocean .cmb2-element.ui-datepicker td .ui-state-hover{background:#9ebaa0;color:#fff}.admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-sunrise .cmb2-element .ui-datepicker .ui-datepicker-header .ui-state-hover,.admin-color-sunrise .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-sunrise .cmb2-element.ui-datepicker .ui-datepicker-header .ui-state-hover,.admin-color-sunrise .cmb2-element.ui-datepicker .ui-widget-header{background:#cf4944}.admin-color-sunrise .cmb2-element .ui-datepicker th,.admin-color-sunrise .cmb2-element.ui-datepicker th{border-color:#be3631;background:#be3631}.admin-color-sunrise .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-sunrise .cmb2-element.ui-datepicker td .ui-state-hover{background:#dd823b;color:#fff}.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-light .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-light .cmb2-element.ui-datepicker .ui-widget-header{background:#e5e5e5}.admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-month,.admin-color-light .cmb2-element .ui-datepicker select.ui-datepicker-year,.admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-month,.admin-color-light .cmb2-element.ui-datepicker select.ui-datepicker-year{color:#555}.admin-color-light .cmb2-element .ui-datepicker thead,.admin-color-light .cmb2-element.ui-datepicker thead{background:#888}.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-next:before,.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-prev:before,.admin-color-light .cmb2-element .ui-datepicker .ui-datepicker-title,.admin-color-light .cmb2-element .ui-datepicker td .ui-state-default,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-next:before,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-prev:before,.admin-color-light .cmb2-element.ui-datepicker .ui-datepicker-title,.admin-color-light .cmb2-element.ui-datepicker td .ui-state-default{color:#555}.admin-color-light .cmb2-element .ui-datepicker td .ui-state-active,.admin-color-light .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-light .cmb2-element.ui-datepicker td .ui-state-active,.admin-color-light .cmb2-element.ui-datepicker td .ui-state-hover{background:#ccc}.admin-color-light .cmb2-element .ui-datepicker td.ui-datepicker-today,.admin-color-light .cmb2-element.ui-datepicker td.ui-datepicker-today{background:#eee}.admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-bbp-evergreen .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker .ui-widget-header{background:#56b274}.admin-color-bbp-evergreen .cmb2-element .ui-datepicker thead,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker thead{background:#36533f}.admin-color-bbp-evergreen .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-bbp-evergreen .cmb2-element.ui-datepicker td .ui-state-hover{background:#446950;color:#fff}.admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-datepicker-header,.admin-color-bbp-mint .cmb2-element .ui-datepicker .ui-widget-header,.admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-datepicker-header,.admin-color-bbp-mint .cmb2-element.ui-datepicker .ui-widget-header{background:#4ca26a}.admin-color-bbp-mint .cmb2-element .ui-datepicker thead,.admin-color-bbp-mint .cmb2-element.ui-datepicker thead{background:#4f6d59}.admin-color-bbp-mint .cmb2-element .ui-datepicker td .ui-state-hover,.admin-color-bbp-mint .cmb2-element.ui-datepicker td .ui-state-hover{background:#5fb37c;color:#fff}@media only screen and (max-width:850px){.cmb2-context-wrap.cmb2-context-wrap-form_top{margin-right:0}}@media (max-width:450px){.cmb-th{font-size:1.2em;padding-bottom:1em;text-align:left}.cmb-th label{display:block;margin-top:0;margin-bottom:.5em}.cmb-td,.cmb-th,.cmb-th+.cmb-td{display:block;float:none;width:100%}.cmb-type-group .cmb-repeatable-group:not(:last-of-type),.cmb-type-group .cmb-row:not(:last-of-type),.cmb2-postbox .cmb-repeatable-group:not(:last-of-type),.cmb2-postbox .cmb-row:not(:last-of-type){border-bottom:0}.cmb2-options-page .cmb2-metabox>.cmb-row>.cmb-th+.cmb-td{padding:0;margin-left:0}}
 
trunk/vendor/webdevstudios/cmb2/css/index.php DELETED
@@ -1,2 +0,0 @@
1
- <?php
2
- // Silence is golden
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/cmb2-display.scss DELETED
@@ -1,5 +0,0 @@
1
- /**
2
- * CMB2 Styling
3
- */
4
-
5
- @import "partials/display";
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/cmb2-front.scss DELETED
@@ -1,6 +0,0 @@
1
- @import "cmb2.scss";
2
-
3
- /**
4
- * CMB2 Frontend
5
- */
6
- @import "partials/front";
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/cmb2.scss DELETED
@@ -1,15 +0,0 @@
1
- /**
2
- * CMB2 Styling
3
- */
4
-
5
- @import "partials/variables";
6
- @import "partials/mixins";
7
-
8
- @import "partials/main_wrap";
9
- @import "partials/post_metaboxes";
10
- @import "partials/context_metaboxes";
11
- @import "partials/options-page";
12
- @import "partials/misc";
13
- @import "partials/sidebar_placements";
14
- @import "partials/collapsible_ui";
15
- @import "partials/jquery_ui";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/index.php DELETED
@@ -1,2 +0,0 @@
1
- <?php
2
- // Silence is golden
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/partials/_collapsible_ui.scss DELETED
@@ -1,52 +0,0 @@
1
- .cmb2-metabox {
2
- .cmbhandle {
3
- color: #aaa;
4
- float: right;
5
- width: 27px;
6
- height: 30px;
7
- cursor: pointer;
8
- right: -1em;
9
- position: relative;
10
- &:before {
11
- content: '\f142';
12
- right: 12px;
13
- font: normal 20px/1 'dashicons';
14
- speak: none;
15
- display: inline-block;
16
- padding: 8px 10px;
17
- top: 0;
18
- position: relative;
19
- -webkit-font-smoothing: antialiased;
20
- -moz-osx-font-smoothing: grayscale;
21
- text-decoration: none !important;
22
- }
23
- }
24
-
25
- .postbox.closed {
26
- .cmbhandle {
27
- &:before {
28
- content: '\f140';
29
- }
30
- }
31
- }
32
-
33
- button.dashicons-before.dashicons-no-alt.cmb-remove-group-row {
34
- -webkit-appearance: none !important;
35
- background: none !important;
36
- border: none !important;
37
- position: absolute;
38
- left: 0;
39
- top: .5em;
40
- line-height: 1em;
41
- padding: 2px 6px 3px;
42
- opacity: .5;
43
- &:not([disabled]) {
44
- cursor: pointer;
45
- color: $dark-red;
46
- opacity: 1;
47
- &:hover {
48
- color: $red;
49
- }
50
- }
51
- }
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/partials/_context_metaboxes.scss DELETED
@@ -1,107 +0,0 @@
1
- /*--------------------------------------------------------------
2
- Context Metaboxes
3
- --------------------------------------------------------------*/
4
-
5
- /* Metabox collapse arrow indicators */
6
- .js .cmb2-postbox.context-box {
7
-
8
- .toggle-indicator {
9
- &:before {
10
- content: "\f142";
11
- display: inline-block;
12
- font: normal 20px/1 dashicons;
13
- speak: none;
14
- -webkit-font-smoothing: antialiased;
15
- -moz-osx-font-smoothing: grayscale;
16
- text-decoration: none !important;
17
- }
18
- }
19
-
20
- &.closed {
21
- .toggle-indicator {
22
- &:before {
23
- content: "\f140";
24
- }
25
- }
26
- }
27
-
28
- }
29
-
30
- .cmb2-postbox.context-box {
31
-
32
- margin-bottom: 10px;
33
-
34
- &.context-before_permalink-box {
35
- margin-top: 10px;
36
- }
37
-
38
- &.context-after_title-box {
39
- margin-top: 10px;
40
- }
41
-
42
- &.context-after_editor-box {
43
- margin-top: 20px;
44
- margin-bottom: 0;
45
- }
46
-
47
- &.context-form_top-box {
48
-
49
- margin-top: 10px;
50
-
51
- .hndle {
52
- font-size: 14px;
53
- padding: 8px 12px;
54
- margin: 0;
55
- line-height: 1.4;
56
- }
57
- }
58
-
59
- .hndle {
60
- cursor: auto;
61
- }
62
- }
63
-
64
- .cmb2-context-wrap {
65
-
66
- margin-top: 10px;
67
-
68
- &.cmb2-context-wrap-form_top {
69
- margin-right: 300px;
70
- width: auto;
71
- }
72
-
73
- &.cmb2-context-wrap-no-title {
74
-
75
- .cmb2-metabox {
76
- padding: 10px;
77
- }
78
- }
79
-
80
- .cmb-th {
81
- padding: 0 2% 0 0;
82
- width: 18%;
83
- }
84
-
85
- .cmb-td {
86
- width: 80%;
87
- padding: 0;
88
- }
89
-
90
- .cmb-row {
91
- margin-bottom: 10px;
92
-
93
- &:last-of-type {
94
- margin-bottom: 0;
95
- }
96
- }
97
-
98
- }
99
-
100
- /* one column on the post write/edit screen */
101
- @media only screen and (max-width: 850px) {
102
-
103
- .cmb2-context-wrap.cmb2-context-wrap-form_top {
104
- margin-right: 0;
105
- }
106
-
107
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/partials/_display.scss DELETED
@@ -1,34 +0,0 @@
1
- /**
2
- * CMB2 Styling
3
- */
4
-
5
- .cmb2-colorpicker-swatch {
6
- span {
7
- display: inline-block;
8
- width: 1em;
9
- height: 1em;
10
- border-radius: 1em;
11
- float: left;
12
- margin-top: 3px;
13
- margin-right: 2px;
14
- }
15
- }
16
-
17
- .cmb2-code {
18
- overflow: scroll;
19
- }
20
-
21
- .cmb-image-display {
22
- max-width: 100%;
23
- height: auto;
24
- }
25
-
26
- .cmb2-display-file-list li {
27
- display: inline;
28
- margin: 0 .5em .5em 0;
29
- }
30
-
31
- .cmb2-oembed * {
32
- max-width: 100%;
33
- height: auto;
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/partials/_front.scss DELETED
@@ -1,52 +0,0 @@
1
- .closed .inside {
2
- display: none;
3
- }
4
-
5
- .cmb-repeatable-grouping {
6
- position: relative;
7
-
8
- .cmb-group-title {
9
- margin-left: -1em;
10
- margin-right: -1em;
11
- min-height: 1.5em;
12
- }
13
-
14
- h3 {
15
- font-size: 14px;
16
- padding: 8px 12px;
17
- margin: 0;
18
- line-height: 1.4;
19
- }
20
-
21
- }
22
-
23
- .cmb-repeatable-group {
24
-
25
- &.repeatable .cmb-group-title {
26
- padding-left: 2.2em;
27
- }
28
-
29
- &.non-repeatable .cmb-group-title {
30
- padding-left: 12px;
31
- }
32
-
33
- }
34
-
35
- .cmb-type-group .cmb-row .cmbhandle {
36
- right: 0;
37
- position: absolute;
38
- }
39
-
40
- .cmb-spinner {
41
- background: url(/wp-admin/images/spinner.gif) no-repeat;
42
- -webkit-background-size: 20px 20px;
43
- background-size: 20px 20px;
44
- display: none;
45
- float: right;
46
- vertical-align: middle;
47
- opacity: 0.7;
48
- filter: alpha(opacity=70);
49
- width: 20px;
50
- height: 20px;
51
- margin: 4px 10px 0;
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/partials/_jquery_ui.scss DELETED
@@ -1,457 +0,0 @@
1
- /*
2
- * jQuery UI CSS Framework 1.8.16
3
- *
4
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
- * Dual licensed under the MIT or GPL Version 2 licenses.
6
- * http://jquery.org/license
7
- *
8
- * http://docs.jquery.com/UI/Theming/API
9
- *
10
- * WordPress Styles adopted from "jQuery UI Datepicker CSS for WordPress"
11
- * https://github.com/stuttter/wp-datepicker-styling
12
- *
13
- */
14
-
15
- * html .cmb2-element.ui-helper-clearfix {
16
- height:1%;
17
- }
18
-
19
- $weekend: #f4f4f4;
20
- $freshblue: #00a0d2;
21
- $freshdark: #32373c;
22
- $freshdarkblue: #0073aa;
23
-
24
- .cmb2-element.ui-datepicker, .cmb2-element .ui-datepicker {
25
- padding: 0;
26
- margin: 0;
27
- -webkit-border-radius: 0;
28
- -moz-border-radius: 0;
29
- border-radius: 0;
30
- background-color: #fff;
31
- border: 1px solid #dfdfdf;
32
- border-top: none;
33
- -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075);
34
- box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075);
35
- min-width: 17em;
36
- width: auto;
37
-
38
- * {
39
- padding: 0;
40
- font-family: "Open Sans", sans-serif;
41
- -webkit-border-radius: 0;
42
- -moz-border-radius: 0;
43
- border-radius: 0;
44
- }
45
-
46
- table {
47
- font-size: 13px;
48
- margin: 0;
49
- border: none;
50
- border-collapse: collapse;
51
- }
52
-
53
- .ui-widget-header,
54
- .ui-datepicker-header {
55
- background-image: none;
56
- border: none;
57
- color: #fff;
58
- font-weight: normal;
59
- }
60
-
61
- .ui-datepicker-header .ui-state-hover {
62
- background: transparent;
63
- border-color: transparent;
64
- cursor: pointer;
65
- }
66
-
67
- .ui-datepicker-title {
68
- margin: 0;
69
- padding: 10px 0;
70
- color: #fff;
71
- font-size: 14px;
72
- line-height: 14px;
73
- text-align: center;
74
-
75
- select {
76
- margin-top: -8px;
77
- margin-bottom: -8px;
78
- }
79
- }
80
-
81
- .ui-datepicker-prev,
82
- .ui-datepicker-next {
83
- position: relative;
84
- top: 0;
85
- height: 34px;
86
- width: 34px;
87
- }
88
-
89
- .ui-state-hover.ui-datepicker-prev,
90
- .ui-state-hover.ui-datepicker-next {
91
- border: none;
92
- }
93
-
94
- .ui-datepicker-prev,
95
- .ui-datepicker-prev-hover {
96
- left: 0;
97
- }
98
-
99
- .ui-datepicker-next,
100
- .ui-datepicker-next-hover {
101
- right: 0;
102
- }
103
-
104
- .ui-datepicker-next span,
105
- .ui-datepicker-prev span {
106
- display: none;
107
- }
108
-
109
- .ui-datepicker-prev {
110
- float: left;
111
- }
112
-
113
- .ui-datepicker-next {
114
- float: right;
115
- }
116
-
117
- .ui-datepicker-prev:before,
118
- .ui-datepicker-next:before {
119
- font: normal 20px/34px 'dashicons';
120
- padding-left: 7px;
121
- color: #fff;
122
- speak: none;
123
- -webkit-font-smoothing: antialiased;
124
- -moz-osx-font-smoothing: grayscale;
125
- width: 34px;
126
- height: 34px;
127
- }
128
-
129
- .ui-datepicker-prev:before {
130
- content: '\f341';
131
- }
132
-
133
- .ui-datepicker-next:before {
134
- content: '\f345';
135
- }
136
-
137
- .ui-datepicker-prev-hover:before,
138
- .ui-datepicker-next-hover:before {
139
- opacity: 0.7;
140
- }
141
-
142
- select.ui-datepicker-month,
143
- select.ui-datepicker-year {
144
- width: 33%;
145
- background: transparent;
146
- border-color: transparent;
147
- box-shadow: none;
148
- color: #fff;
149
- option {
150
- color: #333;
151
- }
152
- }
153
-
154
- thead {
155
- color: #fff;
156
- font-weight: 600;
157
- th {
158
- font-weight: normal;
159
- }
160
- }
161
-
162
- th {
163
- padding: 10px;
164
- }
165
-
166
- td {
167
- padding: 0;
168
- border: 1px solid $weekend;
169
- }
170
-
171
- td.ui-datepicker-other-month {
172
- border: transparent;
173
- }
174
-
175
- td.ui-datepicker-week-end {
176
- background-color: $weekend;
177
- border: 1px solid $weekend;
178
- &.ui-datepicker-today {
179
- -webkit-box-shadow: inset 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
180
- -moz-box-shadow: inset 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
181
- box-shadow: inset 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
182
- }
183
- }
184
-
185
- td.ui-datepicker-today {
186
- background-color: #f0f0c0;
187
- }
188
-
189
- td.ui-datepicker-current-day {
190
- background: #bbdd88;
191
- }
192
-
193
- td .ui-state-default {
194
- background: transparent;
195
- border: none;
196
- text-align: center;
197
- text-decoration: none;
198
- width: auto;
199
- display: block;
200
- padding: 5px 10px;
201
- font-weight: normal;
202
- color: #444;
203
- }
204
-
205
- td.ui-state-disabled .ui-state-default {
206
- opacity: 0.5;
207
- }
208
-
209
- /* Default Color Scheme */
210
- .ui-widget-header,
211
- .ui-datepicker-header {
212
- background: $freshblue;
213
- }
214
-
215
- thead {
216
- background: $freshdark;
217
- }
218
-
219
- td .ui-state-hover, td .ui-state-active {
220
- background: $freshdarkblue;
221
- color: #fff;
222
- }
223
-
224
- .ui-timepicker-div {
225
- font-size: 14px;
226
- dl {
227
- text-align: left;
228
- padding: 0 .6em;
229
- dt {
230
- float: left;
231
- clear:left;
232
- padding: 0 0 0 5px;
233
- }
234
- dd {
235
- margin: 0 10px 10px 40%;
236
- select {
237
- width: 100%;
238
- }
239
- }
240
- }
241
-
242
- + .ui-datepicker-buttonpane {
243
- padding: .6em;
244
- text-align: left;
245
-
246
- .button-primary, .button-secondary {
247
- padding: 0 10px 1px;
248
- -webkit-border-radius: 3px;
249
- -moz-border-radius: 3px;
250
- border-radius: 3px;
251
- margin: 0 .6em .4em .4em;
252
- }
253
-
254
- }
255
- }
256
-
257
- }
258
- .admin-color-fresh {
259
- .cmb2-element.ui-datepicker, .cmb2-element .ui-datepicker {
260
- .ui-widget-header,
261
- .ui-datepicker-header {
262
- background: $freshblue;
263
- }
264
-
265
- thead {
266
- background: $freshdark;
267
- }
268
-
269
- td .ui-state-hover {
270
- background: $freshdarkblue;
271
- color: #fff;
272
- }
273
- }
274
- }
275
- .admin-color-blue {
276
- .cmb2-element.ui-datepicker, .cmb2-element .ui-datepicker {
277
- .ui-widget-header,
278
- .ui-datepicker-header {
279
- background: #52accc;
280
- }
281
-
282
- thead {
283
- background: #4796b3;
284
- }
285
-
286
- // td .ui-state-hover {
287
- // background: #096484;
288
- // }
289
-
290
- td {
291
- .ui-state-hover, .ui-state-active {
292
- background: #096484;
293
- color: #fff;
294
- }
295
-
296
- &.ui-datepicker-today {
297
- background: #eee;
298
- }
299
- }
300
-
301
- }
302
- }
303
- .admin-color-coffee {
304
- .cmb2-element.ui-datepicker, .cmb2-element .ui-datepicker {
305
- .ui-widget-header,
306
- .ui-datepicker-header {
307
- background: #59524c;
308
- }
309
-
310
- thead {
311
- background: #46403c;
312
- }
313
-
314
- td .ui-state-hover {
315
- background: #c7a589;
316
- color: #fff;
317
- }
318
- }
319
- }
320
- .admin-color-ectoplasm {
321
- .cmb2-element.ui-datepicker, .cmb2-element .ui-datepicker {
322
- .ui-widget-header,
323
- .ui-datepicker-header {
324
- background: #523f6d;
325
- }
326
-
327
- thead {
328
- background: #413256;
329
- }
330
-
331
- td .ui-state-hover {
332
- background: #a3b745;
333
- color: #fff;
334
- }
335
- }
336
- }
337
- .admin-color-midnight {
338
- .cmb2-element.ui-datepicker, .cmb2-element .ui-datepicker {
339
- .ui-widget-header,
340
- .ui-datepicker-header {
341
- background: #363b3f;
342
- }
343
-
344
- thead {
345
- background: #26292c;
346
- }
347
-
348
- td .ui-state-hover {
349
- background: #e14d43;
350
- color: #fff;
351
- }
352
- }
353
- }
354
- .admin-color-ocean {
355
- .cmb2-element.ui-datepicker, .cmb2-element .ui-datepicker {
356
- .ui-widget-header,
357
- .ui-datepicker-header {
358
- background: #738e96;
359
- }
360
-
361
- thead {
362
- background: #627c83;
363
- }
364
-
365
- td .ui-state-hover {
366
- background: #9ebaa0;
367
- color: #fff;
368
- }
369
- }
370
- }
371
- .admin-color-sunrise {
372
- .cmb2-element.ui-datepicker, .cmb2-element .ui-datepicker {
373
- .ui-widget-header,
374
- .ui-datepicker-header,
375
- .ui-datepicker-header .ui-state-hover {
376
- background: #cf4944;
377
- }
378
-
379
- th {
380
- border-color: #be3631;
381
- background: #be3631;
382
- }
383
-
384
- td .ui-state-hover {
385
- background: #dd823b;
386
- color: #fff;
387
- }
388
- }
389
- }
390
- .admin-color-light {
391
- .cmb2-element.ui-datepicker, .cmb2-element .ui-datepicker {
392
- .ui-widget-header,
393
- .ui-datepicker-header {
394
- background: #e5e5e5;
395
- }
396
-
397
- select.ui-datepicker-month,
398
- select.ui-datepicker-year {
399
- color: #555;
400
- }
401
-
402
- thead {
403
- background: #888;
404
- }
405
-
406
- .ui-datepicker-title,
407
- td .ui-state-default,
408
- .ui-datepicker-prev:before,
409
- .ui-datepicker-next:before {
410
- color: #555;
411
- }
412
-
413
- td {
414
- .ui-state-hover, .ui-state-active {
415
- background: #ccc;
416
- }
417
-
418
- &.ui-datepicker-today {
419
- background: #eee;
420
- }
421
- }
422
- }
423
- }
424
- .admin-color-bbp-evergreen {
425
- .cmb2-element.ui-datepicker, .cmb2-element .ui-datepicker {
426
- .ui-widget-header,
427
- .ui-datepicker-header {
428
- background: #56b274;
429
- }
430
-
431
- thead {
432
- background: #36533f;
433
- }
434
-
435
- td .ui-state-hover {
436
- background: #446950;
437
- color: #fff;
438
- }
439
- }
440
- }
441
- .admin-color-bbp-mint {
442
- .cmb2-element.ui-datepicker, .cmb2-element .ui-datepicker {
443
- .ui-widget-header,
444
- .ui-datepicker-header {
445
- background: #4ca26a;
446
- }
447
-
448
- thead {
449
- background: #4f6d59;
450
- }
451
-
452
- td .ui-state-hover {
453
- background: #5fb37c;
454
- color: #fff;
455
- }
456
- }
457
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/partials/_main_wrap.scss DELETED
@@ -1,518 +0,0 @@
1
- /*--------------------------------------------------------------
2
- Main Wrap
3
- --------------------------------------------------------------*/
4
-
5
- .cmb2-wrap {
6
- margin: 0;
7
-
8
- input,
9
- textarea {
10
- font-size: $font-size;
11
- max-width: 100%;
12
- padding: 5px;
13
-
14
- }
15
-
16
- input[type=text] {
17
-
18
- &.cmb2-oembed {
19
- width: 100%;
20
- }
21
- }
22
-
23
- textarea {
24
- width: 500px;
25
-
26
- &.cmb2-textarea-code {
27
- font-family: $font-mono;
28
- line-height: 16px;
29
- }
30
- }
31
-
32
- input {
33
-
34
- &.cmb2-text-small,
35
- &.cmb2-timepicker {
36
- width: 100px;
37
- // margin-right: 15px
38
- }
39
-
40
- &.cmb2-text-money {
41
- width: 90px;
42
- // margin-right: 15px
43
- }
44
-
45
- &.cmb2-text-medium {
46
- width: 230px;
47
- // margin-right: 15px
48
- }
49
-
50
- &.cmb2-upload-file {
51
- width: 65%;
52
- }
53
-
54
- &.ed_button {
55
- padding: 2px 4px;
56
- }
57
-
58
- &:not([type="hidden"]) {
59
- + input,
60
- + .button-secondary,
61
- + select {
62
- margin-left: 20px;
63
- }
64
- }
65
- }
66
-
67
- ul {
68
- margin: 0;
69
- }
70
-
71
- li {
72
- font-size: $font-size;
73
- line-height: 16px;
74
- margin: 1px 0 5px 0;
75
- }
76
-
77
- // .cmb-field-list .cmb-field-list {
78
- // padding-top:5px;
79
- // margin: 0;
80
- // }
81
-
82
- select {
83
- font-size: $font-size;
84
- margin-top: 3px;
85
- }
86
-
87
- input:focus,
88
- textarea:focus {
89
- background: $light-yellow;
90
- }
91
-
92
- input[type="radio"] {
93
- margin: 0 5px 0 0;
94
- padding: 0
95
- }
96
-
97
- input[type="checkbox"] {
98
- margin: 0 5px 0 0;
99
- padding: 0;
100
- }
101
-
102
- button,
103
- .button-secondary {
104
- white-space: nowrap;
105
- }
106
-
107
- .mceLayout {
108
- border: 1px solid $light-gray !important;
109
- }
110
-
111
- .mceIframeContainer {
112
- background: #fff;
113
- }
114
-
115
- .meta_mce {
116
- width: 97%;
117
-
118
- textarea {
119
- width: 100%;
120
- }
121
- }
122
-
123
- // Color picker
124
- .wp-color-result,
125
- .wp-picker-input-wrap {
126
- vertical-align: middle;
127
- }
128
-
129
- .wp-color-result,
130
- .wp-picker-container {
131
- margin: 0 10px 0 0;
132
- }
133
-
134
- .cmb-row {
135
- margin: 0;
136
-
137
- &:after {
138
- content: '';
139
- clear: both;
140
- display: block;
141
- width: 100%;
142
- }
143
-
144
- &.cmb-repeat .cmb2-metabox-description {
145
- padding-top: 0;
146
- padding-bottom: 1em;
147
- }
148
- }
149
-
150
- }
151
-
152
- .cmb2-metabox {
153
- clear: both;
154
- margin: 0;
155
-
156
- > .cmb-row:first-of-type >,
157
- .cmb-field-list > .cmb-row:first-of-type > {
158
- .cmb-td,
159
- .cmb-th {
160
- border: 0;
161
- }
162
- }
163
- }
164
-
165
- .cmb-add-row {
166
- margin: 1.8em 0 0;
167
- }
168
-
169
- .cmb-nested .cmb-td,
170
- .cmb-repeatable-group .cmb-th,
171
- .cmb-repeatable-group:first-of-type {
172
- border: 0;
173
- }
174
-
175
- .cmb-row:last-of-type,
176
- .cmb2-wrap .cmb-row:last-of-type,
177
- .cmb-repeatable-group:last-of-type {
178
- border-bottom: 0;
179
- }
180
-
181
- .cmb-repeatable-grouping {
182
- border: 1px solid $light-gray;
183
- padding: 0 1em;
184
-
185
- &.cmb-row {
186
- margin: 0 0 0.8em;
187
- }
188
-
189
- + .cmb-repeatable-grouping {
190
- }
191
- }
192
-
193
- .cmb-th {
194
- color: $dark-gray;
195
- float: left;
196
- font-weight: 600;
197
- line-height: 1.3;
198
- padding: 20px 10px 20px 0;
199
- vertical-align: top;
200
- width: 200px;
201
-
202
- @media (max-width: $mobile-break) {
203
- @include fullth;
204
- }
205
- }
206
-
207
- .cmb-td {
208
- line-height: 1.3;
209
- max-width: 100%;
210
- padding: 15px 10px;
211
- vertical-align: middle;
212
- }
213
-
214
- .cmb-type-title {
215
-
216
- .cmb-td {
217
- padding: 0;
218
- }
219
- }
220
-
221
- .cmb-th label {
222
- display: block;
223
- padding: 5px 0;
224
- }
225
-
226
- .cmb-th + .cmb-td {
227
- float: left;
228
- }
229
-
230
- .cmb-td .cmb-td {
231
- padding-bottom: 1em;
232
- }
233
-
234
- .cmb-remove-row {
235
- text-align: right;
236
- }
237
-
238
- .empty-row.hidden {
239
- display: none;
240
- }
241
-
242
- // Repeatable fields styles
243
- .cmb-repeat-table {
244
- background-color: #fafafa;
245
- border: 1px solid darken($light-gray, 3%);
246
-
247
- .cmb-row.cmb-repeat-row {
248
- position: relative;
249
- counter-increment: el;
250
-
251
- margin: 0;
252
- padding: 10px 10px 10px 50px;
253
- border-bottom: none !important; // Sometime, we need !important :).
254
-
255
- & + .cmb-repeat-row {
256
- border-top: solid 1px $light-gray;
257
- }
258
-
259
- &:before {
260
- content: counter(el);
261
- display: block;
262
-
263
- top: 0;
264
- left: 0;
265
- position: absolute;
266
-
267
- width: 35px;
268
- height: 100%;
269
- line-height: 35px;
270
-
271
- color: $gray;
272
- text-align: center;
273
- border-right: solid 1px $light-gray;
274
- }
275
-
276
- .cmb-td {
277
- margin: 0;
278
- padding: 0;
279
- }
280
-
281
- }
282
-
283
- + .cmb-add-row {
284
- margin: 0;
285
-
286
- &:before {
287
- content: '';
288
- width: 1px;
289
- height: 1.6em;
290
- display: block;
291
- margin-left: 17px;
292
- background-color: darken($light-gray, 5%);
293
- }
294
- }
295
-
296
- .cmb-remove-row {
297
- top: 7px;
298
- right: 7px;
299
- position: absolute;
300
-
301
- width: auto;
302
- margin-left: 0;
303
- padding: 0 !important; // Sometime, we need !important :).
304
-
305
- display: none;
306
-
307
- > .cmb-remove-row-button {
308
- font-size: 20px;
309
- text-indent: -1000px;
310
-
311
- overflow: hidden;
312
- position: relative;
313
-
314
- height: auto;
315
- line-height: 1;
316
- padding: 0 10px 0;
317
-
318
- &:before {
319
- @include pseudo-dashicons("\f335");
320
- }
321
- }
322
- }
323
-
324
- .cmb-repeat-row:hover .cmb-remove-row {
325
- display: block;
326
- }
327
-
328
- }
329
-
330
- .cmb-repeatable-group {
331
-
332
- .cmb-th {
333
- padding: 5px;
334
- }
335
-
336
- .cmb-group-title {
337
- background-color: $light-gray;
338
- padding: 8px 12px 8px 2.2em;
339
- margin: 0 -1em;
340
- min-height: 1.5em;
341
- font-size: 14px;
342
- line-height: 1.4;
343
-
344
- h4 {
345
- border: 0;
346
- margin: 0;
347
- font-size: 1.2em;
348
- font-weight: 500;
349
- padding: 0.5em 0.75em;
350
- }
351
-
352
- .cmb-th {
353
- display: block;
354
- width: 100%;
355
- }
356
- }
357
-
358
- .cmb-group-description .cmb-th {
359
- @include fullth;
360
- }
361
-
362
- .cmb-shift-rows {
363
- font-size: 1em;
364
- margin-right: 1em;
365
- text-decoration: none;
366
-
367
- .dashicons {
368
- font-size: 1.5em;
369
- height: 1.5em;
370
- line-height: 1.2em;
371
- width: 1em;
372
-
373
- &.dashicons-arrow-down-alt2 {
374
- line-height: 1.3em;
375
-
376
- }
377
- }
378
- }
379
-
380
- .cmb2-upload-button {
381
- float: right;
382
- }
383
-
384
- }
385
-
386
- p.cmb2-metabox-description {
387
- color: $gray;
388
- font-style: italic;
389
- margin: 0;
390
- padding-top: .5em;
391
- }
392
-
393
- span.cmb2-metabox-description {
394
- color: $gray;
395
- font-style: italic;
396
- }
397
-
398
- .cmb2-metabox-title {
399
- margin: 0 0 5px 0;
400
- padding: 5px 0 0 0;
401
- font-size: 14px;
402
- }
403
-
404
- .cmb-inline ul {
405
- padding: 4px 0 0 0;
406
- }
407
-
408
- .cmb-inline li {
409
- display: inline-block;
410
- padding-right: 18px;
411
- }
412
-
413
- .cmb-type-textarea-code pre {
414
- margin: 0;
415
- }
416
-
417
- .cmb2-media-status {
418
-
419
- .img-status {
420
- clear: none;
421
- display: inline-block;
422
- vertical-align: middle;
423
- margin-right: 10px;
424
- width: auto;
425
-
426
- img {
427
- max-width: 350px;
428
- height: auto;
429
- }
430
- }
431
-
432
- .img-status img,
433
- .embed-status {
434
- background: $white;
435
- border: 1px solid $light-gray;
436
- border-radius: 2px;
437
- -moz-border-radius: 2px;
438
- margin: 15px 0 0 0;
439
- padding: 5px;
440
- }
441
-
442
- .embed-status {
443
- float: left;
444
- max-width: 800px;
445
- }
446
-
447
- .img-status, .embed-status {
448
- position: relative;
449
-
450
- .cmb2-remove-file-button {
451
- background: url(../images/ico-delete.png);
452
- height: 16px;
453
- left: -5px;
454
- position: absolute;
455
- text-indent: -9999px;
456
- top: -5px;
457
- width: 16px;
458
- }
459
-
460
- }
461
-
462
- .img-status {
463
-
464
- .cmb2-remove-file-button {
465
- top: 10px;
466
- }
467
- }
468
-
469
- .img-status img, .file-status > span {
470
- cursor: pointer;
471
- }
472
-
473
- }
474
-
475
- .cmb-type-file-list .cmb2-media-status .img-status {
476
- clear: none;
477
- vertical-align: middle;
478
- width: auto;
479
- margin-right: 10px;
480
- margin-bottom: 10px;
481
- margin-top: 0;
482
- }
483
-
484
- .cmb-attach-list li {
485
- clear: both;
486
- display: inline-block;
487
- width: 100%;
488
- margin-top: 5px;
489
- margin-bottom: 10px;
490
-
491
- img {
492
- cursor: move;
493
- float: left;
494
- margin-right: 10px;
495
- }
496
- }
497
-
498
- .cmb2-remove-wrapper {
499
- margin: 0;
500
- }
501
-
502
- .child-cmb2 .cmb-th {
503
- text-align: left;
504
- }
505
-
506
- .cmb2-indented-hierarchy {
507
- padding-left: 1.5em;
508
- }
509
-
510
- @media (max-width: $mobile-break) {
511
- .cmb-th,
512
- .cmb-td,
513
- .cmb-th + .cmb-td {
514
- display: block;
515
- float: none;
516
- width: 100%;
517
- }
518
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/partials/_misc.scss DELETED
@@ -1,29 +0,0 @@
1
- /*--------------------------------------------------------------
2
- Misc.
3
- --------------------------------------------------------------*/
4
-
5
- #poststuff .cmb-repeatable-group h2 {
6
- margin: 0;
7
- }
8
-
9
- .edit-tags-php,
10
- .profile-php,
11
- .user-edit-php {
12
- .cmb2-metabox-title {
13
- font-size: 1.4em;
14
- }
15
- }
16
-
17
- .cmb2-postbox, .cmb2-no-box-wrap {
18
- .cmb-spinner {
19
- float: left;
20
- display: none;
21
- }
22
- }
23
-
24
- .cmb-spinner {
25
- display: none;
26
- &.is-active {
27
- display: block;
28
- }
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/partials/_mixins.scss DELETED
@@ -1,51 +0,0 @@
1
- //--------------------------------------------------------------
2
- // Mixins
3
- //--------------------------------------------------------------
4
-
5
- @mixin fullth() {
6
- font-size: 1.2em;
7
- @include _fullth;
8
- }
9
-
10
- @mixin fullth_side() {
11
-
12
- @include _fullth;
13
-
14
- label {
15
- font-size: $font-size;
16
- line-height: 1.4em;
17
- }
18
- }
19
-
20
- @mixin _fullth() {
21
- display: block;
22
- float: none;
23
- padding-bottom: 1em;
24
- text-align: left;
25
- width: 100%;
26
-
27
- label {
28
- display: block;
29
- margin-top: 0;
30
- margin-bottom: 0.5em;
31
- }
32
- }
33
-
34
- @mixin pseudo-dashicons( $glyph: "\f333" ) {
35
- content: $glyph;
36
- font-family: 'Dashicons';
37
- speak: none;
38
- font-weight: normal;
39
- font-variant: normal;
40
- text-transform: none;
41
- line-height: 1;
42
- -webkit-font-smoothing: antialiased;
43
- margin: 0;
44
- text-indent: 0;
45
- position: absolute;
46
- top: 0;
47
- left: 0;
48
- width: 100%;
49
- height: 100%;
50
- text-align: center;
51
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/partials/_options-page.scss DELETED
@@ -1,70 +0,0 @@
1
- /*--------------------------------------------------------------
2
- Options page
3
- --------------------------------------------------------------*/
4
- .cmb2-options-page {
5
- max-width: 1200px;
6
-
7
- &.wrap > h2 {
8
- margin-bottom: 1em;
9
- }
10
-
11
- .cmb2-metabox > .cmb-row {
12
- padding: 1em;
13
- margin-top: -1px;
14
- background: $white;
15
- border: 1px solid $light-gray;
16
- box-shadow: 0 1px 1px rgba(black, 0.05);
17
-
18
- > .cmb-th {
19
- padding: 0;
20
- font-weight: initial;
21
- }
22
-
23
- > .cmb-th + .cmb-td {
24
- float: none;
25
- padding: 0 0 0 1em;
26
- margin-left: 200px;
27
-
28
- @media (max-width: $mobile-break) {
29
- padding: 0;
30
- margin-left: 0;
31
- }
32
- }
33
- }
34
-
35
- // Title field style.
36
- .cmb2-wrap .cmb-type-title {
37
- margin-top: 1em;
38
- padding: 0.6em 1em;
39
- background-color: #fafafa;
40
-
41
- .cmb2-metabox-title {
42
- font-size: 12px;
43
- margin-top: 0;
44
- margin-bottom: 0;
45
- text-transform: uppercase;
46
- }
47
-
48
- .cmb2-metabox-description {
49
- padding-top: 0.25em;
50
- }
51
- }
52
-
53
- .cmb-repeatable-group {
54
- .cmb-group-description .cmb-th {
55
- padding: 0 0 0.8em 0;
56
- }
57
-
58
- .cmb-group-name {
59
- font-size: 16px;
60
- margin-top: 0;
61
- margin-bottom: 0;
62
- }
63
-
64
- .cmb-th > .cmb2-metabox-description {
65
- font-weight: 400;
66
- padding-bottom: 0 !important;
67
- }
68
- }
69
-
70
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/partials/_post_metaboxes.scss DELETED
@@ -1,82 +0,0 @@
1
- /*--------------------------------------------------------------
2
- Post Metaboxes
3
- --------------------------------------------------------------*/
4
- #poststuff .cmb-group-title {
5
- margin-left: -1em;
6
- margin-right: -1em;
7
- min-height: 1.5em;
8
- }
9
-
10
- #poststuff .repeatable .cmb-group-title {
11
- padding-left: 2.2em;
12
- }
13
-
14
- .cmb2-postbox, .cmb-type-group {
15
-
16
- .cmb2-wrap {
17
- margin: 0;
18
-
19
- > .cmb-field-list > .cmb-row {
20
- padding: 1.8em 0;
21
- }
22
-
23
- input[type=text] {
24
-
25
- &.cmb2-oembed {
26
- width: 100%;
27
- }
28
- }
29
- }
30
-
31
- .cmb-row {
32
- padding: 0 0 1.8em;
33
- margin: 0 0 0.8em;
34
-
35
- .cmbhandle {
36
- right: -1em;
37
- position: relative;
38
- }
39
- }
40
-
41
- .cmb-repeatable-grouping {
42
- padding: 0 1em;
43
- max-width: 100%;
44
- min-width: 1px !important;
45
- }
46
-
47
- .cmb-repeatable-group > .cmb-row {
48
- padding-bottom: 0;
49
- }
50
-
51
- .cmb-th {
52
- width: 18%;
53
- padding: 0 2% 0 0;
54
- // text-align: right;
55
- }
56
-
57
- .cmb-td {
58
- margin-bottom: 0;
59
- padding: 0;
60
- line-height: 1.3;
61
- }
62
-
63
- .cmb-th + .cmb-td {
64
- width: 80%;
65
- float: right;
66
- }
67
-
68
- .cmb-row:not(:last-of-type),
69
- .cmb-repeatable-group:not(:last-of-type) {
70
- border-bottom: 1px solid $light-gray;
71
-
72
- @media (max-width: $mobile-break) {
73
- border-bottom: 0;
74
- }
75
- }
76
-
77
- .cmb-repeat-group-field,
78
- .cmb-remove-field-row {
79
- padding-top: 1.8em;
80
- }
81
-
82
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/partials/_sidebar_placements.scss DELETED
@@ -1,146 +0,0 @@
1
- /*--------------------------------------------------------------
2
- Sidebar Placement Adjustments
3
- --------------------------------------------------------------*/
4
-
5
- .inner-sidebar,
6
- #side-sortables {
7
-
8
- .cmb2-wrap {
9
-
10
- > .cmb-field-list > .cmb-row {
11
- padding: 1.4em 0;
12
- }
13
-
14
- input {
15
-
16
- &[type=text]:not( .wp-color-picker ) {
17
- width: 100%;
18
- }
19
-
20
- + input:not( .wp-picker-clear ), + select {
21
- margin-left: 0;
22
- margin-top: 1em;
23
- display: block;
24
- }
25
-
26
- &.cmb2-text-money {
27
- max-width: 70%;
28
- + .cmb2-metabox-description {
29
- display: block;
30
- }
31
- }
32
- }
33
-
34
- label {
35
- display: block;
36
- font-weight: 700;
37
- padding: 0 0 5px;
38
- }
39
-
40
- }
41
-
42
- textarea {
43
- max-width: 99%;
44
- }
45
-
46
- .cmb-repeatable-group {
47
- border-bottom: 1px solid $light-gray;
48
- }
49
-
50
- .cmb-type-group > .cmb-td > .cmb-repeatable-group {
51
- border-bottom: 0;
52
- margin-bottom: -1.4em;
53
- }
54
-
55
- .cmb-th,
56
- .cmb-td:not(.cmb-remove-row),
57
- .cmb-th + .cmb-td {
58
- width: 100%;
59
- display: block;
60
- float: none;
61
- }
62
-
63
- .closed .inside {
64
- display: none;
65
- }
66
-
67
- .cmb-th {
68
- @include fullth_side;
69
- padding-left: 0;
70
- padding-right: 0;
71
- }
72
-
73
- .cmb-group-description {
74
- .cmb-th {
75
- padding-top: 0;
76
- }
77
- .cmb2-metabox-description {
78
- padding: 0;
79
- }
80
- }
81
-
82
- .cmb-group-title {
83
- // padding-bottom: 0;
84
- .cmb-th {
85
- padding: 0;
86
- }
87
- }
88
-
89
- .cmb-repeatable-grouping {
90
- + .cmb-repeatable-grouping {
91
- margin-top: 1em;
92
- }
93
- }
94
- .cmb2-media-status {
95
-
96
- .img-status,
97
- .embed-status {
98
-
99
- img {
100
- max-width: 90%;
101
- // width: auto;
102
- height: auto;
103
- }
104
- }
105
- }
106
-
107
- .cmb2-list label {
108
- display: inline;
109
- font-weight: normal;
110
- }
111
-
112
- .cmb2-metabox-description {
113
- display: block;
114
- padding: 7px 0 0;
115
- }
116
-
117
- .cmb-type-checkbox {
118
-
119
- .cmb-td label,
120
- .cmb2-metabox-description {
121
- font-weight: normal;
122
- display: inline;
123
- }
124
- }
125
-
126
- .cmb-row .cmb2-metabox-description {
127
- padding-bottom: 1.8em;
128
- }
129
-
130
- .cmb2-metabox-title {
131
- font-size: 1.2em;
132
- font-style: italic;
133
- }
134
-
135
- .cmb-remove-row {
136
- clear: both;
137
- padding-top: 12px;
138
- padding-bottom: 0;
139
- }
140
-
141
- .cmb2-upload-button {
142
- clear: both;
143
- margin-top: 12px;
144
- }
145
-
146
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/partials/_variables.scss DELETED
@@ -1,22 +0,0 @@
1
- //--------------------------------------------------------------
2
- // Variables
3
- //--------------------------------------------------------------
4
-
5
- // Mobile break-point
6
- $mobile-break : 450px;
7
-
8
- // Fonts
9
- $font-sans : sans-serif;
10
- $font-serif : Georgia, Times, "Times New Roman", serif;
11
- $font-mono : "Courier 10 Pitch", Courier, monospace;
12
- $font-size : 14px;
13
-
14
- // Colors
15
- $dark-gray : #222222;
16
- $gray : #aaaaaa;
17
- $light-gray : #e9e9e9;
18
- $blue : #0063ce;
19
- $light-yellow : #fffff8;
20
- $white : #ffffff;
21
- $red : #f00;
22
- $dark-red : #a00;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/css/sass/partials/index.php DELETED
@@ -1,2 +0,0 @@
1
- <?php
2
- // Silence is golden
 
 
trunk/vendor/webdevstudios/cmb2/example-functions.php DELETED
@@ -1,735 +0,0 @@
1
- <?php
2
- /**
3
- * Include and setup custom metaboxes and fields. (make sure you copy this file to outside the CMB2 directory)
4
- *
5
- * Be sure to replace all instances of 'yourprefix_' with your project's prefix.
6
- * http://nacin.com/2010/05/11/in-wordpress-prefix-everything/
7
- *
8
- * @category YourThemeOrPlugin
9
- * @package Demo_CMB2
10
- * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
11
- * @link https://github.com/CMB2/CMB2
12
- */
13
-
14
- /**
15
- * Get the bootstrap! If using the plugin from wordpress.org, REMOVE THIS!
16
- */
17
-
18
- if ( file_exists( dirname( __FILE__ ) . '/cmb2/init.php' ) ) {
19
- require_once dirname( __FILE__ ) . '/cmb2/init.php';
20
- } elseif ( file_exists( dirname( __FILE__ ) . '/CMB2/init.php' ) ) {
21
- require_once dirname( __FILE__ ) . '/CMB2/init.php';
22
- }
23
-
24
- /**
25
- * Conditionally displays a metabox when used as a callback in the 'show_on_cb' cmb2_box parameter
26
- *
27
- * @param CMB2 object $cmb CMB2 object.
28
- *
29
- * @return bool True if metabox should show
30
- */
31
- function yourprefix_show_if_front_page( $cmb ) {
32
- // Don't show this metabox if it's not the front page template.
33
- if ( get_option( 'page_on_front' ) !== $cmb->object_id ) {
34
- return false;
35
- }
36
- return true;
37
- }
38
-
39
- /**
40
- * Conditionally displays a field when used as a callback in the 'show_on_cb' field parameter
41
- *
42
- * @param CMB2_Field object $field Field object.
43
- *
44
- * @return bool True if metabox should show
45
- */
46
- function yourprefix_hide_if_no_cats( $field ) {
47
- // Don't show this field if not in the cats category.
48
- if ( ! has_tag( 'cats', $field->object_id ) ) {
49
- return false;
50
- }
51
- return true;
52
- }
53
-
54
- /**
55
- * Manually render a field.
56
- *
57
- * @param array $field_args Array of field arguments.
58
- * @param CMB2_Field $field The field object.
59
- */
60
- function yourprefix_render_row_cb( $field_args, $field ) {
61
- $classes = $field->row_classes();
62
- $id = $field->args( 'id' );
63
- $label = $field->args( 'name' );
64
- $name = $field->args( '_name' );
65
- $value = $field->escaped_value();
66
- $description = $field->args( 'description' );
67
- ?>
68
- <div class="custom-field-row <?php echo esc_attr( $classes ); ?>">
69
- <p><label for="<?php echo esc_attr( $id ); ?>"><?php echo esc_html( $label ); ?></label></p>
70
- <p><input id="<?php echo esc_attr( $id ); ?>" type="text" name="<?php echo esc_attr( $name ); ?>" value="<?php echo $value; ?>"/></p>
71
- <p class="description"><?php echo esc_html( $description ); ?></p>
72
- </div>
73
- <?php
74
- }
75
-
76
- /**
77
- * Manually render a field column display.
78
- *
79
- * @param array $field_args Array of field arguments.
80
- * @param CMB2_Field $field The field object.
81
- */
82
- function yourprefix_display_text_small_column( $field_args, $field ) {
83
- ?>
84
- <div class="custom-column-display <?php echo esc_attr( $field->row_classes() ); ?>">
85
- <p><?php echo $field->escaped_value(); ?></p>
86
- <p class="description"><?php echo esc_html( $field->args( 'description' ) ); ?></p>
87
- </div>
88
- <?php
89
- }
90
-
91
- /**
92
- * Conditionally displays a message if the $post_id is 2
93
- *
94
- * @param array $field_args Array of field parameters.
95
- * @param CMB2_Field object $field Field object.
96
- */
97
- function yourprefix_before_row_if_2( $field_args, $field ) {
98
- if ( 2 == $field->object_id ) {
99
- echo '<p>Testing <b>"before_row"</b> parameter (on $post_id 2)</p>';
100
- } else {
101
- echo '<p>Testing <b>"before_row"</b> parameter (<b>NOT</b> on $post_id 2)</p>';
102
- }
103
- }
104
-
105
- add_action( 'cmb2_admin_init', 'yourprefix_register_demo_metabox' );
106
- /**
107
- * Hook in and add a demo metabox. Can only happen on the 'cmb2_admin_init' or 'cmb2_init' hook.
108
- */
109
- function yourprefix_register_demo_metabox() {
110
- $prefix = 'yourprefix_demo_';
111
-
112
- /**
113
- * Sample metabox to demonstrate each field type included
114
- */
115
- $cmb_demo = new_cmb2_box( array(
116
- 'id' => $prefix . 'metabox',
117
- 'title' => esc_html__( 'Test Metabox', 'cmb2' ),
118
- 'object_types' => array( 'page' ), // Post type
119
- // 'show_on_cb' => 'yourprefix_show_if_front_page', // function should return a bool value
120
- // 'context' => 'normal',
121
- // 'priority' => 'high',
122
- // 'show_names' => true, // Show field names on the left
123
- // 'cmb_styles' => false, // false to disable the CMB stylesheet
124
- // 'closed' => true, // true to keep the metabox closed by default
125
- // 'classes' => 'extra-class', // Extra cmb2-wrap classes
126
- // 'classes_cb' => 'yourprefix_add_some_classes', // Add classes through a callback.
127
- ) );
128
-
129
- $cmb_demo->add_field( array(
130
- 'name' => esc_html__( 'Test Text', 'cmb2' ),
131
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
132
- 'id' => $prefix . 'text',
133
- 'type' => 'text',
134
- 'show_on_cb' => 'yourprefix_hide_if_no_cats', // function should return a bool value
135
- // 'sanitization_cb' => 'my_custom_sanitization', // custom sanitization callback parameter
136
- // 'escape_cb' => 'my_custom_escaping', // custom escaping callback parameter
137
- // 'on_front' => false, // Optionally designate a field to wp-admin only
138
- // 'repeatable' => true,
139
- // 'column' => true, // Display field value in the admin post-listing columns
140
- ) );
141
-
142
- $cmb_demo->add_field( array(
143
- 'name' => esc_html__( 'Test Text Small', 'cmb2' ),
144
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
145
- 'id' => $prefix . 'textsmall',
146
- 'type' => 'text_small',
147
- // 'repeatable' => true,
148
- // 'column' => array(
149
- // 'name' => esc_html__( 'Column Title', 'cmb2' ), // Set the admin column title
150
- // 'position' => 2, // Set as the second column.
151
- // );
152
- // 'display_cb' => 'yourprefix_display_text_small_column', // Output the display of the column values through a callback.
153
- ) );
154
-
155
- $cmb_demo->add_field( array(
156
- 'name' => esc_html__( 'Test Text Medium', 'cmb2' ),
157
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
158
- 'id' => $prefix . 'textmedium',
159
- 'type' => 'text_medium',
160
- ) );
161
-
162
- $cmb_demo->add_field( array(
163
- 'name' => esc_html__( 'Read-only Disabled Field', 'cmb2' ),
164
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
165
- 'id' => $prefix . 'readonly',
166
- 'type' => 'text_medium',
167
- 'default' => esc_attr__( 'Hey there, I\'m a read-only field', 'cmb2' ),
168
- 'save_field' => false, // Disables the saving of this field.
169
- 'attributes' => array(
170
- 'disabled' => 'disabled',
171
- 'readonly' => 'readonly',
172
- ),
173
- ) );
174
-
175
- $cmb_demo->add_field( array(
176
- 'name' => esc_html__( 'Custom Rendered Field', 'cmb2' ),
177
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
178
- 'id' => $prefix . 'render_row_cb',
179
- 'type' => 'text',
180
- 'render_row_cb' => 'yourprefix_render_row_cb',
181
- ) );
182
-
183
- $cmb_demo->add_field( array(
184
- 'name' => esc_html__( 'Website URL', 'cmb2' ),
185
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
186
- 'id' => $prefix . 'url',
187
- 'type' => 'text_url',
188
- // 'protocols' => array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet'), // Array of allowed protocols
189
- // 'repeatable' => true,
190
- ) );
191
-
192
- $cmb_demo->add_field( array(
193
- 'name' => esc_html__( 'Test Text Email', 'cmb2' ),
194
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
195
- 'id' => $prefix . 'email',
196
- 'type' => 'text_email',
197
- // 'repeatable' => true,
198
- ) );
199
-
200
- $cmb_demo->add_field( array(
201
- 'name' => esc_html__( 'Test Time', 'cmb2' ),
202
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
203
- 'id' => $prefix . 'time',
204
- 'type' => 'text_time',
205
- // 'time_format' => 'H:i', // Set to 24hr format
206
- ) );
207
-
208
- $cmb_demo->add_field( array(
209
- 'name' => esc_html__( 'Time zone', 'cmb2' ),
210
- 'desc' => esc_html__( 'Time zone', 'cmb2' ),
211
- 'id' => $prefix . 'timezone',
212
- 'type' => 'select_timezone',
213
- ) );
214
-
215
- $cmb_demo->add_field( array(
216
- 'name' => esc_html__( 'Test Date Picker', 'cmb2' ),
217
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
218
- 'id' => $prefix . 'textdate',
219
- 'type' => 'text_date',
220
- // 'date_format' => 'Y-m-d',
221
- ) );
222
-
223
- $cmb_demo->add_field( array(
224
- 'name' => esc_html__( 'Test Date Picker (UNIX timestamp)', 'cmb2' ),
225
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
226
- 'id' => $prefix . 'textdate_timestamp',
227
- 'type' => 'text_date_timestamp',
228
- // 'timezone_meta_key' => $prefix . 'timezone', // Optionally make this field honor the timezone selected in the select_timezone specified above
229
- ) );
230
-
231
- $cmb_demo->add_field( array(
232
- 'name' => esc_html__( 'Test Date/Time Picker Combo (UNIX timestamp)', 'cmb2' ),
233
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
234
- 'id' => $prefix . 'datetime_timestamp',
235
- 'type' => 'text_datetime_timestamp',
236
- ) );
237
-
238
- // This text_datetime_timestamp_timezone field type
239
- // is only compatible with PHP versions 5.3 or above.
240
- // Feel free to uncomment and use if your server meets the requirement
241
- // $cmb_demo->add_field( array(
242
- // 'name' => esc_html__( 'Test Date/Time Picker/Time zone Combo (serialized DateTime object)', 'cmb2' ),
243
- // 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
244
- // 'id' => $prefix . 'datetime_timestamp_timezone',
245
- // 'type' => 'text_datetime_timestamp_timezone',
246
- // ) );
247
-
248
- $cmb_demo->add_field( array(
249
- 'name' => esc_html__( 'Test Money', 'cmb2' ),
250
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
251
- 'id' => $prefix . 'textmoney',
252
- 'type' => 'text_money',
253
- // 'before_field' => '£', // override '$' symbol if needed
254
- // 'repeatable' => true,
255
- ) );
256
-
257
- $cmb_demo->add_field( array(
258
- 'name' => esc_html__( 'Test Color Picker', 'cmb2' ),
259
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
260
- 'id' => $prefix . 'colorpicker',
261
- 'type' => 'colorpicker',
262
- 'default' => '#ffffff',
263
- // 'attributes' => array(
264
- // 'data-colorpicker' => json_encode( array(
265
- // 'palettes' => array( '#3dd0cc', '#ff834c', '#4fa2c0', '#0bc991', ),
266
- // ) ),
267
- // ),
268
- ) );
269
-
270
- $cmb_demo->add_field( array(
271
- 'name' => esc_html__( 'Test Text Area', 'cmb2' ),
272
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
273
- 'id' => $prefix . 'textarea',
274
- 'type' => 'textarea',
275
- ) );
276
-
277
- $cmb_demo->add_field( array(
278
- 'name' => esc_html__( 'Test Text Area Small', 'cmb2' ),
279
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
280
- 'id' => $prefix . 'textareasmall',
281
- 'type' => 'textarea_small',
282
- ) );
283
-
284
- $cmb_demo->add_field( array(
285
- 'name' => esc_html__( 'Test Text Area for Code', 'cmb2' ),
286
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
287
- 'id' => $prefix . 'textarea_code',
288
- 'type' => 'textarea_code',
289
- ) );
290
-
291
- $cmb_demo->add_field( array(
292
- 'name' => esc_html__( 'Test Title Weeeee', 'cmb2' ),
293
- 'desc' => esc_html__( 'This is a title description', 'cmb2' ),
294
- 'id' => $prefix . 'title',
295
- 'type' => 'title',
296
- ) );
297
-
298
- $cmb_demo->add_field( array(
299
- 'name' => esc_html__( 'Test Select', 'cmb2' ),
300
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
301
- 'id' => $prefix . 'select',
302
- 'type' => 'select',
303
- 'show_option_none' => true,
304
- 'options' => array(
305
- 'standard' => esc_html__( 'Option One', 'cmb2' ),
306
- 'custom' => esc_html__( 'Option Two', 'cmb2' ),
307
- 'none' => esc_html__( 'Option Three', 'cmb2' ),
308
- ),
309
- ) );
310
-
311
- $cmb_demo->add_field( array(
312
- 'name' => esc_html__( 'Test Radio inline', 'cmb2' ),
313
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
314
- 'id' => $prefix . 'radio_inline',
315
- 'type' => 'radio_inline',
316
- 'show_option_none' => 'No Selection',
317
- 'options' => array(
318
- 'standard' => esc_html__( 'Option One', 'cmb2' ),
319
- 'custom' => esc_html__( 'Option Two', 'cmb2' ),
320
- 'none' => esc_html__( 'Option Three', 'cmb2' ),
321
- ),
322
- ) );
323
-
324
- $cmb_demo->add_field( array(
325
- 'name' => esc_html__( 'Test Radio', 'cmb2' ),
326
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
327
- 'id' => $prefix . 'radio',
328
- 'type' => 'radio',
329
- 'options' => array(
330
- 'option1' => esc_html__( 'Option One', 'cmb2' ),
331
- 'option2' => esc_html__( 'Option Two', 'cmb2' ),
332
- 'option3' => esc_html__( 'Option Three', 'cmb2' ),
333
- ),
334
- ) );
335
-
336
- $cmb_demo->add_field( array(
337
- 'name' => esc_html__( 'Test Taxonomy Radio', 'cmb2' ),
338
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
339
- 'id' => $prefix . 'text_taxonomy_radio',
340
- 'type' => 'taxonomy_radio',
341
- 'taxonomy' => 'category', // Taxonomy Slug
342
- // 'inline' => true, // Toggles display to inline
343
- ) );
344
-
345
- $cmb_demo->add_field( array(
346
- 'name' => esc_html__( 'Test Taxonomy Select', 'cmb2' ),
347
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
348
- 'id' => $prefix . 'taxonomy_select',
349
- 'type' => 'taxonomy_select',
350
- 'taxonomy' => 'category', // Taxonomy Slug
351
- ) );
352
-
353
- $cmb_demo->add_field( array(
354
- 'name' => esc_html__( 'Test Taxonomy Multi Checkbox', 'cmb2' ),
355
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
356
- 'id' => $prefix . 'multitaxonomy',
357
- 'type' => 'taxonomy_multicheck',
358
- 'taxonomy' => 'post_tag', // Taxonomy Slug
359
- // 'inline' => true, // Toggles display to inline
360
- ) );
361
-
362
- $cmb_demo->add_field( array(
363
- 'name' => esc_html__( 'Test Checkbox', 'cmb2' ),
364
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
365
- 'id' => $prefix . 'checkbox',
366
- 'type' => 'checkbox',
367
- ) );
368
-
369
- $cmb_demo->add_field( array(
370
- 'name' => esc_html__( 'Test Multi Checkbox', 'cmb2' ),
371
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
372
- 'id' => $prefix . 'multicheckbox',
373
- 'type' => 'multicheck',
374
- // 'multiple' => true, // Store values in individual rows
375
- 'options' => array(
376
- 'check1' => esc_html__( 'Check One', 'cmb2' ),
377
- 'check2' => esc_html__( 'Check Two', 'cmb2' ),
378
- 'check3' => esc_html__( 'Check Three', 'cmb2' ),
379
- ),
380
- // 'inline' => true, // Toggles display to inline
381
- ) );
382
-
383
- $cmb_demo->add_field( array(
384
- 'name' => esc_html__( 'Test wysiwyg', 'cmb2' ),
385
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
386
- 'id' => $prefix . 'wysiwyg',
387
- 'type' => 'wysiwyg',
388
- 'options' => array(
389
- 'textarea_rows' => 5,
390
- ),
391
- ) );
392
-
393
- $cmb_demo->add_field( array(
394
- 'name' => esc_html__( 'Test Image', 'cmb2' ),
395
- 'desc' => esc_html__( 'Upload an image or enter a URL.', 'cmb2' ),
396
- 'id' => $prefix . 'image',
397
- 'type' => 'file',
398
- ) );
399
-
400
- $cmb_demo->add_field( array(
401
- 'name' => esc_html__( 'Multiple Files', 'cmb2' ),
402
- 'desc' => esc_html__( 'Upload or add multiple images/attachments.', 'cmb2' ),
403
- 'id' => $prefix . 'file_list',
404
- 'type' => 'file_list',
405
- 'preview_size' => array( 100, 100 ), // Default: array( 50, 50 )
406
- ) );
407
-
408
- $cmb_demo->add_field( array(
409
- 'name' => esc_html__( 'oEmbed', 'cmb2' ),
410
- 'desc' => sprintf(
411
- /* translators: %s: link to codex.wordpress.org/Embeds */
412
- esc_html__( 'Enter a youtube, twitter, or instagram URL. Supports services listed at %s.', 'cmb2' ),
413
- '<a href="https://codex.wordpress.org/Embeds">codex.wordpress.org/Embeds</a>'
414
- ),
415
- 'id' => $prefix . 'embed',
416
- 'type' => 'oembed',
417
- ) );
418
-
419
- $cmb_demo->add_field( array(
420
- 'name' => 'Testing Field Parameters',
421
- 'id' => $prefix . 'parameters',
422
- 'type' => 'text',
423
- 'before_row' => 'yourprefix_before_row_if_2', // callback.
424
- 'before' => '<p>Testing <b>"before"</b> parameter</p>',
425
- 'before_field' => '<p>Testing <b>"before_field"</b> parameter</p>',
426
- 'after_field' => '<p>Testing <b>"after_field"</b> parameter</p>',
427
- 'after' => '<p>Testing <b>"after"</b> parameter</p>',
428
- 'after_row' => '<p>Testing <b>"after_row"</b> parameter</p>',
429
- ) );
430
-
431
- }
432
-
433
- add_action( 'cmb2_admin_init', 'yourprefix_register_about_page_metabox' );
434
- /**
435
- * Hook in and add a metabox that only appears on the 'About' page
436
- */
437
- function yourprefix_register_about_page_metabox() {
438
- $prefix = 'yourprefix_about_';
439
-
440
- /**
441
- * Metabox to be displayed on a single page ID
442
- */
443
- $cmb_about_page = new_cmb2_box( array(
444
- 'id' => $prefix . 'metabox',
445
- 'title' => esc_html__( 'About Page Metabox', 'cmb2' ),
446
- 'object_types' => array( 'page' ), // Post type
447
- 'context' => 'normal',
448
- 'priority' => 'high',
449
- 'show_names' => true, // Show field names on the left
450
- 'show_on' => array(
451
- 'id' => array( 2 ),
452
- ), // Specific post IDs to display this metabox
453
- ) );
454
-
455
- $cmb_about_page->add_field( array(
456
- 'name' => esc_html__( 'Test Text', 'cmb2' ),
457
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
458
- 'id' => $prefix . 'text',
459
- 'type' => 'text',
460
- ) );
461
-
462
- }
463
-
464
- add_action( 'cmb2_admin_init', 'yourprefix_register_repeatable_group_field_metabox' );
465
- /**
466
- * Hook in and add a metabox to demonstrate repeatable grouped fields
467
- */
468
- function yourprefix_register_repeatable_group_field_metabox() {
469
- $prefix = 'yourprefix_group_';
470
-
471
- /**
472
- * Repeatable Field Groups
473
- */
474
- $cmb_group = new_cmb2_box( array(
475
- 'id' => $prefix . 'metabox',
476
- 'title' => esc_html__( 'Repeating Field Group', 'cmb2' ),
477
- 'object_types' => array( 'page' ),
478
- ) );
479
-
480
- // $group_field_id is the field id string, so in this case: $prefix . 'demo'
481
- $group_field_id = $cmb_group->add_field( array(
482
- 'id' => $prefix . 'demo',
483
- 'type' => 'group',
484
- 'description' => esc_html__( 'Generates reusable form entries', 'cmb2' ),
485
- 'options' => array(
486
- 'group_title' => esc_html__( 'Entry {#}', 'cmb2' ), // {#} gets replaced by row number
487
- 'add_button' => esc_html__( 'Add Another Entry', 'cmb2' ),
488
- 'remove_button' => esc_html__( 'Remove Entry', 'cmb2' ),
489
- 'sortable' => true, // beta
490
- // 'closed' => true, // true to have the groups closed by default
491
- ),
492
- ) );
493
-
494
- /**
495
- * Group fields works the same, except ids only need
496
- * to be unique to the group. Prefix is not needed.
497
- *
498
- * The parent field's id needs to be passed as the first argument.
499
- */
500
- $cmb_group->add_group_field( $group_field_id, array(
501
- 'name' => esc_html__( 'Entry Title', 'cmb2' ),
502
- 'id' => 'title',
503
- 'type' => 'text',
504
- // 'repeatable' => true, // Repeatable fields are supported w/in repeatable groups (for most types)
505
- ) );
506
-
507
- $cmb_group->add_group_field( $group_field_id, array(
508
- 'name' => esc_html__( 'Description', 'cmb2' ),
509
- 'description' => esc_html__( 'Write a short description for this entry', 'cmb2' ),
510
- 'id' => 'description',
511
- 'type' => 'textarea_small',
512
- ) );
513
-
514
- $cmb_group->add_group_field( $group_field_id, array(
515
- 'name' => esc_html__( 'Entry Image', 'cmb2' ),
516
- 'id' => 'image',
517
- 'type' => 'file',
518
- ) );
519
-
520
- $cmb_group->add_group_field( $group_field_id, array(
521
- 'name' => esc_html__( 'Image Caption', 'cmb2' ),
522
- 'id' => 'image_caption',
523
- 'type' => 'text',
524
- ) );
525
-
526
- }
527
-
528
- add_action( 'cmb2_admin_init', 'yourprefix_register_user_profile_metabox' );
529
- /**
530
- * Hook in and add a metabox to add fields to the user profile pages
531
- */
532
- function yourprefix_register_user_profile_metabox() {
533
- $prefix = 'yourprefix_user_';
534
-
535
- /**
536
- * Metabox for the user profile screen
537
- */
538
- $cmb_user = new_cmb2_box( array(
539
- 'id' => $prefix . 'edit',
540
- 'title' => esc_html__( 'User Profile Metabox', 'cmb2' ), // Doesn't output for user boxes
541
- 'object_types' => array( 'user' ), // Tells CMB2 to use user_meta vs post_meta
542
- 'show_names' => true,
543
- 'new_user_section' => 'add-new-user', // where form will show on new user page. 'add-existing-user' is only other valid option.
544
- ) );
545
-
546
- $cmb_user->add_field( array(
547
- 'name' => esc_html__( 'Extra Info', 'cmb2' ),
548
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
549
- 'id' => $prefix . 'extra_info',
550
- 'type' => 'title',
551
- 'on_front' => false,
552
- ) );
553
-
554
- $cmb_user->add_field( array(
555
- 'name' => esc_html__( 'Avatar', 'cmb2' ),
556
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
557
- 'id' => $prefix . 'avatar',
558
- 'type' => 'file',
559
- ) );
560
-
561
- $cmb_user->add_field( array(
562
- 'name' => esc_html__( 'Facebook URL', 'cmb2' ),
563
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
564
- 'id' => $prefix . 'facebookurl',
565
- 'type' => 'text_url',
566
- ) );
567
-
568
- $cmb_user->add_field( array(
569
- 'name' => esc_html__( 'Twitter URL', 'cmb2' ),
570
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
571
- 'id' => $prefix . 'twitterurl',
572
- 'type' => 'text_url',
573
- ) );
574
-
575
- $cmb_user->add_field( array(
576
- 'name' => esc_html__( 'Google+ URL', 'cmb2' ),
577
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
578
- 'id' => $prefix . 'googleplusurl',
579
- 'type' => 'text_url',
580
- ) );
581
-
582
- $cmb_user->add_field( array(
583
- 'name' => esc_html__( 'Linkedin URL', 'cmb2' ),
584
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
585
- 'id' => $prefix . 'linkedinurl',
586
- 'type' => 'text_url',
587
- ) );
588
-
589
- $cmb_user->add_field( array(
590
- 'name' => esc_html__( 'User Field', 'cmb2' ),
591
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
592
- 'id' => $prefix . 'user_text_field',
593
- 'type' => 'text',
594
- ) );
595
-
596
- }
597
-
598
- add_action( 'cmb2_admin_init', 'yourprefix_register_taxonomy_metabox' );
599
- /**
600
- * Hook in and add a metabox to add fields to taxonomy terms
601
- */
602
- function yourprefix_register_taxonomy_metabox() {
603
- $prefix = 'yourprefix_term_';
604
-
605
- /**
606
- * Metabox to add fields to categories and tags
607
- */
608
- $cmb_term = new_cmb2_box( array(
609
- 'id' => $prefix . 'edit',
610
- 'title' => esc_html__( 'Category Metabox', 'cmb2' ), // Doesn't output for term boxes
611
- 'object_types' => array( 'term' ), // Tells CMB2 to use term_meta vs post_meta
612
- 'taxonomies' => array( 'category', 'post_tag' ), // Tells CMB2 which taxonomies should have these fields
613
- // 'new_term_section' => true, // Will display in the "Add New Category" section
614
- ) );
615
-
616
- $cmb_term->add_field( array(
617
- 'name' => esc_html__( 'Extra Info', 'cmb2' ),
618
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
619
- 'id' => $prefix . 'extra_info',
620
- 'type' => 'title',
621
- 'on_front' => false,
622
- ) );
623
-
624
- $cmb_term->add_field( array(
625
- 'name' => esc_html__( 'Term Image', 'cmb2' ),
626
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
627
- 'id' => $prefix . 'avatar',
628
- 'type' => 'file',
629
- ) );
630
-
631
- $cmb_term->add_field( array(
632
- 'name' => esc_html__( 'Arbitrary Term Field', 'cmb2' ),
633
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
634
- 'id' => $prefix . 'term_text_field',
635
- 'type' => 'text',
636
- ) );
637
-
638
- }
639
-
640
- add_action( 'cmb2_admin_init', 'yourprefix_register_theme_options_metabox' );
641
- /**
642
- * Hook in and register a metabox to handle a theme options page and adds a menu item.
643
- */
644
- function yourprefix_register_theme_options_metabox() {
645
-
646
- /**
647
- * Registers options page menu item and form.
648
- */
649
- $cmb_options = new_cmb2_box( array(
650
- 'id' => 'yourprefix_theme_options_page',
651
- 'title' => esc_html__( 'Theme Options', 'cmb2' ),
652
- 'object_types' => array( 'options-page' ),
653
-
654
- /*
655
- * The following parameters are specific to the options-page box
656
- * Several of these parameters are passed along to add_menu_page()/add_submenu_page().
657
- */
658
-
659
- 'option_key' => 'yourprefix_theme_options', // The option key and admin menu page slug.
660
- 'icon_url' => 'dashicons-palmtree', // Menu icon. Only applicable if 'parent_slug' is left empty.
661
- // 'menu_title' => esc_html__( 'Options', 'cmb2' ), // Falls back to 'title' (above).
662
- // 'parent_slug' => 'themes.php', // Make options page a submenu item of the themes menu.
663
- // 'capability' => 'manage_options', // Cap required to view options-page.
664
- // 'position' => 1, // Menu position. Only applicable if 'parent_slug' is left empty.
665
- // 'admin_menu_hook' => 'network_admin_menu', // 'network_admin_menu' to add network-level options page.
666
- // 'display_cb' => false, // Override the options-page form output (CMB2_Hookup::options_page_output()).
667
- // 'save_button' => esc_html__( 'Save Theme Options', 'cmb2' ), // The text for the options-page save button. Defaults to 'Save'.
668
- // 'disable_settings_errors' => true, // On settings pages (not options-general.php sub-pages), allows disabling.
669
- ) );
670
-
671
- /**
672
- * Options fields ids only need
673
- * to be unique within this box.
674
- * Prefix is not needed.
675
- */
676
- $cmb_options->add_field( array(
677
- 'name' => esc_html__( 'Site Background Color', 'cmb2' ),
678
- 'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
679
- 'id' => 'bg_color',
680
- 'type' => 'colorpicker',
681
- 'default' => '#ffffff',
682
- ) );
683
-
684
- }
685
-
686
- /**
687
- * Only show this box in the CMB2 REST API if the user is logged in.
688
- *
689
- * @param bool $is_allowed Whether this box and its fields are allowed to be viewed.
690
- * @param CMB2_REST_Controller $cmb_controller The controller object.
691
- * CMB2 object available via `$cmb_controller->rest_box->cmb`.
692
- *
693
- * @return bool Whether this box and its fields are allowed to be viewed.
694
- */
695
- function yourprefix_limit_rest_view_to_logged_in_users( $is_allowed, $cmb_controller ) {
696
- if ( ! is_user_logged_in() ) {
697
- $is_allowed = false;
698
- }
699
-
700
- return $is_allowed;
701
- }
702
-
703
- add_action( 'cmb2_init', 'yourprefix_register_rest_api_box' );
704
- /**
705
- * Hook in and add a box to be available in the CMB2 REST API. Can only happen on the 'cmb2_init' hook.
706
- * More info: https://github.com/CMB2/CMB2/wiki/REST-API
707
- */
708
- function yourprefix_register_rest_api_box() {
709
- $prefix = 'yourprefix_rest_';
710
-
711
- $cmb_rest = new_cmb2_box( array(
712
- 'id' => $prefix . 'metabox',
713
- 'title' => esc_html__( 'REST Test Box', 'cmb2' ),
714
- 'object_types' => array( 'page' ), // Post type
715
- 'show_in_rest' => WP_REST_Server::ALLMETHODS, // WP_REST_Server::READABLE|WP_REST_Server::EDITABLE, // Determines which HTTP methods the box is visible in.
716
- // Optional callback to limit box visibility.
717
- // See: https://github.com/CMB2/CMB2/wiki/REST-API#permissions
718
- // 'get_box_permissions_check_cb' => 'yourprefix_limit_rest_view_to_logged_in_users',
719
- ) );
720
-
721
- $cmb_rest->add_field( array(
722
- 'name' => esc_html__( 'REST Test Text', 'cmb2' ),
723
- 'desc' => esc_html__( 'Will show in the REST API for this box and for pages.', 'cmb2' ),
724
- 'id' => $prefix . 'text',
725
- 'type' => 'text',
726
- ) );
727
-
728
- $cmb_rest->add_field( array(
729
- 'name' => esc_html__( 'REST Editable Test Text', 'cmb2' ),
730
- 'desc' => esc_html__( 'Will show in REST API "editable" contexts only (`POST` requests).', 'cmb2' ),
731
- 'id' => $prefix . 'editable_text',
732
- 'type' => 'text',
733
- 'show_in_rest' => WP_REST_Server::EDITABLE,// WP_REST_Server::ALLMETHODS|WP_REST_Server::READABLE, // Determines which HTTP methods the field is visible in. Will override the cmb2_box 'show_in_rest' param.
734
- ) );
735
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/images/ico-delete.png DELETED
Binary file
trunk/vendor/webdevstudios/cmb2/images/index.php DELETED
@@ -1,2 +0,0 @@
1
- <?php
2
- // Silence is golden
 
 
trunk/vendor/webdevstudios/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png DELETED
Binary file
trunk/vendor/webdevstudios/cmb2/images/ui-bg_flat_75_ffffff_40x100.png DELETED
Binary file
trunk/vendor/webdevstudios/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png DELETED
Binary file
trunk/vendor/webdevstudios/cmb2/images/ui-bg_glass_65_ffffff_1x400.png DELETED
Binary file
trunk/vendor/webdevstudios/cmb2/images/ui-bg_glass_75_dadada_1x400.png DELETED
Binary file
trunk/vendor/webdevstudios/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png DELETED
Binary file
trunk/vendor/webdevstudios/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png DELETED
Binary file
trunk/vendor/webdevstudios/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png DELETED
Binary file
trunk/vendor/webdevstudios/cmb2/images/ui-icons_222222_256x240.png DELETED
Binary file
trunk/vendor/webdevstudios/cmb2/images/ui-icons_2e83ff_256x240.png DELETED
Binary file
trunk/vendor/webdevstudios/cmb2/images/ui-icons_454545_256x240.png DELETED
Binary file
trunk/vendor/webdevstudios/cmb2/images/ui-icons_888888_256x240.png DELETED
Binary file
trunk/vendor/webdevstudios/cmb2/images/ui-icons_cd0a0a_256x240.png DELETED
Binary file
trunk/vendor/webdevstudios/cmb2/includes/CMB2.php DELETED
@@ -1,1689 +0,0 @@
1
- <?php
2
- /**
3
- * CMB2 - The core metabox object
4
- *
5
- * @category WordPress_Plugin
6
- * @package CMB2
7
- * @author CMB2 team
8
- * @license GPL-2.0+
9
- * @link https://cmb2.io
10
- *
11
- * @property-read string $cmb_id
12
- * @property-read array $meta_box
13
- * @property-read array $updated
14
- * @property-read bool $has_columns
15
- * @property-read array $tax_metaboxes_to_remove
16
- */
17
-
18
- /**
19
- * The main CMB2 object for storing box data/properties.
20
- */
21
- class CMB2 extends CMB2_Base {
22
-
23
- /**
24
- * The object properties name.
25
- *
26
- * @var string
27
- * @since 2.2.3
28
- */
29
- protected $properties_name = 'meta_box';
30
-
31
- /**
32
- * Metabox Config array
33
- *
34
- * @var array
35
- * @since 0.9.0
36
- */
37
- protected $meta_box = array();
38
-
39
- /**
40
- * Type of object registered for metabox. (e.g., post, user, or comment)
41
- *
42
- * @var string
43
- * @since 1.0.0
44
- */
45
- protected $mb_object_type = null;
46
-
47
- /**
48
- * List of fields that are changed/updated on save
49
- *
50
- * @var array
51
- * @since 1.1.0
52
- */
53
- protected $updated = array();
54
-
55
- /**
56
- * Metabox Defaults
57
- *
58
- * @var array
59
- * @since 1.0.1
60
- */
61
- protected $mb_defaults = array(
62
- 'id' => '',
63
- 'title' => '',
64
- // Post type slug, or 'user', 'term', 'comment', or 'options-page'.
65
- 'object_types' => array(),
66
-
67
- /*
68
- * The context within the screen where the boxes should display. Available contexts vary
69
- * from screen to screen. Post edit screen contexts include 'normal', 'side', and 'advanced'.
70
- *
71
- * For placement in locations outside of a metabox, other options include:
72
- * 'form_top', 'before_permalink', 'after_title', 'after_editor'
73
- *
74
- * Comments screen contexts include 'normal' and 'side'. Default is 'normal'.
75
- */
76
- 'context' => 'normal',
77
- 'priority' => 'high',
78
- 'show_names' => true, // Show field names on the left.
79
- 'show_on_cb' => null, // Callback to determine if metabox should display.
80
- 'show_on' => array(), // Post IDs or page templates to display this metabox. overrides 'show_on_cb'.
81
- 'cmb_styles' => true, // Include CMB2 stylesheet.
82
- 'enqueue_js' => true, // Include CMB2 JS.
83
- 'fields' => array(),
84
-
85
- /*
86
- * Handles hooking CMB2 forms/metaboxes into the post/attachement/user/options-page screens
87
- * and handles hooking in and saving those fields.
88
- */
89
- 'hookup' => true,
90
- 'save_fields' => true, // Will not save during hookup if false.
91
- 'closed' => false, // Default metabox to being closed.
92
- 'taxonomies' => array(),
93
- 'new_user_section' => 'add-new-user', // or 'add-existing-user'.
94
- 'new_term_section' => true,
95
- 'show_in_rest' => false,
96
- 'classes' => null, // Optionally add classes to the CMB2 wrapper
97
- 'classes_cb' => '', // Optionally add classes to the CMB2 wrapper (via a callback)
98
-
99
- /*
100
- * The following parameter is for post alternate-context metaboxes only.
101
- *
102
- * To output the fields 'naked' (without a postbox wrapper/style), then
103
- * add a `'remove_box_wrap' => true` to your metabox registration array.
104
- */
105
- 'remove_box_wrap' => false,
106
-
107
- /*
108
- * The following parameters are for options-page metaboxes,
109
- * and several are passed along to add_menu_page()/add_submenu_page()
110
- */
111
-
112
- // 'menu_title' => null, // Falls back to 'title' (above). Do not define here so we can set a fallback.
113
- 'option_key' => '', // The actual option key and admin menu page slug.
114
- 'parent_slug' => '', // Used as first param in add_submenu_page().
115
- 'capability' => 'manage_options', // Cap required to view options-page.
116
- 'icon_url' => '', // Menu icon. Only applicable if 'parent_slug' is left empty.
117
- 'position' => null, // Menu position. Only applicable if 'parent_slug' is left empty.
118
-
119
- 'admin_menu_hook' => 'admin_menu', // Alternately 'network_admin_menu' to add network-level options page.
120
- 'display_cb' => false, // Override the options-page form output (CMB2_Hookup::options_page_output()).
121
- 'save_button' => '', // The text for the options-page save button. Defaults to 'Save'.
122
- 'disable_settings_errors' => false, // On settings pages (not options-general.php sub-pages), allows disabling.
123
- );
124
-
125
- /**
126
- * Metabox field objects
127
- *
128
- * @var array
129
- * @since 2.0.3
130
- */
131
- protected $fields = array();
132
-
133
- /**
134
- * An array of hidden fields to output at the end of the form
135
- *
136
- * @var array
137
- * @since 2.0.0
138
- */
139
- protected $hidden_fields = array();
140
-
141
- /**
142
- * Array of key => value data for saving. Likely $_POST data.
143
- *
144
- * @var string
145
- * @since 2.0.0
146
- */
147
- protected $generated_nonce = '';
148
-
149
- /**
150
- * Whether there are fields to be shown in columns. Set in CMB2::add_field().
151
- *
152
- * @var bool
153
- * @since 2.2.2
154
- */
155
- protected $has_columns = false;
156
-
157
- /**
158
- * If taxonomy field is requesting to remove_default, we store the taxonomy here.
159
- *
160
- * @var array
161
- * @since 2.2.3
162
- */
163
- protected $tax_metaboxes_to_remove = array();
164
-
165
- /**
166
- * Get started
167
- *
168
- * @since 0.4.0
169
- * @param array $config Metabox config array.
170
- * @param integer $object_id Optional object id.
171
- */
172
- public function __construct( $config, $object_id = 0 ) {
173
-
174
- if ( empty( $config['id'] ) ) {
175
- wp_die( esc_html__( 'Metabox configuration is required to have an ID parameter.', 'cmb2' ) );
176
- }
177
-
178
- $this->cmb_id = $config['id'];
179
- $this->meta_box = wp_parse_args( $config, $this->mb_defaults );
180
- $this->meta_box['fields'] = array();
181
-
182
- // Ensures object_types is an array.
183
- $this->set_prop( 'object_types', $this->box_types() ) ;
184
- $this->object_id( $object_id );
185
-
186
- if ( $this->is_options_page_mb() ) {
187
- $this->init_options_mb();
188
- }
189
-
190
- $this->mb_object_type();
191
-
192
- if ( ! empty( $config['fields'] ) && is_array( $config['fields'] ) ) {
193
- $this->add_fields( $config['fields'] );
194
- }
195
-
196
- CMB2_Boxes::add( $this );
197
-
198
- /**
199
- * Hook during initiation of CMB2 object
200
- *
201
- * The dynamic portion of the hook name, $this->cmb_id, is this meta_box id.
202
- *
203
- * @param array $cmb This CMB2 object
204
- */
205
- do_action( "cmb2_init_{$this->cmb_id}", $this );
206
-
207
- // Hook in the hookup... how meta.
208
- add_action( "cmb2_init_hookup_{$this->cmb_id}", array( 'CMB2_hookup', 'maybe_init_and_hookup' ) );
209
-
210
- // Hook in the rest api functionality.
211
- add_action( "cmb2_init_hookup_{$this->cmb_id}", array( 'CMB2_REST', 'maybe_init_and_hookup' ) );
212
- }
213
-
214
- /**
215
- * Loops through and displays fields
216
- *
217
- * @since 1.0.0
218
- * @param int $object_id Object ID.
219
- * @param string $object_type Type of object being saved. (e.g., post, user, or comment).
220
- *
221
- * @return CMB2
222
- */
223
- public function show_form( $object_id = 0, $object_type = '' ) {
224
- $this->render_form_open( $object_id, $object_type );
225
-
226
- foreach ( $this->prop( 'fields' ) as $field_args ) {
227
- $this->render_field( $field_args );
228
- }
229
-
230
- return $this->render_form_close( $object_id, $object_type );
231
- }
232
-
233
- /**
234
- * Outputs the opening form markup and runs corresponding hooks:
235
- * 'cmb2_before_form' and "cmb2_before_{$object_type}_form_{$this->cmb_id}"
236
- *
237
- * @since 2.2.0
238
- * @param integer $object_id Object ID.
239
- * @param string $object_type Object type.
240
- *
241
- * @return CMB2
242
- */
243
- public function render_form_open( $object_id = 0, $object_type = '' ) {
244
- $object_type = $this->object_type( $object_type );
245
- $object_id = $this->object_id( $object_id );
246
-
247
- echo "\n<!-- Begin CMB2 Fields -->\n";
248
-
249
- $this->nonce_field();
250
-
251
- /**
252
- * Hook before form table begins
253
- *
254
- * @param array $cmb_id The current box ID.
255
- * @param int $object_id The ID of the current object.
256
- * @param string $object_type The type of object you are working with.
257
- * Usually `post` (this applies to all post-types).
258
- * Could also be `comment`, `user` or `options-page`.
259
- * @param array $cmb This CMB2 object.
260
- */
261
- do_action( 'cmb2_before_form', $this->cmb_id, $object_id, $object_type, $this );
262
-
263
- /**
264
- * Hook before form table begins
265
- *
266
- * The first dynamic portion of the hook name, $object_type, is the type of object
267
- * you are working with. Usually `post` (this applies to all post-types).
268
- * Could also be `comment`, `user` or `options-page`.
269
- *
270
- * The second dynamic portion of the hook name, $this->cmb_id, is the meta_box id.
271
- *
272
- * @param array $cmb_id The current box ID
273
- * @param int $object_id The ID of the current object
274
- * @param array $cmb This CMB2 object
275
- */
276
- do_action( "cmb2_before_{$object_type}_form_{$this->cmb_id}", $object_id, $this );
277
-
278
- echo '<div class="', esc_attr( $this->box_classes() ), '"><div id="cmb2-metabox-', sanitize_html_class( $this->cmb_id ), '" class="cmb2-metabox cmb-field-list">';
279
-
280
- return $this;
281
- }
282
-
283
- /**
284
- * Defines the classes for the CMB2 form/wrap.
285
- *
286
- * @since 2.0.0
287
- * @return string Space concatenated list of classes
288
- */
289
- public function box_classes() {
290
-
291
- $classes = array( 'cmb2-wrap', 'form-table' );
292
-
293
- // Use the callback to fetch classes.
294
- if ( $added_classes = $this->get_param_callback_result( 'classes_cb' ) ) {
295
- $added_classes = is_array( $added_classes ) ? $added_classes : array( $added_classes );
296
- $classes = array_merge( $classes, $added_classes );
297
- }
298
-
299
- if ( $added_classes = $this->prop( 'classes' ) ) {
300
- $added_classes = is_array( $added_classes ) ? $added_classes : array( $added_classes );
301
- $classes = array_merge( $classes, $added_classes );
302
- }
303
-
304
- /**
305
- * Add our context classes for non-standard metaboxes.
306
- *
307
- * @since 2.2.4
308
- */
309
- if ( $this->is_alternate_context_box() ) {
310
-
311
- // Include custom class if requesting no title.
312
- if ( ! $this->prop( 'title' ) && ! $this->prop( 'remove_box_wrap' ) ) {
313
- $context[] = 'cmb2-context-wrap-no-title';
314
- }
315
-
316
- // Include a generic context wrapper.
317
- $context[] = 'cmb2-context-wrap';
318
-
319
- // Include a context-type based context wrapper.
320
- $context[] = 'cmb2-context-wrap-' . $this->prop( 'context' );
321
-
322
- // Include an ID based context wrapper as well.
323
- $context[] = 'cmb2-context-wrap-' . $this->prop( 'id' );
324
-
325
- // And merge all the classes back into the array.
326
- $classes = array_merge( $classes, $context );
327
- }
328
-
329
- /**
330
- * Globally filter box wrap classes
331
- *
332
- * @since 2.2.2
333
- *
334
- * @param string $classes Array of classes for the cmb2-wrap.
335
- * @param CMB2 $cmb This CMB2 object.
336
- */
337
- $classes = apply_filters( 'cmb2_wrap_classes', $classes, $this );
338
-
339
- // Clean up.
340
- $classes = array_map( 'strip_tags', array_filter( $classes ) );
341
-
342
- // Remove any duplicates.
343
- $classes = array_unique( $classes );
344
-
345
- // Make a string.
346
- return implode( ' ', $classes );
347
- }
348
-
349
- /**
350
- * Outputs the closing form markup and runs corresponding hooks:
351
- * 'cmb2_after_form' and "cmb2_after_{$object_type}_form_{$this->cmb_id}"
352
- *
353
- * @since 2.2.0
354
- * @param integer $object_id Object ID.
355
- * @param string $object_type Object type.
356
- *
357
- * @return CMB2
358
- */
359
- public function render_form_close( $object_id = 0, $object_type = '' ) {
360
- $object_type = $this->object_type( $object_type );
361
- $object_id = $this->object_id( $object_id );
362
-
363
- echo '</div></div>';
364
-
365
- $this->render_hidden_fields();
366
-
367
- /**
368
- * Hook after form form has been rendered
369
- *
370
- * The dynamic portion of the hook name, $this->cmb_id, is the meta_box id.
371
- *
372
- * The first dynamic portion of the hook name, $object_type, is the type of object
373
- * you are working with. Usually `post` (this applies to all post-types).
374
- * Could also be `comment`, `user` or `options-page`.
375
- *
376
- * @param int $object_id The ID of the current object
377
- * @param array $cmb This CMB2 object
378
- */
379
- do_action( "cmb2_after_{$object_type}_form_{$this->cmb_id}", $object_id, $this );
380
-
381
- /**
382
- * Hook after form form has been rendered
383
- *
384
- * @param array $cmb_id The current box ID.
385
- * @param int $object_id The ID of the current object.
386
- * @param string $object_type The type of object you are working with.
387
- * Usually `post` (this applies to all post-types).
388
- * Could also be `comment`, `user` or `options-page`.
389
- * @param array $cmb This CMB2 object.
390
- */
391
- do_action( 'cmb2_after_form', $this->cmb_id, $object_id, $object_type, $this );
392
-
393
- echo "\n<!-- End CMB2 Fields -->\n";
394
-
395
- return $this;
396
- }
397
-
398
- /**
399
- * Renders a field based on the field type
400
- *
401
- * @since 2.2.0
402
- * @param array $field_args A field configuration array.
403
- * @return mixed CMB2_Field object if successful.
404
- */
405
- public function render_field( $field_args ) {
406
- $field_args['context'] = $this->prop( 'context' );
407
-
408
- if ( 'group' === $field_args['type'] ) {
409
-
410
- if ( ! isset( $field_args['show_names'] ) ) {
411
- $field_args['show_names'] = $this->prop( 'show_names' );
412
- }
413
- $field = $this->render_group( $field_args );
414
-
415
- } elseif ( 'hidden' === $field_args['type'] && $this->get_field( $field_args )->should_show() ) {
416
- // Save rendering for after the metabox.
417
- $field = $this->add_hidden_field( $field_args );
418
-
419
- } else {
420
-
421
- $field_args['show_names'] = $this->prop( 'show_names' );
422
-
423
- // Render default fields.
424
- $field = $this->get_field( $field_args )->render_field();
425
- }
426
-
427
- return $field;
428
- }
429
-
430
- /**
431
- * Render a repeatable group.
432
- *
433
- * @param array $args Array of field arguments for a group field parent.
434
- * @return CMB2_Field|null Group field object.
435
- */
436
- public function render_group( $args ) {
437
-
438
- if ( ! isset( $args['id'], $args['fields'] ) || ! is_array( $args['fields'] ) ) {
439
- return;
440
- }
441
-
442
- $field_group = $this->get_field( $args );
443
-
444
- // If field is requesting to be conditionally shown.
445
- if ( ! $field_group || ! $field_group->should_show() ) {
446
- return;
447
- }
448
-
449
- $desc = $field_group->args( 'description' );
450
- $label = $field_group->args( 'name' );
451
- $group_val = (array) $field_group->value();
452
- $field_group->index = 0;
453
-
454
- $field_group->peform_param_callback( 'before_group' );
455
-
456
- echo '<div class="cmb-row cmb-repeat-group-wrap ', esc_attr( $field_group->row_classes() ), '" data-fieldtype="group"><div class="cmb-td"><div data-groupid="', esc_attr( $field_group->id() ), '" id="', esc_attr( $field_group->id() ), '_repeat" ', $this->group_wrap_attributes( $field_group ), '>';
457
-
458
- if ( $desc || $label ) {
459
- $class = $desc ? ' cmb-group-description' : '';
460
- echo '<div class="cmb-row', $class, '"><div class="cmb-th">';
461
- if ( $label ) {
462
- echo '<h2 class="cmb-group-name">', $label, '</h2>';
463
- }
464
- if ( $desc ) {
465
- echo '<p class="cmb2-metabox-description">', $desc, '</p>';
466
- }
467
- echo '</div></div>';
468
- }
469
-
470
- if ( ! empty( $group_val ) ) {
471
- foreach ( $group_val as $group_key => $field_id ) {
472
- $this->render_group_row( $field_group );
473
- $field_group->index++;
474
- }
475
- } else {
476
- $this->render_group_row( $field_group );
477
- }
478
-
479
- if ( $field_group->args( 'repeatable' ) ) {
480
- echo '<div class="cmb-row"><div class="cmb-td"><p class="cmb-add-row"><button type="button" data-selector="', esc_attr( $field_group->id() ), '_repeat" data-grouptitle="', esc_attr( $field_group->options( 'group_title' ) ), '" class="cmb-add-group-row button-secondary">', $field_group->options( 'add_button' ), '</button></p></div></div>';
481
- }
482
-
483
- echo '</div></div></div>';
484
-
485
- $field_group->peform_param_callback( 'after_group' );
486
-
487
- return $field_group;
488
- }
489
-
490
- /**
491
- * Get the group wrap attributes, which are passed through a filter.
492
- *
493
- * @since 2.2.3
494
- * @param CMB2_Field $field_group The group CMB2_Field object.
495
- * @return string The attributes string.
496
- */
497
- public function group_wrap_attributes( $field_group ) {
498
- $classes = 'cmb-nested cmb-field-list cmb-repeatable-group';
499
- $classes .= $field_group->options( 'sortable' ) ? ' sortable' : ' non-sortable';
500
- $classes .= $field_group->args( 'repeatable' ) ? ' repeatable' : ' non-repeatable';
501
-
502
- $group_wrap_attributes = array(
503
- 'class' => $classes,
504
- 'style' => 'width:100%;',
505
- );
506
-
507
- /**
508
- * Allow for adding additional HTML attributes to a group wrapper.
509
- *
510
- * The attributes will be an array of key => value pairs for each attribute.
511
- *
512
- * @since 2.2.2
513
- *
514
- * @param string $group_wrap_attributes Current attributes array.
515
- *
516
- * @param CMB2_Field $field_group The group CMB2_Field object.
517
- */
518
- $group_wrap_attributes = apply_filters( 'cmb2_group_wrap_attributes', $group_wrap_attributes, $field_group );
519
-
520
- $atts = array();
521
- foreach ( $group_wrap_attributes as $att => $att_value ) {
522
- if ( ! CMB2_Utils::is_data_attribute( $att ) ) {
523
- $att_value = htmlspecialchars( $att_value );
524
- }
525
-
526
- $atts[ sanitize_html_class( $att ) ] = sanitize_text_field( strip_tags( $att_value ) );
527
- }
528
-
529
- return CMB2_Utils::concat_attrs( $atts );
530
- }
531
-
532
- /**
533
- * Render a repeatable group row
534
- *
535
- * @since 1.0.2
536
- * @param CMB2_Field $field_group CMB2_Field group field object.
537
- *
538
- * @return CMB2
539
- */
540
- public function render_group_row( $field_group ) {
541
-
542
- $field_group->peform_param_callback( 'before_group_row' );
543
- $closed_class = $field_group->options( 'closed' ) ? ' closed' : '';
544
-
545
- echo '
546
- <div class="postbox cmb-row cmb-repeatable-grouping', $closed_class, '" data-iterator="', $field_group->index, '">';
547
-
548
- if ( $field_group->args( 'repeatable' ) ) {
549
- echo '<button type="button" data-selector="', $field_group->id(), '_repeat" class="dashicons-before dashicons-no-alt cmb-remove-group-row" title="', esc_attr( $field_group->options( 'remove_button' ) ), '"></button>';
550
- }
551
-
552
- echo '
553
- <div class="cmbhandle" title="' , esc_attr__( 'Click to toggle', 'cmb2' ), '"><br></div>
554
- <h3 class="cmb-group-title cmbhandle-title"><span>', $field_group->replace_hash( $field_group->options( 'group_title' ) ), '</span></h3>
555
-
556
- <div class="inside cmb-td cmb-nested cmb-field-list">';
557
- // Loop and render repeatable group fields.
558
- foreach ( array_values( $field_group->args( 'fields' ) ) as $field_args ) {
559
- if ( 'hidden' === $field_args['type'] ) {
560
-
561
- // Save rendering for after the metabox.
562
- $this->add_hidden_field( $field_args, $field_group );
563
-
564
- } else {
565
-
566
- $field_args['show_names'] = $field_group->args( 'show_names' );
567
- $field_args['context'] = $field_group->args( 'context' );
568
-
569
- $field = $this->get_field( $field_args, $field_group )->render_field();
570
- }
571
- }
572
- if ( $field_group->args( 'repeatable' ) ) {
573
- echo '
574
- <div class="cmb-row cmb-remove-field-row">
575
- <div class="cmb-remove-row">
576
- <button type="button" data-selector="', $field_group->id(), '_repeat" class="cmb-remove-group-row cmb-remove-group-row-button alignright button-secondary">', $field_group->options( 'remove_button' ), '</button>
577
- </div>
578
- </div>
579
- ';
580
- }
581
- echo '
582
- </div>
583
- </div>
584
- ';
585
-
586
- $field_group->peform_param_callback( 'after_group_row' );
587
-
588
- return $this;
589
- }
590
-
591
- /**
592
- * Add a hidden field to the list of hidden fields to be rendered later
593
- *
594
- * @since 2.0.0
595
- * @param array $field_args Array of field arguments to be passed to CMB2_Field.
596
- * @param CMB2_Field|null $field_group CMB2_Field group field object.
597
- */
598
- public function add_hidden_field( $field_args, $field_group = null ) {
599
- if ( isset( $field_args['field_args'] ) ) {
600
- // For back-compatibility.
601
- $field = new CMB2_Field( $field_args );
602
- } else {
603
- $field = $this->get_new_field( $field_args, $field_group );
604
- }
605
-
606
- $types = new CMB2_Types( $field );
607
-
608
- if ( $field_group ) {
609
- $types->iterator = $field_group->index;
610
- }
611
-
612
- $this->hidden_fields[] = $types;
613
-
614
- return $field;
615
- }
616
-
617
- /**
618
- * Loop through and output hidden fields
619
- *
620
- * @since 2.0.0
621
- *
622
- * @return CMB2
623
- */
624
- public function render_hidden_fields() {
625
- if ( ! empty( $this->hidden_fields ) ) {
626
- foreach ( $this->hidden_fields as $hidden ) {
627
- $hidden->render();
628
- }
629
- }
630
-
631
- return $this;
632
- }
633
-
634
- /**
635
- * Returns array of sanitized field values (without saving them)
636
- *
637
- * @since 2.0.3
638
- * @param array $data_to_sanitize Array of field_id => value data for sanitizing (likely $_POST data).
639
- */
640
- public function get_sanitized_values( array $data_to_sanitize ) {
641
- $this->data_to_save = $data_to_sanitize;
642
- $stored_id = $this->object_id();
643
-
644
- // We do this So CMB will sanitize our data for us, but not save it.
645
- $this->object_id( '_' );
646
-
647
- // Ensure temp. data store is empty.
648
- cmb2_options( 0 )->set();
649
-
650
- // We want to get any taxonomy values back.
651
- add_filter( "cmb2_return_taxonomy_values_{$this->cmb_id}", '__return_true' );
652
-
653
- // Process/save fields.
654
- $this->process_fields();
655
-
656
- // Put things back the way they were.
657
- remove_filter( "cmb2_return_taxonomy_values_{$this->cmb_id}", '__return_true' );
658
-
659
- // Get data from temp. data store.
660
- $sanitized_values = cmb2_options( 0 )->get_options();
661
-
662
- // Empty out temp. data store again.
663
- cmb2_options( 0 )->set();
664
-
665
- // Reset the object id.
666
- $this->object_id( $stored_id );
667
-
668
- return $sanitized_values;
669
- }
670
-
671
- /**
672
- * Loops through and saves field data
673
- *
674
- * @since 1.0.0
675
- * @param int $object_id Object ID.
676
- * @param string $object_type Type of object being saved. (e.g., post, user, or comment).
677
- * @param array $data_to_save Array of key => value data for saving. Likely $_POST data.
678
- *
679
- * @return CMB2
680
- */
681
- public function save_fields( $object_id = 0, $object_type = '', $data_to_save = array() ) {
682
-
683
- // Fall-back to $_POST data.
684
- $this->data_to_save = ! empty( $data_to_save ) ? $data_to_save : $_POST;
685
- $object_id = $this->object_id( $object_id );
686
- $object_type = $this->object_type( $object_type );
687
-
688
- $this->process_fields();
689
-
690
- // If options page, save the updated options.
691
- if ( 'options-page' === $object_type ) {
692
- cmb2_options( $object_id )->set();
693
- }
694
-
695
- return $this->after_save();
696
- }
697
-
698
- /**
699
- * Process and save form fields
700
- *
701
- * @since 2.0.0
702
- *
703
- * @return CMB2
704
- */
705
- public function process_fields() {
706
-
707
- $this->pre_process();
708
-
709
- // Remove the show_on properties so saving works.
710
- $this->prop( 'show_on', array() );
711
-
712
- // save field ids of those that are updated.
713
- $this->updated = array();
714
-
715
- foreach ( $this->prop( 'fields' ) as $field_args ) {
716
- $this->process_field( $field_args );
717
- }
718
-
719
- return $this;
720
- }
721
-
722
- /**
723
- * Process and save a field
724
- *
725
- * @since 2.0.0
726
- * @param array $field_args Array of field arguments.
727
- *
728
- * @return CMB2
729
- */
730
- public function process_field( $field_args ) {
731
-
732
- switch ( $field_args['type'] ) {
733
-
734
- case 'group':
735
- if ( $this->save_group( $field_args ) ) {
736
- $this->updated[] = $field_args['id'];
737
- }
738
-
739
- break;
740
-
741
- case 'title':
742
- // Don't process title fields.
743
- break;
744
-
745
- default:
746
-
747
- $field = $this->get_new_field( $field_args );
748
-
749
- if ( $field->save_field_from_data( $this->data_to_save ) ) {
750
- $this->updated[] = $field->id();
751
- }
752
-
753
- break;
754
- }
755
-
756
- return $this;
757
- }
758
-
759
- /**
760
- * Fires the "cmb2_{$object_type}_process_fields_{$cmb_id}" action hook.
761
- *
762
- * @since 2.x.x
763
- *
764
- * @return CMB2
765
- */
766
- public function pre_process() {
767
- /**
768
- * Fires before fields have been processed/saved.
769
- *
770
- * The dynamic portion of the hook name, $this->cmb_id, is the meta_box id.
771
- *
772
- * The dynamic portion of the hook name, $object_type, refers to the metabox/form's object type
773
- * Usually `post` (this applies to all post-types).
774
- * Could also be `comment`, `user` or `options-page`.
775
- *
776
- * @param array $cmb This CMB2 object
777
- * @param int $object_id The ID of the current object
778
- */
779
- do_action( "cmb2_{$this->object_type()}_process_fields_{$this->cmb_id}", $this, $this->object_id() );
780
-
781
- return $this;
782
- }
783
-
784
- /**
785
- * Fires the "cmb2_save_{$object_type}_fields" and
786
- * "cmb2_save_{$object_type}_fields_{$cmb_id}" action hooks.
787
- *
788
- * @since 2.x.x
789
- *
790
- * @return CMB2
791
- */
792
- public function after_save() {
793
- $object_type = $this->object_type();
794
- $object_id = $this->object_id();
795
-
796
- /**
797
- * Fires after all fields have been saved.
798
- *
799
- * The dynamic portion of the hook name, $object_type, refers to the metabox/form's object type
800
- * Usually `post` (this applies to all post-types).
801
- * Could also be `comment`, `user` or `options-page`.
802
- *
803
- * @param int $object_id The ID of the current object
804
- * @param array $cmb_id The current box ID
805
- * @param string $updated Array of field ids that were updated.
806
- * Will only include field ids that had values change.
807
- * @param array $cmb This CMB2 object
808
- */
809
- do_action( "cmb2_save_{$object_type}_fields", $object_id, $this->cmb_id, $this->updated, $this );
810
-
811
- /**
812
- * Fires after all fields have been saved.
813
- *
814
- * The dynamic portion of the hook name, $this->cmb_id, is the meta_box id.
815
- *
816
- * The dynamic portion of the hook name, $object_type, refers to the metabox/form's object type
817
- * Usually `post` (this applies to all post-types).
818
- * Could also be `comment`, `user` or `options-page`.
819
- *
820
- * @param int $object_id The ID of the current object
821
- * @param string $updated Array of field ids that were updated.
822
- * Will only include field ids that had values change.
823
- * @param array $cmb This CMB2 object
824
- */
825
- do_action( "cmb2_save_{$object_type}_fields_{$this->cmb_id}", $object_id, $this->updated, $this );
826
-
827
- return $this;
828
- }
829
-
830
- /**
831
- * Save a repeatable group
832
- *
833
- * @since 1.x.x
834
- * @param array $args Field arguments array.
835
- * @return mixed Return of CMB2_Field::update_data().
836
- */
837
- public function save_group( $args ) {
838
- if ( ! isset( $args['id'], $args['fields'] ) || ! is_array( $args['fields'] ) ) {
839
- return;
840
- }
841
-
842
- return $this->save_group_field( $this->get_new_field( $args ) );
843
- }
844
-
845
- /**
846
- * Save a repeatable group
847
- *
848
- * @since 1.x.x
849
- * @param CMB2_Field $field_group CMB2_Field group field object.
850
- * @return mixed Return of CMB2_Field::update_data().
851
- */
852
- public function save_group_field( $field_group ) {
853
- $base_id = $field_group->id();
854
-
855
- if ( ! isset( $this->data_to_save[ $base_id ] ) ) {
856
- return;
857
- }
858
-
859
- $old = $field_group->get_data();
860
- // Check if group field has sanitization_cb.
861
- $group_vals = $field_group->sanitization_cb( $this->data_to_save[ $base_id ] );
862
- $saved = array();
863
-
864
- $field_group->index = 0;
865
- $field_group->data_to_save = $this->data_to_save;
866
-
867
- foreach ( array_values( $field_group->fields() ) as $field_args ) {
868
- if ( 'title' === $field_args['type'] ) {
869
- // Don't process title fields.
870
- continue;
871
- }
872
-
873
- $field = $this->get_new_field( $field_args, $field_group );
874
- $sub_id = $field->id( true );
875
-
876
- foreach ( (array) $group_vals as $field_group->index => $post_vals ) {
877
-
878
- // Get value.
879
- $new_val = isset( $group_vals[ $field_group->index ][ $sub_id ] )
880
- ? $group_vals[ $field_group->index ][ $sub_id ]
881
- : false;
882
-
883
- // Sanitize.
884
- $new_val = $field->sanitization_cb( $new_val );
885
-
886
- if ( is_array( $new_val ) && $field->args( 'has_supporting_data' ) ) {
887
- if ( $field->args( 'repeatable' ) ) {
888
- $_new_val = array();
889
- foreach ( $new_val as $group_index => $grouped_data ) {
890
- // Add the supporting data to the $saved array stack.
891
- $saved[ $field_group->index ][ $grouped_data['supporting_field_id'] ][] = $grouped_data['supporting_field_value'];
892
- // Reset var to the actual value.
893
- $_new_val[ $group_index ] = $grouped_data['value'];
894
- }
895
- $new_val = $_new_val;
896
- } else {
897
- // Add the supporting data to the $saved array stack.
898
- $saved[ $field_group->index ][ $new_val['supporting_field_id'] ] = $new_val['supporting_field_value'];
899
- // Reset var to the actual value.
900
- $new_val = $new_val['value'];
901
- }
902
- }
903
-
904
- // Get old value.
905
- $old_val = is_array( $old ) && isset( $old[ $field_group->index ][ $sub_id ] )
906
- ? $old[ $field_group->index ][ $sub_id ]
907
- : false;
908
-
909
- $is_updated = ( ! CMB2_Utils::isempty( $new_val ) && $new_val !== $old_val );
910
- $is_removed = ( CMB2_Utils::isempty( $new_val ) && ! CMB2_Utils::isempty( $old_val ) );
911
-
912
- // Compare values and add to `$updated` array.
913
- if ( $is_updated || $is_removed ) {
914
- $this->updated[] = $base_id . '::' . $field_group->index . '::' . $sub_id;
915
- }
916
-
917
- // Add to `$saved` array.
918
- $saved[ $field_group->index ][ $sub_id ] = $new_val;
919
-
920
- }// End foreach().
921
-
922
- $saved[ $field_group->index ] = CMB2_Utils::filter_empty( $saved[ $field_group->index ] );
923
- }// End foreach().
924
-
925
- $saved = CMB2_Utils::filter_empty( $saved );
926
-
927
- return $field_group->update_data( $saved, true );
928
- }
929
-
930
- /**
931
- * Get object id from global space if no id is provided
932
- *
933
- * @since 1.0.0
934
- * @param integer $object_id Object ID.
935
- * @return integer $object_id Object ID.
936
- */
937
- public function object_id( $object_id = 0 ) {
938
- global $pagenow;
939
-
940
- if ( $object_id ) {
941
- $this->object_id = $object_id;
942
- return $this->object_id;
943
- }
944
-
945
- if ( $this->object_id ) {
946
- return $this->object_id;
947
- }
948
-
949
- // Try to get our object ID from the global space.
950
- switch ( $this->object_type() ) {
951
- case 'user':
952
- $object_id = isset( $_REQUEST['user_id'] ) ? wp_unslash( $_REQUEST['user_id'] ) : $object_id;
953
- $object_id = ! $object_id && 'user-new.php' !== $pagenow && isset( $GLOBALS['user_ID'] ) ? $GLOBALS['user_ID'] : $object_id;
954
- break;
955
-
956
- case 'comment':
957
- $object_id = isset( $_REQUEST['c'] ) ? wp_unslash( $_REQUEST['c'] ) : $object_id;
958
- $object_id = ! $object_id && isset( $GLOBALS['comments']->comment_ID ) ? $GLOBALS['comments']->comment_ID : $object_id;
959
- break;
960
-
961
- case 'term':
962
- $object_id = isset( $_REQUEST['tag_ID'] ) ? wp_unslash( $_REQUEST['tag_ID'] ) : $object_id;
963
- break;
964
-
965
- case 'options-page':
966
- $key = $this->doing_options_page();
967
- if ( ! empty( $key ) ) {
968
- $object_id = $key;
969
- }
970
- break;
971
-
972
- default:
973
- $object_id = isset( $GLOBALS['post']->ID ) ? $GLOBALS['post']->ID : $object_id;
974
- $object_id = isset( $_REQUEST['post'] ) ? wp_unslash( $_REQUEST['post'] ) : $object_id;
975
- break;
976
- }
977
-
978
- // reset to id or 0.
979
- $this->object_id = $object_id ? $object_id : 0;
980
-
981
- return $this->object_id;
982
- }
983
-
984
- /**
985
- * Sets the $object_type based on metabox settings
986
- *
987
- * @since 1.0.0
988
- * @return string Object type.
989
- */
990
- public function mb_object_type() {
991
- if ( null !== $this->mb_object_type ) {
992
- return $this->mb_object_type;
993
- }
994
-
995
- if ( $this->is_options_page_mb() ) {
996
- $this->mb_object_type = 'options-page';
997
- return $this->mb_object_type;
998
- }
999
-
1000
- $registered_types = $this->box_types();
1001
-
1002
- $type = '';
1003
-
1004
- // if it's an array of one, extract it.
1005
- if ( 1 === count( $registered_types ) ) {
1006
- $last = end( $registered_types );
1007
- if ( is_string( $last ) ) {
1008
- $type = $last;
1009
- }
1010
- } elseif ( ( $curr_type = $this->current_object_type() ) && in_array( $curr_type, $registered_types, true ) ) {
1011
- $type = $curr_type;
1012
- }
1013
-
1014
- // Get our object type.
1015
- switch ( $type ) {
1016
-
1017
- case 'user':
1018
- case 'comment':
1019
- case 'term':
1020
- $this->mb_object_type = $type;
1021
- break;
1022
-
1023
- default:
1024
- $this->mb_object_type = 'post';
1025
- break;
1026
- }
1027
-
1028
- return $this->mb_object_type;
1029
- }
1030
-
1031
- /**
1032
- * Gets the box 'object_types' array based on box settings.
1033
- *
1034
- * @since 2.2.3
1035
- * @param array $fallback Fallback value.
1036
- *
1037
- * @return array Object types.
1038
- */
1039
- public function box_types( $fallback = array() ) {
1040
- return CMB2_Utils::ensure_array( $this->prop( 'object_types' ), $fallback );
1041
- }
1042
-
1043
- /**
1044
- * Initates the object types and option key for an options page metabox.
1045
- *
1046
- * @since 2.2.5
1047
- *
1048
- * @return void
1049
- */
1050
- public function init_options_mb() {
1051
- $keys = $this->options_page_keys();
1052
- $types = $this->box_types();
1053
-
1054
- if ( empty( $keys ) ) {
1055
- $keys = '';
1056
- $types = $this->deinit_options_mb( $types );
1057
- } else {
1058
-
1059
- // Make sure 'options-page' is one of the object types.
1060
- $types[] = 'options-page';
1061
- }
1062
-
1063
- // Set/Reset the option_key property.
1064
- $this->set_prop( 'option_key', $keys );
1065
-
1066
- // Reset the object types.
1067
- $this->set_prop( 'object_types', array_unique( $types ) ) ;
1068
- }
1069
-
1070
- /**
1071
- * If object-page initiation failed, remove traces options page setup.
1072
- *
1073
- * @since 2.2.5
1074
- *
1075
- * @return void
1076
- */
1077
- protected function deinit_options_mb( $types ) {
1078
- if ( isset( $this->meta_box['show_on']['key'] ) && 'options-page' === $this->meta_box['show_on']['key'] ) {
1079
- unset( $this->meta_box['show_on']['key'] );
1080
- }
1081
-
1082
- if ( array_key_exists( 'options-page', $this->meta_box['show_on'] ) ) {
1083
- unset( $this->meta_box['show_on']['options-page'] );
1084
- }
1085
-
1086
- $index = array_search( 'options-page', $types );
1087
-
1088
- if ( false !== $index ) {
1089
- unset( $types[ $index ] );
1090
- }
1091
-
1092
- return $types;
1093
- }
1094
-
1095
- /**
1096
- * Determines if metabox is for an options page
1097
- *
1098
- * @since 1.0.1
1099
- * @return boolean True/False.
1100
- */
1101
- public function is_options_page_mb() {
1102
- return (
1103
- // 'show_on' values checked for back-compatibility.
1104
- $this->is_old_school_options_page_mb()
1105
- || in_array( 'options-page', $this->box_types() )
1106
- );
1107
- }
1108
-
1109
- /**
1110
- * Determines if metabox uses old-schoold options page config.
1111
- *
1112
- * @since 2.2.5
1113
- * @return boolean True/False.
1114
- */
1115
- public function is_old_school_options_page_mb() {
1116
- return (
1117
- // 'show_on' values checked for back-compatibility.
1118
- isset( $this->meta_box['show_on']['key'] ) && 'options-page' === $this->meta_box['show_on']['key']
1119
- || array_key_exists( 'options-page', $this->meta_box['show_on'] )
1120
- );
1121
- }
1122
-
1123
- /**
1124
- * Determine if we are on an options page (or saving the options page).
1125
- *
1126
- * @since 2.2.5
1127
- *
1128
- * @return bool
1129
- */
1130
- public function doing_options_page() {
1131
- $found_key = false;
1132
- $keys = $this->options_page_keys();
1133
-
1134
- if ( empty( $keys ) ) {
1135
- return $found_key;
1136
- }
1137
-
1138
- if ( ! empty( $_GET['page'] ) && in_array( $_GET['page'], $keys ) ) {
1139
- $found_key = $_GET['page'];
1140
- }
1141
-
1142
- if ( ! empty( $_POST['action'] ) && in_array( $_POST['action'], $keys ) ) {
1143
- $found_key = $_POST['action'];
1144
- }
1145
-
1146
- return $found_key ? $found_key : false;
1147
- }
1148
-
1149
- /**
1150
- * Get the options page key.
1151
- *
1152
- * @since 2.2.5
1153
- * @return string|array
1154
- */
1155
- public function options_page_keys() {
1156
- $key = '';
1157
- if ( ! $this->is_options_page_mb() ) {
1158
- return $key;
1159
- }
1160
-
1161
- $values = null;
1162
- if ( ! empty( $this->meta_box['show_on']['value'] ) ) {
1163
- $values = $this->meta_box['show_on']['value'];
1164
- } elseif ( ! empty( $this->meta_box['show_on']['options-page'] ) ) {
1165
- $values = $this->meta_box['show_on']['options-page'];
1166
- } elseif ( $this->prop( 'option_key') ) {
1167
- $values = $this->prop( 'option_key');
1168
- }
1169
-
1170
- if ( $values ) {
1171
- $key = $values;
1172
- }
1173
-
1174
- if ( ! is_array( $key ) ) {
1175
- $key = array( $key );
1176
- }
1177
-
1178
- return $key;
1179
- }
1180
-
1181
- /**
1182
- * Returns the object type
1183
- *
1184
- * @since 1.0.0
1185
- * @param string $object_type Type of object being saved. (e.g., post, user, or comment). Optional.
1186
- * @return string Object type.
1187
- */
1188
- public function object_type( $object_type = '' ) {
1189
- if ( $object_type ) {
1190
- $this->object_type = $object_type;
1191
- return $this->object_type;
1192
- }
1193
-
1194
- if ( $this->object_type ) {
1195
- return $this->object_type;
1196
- }
1197
-
1198
- $this->object_type = $this->current_object_type();
1199
-
1200
- return $this->object_type;
1201
- }
1202
-
1203
- /**
1204
- * Get the object type for the current page, based on the $pagenow global.
1205
- *
1206
- * @since 2.2.2
1207
- * @return string Page object type name.
1208
- */
1209
- public function current_object_type() {
1210
- global $pagenow;
1211
- $type = 'post';
1212
-
1213
- if ( in_array( $pagenow, array( 'user-edit.php', 'profile.php', 'user-new.php' ), true ) ) {
1214
- $type = 'user';
1215
- }
1216
-
1217
- if ( in_array( $pagenow, array( 'edit-comments.php', 'comment.php' ), true ) ) {
1218
- $type = 'comment';
1219
- }
1220
-
1221
- if ( in_array( $pagenow, array( 'edit-tags.php', 'term.php' ), true ) ) {
1222
- $type = 'term';
1223
- }
1224
-
1225
- if ( defined( 'DOING_AJAX' ) && isset( $_POST['action'] ) && 'add-tag' === $_POST['action'] ) {
1226
- $type = 'term';
1227
- }
1228
-
1229
- if (
1230
- in_array( $pagenow, array( 'admin.php', 'admin-post.php' ), true )
1231
- && $this->doing_options_page()
1232
- ) {
1233
- $type = 'options-page';
1234
- }
1235
-
1236
- return $type;
1237
- }
1238
-
1239
- /**
1240
- * Set metabox property.
1241
- *
1242
- * @since 2.2.2
1243
- * @param string $property Metabox config property to retrieve.
1244
- * @param mixed $value Value to set if no value found.
1245
- * @return mixed Metabox config property value or false.
1246
- */
1247
- public function set_prop( $property, $value ) {
1248
- $this->meta_box[ $property ] = $value;
1249
-
1250
- return $this->prop( $property );
1251
- }
1252
-
1253
- /**
1254
- * Get metabox property and optionally set a fallback
1255
- *
1256
- * @since 2.0.0
1257
- * @param string $property Metabox config property to retrieve.
1258
- * @param mixed $fallback Fallback value to set if no value found.
1259
- * @return mixed Metabox config property value or false.
1260
- */
1261
- public function prop( $property, $fallback = null ) {
1262
- if ( array_key_exists( $property, $this->meta_box ) ) {
1263
- return $this->meta_box[ $property ];
1264
- } elseif ( $fallback ) {
1265
- return $this->meta_box[ $property ] = $fallback;
1266
- }
1267
- }
1268
-
1269
- /**
1270
- * Get a field object
1271
- *
1272
- * @since 2.0.3
1273
- * @param string|array|CMB2_Field $field Metabox field id or field config array or CMB2_Field object.
1274
- * @param CMB2_Field|null $field_group (optional) CMB2_Field object (group parent).
1275
- * @return CMB2_Field|false CMB2_Field object (or false).
1276
- */
1277
- public function get_field( $field, $field_group = null ) {
1278
- if ( $field instanceof CMB2_Field ) {
1279
- return $field;
1280
- }
1281
-
1282
- $field_id = is_string( $field ) ? $field : $field['id'];
1283
-
1284
- $parent_field_id = ! empty( $field_group ) ? $field_group->id() : '';
1285
- $ids = $this->get_field_ids( $field_id, $parent_field_id );
1286
-
1287
- if ( ! $ids ) {
1288
- return false;
1289
- }
1290
-
1291
- list( $field_id, $sub_field_id ) = $ids;
1292
-
1293
- $index = implode( '', $ids ) . ( $field_group ? $field_group->index : '' );
1294
- if ( array_key_exists( $index, $this->fields ) ) {
1295
- return $this->fields[ $index ];
1296
- }
1297
-
1298
- $this->fields[ $index ] = new CMB2_Field( $this->get_field_args( $field_id, $field, $sub_field_id, $field_group ) );
1299
-
1300
- return $this->fields[ $index ];
1301
- }
1302
-
1303
- /**
1304
- * Handles determining which type of arguments to pass to CMB2_Field
1305
- *
1306
- * @since 2.0.7
1307
- * @param mixed $field_id Field (or group field) ID.
1308
- * @param mixed $field_args Array of field arguments.
1309
- * @param mixed $sub_field_id Sub field ID (if field_group exists).
1310
- * @param CMB2_Field|null $field_group If a sub-field, will be the parent group CMB2_Field object.
1311
- * @return array Array of CMB2_Field arguments.
1312
- */
1313
- public function get_field_args( $field_id, $field_args, $sub_field_id, $field_group ) {
1314
-
1315
- // Check if group is passed and if fields were added in the old-school fields array.
1316
- if ( $field_group && ( $sub_field_id || 0 === $sub_field_id ) ) {
1317
-
1318
- // Update the fields array w/ any modified properties inherited from the group field.
1319
- $this->meta_box['fields'][ $field_id ]['fields'][ $sub_field_id ] = $field_args;
1320
-
1321
- return $this->get_default_args( $field_args, $field_group );
1322
- }
1323
-
1324
- if ( is_array( $field_args ) ) {
1325
- $this->meta_box['fields'][ $field_id ] = array_merge( $field_args, $this->meta_box['fields'][ $field_id ] );
1326
- }
1327
-
1328
- return $this->get_default_args( $this->meta_box['fields'][ $field_id ] );
1329
- }
1330
-
1331
- /**
1332
- * Get default field arguments specific to this CMB2 object.
1333
- *
1334
- * @since 2.2.0
1335
- * @param array $field_args Metabox field config array.
1336
- * @param CMB2_Field $field_group (optional) CMB2_Field object (group parent).
1337
- * @return array Array of field arguments.
1338
- */
1339
- protected function get_default_args( $field_args, $field_group = null ) {
1340
- if ( $field_group ) {
1341
- $args = array(
1342
- 'field_args' => $field_args,
1343
- 'group_field' => $field_group,
1344
- );
1345
- } else {
1346
- $args = array(
1347
- 'field_args' => $field_args,
1348
- 'object_type' => $this->object_type(),
1349
- 'object_id' => $this->object_id(),
1350
- 'cmb_id' => $this->cmb_id,
1351
- );
1352
- }
1353
-
1354
- return $args;
1355
- }
1356
-
1357
- /**
1358
- * When fields are added in the old-school way, intitate them as they should be
1359
- *
1360
- * @since 2.1.0
1361
- * @param array $fields Array of fields to add.
1362
- * @param mixed $parent_field_id Parent field id or null.
1363
- *
1364
- * @return CMB2
1365
- */
1366
- protected function add_fields( $fields, $parent_field_id = null ) {
1367
- foreach ( $fields as $field ) {
1368
-
1369
- $sub_fields = false;
1370
- if ( array_key_exists( 'fields', $field ) ) {
1371
- $sub_fields = $field['fields'];
1372
- unset( $field['fields'] );
1373
- }
1374
-
1375
- $field_id = $parent_field_id
1376
- ? $this->add_group_field( $parent_field_id, $field )
1377
- : $this->add_field( $field );
1378
-
1379
- if ( $sub_fields ) {
1380
- $this->add_fields( $sub_fields, $field_id );
1381
- }
1382
- }
1383
-
1384
- return $this;
1385
- }
1386
-
1387
- /**
1388
- * Add a field to the metabox
1389
- *
1390
- * @since 2.0.0
1391
- * @param array $field Metabox field config array.
1392
- * @param int $position (optional) Position of metabox. 1 for first, etc.
1393
- * @return string|false Field id or false.
1394
- */
1395
- public function add_field( array $field, $position = 0 ) {
1396
- if ( ! is_array( $field ) || ! array_key_exists( 'id', $field ) ) {
1397
- return false;
1398
- }
1399
-
1400
- // Perform some field-type-specific initiation actions.
1401
- switch ( $field['type'] ) {
1402
- case 'file':
1403
- case 'file_list':
1404
-
1405
- // Initiate attachment JS hooks.
1406
- add_filter( 'wp_prepare_attachment_for_js', array( 'CMB2_Type_File_Base', 'prepare_image_sizes_for_js' ), 10, 3 );
1407
- break;
1408
-
1409
- case 'oembed':
1410
-
1411
- // Initiate oembed Ajax hooks.
1412
- cmb2_ajax();
1413
- break;
1414
- }
1415
-
1416
- if ( isset( $field['column'] ) && false !== $field['column'] ) {
1417
- $field = $this->define_field_column( $field );
1418
- }
1419
-
1420
- if ( isset( $field['taxonomy'] ) && ! empty( $field['remove_default'] ) ) {
1421
- $this->tax_metaboxes_to_remove[ $field['taxonomy'] ] = $field['taxonomy'];
1422
- }
1423
-
1424
- $this->_add_field_to_array(
1425
- $field,
1426
- $this->meta_box['fields'],
1427
- $position
1428
- );
1429
-
1430
- return $field['id'];
1431
- }
1432
-
1433
- /**
1434
- * Defines a field's column if requesting to be show in admin columns.
1435
- *
1436
- * @since 2.2.3
1437
- * @param array $field Metabox field config array.
1438
- * @return array Modified metabox field config array.
1439
- */
1440
- protected function define_field_column( array $field ) {
1441
- $this->has_columns = true;
1442
-
1443
- $column = is_array( $field['column'] ) ? $field['column'] : array();
1444
-
1445
- $field['column'] = wp_parse_args( $column, array(
1446
- 'name' => isset( $field['name'] ) ? $field['name'] : '',
1447
- 'position' => false,
1448
- ) );
1449
-
1450
- return $field;
1451
- }
1452
-
1453
- /**
1454
- * Add a field to a group
1455
- *
1456
- * @since 2.0.0
1457
- * @param string $parent_field_id The field id of the group field to add the field.
1458
- * @param array $field Metabox field config array.
1459
- * @param int $position (optional) Position of metabox. 1 for first, etc.
1460
- * @return mixed Array of parent/field ids or false.
1461
- */
1462
- public function add_group_field( $parent_field_id, array $field, $position = 0 ) {
1463
- if ( ! array_key_exists( $parent_field_id, $this->meta_box['fields'] ) ) {
1464
- return false;
1465
- }
1466
-
1467
- $parent_field = $this->meta_box['fields'][ $parent_field_id ];
1468
-
1469
- if ( 'group' !== $parent_field['type'] ) {
1470
- return false;
1471
- }
1472
-
1473
- if ( ! isset( $parent_field['fields'] ) ) {
1474
- $this->meta_box['fields'][ $parent_field_id ]['fields'] = array();
1475
- }
1476
-
1477
- $this->_add_field_to_array(
1478
- $field,
1479
- $this->meta_box['fields'][ $parent_field_id ]['fields'],
1480
- $position
1481
- );
1482
-
1483
- return array( $parent_field_id, $field['id'] );
1484
- }
1485
-
1486
- /**
1487
- * Add a field array to a fields array in desired position
1488
- *
1489
- * @since 2.0.2
1490
- * @param array $field Metabox field config array.
1491
- * @param array $fields Array (passed by reference) to append the field (array) to.
1492
- * @param integer $position Optionally specify a position in the array to be inserted.
1493
- */
1494
- protected function _add_field_to_array( $field, &$fields, $position = 0 ) {
1495
- if ( $position ) {
1496
- CMB2_Utils::array_insert( $fields, array( $field['id'] => $field ), $position );
1497
- } else {
1498
- $fields[ $field['id'] ] = $field;
1499
- }
1500
- }
1501
-
1502
- /**
1503
- * Remove a field from the metabox
1504
- *
1505
- * @since 2.0.0
1506
- * @param string $field_id The field id of the field to remove.
1507
- * @param string $parent_field_id (optional) The field id of the group field to remove field from.
1508
- * @return bool True if field was removed.
1509
- */
1510
- public function remove_field( $field_id, $parent_field_id = '' ) {
1511
- $ids = $this->get_field_ids( $field_id, $parent_field_id );
1512
-
1513
- if ( ! $ids ) {
1514
- return false;
1515
- }
1516
-
1517
- list( $field_id, $sub_field_id ) = $ids;
1518
-
1519
- unset( $this->fields[ implode( '', $ids ) ] );
1520
-
1521
- if ( ! $sub_field_id ) {
1522
- unset( $this->meta_box['fields'][ $field_id ] );
1523
- return true;
1524
- }
1525
-
1526
- if ( isset( $this->fields[ $field_id ]->args['fields'][ $sub_field_id ] ) ) {
1527
- unset( $this->fields[ $field_id ]->args['fields'][ $sub_field_id ] );
1528
- }
1529
- if ( isset( $this->meta_box['fields'][ $field_id ]['fields'][ $sub_field_id ] ) ) {
1530
- unset( $this->meta_box['fields'][ $field_id ]['fields'][ $sub_field_id ] );
1531
- }
1532
-
1533
- return true;
1534
- }
1535
-
1536
- /**
1537
- * Update or add a property to a field
1538
- *
1539
- * @since 2.0.0
1540
- * @param string $field_id Field id.
1541
- * @param string $property Field property to set/update.
1542
- * @param mixed $value Value to set the field property.
1543
- * @param string $parent_field_id (optional) The field id of the group field to remove field from.
1544
- * @return mixed Field id. Strict compare to false, as success can return a falsey value (like 0).
1545
- */
1546
- public function update_field_property( $field_id, $property, $value, $parent_field_id = '' ) {
1547
- $ids = $this->get_field_ids( $field_id, $parent_field_id );
1548
-
1549
- if ( ! $ids ) {
1550
- return false;
1551
- }
1552
-
1553
- list( $field_id, $sub_field_id ) = $ids;
1554
-
1555
- if ( ! $sub_field_id ) {
1556
- $this->meta_box['fields'][ $field_id ][ $property ] = $value;
1557
- return $field_id;
1558
- }
1559
-
1560
- $this->meta_box['fields'][ $field_id ]['fields'][ $sub_field_id ][ $property ] = $value;
1561
- return $field_id;
1562
- }
1563
-
1564
- /**
1565
- * Check if field ids match a field and return the index/field id
1566
- *
1567
- * @since 2.0.2
1568
- * @param string $field_id Field id.
1569
- * @param string $parent_field_id (optional) Parent field id.
1570
- * @return mixed Array of field/parent ids, or false.
1571
- */
1572
- public function get_field_ids( $field_id, $parent_field_id = '' ) {
1573
- $sub_field_id = $parent_field_id ? $field_id : '';
1574
- $field_id = $parent_field_id ? $parent_field_id : $field_id;
1575
- $fields =& $this->meta_box['fields'];
1576
-
1577
- if ( ! array_key_exists( $field_id, $fields ) ) {
1578
- $field_id = $this->search_old_school_array( $field_id, $fields );
1579
- }
1580
-
1581
- if ( false === $field_id ) {
1582
- return false;
1583
- }
1584
-
1585
- if ( ! $sub_field_id ) {
1586
- return array( $field_id, $sub_field_id );
1587
- }
1588
-
1589
- if ( 'group' !== $fields[ $field_id ]['type'] ) {
1590
- return false;
1591
- }
1592
-
1593
- if ( ! array_key_exists( $sub_field_id, $fields[ $field_id ]['fields'] ) ) {
1594
- $sub_field_id = $this->search_old_school_array( $sub_field_id, $fields[ $field_id ]['fields'] );
1595
- }
1596
-
1597
- return false === $sub_field_id ? false : array( $field_id, $sub_field_id );
1598
- }
1599
-
1600
- /**
1601
- * When using the old array filter, it is unlikely field array indexes will be the field id.
1602
- *
1603
- * @since 2.0.2
1604
- * @param string $field_id The field id.
1605
- * @param array $fields Array of fields to search.
1606
- * @return mixed Field index or false.
1607
- */
1608
- public function search_old_school_array( $field_id, $fields ) {
1609
- $ids = wp_list_pluck( $fields, 'id' );
1610
- $index = array_search( $field_id, $ids );
1611
- return false !== $index ? $index : false;
1612
- }
1613
-
1614
- /**
1615
- * Handles metabox property callbacks, and passes this $cmb object as property.
1616
- *
1617
- * @since 2.2.3
1618
- * @param callable $cb The callback method/function/closure.
1619
- * @return mixed Return of the callback function.
1620
- */
1621
- protected function do_callback( $cb ) {
1622
- return call_user_func( $cb, $this );
1623
- }
1624
-
1625
- /**
1626
- * Generate a unique nonce field for each registered meta_box
1627
- *
1628
- * @since 2.0.0
1629
- * @return void
1630
- */
1631
- public function nonce_field() {
1632
- wp_nonce_field( $this->nonce(), $this->nonce(), false, true );
1633
- }
1634
-
1635
- /**
1636
- * Generate a unique nonce for each registered meta_box
1637
- *
1638
- * @since 2.0.0
1639
- * @return string unique nonce string.
1640
- */
1641
- public function nonce() {
1642
- if ( ! $this->generated_nonce ) {
1643
- $this->generated_nonce = sanitize_html_class( 'nonce_' . basename( __FILE__ ) . $this->cmb_id );
1644
- }
1645
-
1646
- return $this->generated_nonce;
1647
- }
1648
-
1649
- /**
1650
- * Checks if field-saving updated any fields.
1651
- *
1652
- * @since 2.2.5
1653
- *
1654
- * @return bool
1655
- */
1656
- public function was_updated() {
1657
- return ! empty( $this->updated );
1658
- }
1659
-
1660
- /**
1661
- * Whether this box is an "alternate context" box. This means the box has a 'context' property defined as:
1662
- * 'form_top', 'before_permalink', 'after_title', or 'after_editor'.
1663
- *
1664
- * @since 2.2.4
1665
- * @return bool
1666
- */
1667
- public function is_alternate_context_box() {
1668
- return $this->prop( 'context' ) && in_array( $this->prop( 'context' ), array( 'form_top', 'before_permalink', 'after_title', 'after_editor' ), true );
1669
- }
1670
-
1671
- /**
1672
- * Magic getter for our object.
1673
- *
1674
- * @param string $property Object property.
1675
- * @throws Exception Throws an exception if the field is invalid.
1676
- * @return mixed
1677
- */
1678
- public function __get( $property ) {
1679
- switch ( $property ) {
1680
- case 'updated':
1681
- case 'has_columns':
1682
- case 'tax_metaboxes_to_remove':
1683
- return $this->{$property};
1684
- default:
1685
- return parent::__get( $property );
1686
- }
1687
- }
1688
-
1689
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/CMB2_Ajax.php DELETED
@@ -1,321 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * CMB2 ajax methods
5
- * (i.e. a lot of work to get oEmbeds to work with non-post objects)
6
- *
7
- * @since 0.9.5
8
- *
9
- * @category WordPress_Plugin
10
- * @package CMB2
11
- * @author CMB2 team
12
- * @license GPL-2.0+
13
- */
14
- class CMB2_Ajax {
15
-
16
- // Whether to hijack the oembed cache system
17
- protected $hijack = false;
18
- protected $object_id = 0;
19
- protected $embed_args = array();
20
- protected $object_type = 'post';
21
- protected $ajax_update = false;
22
-
23
- /**
24
- * Instance of this class
25
- *
26
- * @since 2.2.2
27
- * @var object
28
- */
29
- protected static $instance;
30
-
31
- /**
32
- * Get the singleton instance of this class
33
- *
34
- * @since 2.2.2
35
- * @return CMB2_Ajax
36
- */
37
- public static function get_instance() {
38
- if ( ! ( self::$instance instanceof self ) ) {
39
- self::$instance = new self();
40
- }
41
-
42
- return self::$instance;
43
- }
44
-
45
- /**
46
- * Constructor
47
- *
48
- * @since 2.2.0
49
- */
50
- protected function __construct() {
51
- add_action( 'wp_ajax_cmb2_oembed_handler', array( $this, 'oembed_handler' ) );
52
- add_action( 'wp_ajax_nopriv_cmb2_oembed_handler', array( $this, 'oembed_handler' ) );
53
- // Need to occasionally clean stale oembed cache data from the option value.
54
- add_action( 'cmb2_save_options-page_fields', array( __CLASS__, 'clean_stale_options_page_oembeds' ) );
55
- }
56
-
57
- /**
58
- * Handles our oEmbed ajax request
59
- *
60
- * @since 0.9.5
61
- * @return object oEmbed embed code | fallback | error message
62
- */
63
- public function oembed_handler() {
64
-
65
- // Verify our nonce
66
- if ( ! ( isset( $_REQUEST['cmb2_ajax_nonce'], $_REQUEST['oembed_url'] ) && wp_verify_nonce( $_REQUEST['cmb2_ajax_nonce'], 'ajax_nonce' ) ) ) {
67
- die();
68
- }
69
-
70
- // Sanitize our search string
71
- $oembed_string = sanitize_text_field( $_REQUEST['oembed_url'] );
72
-
73
- // Send back error if empty
74
- if ( empty( $oembed_string ) ) {
75
- wp_send_json_error( '<p class="ui-state-error-text">' . esc_html__( 'Please Try Again', 'cmb2' ) . '</p>' );
76
- }
77
-
78
- // Set width of embed
79
- $embed_width = isset( $_REQUEST['oembed_width'] ) && intval( $_REQUEST['oembed_width'] ) < 640 ? intval( $_REQUEST['oembed_width'] ) : '640';
80
-
81
- // Set url
82
- $oembed_url = esc_url( $oembed_string );
83
-
84
- // Set args
85
- $embed_args = array(
86
- 'width' => $embed_width,
87
- );
88
-
89
- $this->ajax_update = true;
90
-
91
- // Get embed code (or fallback link)
92
- $html = $this->get_oembed( array(
93
- 'url' => $oembed_url,
94
- 'object_id' => $_REQUEST['object_id'],
95
- 'object_type' => isset( $_REQUEST['object_type'] ) ? $_REQUEST['object_type'] : 'post',
96
- 'oembed_args' => $embed_args,
97
- 'field_id' => $_REQUEST['field_id'],
98
- ) );
99
-
100
- wp_send_json_success( $html );
101
- }
102
-
103
- /**
104
- * Retrieves oEmbed from url/object ID
105
- *
106
- * @since 0.9.5
107
- * @param array $args Arguments for method
108
- * @return string html markup with embed or fallback
109
- */
110
- public function get_oembed_no_edit( $args ) {
111
- global $wp_embed;
112
-
113
- $oembed_url = esc_url( $args['url'] );
114
-
115
- // Sanitize object_id
116
- $this->object_id = is_numeric( $args['object_id'] ) ? absint( $args['object_id'] ) : sanitize_text_field( $args['object_id'] );
117
-
118
- $args = wp_parse_args( $args, array(
119
- 'object_type' => 'post',
120
- 'oembed_args' => $this->embed_args,
121
- 'field_id' => false,
122
- 'wp_error' => false,
123
- ) );
124
-
125
- $this->embed_args =& $args;
126
-
127
- /**
128
- * Set the post_ID so oEmbed won't fail
129
- * wp-includes/class-wp-embed.php, WP_Embed::shortcode()
130
- */
131
- $wp_embed->post_ID = $this->object_id;
132
-
133
- // Special scenario if NOT a post object
134
- if ( isset( $args['object_type'] ) && 'post' != $args['object_type'] ) {
135
-
136
- if ( 'options-page' == $args['object_type'] ) {
137
-
138
- // Bogus id to pass some numeric checks. Issue with a VERY large WP install?
139
- $wp_embed->post_ID = 1987645321;
140
- }
141
-
142
- // Ok, we need to hijack the oembed cache system
143
- $this->hijack = true;
144
- $this->object_type = $args['object_type'];
145
-
146
- // Gets ombed cache from our object's meta (vs postmeta)
147
- add_filter( 'get_post_metadata', array( $this, 'hijack_oembed_cache_get' ), 10, 3 );
148
-
149
- // Sets ombed cache in our object's meta (vs postmeta)
150
- add_filter( 'update_post_metadata', array( $this, 'hijack_oembed_cache_set' ), 10, 4 );
151
-
152
- }
153
-
154
- $embed_args = '';
155
-
156
- foreach ( $args['oembed_args'] as $key => $val ) {
157
- $embed_args .= " $key=\"$val\"";
158
- }
159
-
160
- // Ping WordPress for an embed
161
- $embed = $wp_embed->run_shortcode( '[embed' . $embed_args . ']' . $oembed_url . '[/embed]' );
162
-
163
- // Fallback that WordPress creates when no oEmbed was found
164
- $fallback = $wp_embed->maybe_make_link( $oembed_url );
165
-
166
- return compact( 'embed', 'fallback', 'args' );
167
- }
168
-
169
- /**
170
- * Retrieves oEmbed from url/object ID
171
- *
172
- * @since 0.9.5
173
- * @param array $args Arguments for method
174
- * @return string html markup with embed or fallback
175
- */
176
- public function get_oembed( $args ) {
177
- $oembed = $this->get_oembed_no_edit( $args );
178
-
179
- // Send back our embed
180
- if ( $oembed['embed'] && $oembed['embed'] != $oembed['fallback'] ) {
181
- return '<div class="cmb2-oembed embed-status">' . $oembed['embed'] . '<p class="cmb2-remove-wrapper"><a href="#" class="cmb2-remove-file-button" rel="' . $oembed['args']['field_id'] . '">' . esc_html__( 'Remove Embed', 'cmb2' ) . '</a></p></div>';
182
- }
183
-
184
- // Otherwise, send back error info that no oEmbeds were found
185
- return sprintf(
186
- '<p class="ui-state-error-text">%s</p>',
187
- sprintf(
188
- /* translators: 1: results for. 2: link to codex.wordpress.org/Embeds */
189
- esc_html__( 'No oEmbed Results Found for %1$s. View more info at %2$s.', 'cmb2' ),
190
- $oembed['fallback'],
191
- '<a href="https://codex.wordpress.org/Embeds" target="_blank">codex.wordpress.org/Embeds</a>'
192
- )
193
- );
194
- }
195
-
196
- /**
197
- * Hijacks retrieving of cached oEmbed.
198
- * Returns cached data from relevant object metadata (vs postmeta)
199
- *
200
- * @since 0.9.5
201
- * @param boolean $check Whether to retrieve postmeta or override
202
- * @param int $object_id Object ID
203
- * @param string $meta_key Object metakey
204
- * @return mixed Object's oEmbed cached data
205
- */
206
- public function hijack_oembed_cache_get( $check, $object_id, $meta_key ) {
207
- if ( ! $this->hijack || ( $this->object_id != $object_id && 1987645321 !== $object_id ) ) {
208
- return $check;
209
- }
210
-
211
- if ( $this->ajax_update ) {
212
- return false;
213
- }
214
-
215
- return $this->cache_action( $meta_key );
216
- }
217
-
218
- /**
219
- * Hijacks saving of cached oEmbed.
220
- * Saves cached data to relevant object metadata (vs postmeta)
221
- *
222
- * @since 0.9.5
223
- * @param boolean $check Whether to continue setting postmeta
224
- * @param int $object_id Object ID to get postmeta from
225
- * @param string $meta_key Postmeta's key
226
- * @param mixed $meta_value Value of the postmeta to be saved
227
- * @return boolean Whether to continue setting
228
- */
229
- public function hijack_oembed_cache_set( $check, $object_id, $meta_key, $meta_value ) {
230
-
231
- if (
232
- ! $this->hijack
233
- || ( $this->object_id != $object_id && 1987645321 !== $object_id )
234
- // only want to hijack oembed meta values
235
- || 0 !== strpos( $meta_key, '_oembed_' )
236
- ) {
237
- return $check;
238
- }
239
-
240
- $this->cache_action( $meta_key, $meta_value );
241
-
242
- // Anything other than `null` to cancel saving to postmeta
243
- return true;
244
- }
245
-
246
- /**
247
- * Gets/updates the cached oEmbed value from/to relevant object metadata (vs postmeta)
248
- *
249
- * @since 1.3.0
250
- * @param string $meta_key Postmeta's key
251
- */
252
- protected function cache_action( $meta_key ) {
253
- $func_args = func_get_args();
254
- $action = isset( $func_args[1] ) ? 'update' : 'get';
255
-
256
- if ( 'options-page' === $this->object_type ) {
257
-
258
- $args = array( $meta_key );
259
-
260
- if ( 'update' === $action ) {
261
- $args[] = $func_args[1];
262
- $args[] = true;
263
- }
264
-
265
- // Cache the result to our options
266
- $status = call_user_func_array( array( cmb2_options( $this->object_id ), $action ), $args );
267
- } else {
268
-
269
- $args = array( $this->object_type, $this->object_id, $meta_key );
270
- $args[] = 'update' === $action ? $func_args : true;
271
-
272
- // Cache the result to our metadata
273
- $status = call_user_func_array( $action . '_metadata', $args );
274
- }
275
-
276
- return $status;
277
- }
278
-
279
- /**
280
- * Hooks in when options-page data is saved to clean stale
281
- * oembed cache data from the option value.
282
- *
283
- * @since 2.2.0
284
- * @param string $option_key The options-page option key
285
- * @return void
286
- */
287
- public static function clean_stale_options_page_oembeds( $option_key ) {
288
- $options = cmb2_options( $option_key )->get_options();
289
- $modified = false;
290
- if ( is_array( $options ) ) {
291
-
292
- $ttl = apply_filters( 'oembed_ttl', DAY_IN_SECONDS, '', array(), 0 );
293
- $now = time();
294
-
295
- foreach ( $options as $key => $value ) {
296
- // Check for cached oembed data
297
- if ( 0 === strpos( $key, '_oembed_time_' ) ) {
298
- $cached_recently = ( $now - $value ) < $ttl;
299
-
300
- if ( ! $cached_recently ) {
301
- $modified = true;
302
- // Remove the the cached ttl expiration, and the cached oembed value.
303
- unset( $options[ $key ] );
304
- unset( $options[ str_replace( '_oembed_time_', '_oembed_', $key ) ] );
305
- }
306
- } // End if().
307
- // Remove the cached unknown values.
308
- elseif ( '{{unknown}}' === $value ) {
309
- $modified = true;
310
- unset( $options[ $key ] );
311
- }
312
- }
313
- }
314
-
315
- // Update the option and remove stale cache data
316
- if ( $modified ) {
317
- $updated = cmb2_options( $option_key )->set( $options );
318
- }
319
- }
320
-
321
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/CMB2_Base.php DELETED
@@ -1,514 +0,0 @@
1
- <?php
2
- /**
3
- * CMB2 Base - Base object functionality.
4
- *
5
- * @category WordPress_Plugin
6
- * @package CMB2
7
- * @author CMB2 team
8
- * @license GPL-2.0+
9
- * @link https://cmb2.io
10
- *
11
- * @property-read $args The objects array of properties/arguments.
12
- * @property-read $meta_box The objects array of properties/arguments.
13
- * @property-read $properties The objects array of properties/arguments.
14
- * @property-read $cmb_id Current CMB2 instance ID
15
- * @property-read $object_id Object ID
16
- * @property-read $object_type Type of object being handled. (e.g., post, user, comment, or term)
17
- */
18
- abstract class CMB2_Base {
19
-
20
- /**
21
- * Current CMB2 instance ID
22
- *
23
- * @var string
24
- * @since 2.2.3
25
- */
26
- protected $cmb_id = '';
27
-
28
- /**
29
- * The object properties name.
30
- *
31
- * @var string
32
- * @since 2.2.3
33
- */
34
- protected $properties_name = 'meta_box';
35
-
36
- /**
37
- * Object ID
38
- *
39
- * @var mixed
40
- * @since 2.2.3
41
- */
42
- protected $object_id = 0;
43
-
44
- /**
45
- * Type of object being handled. (e.g., post, user, comment, or term)
46
- *
47
- * @var string
48
- * @since 2.2.3
49
- */
50
- protected $object_type = '';
51
-
52
- /**
53
- * Array of key => value data for saving. Likely $_POST data.
54
- *
55
- * @var array
56
- * @since 2.2.3
57
- */
58
- public $data_to_save = array();
59
-
60
- /**
61
- * Array of field param callback results
62
- *
63
- * @var array
64
- * @since 2.0.0
65
- */
66
- protected $callback_results = array();
67
-
68
- /**
69
- * The deprecated_param method deprecated param message signature.
70
- */
71
- const DEPRECATED_PARAM = 1;
72
-
73
- /**
74
- * The deprecated_param method deprecated callback param message signature.
75
- */
76
- const DEPRECATED_CB_PARAM = 2;
77
-
78
- /**
79
- * Get started
80
- *
81
- * @since 2.2.3
82
- * @param array $args Object properties array
83
- */
84
- public function __construct( $args = array() ) {
85
- if ( ! empty( $args ) ) {
86
- foreach ( array(
87
- 'cmb_id',
88
- 'properties_name',
89
- 'object_id',
90
- 'object_type',
91
- 'data_to_save',
92
- ) as $object_prop ) {
93
- if ( isset( $args[ $object_prop ] ) ) {
94
- $this->{$object_prop} = $args[ $object_prop ];
95
- }
96
- }
97
- }
98
- }
99
-
100
- /**
101
- * Returns the object ID
102
- *
103
- * @since 2.2.3
104
- * @param integer $object_id Object ID
105
- * @return integer Object ID
106
- */
107
- public function object_id( $object_id = 0 ) {
108
- if ( $object_id ) {
109
- $this->object_id = $object_id;
110
- }
111
-
112
- return $this->object_id;
113
- }
114
-
115
- /**
116
- * Returns the object type
117
- *
118
- * @since 2.2.3
119
- * @param string $object_type Object Type
120
- * @return string Object type
121
- */
122
- public function object_type( $object_type = '' ) {
123
- if ( $object_type ) {
124
- $this->object_type = $object_type;
125
- }
126
-
127
- return $this->object_type;
128
- }
129
-
130
- /**
131
- * Get the object type for the current page, based on the $pagenow global.
132
- *
133
- * @since 2.2.2
134
- * @return string Page object type name.
135
- */
136
- public function current_object_type() {
137
- global $pagenow;
138
- $type = 'post';
139
-
140
- if ( in_array( $pagenow, array( 'user-edit.php', 'profile.php', 'user-new.php' ), true ) ) {
141
- $type = 'user';
142
- }
143
-
144
- if ( in_array( $pagenow, array( 'edit-comments.php', 'comment.php' ), true ) ) {
145
- $type = 'comment';
146
- }
147
-
148
- if ( in_array( $pagenow, array( 'edit-tags.php', 'term.php' ), true ) ) {
149
- $type = 'term';
150
- }
151
-
152
- return $type;
153
- }
154
-
155
- /**
156
- * Set object property.
157
- *
158
- * @since 2.2.2
159
- * @param string $property Metabox config property to retrieve
160
- * @param mixed $value Value to set if no value found
161
- * @return mixed Metabox config property value or false
162
- */
163
- public function set_prop( $property, $value ) {
164
- $this->{$this->properties_name}[ $property ] = $value;
165
-
166
- return $this->prop( $property );
167
- }
168
-
169
- /**
170
- * Get object property and optionally set a fallback
171
- *
172
- * @since 2.0.0
173
- * @param string $property Metabox config property to retrieve
174
- * @param mixed $fallback Fallback value to set if no value found
175
- * @return mixed Metabox config property value or false
176
- */
177
- public function prop( $property, $fallback = null ) {
178
- if ( array_key_exists( $property, $this->{$this->properties_name} ) ) {
179
- return $this->{$this->properties_name}[ $property ];
180
- } elseif ( $fallback ) {
181
- return $this->{$this->properties_name}[ $property ] = $fallback;
182
- }
183
- }
184
-
185
- /**
186
- * Get default field arguments specific to this CMB2 object.
187
- *
188
- * @since 2.2.0
189
- * @param array $field_args Metabox field config array.
190
- * @param CMB2_Field $field_group (optional) CMB2_Field object (group parent)
191
- * @return array Array of field arguments.
192
- */
193
- protected function get_default_args( $field_args, $field_group = null ) {
194
- if ( $field_group ) {
195
- $args = array(
196
- 'field_args' => $field_args,
197
- 'group_field' => $field_group,
198
- );
199
- } else {
200
- $args = array(
201
- 'field_args' => $field_args,
202
- 'object_type' => $this->object_type(),
203
- 'object_id' => $this->object_id(),
204
- 'cmb_id' => $this->cmb_id,
205
- );
206
- }
207
-
208
- return $args;
209
- }
210
-
211
- /**
212
- * Get a new field object specific to this CMB2 object.
213
- *
214
- * @since 2.2.0
215
- * @param array $field_args Metabox field config array.
216
- * @param CMB2_Field $field_group (optional) CMB2_Field object (group parent)
217
- * @return CMB2_Field CMB2_Field object
218
- */
219
- protected function get_new_field( $field_args, $field_group = null ) {
220
- return new CMB2_Field( $this->get_default_args( $field_args, $field_group ) );
221
- }
222
-
223
- /**
224
- * Determine whether this cmb object should show, based on the 'show_on_cb' callback.
225
- *
226
- * @since 2.0.9
227
- *
228
- * @return bool Whether this cmb should be shown.
229
- */
230
- public function should_show() {
231
- // Default to showing this cmb
232
- $show = true;
233
-
234
- // Use the callback to determine showing the cmb, if it exists
235
- if ( is_callable( $this->prop( 'show_on_cb' ) ) ) {
236
- $show = (bool) call_user_func( $this->prop( 'show_on_cb' ), $this );
237
- }
238
-
239
- return $show;
240
- }
241
-
242
- /**
243
- * Displays the results of the param callbacks.
244
- *
245
- * @since 2.0.0
246
- * @param string $param Field parameter
247
- */
248
- public function peform_param_callback( $param ) {
249
- echo $this->get_param_callback_result( $param );
250
- }
251
-
252
- /**
253
- * Store results of the param callbacks for continual access
254
- *
255
- * @since 2.0.0
256
- * @param string $param Field parameter
257
- * @return mixed Results of param/param callback
258
- */
259
- public function get_param_callback_result( $param ) {
260
-
261
- // If we've already retrieved this param's value,
262
- if ( array_key_exists( $param, $this->callback_results ) ) {
263
-
264
- // send it back
265
- return $this->callback_results[ $param ];
266
- }
267
-
268
- // Check if parameter has registered a callback.
269
- if ( $cb = $this->maybe_callback( $param ) ) {
270
-
271
- // Ok, callback is good, let's run it and store the result.
272
- ob_start();
273
- $returned = $this->do_callback( $cb );
274
-
275
- // Grab the result from the output buffer and store it.
276
- $echoed = ob_get_clean();
277
-
278
- // This checks if the user returned or echoed their callback.
279
- // Defaults to using the echoed value.
280
- $this->callback_results[ $param ] = $echoed ? $echoed : $returned;
281
-
282
- } else {
283
-
284
- // Otherwise just get whatever is there.
285
- $this->callback_results[ $param ] = isset( $this->{$this->properties_name}[ $param ] ) ? $this->{$this->properties_name}[ $param ] : false;
286
- }
287
-
288
- return $this->callback_results[ $param ];
289
- }
290
-
291
- /**
292
- * Handles the parameter callbacks, and passes this object as parameter.
293
- *
294
- * @since 2.2.3
295
- * @param callable $cb The callback method/function/closure
296
- * @return mixed Return of the callback function.
297
- */
298
- protected function do_callback( $cb ) {
299
- return call_user_func( $cb, $this->{$this->properties_name}, $this );
300
- }
301
-
302
- /**
303
- * Checks if field has a callback value
304
- *
305
- * @since 1.0.1
306
- * @param string $cb Callback string
307
- * @return mixed NULL, false for NO validation, or $cb string if it exists.
308
- */
309
- public function maybe_callback( $cb ) {
310
- $args = $this->{$this->properties_name};
311
- if ( ! isset( $args[ $cb ] ) ) {
312
- return null;
313
- }
314
-
315
- // Check if requesting explicitly false
316
- $cb = false !== $args[ $cb ] && 'false' !== $args[ $cb ] ? $args[ $cb ] : false;
317
-
318
- // If requesting NO validation, return false
319
- if ( ! $cb ) {
320
- return false;
321
- }
322
-
323
- if ( is_callable( $cb ) ) {
324
- return $cb;
325
- }
326
-
327
- return null;
328
- }
329
-
330
- /**
331
- * Checks if this object has parameter corresponding to the given filter
332
- * which is callable. If so, it registers the callback, and if not,
333
- * converts the maybe-modified $val to a boolean for return.
334
- *
335
- * The registered handlers will have a parameter name which matches the filter, except:
336
- * - The 'cmb2_api' prefix will be removed
337
- * - A '_cb' suffix will be added (to stay inline with other '*_cb' parameters).
338
- *
339
- * @since 2.2.3
340
- *
341
- * @param string $hook_name The hook name.
342
- * @param bool $val The default value.
343
- * @param string $hook_function The hook function. Default: 'add_filter'
344
- *
345
- * @return null|bool Null if hook is registered, or bool for value.
346
- */
347
- public function maybe_hook_parameter( $hook_name, $val = null, $hook_function = 'add_filter' ) {
348
-
349
- // Remove filter prefix, add param suffix.
350
- $parameter = substr( $hook_name, strlen( 'cmb2_api_' ) ) . '_cb';
351
-
352
- return self::maybe_hook(
353
- $this->prop( $parameter, $val ),
354
- $hook_name,
355
- $hook_function
356
- );
357
- }
358
-
359
- /**
360
- * Checks if given value is callable, and registers the callback.
361
- * If is non-callable, converts the $val to a boolean for return.
362
- *
363
- * @since 2.2.3
364
- *
365
- * @param bool $val The default value.
366
- * @param string $hook_name The hook name.
367
- * @param string $hook_function The hook function.
368
- *
369
- * @return null|bool Null if hook is registered, or bool for value.
370
- */
371
- public static function maybe_hook( $val, $hook_name, $hook_function ) {
372
- if ( is_callable( $val ) ) {
373
- $hook_function( $hook_name, $val, 10, 2 );
374
- return null;
375
- }
376
-
377
- // Cast to bool.
378
- return ! ! $val;
379
- }
380
-
381
- /**
382
- * Mark a param as deprecated and inform when it has been used.
383
- *
384
- * There is a default WordPress hook deprecated_argument_run that will be called
385
- * that can be used to get the backtrace up to what file and function used the
386
- * deprecated argument.
387
- *
388
- * The current behavior is to trigger a user error if WP_DEBUG is true.
389
- *
390
- * @since 2.2.3
391
- *
392
- * @param string $function The function that was called.
393
- * @param string $version The version of CMB2 that deprecated the argument used.
394
- * @param string $message Optional. A message regarding the change, or numeric
395
- * key to generate message from additional arguments.
396
- * Default null.
397
- */
398
- protected function deprecated_param( $function, $version, $message = null ) {
399
-
400
- if ( is_numeric( $message ) ) {
401
- $args = func_get_args();
402
-
403
- switch ( $message ) {
404
-
405
- case self::DEPRECATED_PARAM:
406
- $message = sprintf( __( 'The "%1$s" field parameter has been deprecated in favor of the "%1$s" parameter.', 'cmb2' ), $args[3], $args[4] );
407
- break;
408
-
409
- case self::DEPRECATED_CB_PARAM:
410
- $message = sprintf( __( 'Using the "%1$s" field parameter as a callback has been deprecated in favor of the "%1$s" parameter.', 'cmb2' ), $args[3], $args[4] );
411
- break;
412
-
413
- default:
414
- $message = null;
415
- break;
416
- }
417
- }
418
-
419
- /**
420
- * Fires when a deprecated argument is called. This is a WP core action.
421
- *
422
- * @since 2.2.3
423
- *
424
- * @param string $function The function that was called.
425
- * @param string $message A message regarding the change.
426
- * @param string $version The version of CMB2 that deprecated the argument used.
427
- */
428
- do_action( 'deprecated_argument_run', $function, $message, $version );
429
-
430
- /**
431
- * Filters whether to trigger an error for deprecated arguments. This is a WP core filter.
432
- *
433
- * @since 2.2.3
434
- *
435
- * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
436
- */
437
- if ( defined( 'WP_DEBUG' ) && WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {
438
- if ( function_exists( '__' ) ) {
439
- if ( ! is_null( $message ) ) {
440
- trigger_error( sprintf( __( '%1$s was called with a parameter that is <strong>deprecated</strong> since version %2$s! %3$s', 'cmb2' ), $function, $version, $message ) );
441
- } else {
442
- trigger_error( sprintf( __( '%1$s was called with a parameter that is <strong>deprecated</strong> since version %2$s with no alternative available.', 'cmb2' ), $function, $version ) );
443
- }
444
- } else {
445
- if ( ! is_null( $message ) ) {
446
- trigger_error( sprintf( '%1$s was called with a parameter that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message ) );
447
- } else {
448
- trigger_error( sprintf( '%1$s was called with a parameter that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version ) );
449
- }
450
- }
451
- }
452
- }
453
-
454
- /**
455
- * Magic getter for our object.
456
- *
457
- * @param string $field
458
- * @throws Exception Throws an exception if the field is invalid.
459
- * @return mixed
460
- */
461
- public function __get( $field ) {
462
- switch ( $field ) {
463
- case 'args':
464
- case 'meta_box':
465
- if ( $field === $this->properties_name ) {
466
- return $this->{$this->properties_name};
467
- }
468
- case 'properties':
469
- return $this->{$this->properties_name};
470
- case 'cmb_id':
471
- case 'object_id':
472
- case 'object_type':
473
- return $this->{$field};
474
- default:
475
- throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'cmb2' ), __CLASS__, $field ) );
476
- }
477
- }
478
-
479
- /**
480
- * Allows overloading the object with methods... Whooaaa oooh it's magic, y'knoooow.
481
- *
482
- * @since 1.0.0
483
- * @param string $method Non-existent method.
484
- * @param array $args All arguments passed to the method
485
- */
486
- public function __call( $method, $args ) {
487
- $object_class = strtolower( get_class( $this ) );
488
-
489
- if ( ! has_filter( "{$object_class}_inherit_{$method}" ) ) {
490
- throw new Exception( sprintf( esc_html__( 'Invalid %1$s method: %2$s', 'cmb2' ), get_class( $this ), $method ) );
491
- }
492
-
493
- array_unshift( $args, $this );
494
-
495
- /**
496
- * Allows overloading the object (CMB2 or CMB2_Field) with additional capabilities
497
- * by registering hook callbacks.
498
- *
499
- * The first dynamic portion of the hook name, $object_class, refers to the object class,
500
- * either cmb2 or cmb2_field.
501
- *
502
- * The second dynamic portion of the hook name, $method, is the non-existent method being
503
- * called on the object. To avoid possible future methods encroaching on your hooks,
504
- * use a unique method (aka, $cmb->prefix_my_method()).
505
- *
506
- * When registering your callback, you will need to ensure that you register the correct
507
- * number of `$accepted_args`, accounting for this object instance being the first argument.
508
- *
509
- * @param array $args The arguments to be passed to the hook.
510
- * The first argument will always be this object instance.
511
- */
512
- return apply_filters_ref_array( "{$object_class}_inherit_{$method}", $args );
513
- }
514
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/CMB2_Boxes.php DELETED
@@ -1,96 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * A CMB2 object instance registry for storing every CMB2 instance.
5
- *
6
- * @category WordPress_Plugin
7
- * @package CMB2
8
- * @author CMB2 team
9
- * @license GPL-2.0+
10
- * @link https://cmb2.io
11
- */
12
- class CMB2_Boxes {
13
-
14
- /**
15
- * Array of all metabox objects.
16
- *
17
- * @since 2.0.0
18
- * @var array
19
- */
20
- protected static $cmb2_instances = array();
21
-
22
- /**
23
- * Add a CMB2 instance object to the registry.
24
- *
25
- * @since 1.X.X
26
- *
27
- * @param CMB2 $cmb_instance CMB2 instance.
28
- */
29
- public static function add( CMB2 $cmb_instance ) {
30
- self::$cmb2_instances[ $cmb_instance->cmb_id ] = $cmb_instance;
31
- }
32
-
33
- /**
34
- * Remove a CMB2 instance object from the registry.
35
- *
36
- * @since 1.X.X
37
- *
38
- * @param string $cmb_id A CMB2 instance id.
39
- */
40
- public static function remove( $cmb_id ) {
41
- if ( array_key_exists( $cmb_id, self::$cmb2_instances ) ) {
42
- unset( self::$cmb2_instances[ $cmb_id ] );
43
- }
44
- }
45
-
46
- /**
47
- * Retrieve a CMB2 instance by cmb id.
48
- *
49
- * @since 1.X.X
50
- *
51
- * @param string $cmb_id A CMB2 instance id.
52
- *
53
- * @return CMB2|bool False or CMB2 object instance.
54
- */
55
- public static function get( $cmb_id ) {
56
- if ( empty( self::$cmb2_instances ) || empty( self::$cmb2_instances[ $cmb_id ] ) ) {
57
- return false;
58
- }
59
-
60
- return self::$cmb2_instances[ $cmb_id ];
61
- }
62
-
63
- /**
64
- * Retrieve all CMB2 instances registered.
65
- *
66
- * @since 1.X.X
67
- * @return CMB2[] Array of all registered cmb2 instances.
68
- */
69
- public static function get_all() {
70
- return self::$cmb2_instances;
71
- }
72
-
73
- /**
74
- * Retrieve all CMB2 instances that have the specified property set.
75
- *
76
- * @since 2.2.3
77
- * @param string $property Property name.
78
- * @param mixed $ignore The value to ignore.
79
- * @return CMB2[] Array of matching cmb2 instances.
80
- */
81
- public static function get_by_property( $property, $ignore = null ) {
82
- $boxes = array();
83
-
84
- foreach ( self::$cmb2_instances as $cmb_id => $cmb ) {
85
-
86
- if ( $ignore === $cmb->prop( $property ) ) {
87
- continue;
88
- }
89
-
90
- $boxes[ $cmb_id ] = $cmb;
91
- }
92
-
93
- return $boxes;
94
- }
95
-
96
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/CMB2_Field.php DELETED
@@ -1,1317 +0,0 @@
1
- <?php
2
- /**
3
- * CMB2 field objects
4
- *
5
- * @since 1.1.0
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- *
13
- * @method string _id()
14
- * @method string type()
15
- * @method mixed fields()
16
- */
17
- class CMB2_Field extends CMB2_Base {
18
-
19
- /**
20
- * The object properties name.
21
- *
22
- * @var string
23
- * @since 2.2.3
24
- */
25
- protected $properties_name = 'args';
26
-
27
- /**
28
- * Field arguments
29
- *
30
- * @var mixed
31
- * @since 1.1.0
32
- */
33
- public $args = array();
34
-
35
- /**
36
- * Field group object or false (if no group)
37
- *
38
- * @var mixed
39
- * @since 1.1.0
40
- */
41
- public $group = false;
42
-
43
- /**
44
- * Field meta value
45
- *
46
- * @var mixed
47
- * @since 1.1.0
48
- */
49
- public $value = null;
50
-
51
- /**
52
- * Field meta value
53
- *
54
- * @var mixed
55
- * @since 1.1.0
56
- */
57
- public $escaped_value = null;
58
-
59
- /**
60
- * Grouped Field's current numeric index during the save process
61
- *
62
- * @var mixed
63
- * @since 2.0.0
64
- */
65
- public $index = 0;
66
-
67
- /**
68
- * Array of field options
69
- *
70
- * @var array
71
- * @since 2.0.0
72
- */
73
- protected $field_options = array();
74
-
75
- /**
76
- * Array of provided field text strings
77
- *
78
- * @var array
79
- * @since 2.0.0
80
- */
81
- protected $strings;
82
-
83
- /**
84
- * The field's render context. In most cases, 'edit', but can be 'display'.
85
- *
86
- * @var string
87
- * @since 2.2.2
88
- */
89
- public $render_context = 'edit';
90
-
91
- /**
92
- * All CMB2_Field callable field arguments.
93
- * Can be used to determine if a field argument is callable.
94
- *
95
- * @var array
96
- */
97
- public static $callable_fields = array(
98
- 'default_cb',
99
- 'classes_cb',
100
- 'options_cb',
101
- 'text_cb',
102
- 'label_cb',
103
- 'render_row_cb',
104
- 'display_cb',
105
- 'before_group',
106
- 'before_group_row',
107
- 'before_row',
108
- 'before',
109
- 'before_field',
110
- 'after_field',
111
- 'after',
112
- 'after_row',
113
- 'after_group_row',
114
- 'after_group',
115
- );
116
-
117
- /**
118
- * Constructs our field object
119
- *
120
- * @since 1.1.0
121
- * @param array $args Field arguments
122
- */
123
- public function __construct( $args ) {
124
-
125
- if ( ! empty( $args['group_field'] ) ) {
126
- $this->group = $args['group_field'];
127
- $this->object_id = $this->group->object_id;
128
- $this->object_type = $this->group->object_type;
129
- $this->cmb_id = $this->group->cmb_id;
130
- } else {
131
- $this->object_id = isset( $args['object_id'] ) && '_' !== $args['object_id'] ? $args['object_id'] : 0;
132
- $this->object_type = isset( $args['object_type'] ) ? $args['object_type'] : 'post';
133
-
134
- if ( isset( $args['cmb_id'] ) ) {
135
- $this->cmb_id = $args['cmb_id'];
136
- }
137
- }
138
-
139
- $this->args = $this->_set_field_defaults( $args['field_args'], $args );
140
-
141
- if ( $this->object_id ) {
142
- $this->value = $this->get_data();
143
- }
144
- }
145
-
146
- /**
147
- * Non-existent methods fallback to checking for field arguments of the same name
148
- *
149
- * @since 1.1.0
150
- * @param string $name Method name
151
- * @param array $arguments Array of passed-in arguments
152
- * @return mixed Value of field argument
153
- */
154
- public function __call( $name, $arguments ) {
155
- if ( 'string' === $name ) {
156
- return call_user_func_array( array( $this, 'get_string' ), $arguments );
157
- }
158
-
159
- $key = isset( $arguments[0] ) ? $arguments[0] : false;
160
- return $this->args( $name, $key );
161
- }
162
-
163
- /**
164
- * Retrieves the field id
165
- *
166
- * @since 1.1.0
167
- * @param boolean $raw Whether to retrieve pre-modidifed id
168
- * @return string Field id
169
- */
170
- public function id( $raw = false ) {
171
- $id = $raw ? '_id' : 'id';
172
- return $this->args( $id );
173
- }
174
-
175
- /**
176
- * Get a field argument
177
- *
178
- * @since 1.1.0
179
- * @param string $key Argument to check
180
- * @param string $_key Sub argument to check
181
- * @return mixed Argument value or false if non-existent
182
- */
183
- public function args( $key = '', $_key = '' ) {
184
- $arg = $this->_data( 'args', $key );
185
-
186
- if ( in_array( $key, array( 'default', 'default_cb' ), true ) ) {
187
-
188
- $arg = $this->get_default();
189
-
190
- } elseif ( $_key ) {
191
-
192
- $arg = isset( $arg[ $_key ] ) ? $arg[ $_key ] : false;
193
- }
194
-
195
- return $arg;
196
- }
197
-
198
- /**
199
- * Retrieve a portion of a field property
200
- *
201
- * @since 1.1.0
202
- * @param string $var Field property to check
203
- * @param string $key Field property array key to check
204
- * @return mixed Queried property value or false
205
- */
206
- public function _data( $var, $key = '' ) {
207
- $vars = $this->{$var};
208
- if ( $key ) {
209
- return array_key_exists( $key, $vars ) ? $vars[ $key ] : false;
210
- }
211
- return $vars;
212
- }
213
-
214
- /**
215
- * Get Field's value
216
- *
217
- * @since 1.1.0
218
- * @param string $key If value is an array, is used to get array key->value
219
- * @return mixed Field value or false if non-existent
220
- */
221
- public function value( $key = '' ) {
222
- return $this->_data( 'value', $key );
223
- }
224
-
225
- /**
226
- * Retrieves metadata/option data
227
- *
228
- * @since 1.0.1
229
- * @param string $field_id Meta key/Option array key
230
- * @param array $args Override arguments
231
- * @return mixed Meta/Option value
232
- */
233
- public function get_data( $field_id = '', $args = array() ) {
234
- if ( $field_id ) {
235
- $args['field_id'] = $field_id;
236
- } elseif ( $this->group ) {
237
- $args['field_id'] = $this->group->id();
238
- }
239
-
240
- $a = $this->data_args( $args );
241
-
242
- /**
243
- * Filter whether to override getting of meta value.
244
- * Returning a non 'cmb2_field_no_override_val' value
245
- * will effectively short-circuit the value retrieval.
246
- *
247
- * @since 2.0.0
248
- *
249
- * @param mixed $value The value get_metadata() should
250
- * return - a single metadata value,
251
- * or an array of values.
252
- *
253
- * @param int $object_id Object ID.
254
- *
255
- * @param array $args {
256
- * An array of arguments for retrieving data
257
- *
258
- * @type string $type The current object type
259
- * @type int $id The current object ID
260
- * @type string $field_id The ID of the field being requested
261
- * @type bool $repeat Whether current field is repeatable
262
- * @type bool $single Whether current field is a single database row
263
- * }
264
- *
265
- * @param CMB2_Field object $field This field object
266
- */
267
- $data = apply_filters( 'cmb2_override_meta_value', 'cmb2_field_no_override_val', $this->object_id, $a, $this );
268
-
269
- /**
270
- * Filter and parameters are documented for 'cmb2_override_meta_value' filter (above).
271
- *
272
- * The dynamic portion of the hook, $field_id, refers to the current
273
- * field id paramater. Returning a non 'cmb2_field_no_override_val' value
274
- * will effectively short-circuit the value retrieval.
275
- *
276
- * @since 2.0.0
277
- */
278
- $data = apply_filters( "cmb2_override_{$a['field_id']}_meta_value", $data, $this->object_id, $a, $this );
279
-
280
- // If no override, get value normally
281
- if ( 'cmb2_field_no_override_val' === $data ) {
282
- $data = 'options-page' === $a['type']
283
- ? cmb2_options( $a['id'] )->get( $a['field_id'] )
284
- : get_metadata( $a['type'], $a['id'], $a['field_id'], ( $a['single'] || $a['repeat'] ) );
285
- }
286
-
287
- if ( $this->group ) {
288
-
289
- $data = is_array( $data ) && isset( $data[ $this->group->index ][ $this->args( '_id' ) ] )
290
- ? $data[ $this->group->index ][ $this->args( '_id' ) ]
291
- : false;
292
- }
293
-
294
- return $data;
295
- }
296
-
297
- /**
298
- * Updates metadata/option data
299
- *
300
- * @since 1.0.1
301
- * @param mixed $new_value Value to update data with
302
- * @param bool $single Whether data is an array (add_metadata)
303
- */
304
- public function update_data( $new_value, $single = true ) {
305
- $a = $this->data_args( array(
306
- 'single' => $single,
307
- ) );
308
-
309
- $a['value'] = $a['repeat'] ? array_values( $new_value ) : $new_value;
310
-
311
- /**
312
- * Filter whether to override saving of meta value.
313
- * Returning a non-null value will effectively short-circuit the function.
314
- *
315
- * @since 2.0.0
316
- *
317
- * @param null|bool $check Whether to allow updating metadata for the given type.
318
- *
319
- * @param array $args {
320
- * Array of data about current field including:
321
- *
322
- * @type string $value The value to set
323
- * @type string $type The current object type
324
- * @type int $id The current object ID
325
- * @type string $field_id The ID of the field being updated
326
- * @type bool $repeat Whether current field is repeatable
327
- * @type bool $single Whether current field is a single database row
328
- * }
329
- *
330
- * @param array $field_args All field arguments
331
- *
332
- * @param CMB2_Field object $field This field object
333
- */
334
- $override = apply_filters( 'cmb2_override_meta_save', null, $a, $this->args(), $this );
335
-
336
- /**
337
- * Filter and parameters are documented for 'cmb2_override_meta_save' filter (above).
338
- *
339
- * The dynamic portion of the hook, $a['field_id'], refers to the current
340
- * field id paramater. Returning a non-null value
341
- * will effectively short-circuit the function.
342
- *
343
- * @since 2.0.0
344
- */
345
- $override = apply_filters( "cmb2_override_{$a['field_id']}_meta_save", $override, $a, $this->args(), $this );
346
-
347
- // If override, return that
348
- if ( null !== $override ) {
349
- return $override;
350
- }
351
-
352
- // Options page handling (or temp data store)
353
- if ( 'options-page' === $a['type'] || empty( $a['id'] ) ) {
354
- return cmb2_options( $a['id'] )->update( $a['field_id'], $a['value'], false, $a['single'] );
355
- }
356
-
357
- // Add metadata if not single
358
- if ( ! $a['single'] ) {
359
- return add_metadata( $a['type'], $a['id'], $a['field_id'], $a['value'], false );
360
- }
361
-
362
- // Delete meta if we have an empty array
363
- if ( is_array( $a['value'] ) && empty( $a['value'] ) ) {
364
- return delete_metadata( $a['type'], $a['id'], $a['field_id'], $this->value );
365
- }
366
-
367
- // Update metadata
368
- return update_metadata( $a['type'], $a['id'], $a['field_id'], $a['value'] );
369
- }
370
-
371
- /**
372
- * Removes/updates metadata/option data
373
- *
374
- * @since 1.0.1
375
- * @param string $old Old value
376
- */
377
- public function remove_data( $old = '' ) {
378
- $a = $this->data_args( array(
379
- 'old' => $old,
380
- ) );
381
-
382
- /**
383
- * Filter whether to override removing of meta value.
384
- * Returning a non-null value will effectively short-circuit the function.
385
- *
386
- * @since 2.0.0
387
- *
388
- * @param null|bool $delete Whether to allow metadata deletion of the given type.
389
- * @param array $args Array of data about current field including:
390
- * 'type' : Current object type
391
- * 'id' : Current object ID
392
- * 'field_id' : Current Field ID
393
- * 'repeat' : Whether current field is repeatable
394
- * 'single' : Whether to save as a
395
- * single meta value
396
- * @param array $field_args All field arguments
397
- * @param CMB2_Field object $field This field object
398
- */
399
- $override = apply_filters( 'cmb2_override_meta_remove', null, $a, $this->args(), $this );
400
-
401
- /**
402
- * Filter whether to override removing of meta value.
403
- *
404
- * The dynamic portion of the hook, $a['field_id'], refers to the current
405
- * field id paramater. Returning a non-null value
406
- * will effectively short-circuit the function.
407
- *
408
- * @since 2.0.0
409
- *
410
- * @param null|bool $delete Whether to allow metadata deletion of the given type.
411
- * @param array $args Array of data about current field including:
412
- * 'type' : Current object type
413
- * 'id' : Current object ID
414
- * 'field_id' : Current Field ID
415
- * 'repeat' : Whether current field is repeatable
416
- * 'single' : Whether to save as a
417
- * single meta value
418
- * @param array $field_args All field arguments
419
- * @param CMB2_Field object $field This field object
420
- */
421
- $override = apply_filters( "cmb2_override_{$a['field_id']}_meta_remove", $override, $a, $this->args(), $this );
422
-
423
- // If no override, remove as usual
424
- if ( null !== $override ) {
425
- return $override;
426
- } // End if().
427
- // Option page handling.
428
- elseif ( 'options-page' === $a['type'] || empty( $a['id'] ) ) {
429
- return cmb2_options( $a['id'] )->remove( $a['field_id'] );
430
- }
431
-
432
- // Remove metadata
433
- return delete_metadata( $a['type'], $a['id'], $a['field_id'], $old );
434
- }
435
-
436
- /**
437
- * Data variables for get/set data methods
438
- *
439
- * @since 1.1.0
440
- * @param array $args Override arguments
441
- * @return array Updated arguments
442
- */
443
- public function data_args( $args = array() ) {
444
- $args = wp_parse_args( $args, array(
445
- 'type' => $this->object_type,
446
- 'id' => $this->object_id,
447
- 'field_id' => $this->id( true ),
448
- 'repeat' => $this->args( 'repeatable' ),
449
- 'single' => ! $this->args( 'multiple' ),
450
- ) );
451
- return $args;
452
- }
453
-
454
- /**
455
- * Checks if field has a registered sanitization callback
456
- *
457
- * @since 1.0.1
458
- * @param mixed $meta_value Meta value
459
- * @return mixed Possibly sanitized meta value
460
- */
461
- public function sanitization_cb( $meta_value ) {
462
-
463
- if ( $this->args( 'repeatable' ) && is_array( $meta_value ) ) {
464
- // Remove empties
465
- $meta_value = array_filter( $meta_value );
466
- }
467
-
468
- // Check if the field has a registered validation callback
469
- $cb = $this->maybe_callback( 'sanitization_cb' );
470
- if ( false === $cb ) {
471
- // If requesting NO validation, return meta value
472
- return $meta_value;
473
- } elseif ( $cb ) {
474
- // Ok, callback is good, let's run it.
475
- return call_user_func( $cb, $meta_value, $this->args(), $this );
476
- }
477
-
478
- $sanitizer = new CMB2_Sanitize( $this, $meta_value );
479
-
480
- /**
481
- * Filter the value before it is saved.
482
- *
483
- * The dynamic portion of the hook name, $this->type(), refers to the field type.
484
- *
485
- * Passing a non-null value to the filter will short-circuit saving
486
- * the field value, saving the passed value instead.
487
- *
488
- * @param bool|mixed $override_value Sanitization/Validation override value to return.
489
- * Default false to skip it.
490
- * @param mixed $value The value to be saved to this field.
491
- * @param int $object_id The ID of the object where the value will be saved
492
- * @param array $field_args The current field's arguments
493
- * @param object $sanitizer This `CMB2_Sanitize` object
494
- */
495
- $override_value = apply_filters( "cmb2_sanitize_{$this->type()}", null, $sanitizer->value, $this->object_id, $this->args(), $sanitizer );
496
-
497
- if ( null !== $override_value ) {
498
- return $override_value;
499
- }
500
-
501
- // Sanitization via 'CMB2_Sanitize'
502
- return $sanitizer->{$this->type()}();
503
- }
504
-
505
- /**
506
- * Process $_POST data to save this field's value
507
- *
508
- * @since 2.0.3
509
- * @param array $data_to_save $_POST data to check
510
- * @return array|int|bool Result of save, false on failure
511
- */
512
- public function save_field_from_data( array $data_to_save ) {
513
- $this->data_to_save = $data_to_save;
514
-
515
- $meta_value = isset( $this->data_to_save[ $this->id( true ) ] )
516
- ? $this->data_to_save[ $this->id( true ) ]
517
- : null;
518
-
519
- return $this->save_field( $meta_value );
520
- }
521
-
522
- /**
523
- * Sanitize/store a value to this field
524
- *
525
- * @since 2.0.0
526
- * @param array $meta_value Desired value to sanitize/store
527
- * @return array|int|bool Result of save. false on failure
528
- */
529
- public function save_field( $meta_value ) {
530
-
531
- $updated = false;
532
- $action = '';
533
- $new_value = $this->sanitization_cb( $meta_value );
534
-
535
- if ( ! $this->args( 'save_field' ) ) {
536
-
537
- // Nothing to see here.
538
- $action = 'disabled';
539
-
540
- } elseif ( $this->args( 'multiple' ) && ! $this->args( 'repeatable' ) && ! $this->group ) {
541
-
542
- $this->remove_data();
543
- $count = 0;
544
-
545
- if ( ! empty( $new_value ) ) {
546
- foreach ( $new_value as $add_new ) {
547
- if ( $this->update_data( $add_new, false ) ) {
548
- $count++;
549
- }
550
- }
551
- }
552
-
553
- $updated = $count ? $count : false;
554
- $action = 'repeatable';
555
-
556
- } elseif ( ! CMB2_Utils::isempty( $new_value ) && $new_value !== $this->get_data() ) {
557
- $updated = $this->update_data( $new_value );
558
- $action = 'updated';
559
- } elseif ( CMB2_Utils::isempty( $new_value ) ) {
560
- $updated = $this->remove_data();
561
- $action = 'removed';
562
- }
563
-
564
- if ( $updated ) {
565
- $this->value = $this->get_data();
566
- $this->escaped_value = null;
567
- }
568
-
569
- $field_id = $this->id( true );
570
-
571
- /**
572
- * Hooks after save field action.
573
- *
574
- * @since 2.2.0
575
- *
576
- * @param string $field_id the current field id paramater.
577
- * @param bool $updated Whether the metadata update action occurred.
578
- * @param string $action Action performed. Could be "repeatable", "updated", or "removed".
579
- * @param CMB2_Field object $field This field object
580
- */
581
- do_action( 'cmb2_save_field', $field_id, $updated, $action, $this );
582
-
583
- /**
584
- * Hooks after save field action.
585
- *
586
- * The dynamic portion of the hook, $field_id, refers to the
587
- * current field id paramater.
588
- *
589
- * @since 2.2.0
590
- *
591
- * @param bool $updated Whether the metadata update action occurred.
592
- * @param string $action Action performed. Could be "repeatable", "updated", or "removed".
593
- * @param CMB2_Field object $field This field object
594
- */
595
- do_action( "cmb2_save_field_{$field_id}", $updated, $action, $this );
596
-
597
- return $updated;
598
- }
599
-
600
- /**
601
- * Determine if current type is exempt from escaping
602
- *
603
- * @since 1.1.0
604
- * @return bool True if exempt
605
- */
606
- public function escaping_exception() {
607
- // These types cannot be escaped
608
- return in_array( $this->type(), array(
609
- 'file_list',
610
- 'multicheck',
611
- 'text_datetime_timestamp_timezone',
612
- ) );
613
- }
614
-
615
- /**
616
- * Determine if current type cannot be repeatable
617
- *
618
- * @since 1.1.0
619
- * @param string $type Field type to check
620
- * @return bool True if type cannot be repeatable
621
- */
622
- public function repeatable_exception( $type ) {
623
- // These types cannot be repeatable.
624
- $internal_fields = array(
625
- // Use file_list instead
626
- 'file' => 1,
627
- 'radio' => 1,
628
- 'title' => 1,
629
- 'wysiwyg' => 1,
630
- 'checkbox' => 1,
631
- 'radio_inline' => 1,
632
- 'taxonomy_radio' => 1,
633
- 'taxonomy_radio_inline' => 1,
634
- 'taxonomy_radio_hierarchical' => 1,
635
- 'taxonomy_select' => 1,
636
- 'taxonomy_multicheck' => 1,
637
- 'taxonomy_multicheck_inline' => 1,
638
- 'taxonomy_multicheck_hierarchical' => 1,
639
-
640
- );
641
-
642
- /**
643
- * Filter field types that are non-repeatable.
644
- *
645
- * Note that this does *not* allow overriding the default non-repeatable types.
646
- *
647
- * @since 2.1.1
648
- *
649
- * @param array $fields Array of fields designated as non-repeatable. Note that the field names are *keys*,
650
- * and not values. The value can be anything, because it is meaningless. Example:
651
- * array( 'my_custom_field' => 1 )
652
- */
653
- $all_fields = array_merge( apply_filters( 'cmb2_non_repeatable_fields', array() ), $internal_fields );
654
- return isset( $all_fields[ $type ] );
655
- }
656
-
657
- /**
658
- * Escape the value before output. Defaults to 'esc_attr()'
659
- *
660
- * @since 1.0.1
661
- * @param callable $func Escaping function (if not esc_attr())
662
- * @param mixed $meta_value Meta value
663
- * @return mixed Final value
664
- */
665
- public function escaped_value( $func = 'esc_attr', $meta_value = '' ) {
666
-
667
- if ( null !== $this->escaped_value ) {
668
- return $this->escaped_value;
669
- }
670
-
671
- $meta_value = $meta_value ? $meta_value : $this->value();
672
-
673
- // Check if the field has a registered escaping callback
674
- if ( $cb = $this->maybe_callback( 'escape_cb' ) ) {
675
- // Ok, callback is good, let's run it.
676
- return call_user_func( $cb, $meta_value, $this->args(), $this );
677
- }
678
-
679
- // Or custom escaping filter can be used
680
- $esc = apply_filters( "cmb2_types_esc_{$this->type()}", null, $meta_value, $this->args(), $this );
681
- if ( null !== $esc ) {
682
- return $esc;
683
- }
684
-
685
- if ( false === $cb || $this->escaping_exception() ) {
686
- // If requesting NO escaping, return meta value
687
- return $this->val_or_default( $meta_value );
688
- }
689
-
690
- // escaping function passed in?
691
- $func = $func ? $func : 'esc_attr';
692
- $meta_value = $this->val_or_default( $meta_value );
693
-
694
- if ( is_array( $meta_value ) ) {
695
- foreach ( $meta_value as $key => $value ) {
696
- $meta_value[ $key ] = call_user_func( $func, $value );
697
- }
698
- } else {
699
- $meta_value = call_user_func( $func, $meta_value );
700
- }
701
-
702
- $this->escaped_value = $meta_value;
703
- return $this->escaped_value;
704
- }
705
-
706
- /**
707
- * Return non-empty value or field default if value IS empty
708
- *
709
- * @since 2.0.0
710
- * @param mixed $meta_value Field value
711
- * @return mixed Field value, or default value
712
- */
713
- public function val_or_default( $meta_value ) {
714
- return ! CMB2_Utils::isempty( $meta_value ) ? $meta_value : $this->get_default();
715
- }
716
-
717
- /**
718
- * Offset a time value based on timezone
719
- *
720
- * @since 1.0.0
721
- * @return string Offset time string
722
- */
723
- public function field_timezone_offset() {
724
- return CMB2_Utils::timezone_offset( $this->field_timezone() );
725
- }
726
-
727
- /**
728
- * Return timezone string
729
- *
730
- * @since 1.0.0
731
- * @return string Timezone string
732
- */
733
- public function field_timezone() {
734
- $value = '';
735
-
736
- // Is timezone arg set?
737
- if ( $this->args( 'timezone' ) ) {
738
- $value = $this->args( 'timezone' );
739
- } // End if().
740
- // Is there another meta key with a timezone stored as its value we should use?
741
- elseif ( $this->args( 'timezone_meta_key' ) ) {
742
- $value = $this->get_data( $this->args( 'timezone_meta_key' ) );
743
- }
744
-
745
- return $value;
746
- }
747
-
748
- /**
749
- * Format the timestamp field value based on the field date/time format arg
750
- *
751
- * @since 2.0.0
752
- * @param int $meta_value Timestamp
753
- * @param string $format Either date_format or time_format
754
- * @return string Formatted date
755
- */
756
- public function format_timestamp( $meta_value, $format = 'date_format' ) {
757
- return date( stripslashes( $this->args( $format ) ), $meta_value );
758
- }
759
-
760
- /**
761
- * Return a formatted timestamp for a field
762
- *
763
- * @since 2.0.0
764
- * @param string $format Either date_format or time_format
765
- * @param string $meta_value Optional meta value to check
766
- * @return string Formatted date
767
- */
768
- public function get_timestamp_format( $format = 'date_format', $meta_value = 0 ) {
769
- $meta_value = $meta_value ? $meta_value : $this->escaped_value();
770
- $meta_value = CMB2_Utils::make_valid_time_stamp( $meta_value );
771
-
772
- if ( empty( $meta_value ) ) {
773
- return '';
774
- }
775
-
776
- return is_array( $meta_value )
777
- ? array_map( array( $this, 'format_timestamp' ), $meta_value, $format )
778
- : $this->format_timestamp( $meta_value, $format );
779
- }
780
-
781
- /**
782
- * Get timestamp from text date
783
- *
784
- * @since 2.2.0
785
- * @param string $value Date value
786
- * @return mixed Unix timestamp representing the date.
787
- */
788
- public function get_timestamp_from_value( $value ) {
789
- return CMB2_Utils::get_timestamp_from_value( $value, $this->args( 'date_format' ) );
790
- }
791
-
792
- /**
793
- * Get field render callback and Render the field row
794
- *
795
- * @since 1.0.0
796
- */
797
- public function render_field() {
798
- $this->render_context = 'edit';
799
-
800
- $this->peform_param_callback( 'render_row_cb' );
801
-
802
- // For chaining
803
- return $this;
804
- }
805
-
806
- /**
807
- * Default field render callback
808
- *
809
- * @since 2.1.1
810
- */
811
- public function render_field_callback() {
812
-
813
- // If field is requesting to not be shown on the front-end
814
- if ( ! is_admin() && ! $this->args( 'on_front' ) ) {
815
- return;
816
- }
817
-
818
- // If field is requesting to be conditionally shown
819
- if ( ! $this->should_show() ) {
820
- return;
821
- }
822
-
823
- $this->peform_param_callback( 'before_row' );
824
-
825
- printf( "<div class=\"cmb-row %s\" data-fieldtype=\"%s\">\n", $this->row_classes(), $this->type() );
826
-
827
- if ( ! $this->args( 'show_names' ) ) {
828
- echo "\n\t<div class=\"cmb-td\">\n";
829
-
830
- $this->peform_param_callback( 'label_cb' );
831
-
832
- } else {
833
-
834
- if ( $this->get_param_callback_result( 'label_cb' ) ) {
835
- echo '<div class="cmb-th">', $this->peform_param_callback( 'label_cb' ), '</div>';
836
- }
837
-
838
- echo "\n\t<div class=\"cmb-td\">\n";
839
- }
840
-
841
- $this->peform_param_callback( 'before' );
842
-
843
- $types = new CMB2_Types( $this );
844
- $types->render();
845
-
846
- $this->peform_param_callback( 'after' );
847
-
848
- echo "\n\t</div>\n</div>";
849
-
850
- $this->peform_param_callback( 'after_row' );
851
-
852
- // For chaining
853
- return $this;
854
- }
855
-
856
- /**
857
- * The default label_cb callback (if not a title field)
858
- *
859
- * @since 2.1.1
860
- * @return string Label html markup
861
- */
862
- public function label() {
863
- if ( ! $this->args( 'name' ) ) {
864
- return '';
865
- }
866
-
867
- $style = ! $this->args( 'show_names' ) ? ' style="display:none;"' : '';
868
-
869
- return sprintf( "\n" . '<label%1$s for="%2$s">%3$s</label>' . "\n", $style, $this->id(), $this->args( 'name' ) );
870
- }
871
-
872
- /**
873
- * Defines the classes for the current CMB2 field row
874
- *
875
- * @since 2.0.0
876
- * @return string Space concatenated list of classes
877
- */
878
- public function row_classes() {
879
-
880
- $classes = array();
881
-
882
- /**
883
- * By default, 'text_url' and 'text' fields get table-like styling
884
- *
885
- * @since 2.0.0
886
- *
887
- * @param array $field_types The types of fields which should get the 'table-layout' class
888
- */
889
- $repeat_table_rows_types = apply_filters( 'cmb2_repeat_table_row_types', array(
890
- 'text_url',
891
- 'text',
892
- ) );
893
-
894
- $conditional_classes = array(
895
- 'cmb-type-' . str_replace( '_', '-', sanitize_html_class( $this->type() ) ) => true,
896
- 'cmb2-id-' . str_replace( '_', '-', sanitize_html_class( $this->id() ) ) => true,
897
- 'cmb-repeat' => $this->args( 'repeatable' ),
898
- 'cmb-repeat-group-field' => $this->group,
899
- 'cmb-inline' => $this->args( 'inline' ),
900
- 'table-layout' => 'edit' === $this->render_context && in_array( $this->type(), $repeat_table_rows_types ),
901
- );
902
-
903
- foreach ( $conditional_classes as $class => $condition ) {
904
- if ( $condition ) {
905
- $classes[] = $class;
906
- }
907
- }
908
-
909
- if ( $added_classes = $this->args( 'classes' ) ) {
910
- $added_classes = is_array( $added_classes ) ? implode( ' ', $added_classes ) : (string) $added_classes;
911
- } elseif ( $added_classes = $this->get_param_callback_result( 'classes_cb' ) ) {
912
- $added_classes = is_array( $added_classes ) ? implode( ' ', $added_classes ) : (string) $added_classes;
913
- }
914
-
915
- if ( $added_classes ) {
916
- $classes[] = esc_attr( $added_classes );
917
- }
918
-
919
- /**
920
- * Globally filter row classes
921
- *
922
- * @since 2.0.0
923
- *
924
- * @param string $classes Space-separated list of row classes
925
- * @param CMB2_Field object $field This field object
926
- */
927
- return apply_filters( 'cmb2_row_classes', implode( ' ', $classes ), $this );
928
- }
929
-
930
-
931
-
932
- /**
933
- * Get field display callback and render the display value in the column.
934
- *
935
- * @since 2.2.2
936
- */
937
- public function render_column() {
938
- $this->render_context = 'display';
939
-
940
- $this->peform_param_callback( 'display_cb' );
941
-
942
- // For chaining
943
- return $this;
944
- }
945
-
946
- /**
947
- * Default callback to outputs field value in a display format.
948
- *
949
- * @since 2.2.2
950
- */
951
- public function display_value_callback() {
952
- // If field is requesting to be conditionally shown
953
- if ( ! $this->should_show() ) {
954
- return;
955
- }
956
-
957
- $display = new CMB2_Field_Display( $this );
958
-
959
- /**
960
- * A filter to bypass the default display.
961
- *
962
- * The dynamic portion of the hook name, $this->type(), refers to the field type.
963
- *
964
- * Passing a non-null value to the filter will short-circuit the default display.
965
- *
966
- * @param bool|mixed $pre_output Default null value.
967
- * @param CMB2_Field $field This field object.
968
- * @param CMB2_Field_Display $display The `CMB2_Field_Display` object.
969
- */
970
- $pre_output = apply_filters( "cmb2_pre_field_display_{$this->type()}", null, $this, $display );
971
-
972
- if ( null !== $pre_output ) {
973
- echo $pre_output;
974
- return;
975
- }
976
-
977
- $this->peform_param_callback( 'before_display_wrap' );
978
-
979
- printf( "<div class=\"cmb-column %s\" data-fieldtype=\"%s\">\n", $this->row_classes( 'display' ), $this->type() );
980
-
981
- $this->peform_param_callback( 'before_display' );
982
-
983
- CMB2_Field_Display::get( $this )->display();
984
-
985
- $this->peform_param_callback( 'after_display' );
986
-
987
- echo "\n</div>";
988
-
989
- $this->peform_param_callback( 'after_display_wrap' );
990
-
991
- // For chaining
992
- return $this;
993
- }
994
-
995
- /**
996
- * Replaces a hash key - {#} - with the repeatable index
997
- *
998
- * @since 1.2.0
999
- * @param string $value Value to update
1000
- * @return string Updated value
1001
- */
1002
- public function replace_hash( $value ) {
1003
- // Replace hash with 1 based count
1004
- return str_replace( '{#}', ( $this->index + 1 ), $value );
1005
- }
1006
-
1007
- /**
1008
- * Retrieve text parameter from field's text array (if it has one), or use fallback text
1009
- * For back-compatibility, falls back to checking the options array.
1010
- *
1011
- * @since 2.2.2
1012
- * @param string $text_key Key in field's text array
1013
- * @param string $fallback Fallback text
1014
- * @return string Text
1015
- */
1016
- public function get_string( $text_key, $fallback ) {
1017
- // If null, populate with our field strings values.
1018
- if ( null === $this->strings ) {
1019
- $this->strings = (array) $this->args['text'];
1020
-
1021
- if ( is_callable( $this->args['text_cb'] ) ) {
1022
- $strings = call_user_func( $this->args['text_cb'], $this );
1023
-
1024
- if ( $strings && is_array( $strings ) ) {
1025
- $this->strings += $strings;
1026
- }
1027
- }
1028
- }
1029
-
1030
- // If we have that string value, send it back.
1031
- if ( isset( $this->strings[ $text_key ] ) ) {
1032
- return $this->strings[ $text_key ];
1033
- }
1034
-
1035
- // Check options for back-compat.
1036
- $string = $this->options( $text_key );
1037
-
1038
- return $string ? $string : $fallback;
1039
- }
1040
-
1041
- /**
1042
- * Retrieve options args.
1043
- *
1044
- * @since 2.0.0
1045
- * @param string $key Specific option to retrieve
1046
- * @return array Array of options
1047
- */
1048
- public function options( $key = '' ) {
1049
- if ( empty( $this->field_options ) ) {
1050
- $this->set_options();
1051
- }
1052
-
1053
- if ( $key ) {
1054
- return array_key_exists( $key, $this->field_options ) ? $this->field_options[ $key ] : false;
1055
- }
1056
-
1057
- return $this->field_options;
1058
- }
1059
-
1060
- /**
1061
- * Generates/sets options args. Calls options_cb if it exists.
1062
- *
1063
- * @since 2.2.5
1064
- *
1065
- * @return array Array of options
1066
- */
1067
- public function set_options() {
1068
- $this->field_options = (array) $this->args['options'];
1069
-
1070
- if ( is_callable( $this->args['options_cb'] ) ) {
1071
- $options = call_user_func( $this->args['options_cb'], $this );
1072
-
1073
- if ( $options && is_array( $options ) ) {
1074
- $this->field_options = $options + $this->field_options;
1075
- }
1076
- }
1077
-
1078
- return $this->field_options;
1079
- }
1080
-
1081
- /**
1082
- * Store JS dependencies as part of the field args.
1083
- *
1084
- * @since 2.2.0
1085
- * @param array $dependencies Dependies to register for this field.
1086
- */
1087
- public function add_js_dependencies( $dependencies = array() ) {
1088
- foreach ( (array) $dependencies as $dependency ) {
1089
- $this->args['js_dependencies'][ $dependency ] = $dependency;
1090
- }
1091
-
1092
- CMB2_JS::add_dependencies( $dependencies );
1093
- }
1094
-
1095
- /**
1096
- * Get CMB2_Field default value, either from default param or default_cb param.
1097
- *
1098
- * @since 0.2.2
1099
- *
1100
- * @return mixed Default field value
1101
- */
1102
- public function get_default() {
1103
- if ( null !== $this->args['default'] ) {
1104
- return $this->args['default'];
1105
- }
1106
-
1107
- $param = is_callable( $this->args['default_cb'] ) ? 'default_cb' : 'default';
1108
- $default = $this->get_param_callback_result( $param );
1109
-
1110
- // Allow a filter override of the default value
1111
- $this->args['default'] = apply_filters( 'cmb2_default_filter', $default, $this );
1112
-
1113
- return $this->args['default'];
1114
- }
1115
-
1116
- /**
1117
- * Fills in empty field parameters with defaults
1118
- *
1119
- * @since 1.1.0
1120
- * @param array $args Metabox field config array
1121
- * @param array Modified field config array.
1122
- */
1123
- public function _set_field_defaults( $args ) {
1124
-
1125
- // Set up blank or default values for empty ones
1126
- $args = wp_parse_args( $args, array(
1127
- 'type' => '',
1128
- 'name' => '',
1129
- 'desc' => '',
1130
- 'before' => '',
1131
- 'after' => '',
1132
- 'options' => array(),
1133
- 'options_cb' => '',
1134
- 'text' => array(),
1135
- 'text_cb' => '',
1136
- 'attributes' => array(),
1137
- 'protocols' => null,
1138
- 'default' => null,
1139
- 'default_cb' => '',
1140
- 'classes' => null,
1141
- 'classes_cb' => '',
1142
- 'select_all_button' => true,
1143
- 'multiple' => false,
1144
- 'repeatable' => isset( $args['type'] ) && 'group' == $args['type'],
1145
- 'inline' => false,
1146
- 'on_front' => true,
1147
- 'show_names' => true,
1148
- 'save_field' => true, // Will not save if false
1149
- 'date_format' => 'm\/d\/Y',
1150
- 'time_format' => 'h:i A',
1151
- 'description' => isset( $args['desc'] ) ? $args['desc'] : '',
1152
- 'preview_size' => 'file' == $args['type'] ? array( 350, 350 ) : array( 50, 50 ),
1153
- 'render_row_cb' => array( $this, 'render_field_callback' ),
1154
- 'display_cb' => array( $this, 'display_value_callback' ),
1155
- 'label_cb' => 'title' != $args['type'] ? array( $this, 'label' ) : '',
1156
- 'column' => false,
1157
- 'js_dependencies' => array(),
1158
- 'show_in_rest' => null,
1159
- ) );
1160
-
1161
- /*
1162
- * Deprecated usage:
1163
- *
1164
- * 'std' -- use 'default' (no longer works)
1165
- * 'row_classes' -- use 'class', or 'class_cb'
1166
- * 'default' -- as callback (use default_cb)
1167
- */
1168
- $args = $this->convert_deprecated_params( $args );
1169
-
1170
- $args['repeatable'] = $args['repeatable'] && ! $this->repeatable_exception( $args['type'] );
1171
- $args['inline'] = $args['inline'] || false !== stripos( $args['type'], '_inline' );
1172
-
1173
- $args['options'] = 'group' == $args['type'] ? wp_parse_args( $args['options'], array(
1174
- 'add_button' => esc_html__( 'Add Group', 'cmb2' ),
1175
- 'remove_button' => esc_html__( 'Remove Group', 'cmb2' ),
1176
- ) ) : $args['options'];
1177
-
1178
- $args['_id'] = $args['id'];
1179
- $args['_name'] = $args['id'];
1180
-
1181
- if ( $this->group ) {
1182
-
1183
- $args['id'] = $this->group->args( 'id' ) . '_' . $this->group->index . '_' . $args['id'];
1184
- $args['_name'] = $this->group->args( 'id' ) . '[' . $this->group->index . '][' . $args['_name'] . ']';
1185
- }
1186
-
1187
- if ( 'wysiwyg' == $args['type'] ) {
1188
- $args['id'] = strtolower( str_ireplace( '-', '_', $args['id'] ) );
1189
- $args['options']['textarea_name'] = $args['_name'];
1190
- }
1191
-
1192
- $option_types = apply_filters( 'cmb2_all_or_nothing_types', array( 'select', 'radio', 'radio_inline', 'taxonomy_select', 'taxonomy_radio', 'taxonomy_radio_inline', 'taxonomy_radio_hierarchical', ), $this );
1193
-
1194
- if ( in_array( $args['type'], $option_types, true ) ) {
1195
-
1196
- $args['show_option_none'] = isset( $args['show_option_none'] ) ? $args['show_option_none'] : null;
1197
- $args['show_option_none'] = true === $args['show_option_none'] ? esc_html__( 'None', 'cmb2' ) : $args['show_option_none'];
1198
-
1199
- if ( null === $args['show_option_none'] ) {
1200
- $off_by_default = in_array( $args['type'], array( 'select', 'radio', 'radio_inline' ), true );
1201
- $args['show_option_none'] = $off_by_default ? false : esc_html__( 'None', 'cmb2' );
1202
- }
1203
- }
1204
-
1205
- $args['has_supporting_data'] = in_array(
1206
- $args['type'],
1207
- array(
1208
- // CMB2_Sanitize::_save_file_id_value()/CMB2_Sanitize::_get_group_file_value_array()
1209
- 'file',
1210
- // See CMB2_Sanitize::_save_utc_value()
1211
- 'text_datetime_timestamp_timezone',
1212
- ),
1213
- true
1214
- );
1215
-
1216
- return $args;
1217
- }
1218
-
1219
- /**
1220
- * Get default field arguments specific to this CMB2 object.
1221
- *
1222
- * @since 2.2.0
1223
- * @param array $field_args Metabox field config array.
1224
- * @param CMB2_Field $field_group (optional) CMB2_Field object (group parent)
1225
- * @return array Array of field arguments.
1226
- */
1227
- protected function get_default_args( $field_args, $field_group = null ) {
1228
- $args = parent::get_default_args( array(), $this->group );
1229
-
1230
- if ( isset( $field_args['field_args'] ) ) {
1231
- $args = wp_parse_args( $field_args, $args );
1232
- } else {
1233
- $args['field_args'] = wp_parse_args( $field_args, $this->args );
1234
- }
1235
-
1236
- return $args;
1237
- }
1238
-
1239
- /**
1240
- * Returns a cloned version of this field object, but with
1241
- * modified/overridden field arguments.
1242
- *
1243
- * @since 2.2.2
1244
- * @param array $field_args Array of field arguments, or entire array of
1245
- * arguments for CMB2_Field
1246
- *
1247
- * @return CMB2_Field The new CMB2_Field instance.
1248
- */
1249
- public function get_field_clone( $field_args ) {
1250
- return $this->get_new_field( $field_args );
1251
- }
1252
-
1253
- /**
1254
- * Returns the CMB2 instance this field is registered to.
1255
- *
1256
- * @since 2.2.2
1257
- *
1258
- * @return CMB2|WP_Error If new CMB2_Field is called without cmb_id arg, returns error.
1259
- */
1260
- public function get_cmb() {
1261
- if ( ! $this->cmb_id ) {
1262
- return new WP_Error( 'no_cmb_id', esc_html__( 'Sorry, this field does not have a cmb_id specified.', 'cmb2' ) );
1263
- }
1264
-
1265
- return cmb2_get_metabox( $this->cmb_id, $this->object_id, $this->object_type );
1266
- }
1267
-
1268
- /**
1269
- * Converts deprecated field parameters to the current/proper parameter, and throws a deprecation notice.
1270
- *
1271
- * @since 2.2.3
1272
- * @param array $args Metabox field config array.
1273
- * @param array Modified field config array.
1274
- */
1275
- protected function convert_deprecated_params( $args ) {
1276
-
1277
- if ( isset( $args['row_classes'] ) ) {
1278
-
1279
- // We'll let this one be.
1280
- // $this->deprecated_param( __CLASS__ . '::__construct()', '2.2.3', self::DEPRECATED_PARAM, 'row_classes', 'classes' );
1281
- // row_classes param could be a callback. This is definitely deprecated.
1282
- if ( is_callable( $args['row_classes'] ) ) {
1283
-
1284
- $this->deprecated_param( __CLASS__ . '::__construct()', '2.2.3', self::DEPRECATED_CB_PARAM, 'row_classes', 'classes_cb' );
1285
-
1286
- $args['classes_cb'] = $args['row_classes'];
1287
- $args['classes'] = null;
1288
- } else {
1289
-
1290
- $args['classes'] = $args['row_classes'];
1291
- }
1292
-
1293
- unset( $args['row_classes'] );
1294
- }
1295
-
1296
- // default param can be passed a callback as well
1297
- if ( is_callable( $args['default'] ) ) {
1298
-
1299
- $this->deprecated_param( __CLASS__ . '::__construct()', '2.2.3', self::DEPRECATED_CB_PARAM, 'default', 'default_cb' );
1300
-
1301
- $args['default_cb'] = $args['default'];
1302
- $args['default'] = null;
1303
- }
1304
-
1305
- // options param can be passed a callback as well
1306
- if ( is_callable( $args['options'] ) ) {
1307
-
1308
- $this->deprecated_param( __CLASS__ . '::__construct()', '2.2.3', self::DEPRECATED_CB_PARAM, 'options', 'options_cb' );
1309
-
1310
- $args['options_cb'] = $args['options'];
1311
- $args['options'] = array();
1312
- }
1313
-
1314
- return $args;
1315
- }
1316
-
1317
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/CMB2_Field_Display.php DELETED
@@ -1,484 +0,0 @@
1
- <?php
2
- /**
3
- * CMB2 field display base.
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Field_Display {
14
-
15
- /**
16
- * A CMB field object
17
- *
18
- * @var CMB2_Field object
19
- * @since 2.2.2
20
- */
21
- public $field;
22
-
23
- /**
24
- * The CMB field object's value.
25
- *
26
- * @var mixed
27
- * @since 2.2.2
28
- */
29
- public $value;
30
-
31
- /**
32
- * Get the corresponding display class for the field type.
33
- *
34
- * @since 2.2.2
35
- * @param CMB2_Field $field
36
- * @return CMB2_Field_Display
37
- */
38
- public static function get( CMB2_Field $field ) {
39
- switch ( $field->type() ) {
40
- case 'text_url':
41
- $type = new CMB2_Display_Text_Url( $field );
42
- break;
43
- case 'text_money':
44
- $type = new CMB2_Display_Text_Money( $field );
45
- break;
46
- case 'colorpicker':
47
- $type = new CMB2_Display_Colorpicker( $field );
48
- break;
49
- case 'checkbox':
50
- $type = new CMB2_Display_Checkbox( $field );
51
- break;
52
- case 'wysiwyg':
53
- case 'textarea_small':
54
- $type = new CMB2_Display_Textarea( $field );
55
- break;
56
- case 'textarea_code':
57
- $type = new CMB2_Display_Textarea_Code( $field );
58
- break;
59
- case 'text_time':
60
- $type = new CMB2_Display_Text_Time( $field );
61
- break;
62
- case 'text_date':
63
- case 'text_date_timestamp':
64
- case 'text_datetime_timestamp':
65
- $type = new CMB2_Display_Text_Date( $field );
66
- break;
67
- case 'text_datetime_timestamp_timezone':
68
- $type = new CMB2_Display_Text_Date_Timezone( $field );
69
- break;
70
- case 'select':
71
- case 'radio':
72
- case 'radio_inline':
73
- $type = new CMB2_Display_Select( $field );
74
- break;
75
- case 'multicheck':
76
- case 'multicheck_inline':
77
- $type = new CMB2_Display_Multicheck( $field );
78
- break;
79
- case 'taxonomy_radio':
80
- case 'taxonomy_radio_inline':
81
- case 'taxonomy_select':
82
- case 'taxonomy_radio_hierarchical':
83
- $type = new CMB2_Display_Taxonomy_Radio( $field );
84
- break;
85
- case 'taxonomy_multicheck':
86
- case 'taxonomy_multicheck_inline':
87
- case 'taxonomy_multicheck_hierarchical':
88
- $type = new CMB2_Display_Taxonomy_Multicheck( $field );
89
- break;
90
- case 'file':
91
- $type = new CMB2_Display_File( $field );
92
- break;
93
- case 'file_list':
94
- $type = new CMB2_Display_File_List( $field );
95
- break;
96
- case 'oembed':
97
- $type = new CMB2_Display_oEmbed( $field );
98
- break;
99
- default:
100
- $type = new self( $field );
101
- break;
102
- }// End switch().
103
-
104
- return $type;
105
- }
106
-
107
- /**
108
- * Setup our class vars
109
- *
110
- * @since 2.2.2
111
- * @param CMB2_Field $field A CMB2 field object
112
- */
113
- public function __construct( CMB2_Field $field ) {
114
- $this->field = $field;
115
- $this->value = $this->field->value;
116
- }
117
-
118
- /**
119
- * Catchall method if field's 'display_cb' is NOT defined, or field type does
120
- * not have a corresponding display method
121
- *
122
- * @since 2.2.2
123
- */
124
- public function display() {
125
- // If repeatable
126
- if ( $this->field->args( 'repeatable' ) ) {
127
-
128
- // And has a repeatable value
129
- if ( is_array( $this->field->value ) ) {
130
-
131
- // Then loop and output.
132
- echo '<ul class="cmb2-' . str_replace( '_', '-', $this->field->type() ) . '">';
133
- foreach ( $this->field->value as $val ) {
134
- $this->value = $val;
135
- echo '<li>', $this->_display(), '</li>';
136
- ;
137
- }
138
- echo '</ul>';
139
- }
140
- } else {
141
- $this->_display();
142
- }
143
- }
144
-
145
- /**
146
- * Default fallback display method.
147
- *
148
- * @since 2.2.2
149
- */
150
- protected function _display() {
151
- print_r( $this->value );
152
- }
153
- }
154
-
155
- class CMB2_Display_Text_Url extends CMB2_Field_Display {
156
- /**
157
- * Display url value.
158
- *
159
- * @since 2.2.2
160
- */
161
- protected function _display() {
162
- echo make_clickable( esc_url( $this->value ) );
163
- }
164
- }
165
-
166
- class CMB2_Display_Text_Money extends CMB2_Field_Display {
167
- /**
168
- * Display text_money value.
169
- *
170
- * @since 2.2.2
171
- */
172
- protected function _display() {
173
- $this->value = $this->value ? $this->value : '0';
174
- echo ( ! $this->field->get_param_callback_result( 'before_field' ) ? '$' : ' ' ), $this->value;
175
- }
176
- }
177
-
178
- class CMB2_Display_Colorpicker extends CMB2_Field_Display {
179
- /**
180
- * Display color picker value.
181
- *
182
- * @since 2.2.2
183
- */
184
- protected function _display() {
185
- echo '<span class="cmb2-colorpicker-swatch"><span style="background-color:', esc_attr( $this->value ), '"></span> ', esc_html( $this->value ), '</span>';
186
- }
187
- }
188
-
189
- class CMB2_Display_Checkbox extends CMB2_Field_Display {
190
- /**
191
- * Display multicheck value.
192
- *
193
- * @since 2.2.2
194
- */
195
- protected function _display() {
196
- echo $this->value === 'on' ? 'on' : 'off';
197
- }
198
- }
199
-
200
- class CMB2_Display_Select extends CMB2_Field_Display {
201
- /**
202
- * Display select value.
203
- *
204
- * @since 2.2.2
205
- */
206
- protected function _display() {
207
- $options = $this->field->options();
208
-
209
- $fallback = $this->field->args( 'show_option_none' );
210
- if ( ! $fallback && isset( $options[''] ) ) {
211
- $fallback = $options[''];
212
- }
213
- if ( ! $this->value && $fallback ) {
214
- echo $fallback;
215
- } elseif ( isset( $options[ $this->value ] ) ) {
216
- echo $options[ $this->value ];
217
- } else {
218
- echo esc_attr( $this->value );
219
- }
220
- }
221
- }
222
-
223
- class CMB2_Display_Multicheck extends CMB2_Field_Display {
224
- /**
225
- * Display multicheck value.
226
- *
227
- * @since 2.2.2
228
- */
229
- protected function _display() {
230
- if ( empty( $this->value ) || ! is_array( $this->value ) ) {
231
- return;
232
- }
233
-
234
- $options = $this->field->options();
235
-
236
- $output = array();
237
- foreach ( $this->value as $val ) {
238
- if ( isset( $options[ $val ] ) ) {
239
- $output[] = $options[ $val ];
240
- } else {
241
- $output[] = esc_attr( $val );
242
- }
243
- }
244
-
245
- echo implode( ', ', $output );
246
- }
247
- }
248
-
249
- class CMB2_Display_Textarea extends CMB2_Field_Display {
250
- /**
251
- * Display textarea value.
252
- *
253
- * @since 2.2.2
254
- */
255
- protected function _display() {
256
- echo wpautop( wp_kses_post( $this->value ) );
257
- }
258
- }
259
-
260
- class CMB2_Display_Textarea_Code extends CMB2_Field_Display {
261
- /**
262
- * Display textarea_code value.
263
- *
264
- * @since 2.2.2
265
- */
266
- protected function _display() {
267
- echo '<xmp class="cmb2-code">' . print_r( $this->value, true ) . '</xmp>';
268
- }
269
- }
270
-
271
- class CMB2_Display_Text_Time extends CMB2_Field_Display {
272
- /**
273
- * Display text_time value.
274
- *
275
- * @since 2.2.2
276
- */
277
- protected function _display() {
278
- echo $this->field->get_timestamp_format( 'time_format', $this->value );
279
- }
280
- }
281
-
282
- class CMB2_Display_Text_Date extends CMB2_Field_Display {
283
- /**
284
- * Display text_date value.
285
- *
286
- * @since 2.2.2
287
- */
288
- protected function _display() {
289
- echo $this->field->get_timestamp_format( 'date_format', $this->value );
290
- }
291
- }
292
-
293
- class CMB2_Display_Text_Date_Timezone extends CMB2_Field_Display {
294
- /**
295
- * Display text_datetime_timestamp_timezone value.
296
- *
297
- * @since 2.2.2
298
- */
299
- protected function _display() {
300
- $field = $this->field;
301
-
302
- if ( empty( $this->value ) ) {
303
- return;
304
- }
305
-
306
- $datetime = maybe_unserialize( $this->value );
307
- $this->value = $tzstring = '';
308
-
309
- if ( $datetime && $datetime instanceof DateTime ) {
310
- $tz = $datetime->getTimezone();
311
- $tzstring = $tz->getName();
312
- $this->value = $datetime->getTimestamp();
313
- }
314
-
315
- $date = $this->field->get_timestamp_format( 'date_format', $this->value );
316
- $time = $this->field->get_timestamp_format( 'time_format', $this->value );
317
-
318
- echo $date, ( $time ? ' ' . $time : '' ), ( $tzstring ? ', ' . $tzstring : '' );
319
- }
320
- }
321
-
322
- class CMB2_Display_Taxonomy_Radio extends CMB2_Field_Display {
323
- /**
324
- * Display single taxonomy value.
325
- *
326
- * @since 2.2.2
327
- */
328
- protected function _display() {
329
- $taxonomy = $this->field->args( 'taxonomy' );
330
- $types = new CMB2_Types( $this->field );
331
- $type = $types->get_new_render_type( $this->field->type(), 'CMB2_Type_Taxonomy_Radio' );
332
- $terms = $type->get_object_terms();
333
- $term = false;
334
-
335
- if ( is_wp_error( $terms ) || empty( $terms ) && ( $default = $this->field->get_default() ) ) {
336
- $term = get_term_by( 'slug', $default, $taxonomy );
337
- } elseif ( ! empty( $terms ) ) {
338
- $term = $terms[ key( $terms ) ];
339
- }
340
-
341
- if ( $term ) {
342
- $link = get_edit_term_link( $term->term_id, $taxonomy );
343
- echo '<a href="', esc_url( $link ), '">', esc_html( $term->name ), '</a>';
344
- }
345
- }
346
- }
347
-
348
- class CMB2_Display_Taxonomy_Multicheck extends CMB2_Field_Display {
349
- /**
350
- * Display taxonomy values.
351
- *
352
- * @since 2.2.2
353
- */
354
- protected function _display() {
355
- $taxonomy = $this->field->args( 'taxonomy' );
356
- $types = new CMB2_Types( $this->field );
357
- $type = $types->get_new_render_type( $this->field->type(), 'CMB2_Type_Taxonomy_Multicheck' );
358
- $terms = $type->get_object_terms();
359
-
360
- if ( is_wp_error( $terms ) || empty( $terms ) && ( $default = $this->field->get_default() ) ) {
361
- $terms = array();
362
- if ( is_array( $default ) ) {
363
- foreach ( $default as $slug ) {
364
- $terms[] = get_term_by( 'slug', $slug, $taxonomy );
365
- }
366
- } else {
367
- $terms[] = get_term_by( 'slug', $default, $taxonomy );
368
- }
369
- }
370
-
371
- if ( is_array( $terms ) ) {
372
-
373
- $links = array();
374
- foreach ( $terms as $term ) {
375
- $link = get_edit_term_link( $term->term_id, $taxonomy );
376
- $links[] = '<a href="' . esc_url( $link ) . '">' . esc_html( $term->name ) . '</a>';
377
- }
378
- // Then loop and output.
379
- echo '<div class="cmb2-taxonomy-terms-', esc_attr( $taxonomy ), '">';
380
- echo implode( ', ', $links );
381
- echo '</div>';
382
- }
383
- }
384
- }
385
-
386
- class CMB2_Display_File extends CMB2_Field_Display {
387
- /**
388
- * Display file value.
389
- *
390
- * @since 2.2.2
391
- */
392
- protected function _display() {
393
- if ( empty( $this->value ) ) {
394
- return;
395
- }
396
-
397
- $this->value = esc_url_raw( $this->value );
398
-
399
- $types = new CMB2_Types( $this->field );
400
- $type = $types->get_new_render_type( $this->field->type(), 'CMB2_Type_File_Base' );
401
-
402
- $id = $this->field->get_field_clone( array(
403
- 'id' => $this->field->_id() . '_id',
404
- ) )->escaped_value( 'absint' );
405
-
406
- $this->file_output( $this->value, $id, $type );
407
- }
408
-
409
- protected function file_output( $url_value, $id, CMB2_Type_File_Base $field_type ) {
410
- // If there is no ID saved yet, try to get it from the url
411
- if ( $url_value && ! $id ) {
412
- $id = CMB2_Utils::image_id_from_url( esc_url_raw( $url_value ) );
413
- }
414
-
415
- if ( $field_type->is_valid_img_ext( $url_value ) ) {
416
- $img_size = $this->field->args( 'preview_size' );
417
-
418
- if ( $id ) {
419
- $image = wp_get_attachment_image( $id, $img_size, null, array(
420
- 'class' => 'cmb-image-display',
421
- ) );
422
- } else {
423
- $size = is_array( $img_size ) ? $img_size[0] : 200;
424
- $image = '<img class="cmb-image-display" style="max-width: ' . absint( $size ) . 'px; width: 100%; height: auto;" src="' . $url_value . '" alt="" />';
425
- }
426
-
427
- echo $image;
428
-
429
- } else {
430
-
431
- printf( '<div class="file-status"><span>%1$s <strong><a href="%2$s">%3$s</a></strong></span></div>',
432
- esc_html( $field_type->_text( 'file_text', esc_html__( 'File:', 'cmb2' ) ) ),
433
- $url_value,
434
- CMB2_Utils::get_file_name_from_path( $url_value )
435
- );
436
-
437
- }
438
- }
439
- }
440
-
441
- class CMB2_Display_File_List extends CMB2_Display_File {
442
- /**
443
- * Display file_list value.
444
- *
445
- * @since 2.2.2
446
- */
447
- protected function _display() {
448
- if ( empty( $this->value ) || ! is_array( $this->value ) ) {
449
- return;
450
- }
451
-
452
- $types = new CMB2_Types( $this->field );
453
- $type = $types->get_new_render_type( $this->field->type(), 'CMB2_Type_File_Base' );
454
-
455
- echo '<ul class="cmb2-display-file-list">';
456
- foreach ( $this->value as $id => $fullurl ) {
457
- echo '<li>', $this->file_output( esc_url_raw( $fullurl ), $id, $type ), '</li>';
458
- }
459
- echo '</ul>';
460
- }
461
- }
462
-
463
- class CMB2_Display_oEmbed extends CMB2_Field_Display {
464
- /**
465
- * Display oembed value.
466
- *
467
- * @since 2.2.2
468
- */
469
- protected function _display() {
470
- if ( ! $this->value ) {
471
- return;
472
- }
473
-
474
- cmb2_do_oembed( array(
475
- 'url' => $this->value,
476
- 'object_id' => $this->field->object_id,
477
- 'object_type' => $this->field->object_type,
478
- 'oembed_args' => array(
479
- 'width' => '300',
480
- ),
481
- 'field_id' => $this->field->id(),
482
- ) );
483
- }
484
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/CMB2_Hookup_Base.php DELETED
@@ -1,103 +0,0 @@
1
- <?php
2
- /**
3
- * Base class for hooking CMB2 into WordPress.
4
- *
5
- * @since 2.2.0
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- *
13
- * @property-read string $object_type
14
- * @property-read CMB2 $cmb
15
- */
16
- abstract class CMB2_Hookup_Base {
17
-
18
- /**
19
- * @var CMB2 object
20
- * @since 2.0.2
21
- */
22
- protected $cmb;
23
-
24
- /**
25
- * The object type we are performing the hookup for
26
- *
27
- * @var string
28
- * @since 2.0.9
29
- */
30
- protected $object_type = 'post';
31
-
32
- /**
33
- * A functionalized constructor, used for the hookup action callbacks.
34
- *
35
- * @since 2.2.6
36
- *
37
- * @param CMB2 $cmb The CMB2 object to hookup
38
- *
39
- * @return CMB2_Hookup_Base $hookup The hookup object.
40
- */
41
- public static function maybe_init_and_hookup( CMB2 $cmb ) {
42
- throw new Exception( sprintf( esc_html__( '%1$s should be implemented by the extended class.', 'cmb2' ), __FUNCTION__ ) );
43
- }
44
-
45
- /**
46
- * Constructor
47
- *
48
- * @since 2.0.0
49
- * @param CMB2 $cmb The CMB2 object to hookup
50
- */
51
- public function __construct( CMB2 $cmb ) {
52
- $this->cmb = $cmb;
53
- $this->object_type = $this->cmb->mb_object_type();
54
- }
55
-
56
- abstract public function universal_hooks();
57
-
58
- /**
59
- * Ensures WordPress hook only gets fired once per object.
60
- *
61
- * @since 2.0.0
62
- * @param string $action The name of the filter to hook the $hook callback to.
63
- * @param callback $hook The callback to be run when the filter is applied.
64
- * @param integer $priority Order the functions are executed
65
- * @param int $accepted_args The number of arguments the function accepts.
66
- */
67
- public function once( $action, $hook, $priority = 10, $accepted_args = 1 ) {
68
- static $hooks_completed = array();
69
-
70
- $args = func_get_args();
71
-
72
- // Get object hash.. This bypasses issues with serializing closures.
73
- if ( is_object( $hook ) ) {
74
- $args[1] = spl_object_hash( $args[1] );
75
- } elseif ( is_array( $hook ) && is_object( $hook[0] ) ) {
76
- $args[1][0] = spl_object_hash( $hook[0] );
77
- }
78
-
79
- $key = md5( serialize( $args ) );
80
-
81
- if ( ! isset( $hooks_completed[ $key ] ) ) {
82
- $hooks_completed[ $key ] = 1;
83
- add_filter( $action, $hook, $priority, $accepted_args );
84
- }
85
- }
86
-
87
- /**
88
- * Magic getter for our object.
89
- *
90
- * @param string $field
91
- * @throws Exception Throws an exception if the field is invalid.
92
- * @return mixed
93
- */
94
- public function __get( $field ) {
95
- switch ( $field ) {
96
- case 'object_type':
97
- case 'cmb':
98
- return $this->{$field};
99
- default:
100
- throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'cmb2' ), __CLASS__, $field ) );
101
- }
102
- }
103
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/CMB2_JS.php DELETED
@@ -1,176 +0,0 @@
1
- <?php
2
- /**
3
- * Handles the dependencies and enqueueing of the CMB2 JS scripts
4
- *
5
- * @category WordPress_Plugin
6
- * @package CMB2
7
- * @author CMB2 team
8
- * @license GPL-2.0+
9
- * @link https://cmb2.io
10
- */
11
- class CMB2_JS {
12
-
13
- /**
14
- * The CMB2 JS handle
15
- *
16
- * @var string
17
- * @since 2.0.7
18
- */
19
- protected static $handle = 'cmb2-scripts';
20
-
21
- /**
22
- * The CMB2 JS variable name
23
- *
24
- * @var string
25
- * @since 2.0.7
26
- */
27
- protected static $js_variable = 'cmb2_l10';
28
-
29
- /**
30
- * Array of CMB2 JS dependencies
31
- *
32
- * @var array
33
- * @since 2.0.7
34
- */
35
- protected static $dependencies = array(
36
- 'jquery' => 'jquery',
37
- );
38
-
39
- /**
40
- * Add a dependency to the array of CMB2 JS dependencies
41
- *
42
- * @since 2.0.7
43
- * @param array|string $dependencies Array (or string) of dependencies to add
44
- */
45
- public static function add_dependencies( $dependencies ) {
46
- foreach ( (array) $dependencies as $dependency ) {
47
- self::$dependencies[ $dependency ] = $dependency;
48
- }
49
- }
50
-
51
- /**
52
- * Enqueue the CMB2 JS
53
- *
54
- * @since 2.0.7
55
- */
56
- public static function enqueue() {
57
- // Filter required script dependencies
58
- $dependencies = apply_filters( 'cmb2_script_dependencies', self::$dependencies );
59
-
60
- // Only use minified files if SCRIPT_DEBUG is off
61
- $debug = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;
62
-
63
- $min = $debug ? '' : '.min';
64
-
65
- // if colorpicker
66
- if ( ! is_admin() && isset( $dependencies['wp-color-picker'] ) ) {
67
- self::colorpicker_frontend();
68
- }
69
-
70
- // if file/file_list
71
- if ( isset( $dependencies['media-editor'] ) ) {
72
- wp_enqueue_media();
73
- CMB2_Type_File_Base::output_js_underscore_templates();
74
- }
75
-
76
- // if timepicker
77
- if ( isset( $dependencies['jquery-ui-datetimepicker'] ) ) {
78
- wp_register_script( 'jquery-ui-datetimepicker', CMB2_Utils::url( 'js/jquery-ui-timepicker-addon.min.js' ), array( 'jquery-ui-slider' ), CMB2_VERSION );
79
- }
80
-
81
- // if cmb2-wysiwyg
82
- $enqueue_wysiwyg = isset( $dependencies['cmb2-wysiwyg'] ) && $debug;
83
- unset( $dependencies['cmb2-wysiwyg'] );
84
-
85
- // Enqueue cmb JS
86
- wp_enqueue_script( self::$handle, CMB2_Utils::url( "js/cmb2{$min}.js" ), $dependencies, CMB2_VERSION, true );
87
-
88
- // if SCRIPT_DEBUG, we need to enqueue separately.
89
- if ( $enqueue_wysiwyg ) {
90
- wp_enqueue_script( 'cmb2-wysiwyg', CMB2_Utils::url( 'js/cmb2-wysiwyg.js' ), array( 'jquery', 'wp-util' ), CMB2_VERSION );
91
- }
92
-
93
- self::localize( $debug );
94
-
95
- do_action( 'cmb2_footer_enqueue' );
96
- }
97
-
98
- /**
99
- * We need to register colorpicker on the front-end
100
- *
101
- * @since 2.0.7
102
- */
103
- protected static function colorpicker_frontend() {
104
- wp_register_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), CMB2_VERSION );
105
- wp_register_script( 'wp-color-picker', admin_url( 'js/color-picker.min.js' ), array( 'iris' ), CMB2_VERSION );
106
- wp_localize_script( 'wp-color-picker', 'wpColorPickerL10n', array(
107
- 'clear' => esc_html__( 'Clear', 'cmb2' ),
108
- 'defaultString' => esc_html__( 'Default', 'cmb2' ),
109
- 'pick' => esc_html__( 'Select Color', 'cmb2' ),
110
- 'current' => esc_html__( 'Current Color', 'cmb2' ),
111
- ) );
112
- }
113
-
114
- /**
115
- * Localize the php variables for CMB2 JS
116
- *
117
- * @since 2.0.7
118
- */
119
- protected static function localize( $debug ) {
120
- static $localized = false;
121
- if ( $localized ) {
122
- return;
123
- }
124
-
125
- $localized = true;
126
- $l10n = array(
127
- 'ajax_nonce' => wp_create_nonce( 'ajax_nonce' ),
128
- 'ajaxurl' => admin_url( '/admin-ajax.php' ),
129
- 'script_debug' => $debug,
130
- 'up_arrow_class' => 'dashicons dashicons-arrow-up-alt2',
131
- 'down_arrow_class' => 'dashicons dashicons-arrow-down-alt2',
132
- 'defaults' => array(
133
- 'color_picker' => false,
134
- 'date_picker' => array(
135
- 'changeMonth' => true,
136
- 'changeYear' => true,
137
- 'dateFormat' => _x( 'mm/dd/yy', 'Valid formatDate string for jquery-ui datepicker', 'cmb2' ),
138
- 'dayNames' => explode( ',', esc_html__( 'Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday', 'cmb2' ) ),
139
- 'dayNamesMin' => explode( ',', esc_html__( 'Su, Mo, Tu, We, Th, Fr, Sa', 'cmb2' ) ),
140
- 'dayNamesShort' => explode( ',', esc_html__( 'Sun, Mon, Tue, Wed, Thu, Fri, Sat', 'cmb2' ) ),
141
- 'monthNames' => explode( ',', esc_html__( 'January, February, March, April, May, June, July, August, September, October, November, December', 'cmb2' ) ),
142
- 'monthNamesShort' => explode( ',', esc_html__( 'Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec', 'cmb2' ) ),
143
- 'nextText' => esc_html__( 'Next', 'cmb2' ),
144
- 'prevText' => esc_html__( 'Prev', 'cmb2' ),
145
- 'currentText' => esc_html__( 'Today', 'cmb2' ),
146
- 'closeText' => esc_html__( 'Done', 'cmb2' ),
147
- 'clearText' => esc_html__( 'Clear', 'cmb2' ),
148
- ),
149
- 'time_picker' => array(
150
- 'timeOnlyTitle' => esc_html__( 'Choose Time', 'cmb2' ),
151
- 'timeText' => esc_html__( 'Time', 'cmb2' ),
152
- 'hourText' => esc_html__( 'Hour', 'cmb2' ),
153
- 'minuteText' => esc_html__( 'Minute', 'cmb2' ),
154
- 'secondText' => esc_html__( 'Second', 'cmb2' ),
155
- 'currentText' => esc_html__( 'Now', 'cmb2' ),
156
- 'closeText' => esc_html__( 'Done', 'cmb2' ),
157
- 'timeFormat' => _x( 'hh:mm TT', 'Valid formatting string, as per http://trentrichardson.com/examples/timepicker/', 'cmb2' ),
158
- 'controlType' => 'select',
159
- 'stepMinute' => 5,
160
- ),
161
- ),
162
- 'strings' => array(
163
- 'upload_file' => esc_html__( 'Use this file', 'cmb2' ),
164
- 'upload_files' => esc_html__( 'Use these files', 'cmb2' ),
165
- 'remove_image' => esc_html__( 'Remove Image', 'cmb2' ),
166
- 'remove_file' => esc_html__( 'Remove', 'cmb2' ),
167
- 'file' => esc_html__( 'File:', 'cmb2' ),
168
- 'download' => esc_html__( 'Download', 'cmb2' ),
169
- 'check_toggle' => esc_html__( 'Select / Deselect All', 'cmb2' ),
170
- ),
171
- );
172
-
173
- wp_localize_script( self::$handle, self::$js_variable, apply_filters( 'cmb2_localized_data', $l10n ) );
174
- }
175
-
176
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/CMB2_Options.php DELETED
@@ -1,215 +0,0 @@
1
- <?php
2
- /**
3
- * CMB2 Utility classes for handling multi-dimensional array data for options
4
- *
5
- * @category WordPress_Plugin
6
- * @package CMB2
7
- * @author CMB2 team
8
- * @license GPL-2.0+
9
- * @link https://cmb2.io
10
- */
11
-
12
- /**
13
- * Retrieves an instance of CMB2_Option based on the option key
14
- *
15
- * @package CMB2
16
- * @author CMB2 team
17
- */
18
- class CMB2_Options {
19
- /**
20
- * Array of all CMB2_Option instances
21
- *
22
- * @var array
23
- * @since 1.0.0
24
- */
25
- protected static $option_sets = array();
26
-
27
- public static function get( $option_key ) {
28
-
29
- if ( empty( self::$option_sets ) || empty( self::$option_sets[ $option_key ] ) ) {
30
- self::$option_sets[ $option_key ] = new CMB2_Option( $option_key );
31
- }
32
-
33
- return self::$option_sets[ $option_key ];
34
- }
35
- }
36
-
37
- /**
38
- * Handles getting/setting of values to an option array
39
- * for a specific option key
40
- *
41
- * @package CMB2
42
- * @author CMB2 team
43
- */
44
- class CMB2_Option {
45
-
46
- /**
47
- * Options array
48
- *
49
- * @var array
50
- */
51
- protected $options = array();
52
-
53
- /**
54
- * Current option key
55
- *
56
- * @var string
57
- */
58
- protected $key = '';
59
-
60
- /**
61
- * Initiate option object
62
- *
63
- * @param string $option_key Option key where data will be saved.
64
- * Leave empty for temporary data store.
65
- * @since 2.0.0
66
- */
67
- public function __construct( $option_key = '' ) {
68
- $this->key = ! empty( $option_key ) ? $option_key : '';
69
- }
70
-
71
- /**
72
- * Delete the option from the db
73
- *
74
- * @since 2.0.0
75
- * @return bool Delete success or failure
76
- */
77
- public function delete_option() {
78
- $deleted = $this->key ? delete_option( $this->key ) : true;
79
- $this->options = $deleted ? array() : $this->options;
80
- return $this->options;
81
- }
82
-
83
- /**
84
- * Removes an option from an option array
85
- *
86
- * @since 1.0.1
87
- * @param string $field_id Option array field key
88
- * @return array Modified options
89
- */
90
- public function remove( $field_id, $resave = false ) {
91
-
92
- $this->get_options();
93
-
94
- if ( isset( $this->options[ $field_id ] ) ) {
95
- unset( $this->options[ $field_id ] );
96
- }
97
-
98
- if ( $resave ) {
99
- $this->set();
100
- }
101
-
102
- return $this->options;
103
- }
104
-
105
- /**
106
- * Retrieves an option from an option array
107
- *
108
- * @since 1.0.1
109
- * @param string $field_id Option array field key
110
- * @param mixed $default Fallback value for the option
111
- * @return array Requested field or default
112
- */
113
- public function get( $field_id, $default = false ) {
114
- $opts = $this->get_options();
115
-
116
- if ( 'all' == $field_id ) {
117
- return $opts;
118
- } elseif ( array_key_exists( $field_id, $opts ) ) {
119
- return false !== $opts[ $field_id ] ? $opts[ $field_id ] : $default;
120
- }
121
-
122
- return $default;
123
- }
124
-
125
- /**
126
- * Updates Option data
127
- *
128
- * @since 1.0.1
129
- * @param string $field_id Option array field key
130
- * @param mixed $value Value to update data with
131
- * @param bool $resave Whether to re-save the data
132
- * @param bool $single Whether data should not be an array
133
- * @return boolean Return status of update
134
- */
135
- public function update( $field_id, $value = '', $resave = false, $single = true ) {
136
- $this->get_options();
137
-
138
- if ( true !== $field_id ) {
139
-
140
- if ( ! $single ) {
141
- // If multiple, add to array
142
- $this->options[ $field_id ][] = $value;
143
- } else {
144
- $this->options[ $field_id ] = $value;
145
- }
146
- }
147
-
148
- if ( $resave || true === $field_id ) {
149
- return $this->set();
150
- }
151
-
152
- return true;
153
- }
154
-
155
- /**
156
- * Saves the option array
157
- * Needs to be run after finished using remove/update_option
158
- *
159
- * @uses apply_filters() Calls 'cmb2_override_option_save_{$this->key}' hook
160
- * to allow overwriting the option value to be stored.
161
- *
162
- * @since 1.0.1
163
- * @param array $options Optional options to override
164
- * @return bool Success/Failure
165
- */
166
- public function set( $options = array() ) {
167
- if ( ! empty( $options ) || empty( $options ) && empty( $this->key ) ) {
168
- $this->options = $options;
169
- }
170
-
171
- $this->options = wp_unslash( $this->options ); // get rid of those evil magic quotes
172
-
173
- if ( empty( $this->key ) ) {
174
- return false;
175
- }
176
-
177
- $test_save = apply_filters( "cmb2_override_option_save_{$this->key}", 'cmb2_no_override_option_save', $this->options, $this );
178
-
179
- if ( 'cmb2_no_override_option_save' !== $test_save ) {
180
- return $test_save;
181
- }
182
-
183
- // If no override, update the option
184
- return update_option( $this->key, $this->options );
185
- }
186
-
187
- /**
188
- * Retrieve option value based on name of option.
189
- *
190
- * @uses apply_filters() Calls 'cmb2_override_option_get_{$this->key}' hook to allow
191
- * overwriting the option value to be retrieved.
192
- *
193
- * @since 1.0.1
194
- * @param mixed $default Optional. Default value to return if the option does not exist.
195
- * @return mixed Value set for the option.
196
- */
197
- public function get_options( $default = null ) {
198
- if ( empty( $this->options ) && ! empty( $this->key ) ) {
199
-
200
- $test_get = apply_filters( "cmb2_override_option_get_{$this->key}", 'cmb2_no_override_option_get', $default, $this );
201
-
202
- if ( 'cmb2_no_override_option_get' !== $test_get ) {
203
- $this->options = $test_get;
204
- } else {
205
- // If no override, get the option
206
- $this->options = get_option( $this->key, $default );
207
- }
208
- }
209
-
210
- $this->options = (array) $this->options;
211
-
212
- return $this->options;
213
- }
214
-
215
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/CMB2_Options_Hookup.php DELETED
@@ -1,236 +0,0 @@
1
- <?php
2
- /**
3
- * Handles hooking CMB2 forms/metaboxes into the post/attachement/user screens
4
- * and handles hooking in and saving those fields.
5
- *
6
- * @since 2.0.0
7
- *
8
- * @category WordPress_Plugin
9
- * @package CMB2
10
- * @author CMB2 team
11
- * @license GPL-2.0+
12
- * @link https://cmb2.io
13
- */
14
- class CMB2_Options_Hookup extends CMB2_hookup {
15
-
16
- /**
17
- * The object type we are performing the hookup for
18
- *
19
- * @var string
20
- * @since 2.0.9
21
- */
22
- protected $object_type = 'options-page';
23
-
24
- /**
25
- * Options page key.
26
- *
27
- * @var string
28
- * @since 2.2.5
29
- */
30
- protected $option_key = '';
31
-
32
- /**
33
- * Constructor
34
- *
35
- * @since 2.0.0
36
- * @param CMB2 $cmb The CMB2 object to hookup
37
- */
38
- public function __construct( CMB2 $cmb, $option_key ) {
39
- $this->cmb = $cmb;
40
- $this->option_key = $option_key;
41
- }
42
-
43
- public function hooks() {
44
- if ( empty( $this->option_key ) ) {
45
- return;
46
- }
47
-
48
- // Register setting to cmb2 group.
49
- register_setting( 'cmb2', $this->option_key );
50
-
51
- // Handle saving the data.
52
- add_action( 'admin_post_' . $this->option_key, array( $this, 'save_options' ) );
53
-
54
- // Optionally network_admin_menu.
55
- $hook = $this->cmb->prop( 'admin_menu_hook' );
56
-
57
- // Hook in to add our menu.
58
- add_action( $hook, array( $this, 'options_page_menu_hooks' ) );
59
-
60
- // If in the network admin, need to use get/update_site_option.
61
- if ( 'network_admin_menu' === $hook ) {
62
- // Override CMB's getter.
63
- add_filter( "cmb2_override_option_get_{$this->option_key}", array( $this, 'network_get_override' ), 10, 2 );
64
- // Override CMB's setter.
65
- add_filter( "cmb2_override_option_save_{$this->option_key}", array( $this, 'network_update_override' ), 10, 2 );
66
- }
67
- }
68
-
69
- /**
70
- * Hook up our admin menu item and admin page.
71
- *
72
- * @since 2.2.5
73
- *
74
- * @return void
75
- */
76
- public function options_page_menu_hooks() {
77
- $parent_slug = $this->cmb->prop( 'parent_slug' );
78
- $title = $this->cmb->prop( 'title' );
79
- $menu_title = $this->cmb->prop( 'menu_title', $title );
80
- $capability = $this->cmb->prop( 'capability' );
81
- $callback = array( $this, 'options_page_output' );
82
-
83
- if ( $parent_slug ) {
84
- $page_hook = add_submenu_page(
85
- $parent_slug,
86
- $title,
87
- $menu_title,
88
- $capability,
89
- $this->option_key,
90
- $callback
91
- );
92
- } else {
93
- $page_hook = add_menu_page(
94
- $title,
95
- $menu_title,
96
- $capability,
97
- $this->option_key,
98
- $callback,
99
- $this->cmb->prop( 'icon_url' ),
100
- $this->cmb->prop( 'position' )
101
- );
102
- }
103
-
104
- if ( $this->cmb->prop( 'cmb_styles' ) ) {
105
- // Include CMB CSS in the head to avoid FOUC
106
- add_action( "admin_print_styles-{$page_hook}", array( 'CMB2_hookup', 'enqueue_cmb_css' ) );
107
- }
108
-
109
- if ( ! empty( $_GET['settings-updated'] ) ) {
110
- if ( 'true' === $_GET['settings-updated'] ) {
111
- add_settings_error( "{$this->option_key}-notices", '', __( 'Settings updated.', 'cmb2' ), 'updated' );
112
- } else {
113
- add_settings_error( "{$this->option_key}-notices", '', __( 'Nothing to update.', 'cmb2' ), 'notice-warning' );
114
- }
115
- }
116
- }
117
-
118
- /**
119
- * Display options-page output. To override, set 'display_cb' box property.
120
- *
121
- * @since 2.2.5
122
- */
123
- public function options_page_output() {
124
- $this->maybe_output_settings_notices();
125
-
126
- $callback = $this->cmb->prop( 'display_cb' );
127
- if ( is_callable( $callback ) ) {
128
- return $callback( $this );
129
- }
130
-
131
- ?>
132
- <div class="wrap cmb2-options-page option-<?php echo $this->option_key; ?>">
133
- <?php if ( $this->cmb->prop( 'title' ) ) : ?>
134
- <h2><?php echo wp_kses_post( $this->cmb->prop( 'title' ) ); ?></h2>
135
- <?php endif; ?>
136
- <form class="cmb-form" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="POST" id="<?php echo $this->cmb->cmb_id; ?>" enctype="multipart/form-data" encoding="multipart/form-data">
137
- <input type="hidden" name="action" value="<?php echo esc_attr( $this->option_key ); ?>">
138
- <?php $this->options_page_metabox(); ?>
139
- <?php submit_button( esc_attr( $this->cmb->prop( 'save_button' ) ), 'primary', 'submit-cmb' ); ?>
140
- </form>
141
- </div>
142
- <?php
143
- }
144
-
145
- /**
146
- * Outputs the settings notices if a) not a sub-page of 'options-general.php'
147
- * (because settings_errors() already called in wp-admin/options-head.php),
148
- * and b) the 'disable_settings_errors' prop is not set or truthy.
149
- *
150
- * @since 2.2.5
151
- * @return void
152
- */
153
- public function maybe_output_settings_notices() {
154
- global $parent_file;
155
-
156
- // The settings sub-pages will already have settings_errors() called in wp-admin/options-head.php
157
- if ( 'options-general.php' !== $parent_file && ! $this->cmb->prop( 'disable_settings_errors' ) ) {
158
- settings_errors( "{$this->option_key}-notices" );
159
- }
160
- }
161
-
162
- /**
163
- * Display metaboxes for an options-page object.
164
- *
165
- * @since 2.2.5
166
- */
167
- public function options_page_metabox() {
168
- $this->show_form_for_type( 'options-page' );
169
- }
170
-
171
- /**
172
- * Save data from options page, then redirects back.
173
- *
174
- * @since 2.2.5
175
- * @return void
176
- */
177
- public function save_options() {
178
- $url = wp_get_referer();
179
- if ( ! $url ) {
180
- $url = admin_url();
181
- }
182
-
183
- if (
184
- $this->can_save( 'options-page' )
185
- // check params
186
- && isset( $_POST['submit-cmb'], $_POST['action'] )
187
- && $this->option_key === $_POST['action']
188
- ) {
189
-
190
- $updated = $this->cmb
191
- ->save_fields( $this->option_key, $this->cmb->object_type(), $_POST )
192
- ->was_updated(); // Will be false if no values were changed/updated.
193
-
194
- $url = add_query_arg( 'settings-updated', $updated ? 'true' : 'false', $url );
195
- }
196
-
197
- wp_safe_redirect( esc_url_raw( $url ), WP_Http::SEE_OTHER );
198
- exit;
199
- }
200
-
201
- /**
202
- * Replaces get_option with get_site_option
203
- * @since 2.2.5
204
- * @return mixed Value set for the network option.
205
- */
206
- public function network_get_override( $test, $default = false ) {
207
- return get_site_option( $this->option_key, $default );
208
- }
209
-
210
- /**
211
- * Replaces update_option with update_site_option
212
- * @since 2.2.5
213
- * @return bool Success/Failure
214
- */
215
- public function network_update_override( $test, $option_value ) {
216
- return update_site_option( $this->option_key, $option_value );
217
- }
218
-
219
- /**
220
- * Magic getter for our object.
221
- *
222
- * @param string $field
223
- * @throws Exception Throws an exception if the field is invalid.
224
- * @return mixed
225
- */
226
- public function __get( $field ) {
227
- switch ( $field ) {
228
- case 'object_type':
229
- case 'option_key':
230
- case 'cmb':
231
- return $this->{$field};
232
- default:
233
- throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'cmb2' ), __CLASS__, $field ) );
234
- }
235
- }
236
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/CMB2_Sanitize.php DELETED
@@ -1,560 +0,0 @@
1
- <?php
2
- /**
3
- * CMB2 field sanitization
4
- *
5
- * @since 0.0.4
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- *
13
- * @method string _id()
14
- */
15
- class CMB2_Sanitize {
16
-
17
- /**
18
- * A CMB field object
19
- *
20
- * @var CMB2_Field object
21
- */
22
- public $field;
23
-
24
- /**
25
- * Field's value
26
- *
27
- * @var mixed
28
- */
29
- public $value;
30
-
31
- /**
32
- * Setup our class vars
33
- *
34
- * @since 1.1.0
35
- * @param CMB2_Field $field A CMB2 field object
36
- * @param mixed $value Field value
37
- */
38
- public function __construct( CMB2_Field $field, $value ) {
39
- $this->field = $field;
40
- $this->value = $value;
41
- }
42
-
43
- /**
44
- * Catchall method if field's 'sanitization_cb' is NOT defined, or field type does not have a corresponding validation method
45
- *
46
- * @since 1.0.0
47
- * @param string $name Non-existent method name
48
- * @param array $arguments All arguments passed to the method
49
- */
50
- public function __call( $name, $arguments ) {
51
- return $this->default_sanitization();
52
- }
53
-
54
- /**
55
- * Default fallback sanitization method. Applies filters.
56
- *
57
- * @since 1.0.2
58
- */
59
- public function default_sanitization() {
60
-
61
- /**
62
- * This exists for back-compatibility, but validation
63
- * is not what happens here.
64
- *
65
- * @deprecated See documentation for "cmb2_sanitize_{$this->type()}".
66
- */
67
- if ( function_exists( 'apply_filters_deprecated' ) ) {
68
- $override_value = apply_filters_deprecated( "cmb2_validate_{$this->field->type()}", array( null, $this->value, $this->field->object_id, $this->field->args(), $this ), '2.0.0', "cmb2_sanitize_{$this->field->type()}" );
69
- } else {
70
- $override_value = apply_filters( "cmb2_validate_{$this->field->type()}", null, $this->value, $this->field->object_id, $this->field->args(), $this );
71
- }
72
-
73
- if ( null !== $override_value ) {
74
- return $override_value;
75
- }
76
-
77
- $sanitized_value = '';
78
- switch ( $this->field->type() ) {
79
- case 'wysiwyg':
80
- case 'textarea_small':
81
- case 'oembed':
82
- $sanitized_value = $this->textarea();
83
- break;
84
- case 'taxonomy_select':
85
- case 'taxonomy_radio':
86
- case 'taxonomy_radio_inline':
87
- case 'taxonomy_radio_hierarchical':
88
- case 'taxonomy_multicheck':
89
- case 'taxonomy_multicheck_hierarchical':
90
- case 'taxonomy_multicheck_inline':
91
- $sanitized_value = $this->taxonomy();
92
- break;
93
- case 'multicheck':
94
- case 'multicheck_inline':
95
- case 'file_list':
96
- case 'group':
97
- // no filtering
98
- $sanitized_value = $this->value;
99
- break;
100
- default:
101
- // Handle repeatable fields array
102
- // We'll fallback to 'sanitize_text_field'
103
- $sanitized_value = $this->_default_sanitization();
104
- break;
105
- }
106
-
107
- return $this->_is_empty_array( $sanitized_value ) ? '' : $sanitized_value;
108
- }
109
-
110
- /**
111
- * Default sanitization method, sanitize_text_field. Checks if value is array.
112
- *
113
- * @since 2.2.4
114
- * @return mixed Sanitized value.
115
- */
116
- protected function _default_sanitization() {
117
- // Handle repeatable fields array
118
- return is_array( $this->value ) ? array_map( 'sanitize_text_field', $this->value ) : sanitize_text_field( $this->value );
119
- }
120
-
121
- /**
122
- * Sets the object terms to the object (if not options-page) and optionally returns the sanitized term values.
123
- *
124
- * @since 2.2.4
125
- * @return mixed Blank value, or sanitized term values if "cmb2_return_taxonomy_values_{$cmb_id}" is true.
126
- */
127
- public function taxonomy() {
128
- $sanitized_value = '';
129
-
130
- if ( ! $this->field->args( 'taxonomy' ) ) {
131
- CMB2_Utils::log_if_debug( __METHOD__, __LINE__, "{$this->field->type()} {$this->field->_id()} is missing the 'taxonomy' parameter." );
132
- } else {
133
-
134
- if ( 'options-page' === $this->field->object_type ) {
135
- $return_values = true;
136
- } else {
137
- wp_set_object_terms( $this->field->object_id, $this->value, $this->field->args( 'taxonomy' ) );
138
- $return_values = false;
139
- }
140
-
141
- $cmb_id = $this->field->cmb_id;
142
-
143
- /**
144
- * Filter whether 'taxonomy_*' fields should return their value when being sanitized.
145
- *
146
- * By default, these fields do not return a value as we do not want them stored to meta
147
- * (as they are stored as terms). This allows overriding that and is used by CMB2::get_sanitized_values().
148
- *
149
- * The dynamic portion of the hook, $cmb_id, refers to the this field's CMB2 box id.
150
- *
151
- * @since 2.2.4
152
- *
153
- * @param bool $return_values By default, this is only true for 'options-page' boxes. To enable:
154
- * `add_filter( "cmb2_return_taxonomy_values_{$cmb_id}", '__return_true' );`
155
- * @param CMB2_Sanitize $sanitizer This object.
156
- */
157
- if ( apply_filters( "cmb2_return_taxonomy_values_{$cmb_id}", $return_values, $this ) ) {
158
- $sanitized_value = $this->_default_sanitization();
159
- }
160
- }
161
-
162
- return $sanitized_value;
163
- }
164
-
165
- /**
166
- * Simple checkbox validation
167
- *
168
- * @since 1.0.1
169
- * @return string|false 'on' or false
170
- */
171
- public function checkbox() {
172
- return $this->value === 'on' ? 'on' : false;
173
- }
174
-
175
- /**
176
- * Validate url in a meta value
177
- *
178
- * @since 1.0.1
179
- * @return string Empty string or escaped url
180
- */
181
- public function text_url() {
182
- $protocols = $this->field->args( 'protocols' );
183
- // for repeatable
184
- if ( is_array( $this->value ) ) {
185
- foreach ( $this->value as $key => $val ) {
186
- $this->value[ $key ] = $val ? esc_url_raw( $val, $protocols ) : $this->field->get_default();
187
- }
188
- } else {
189
- $this->value = $this->value ? esc_url_raw( $this->value, $protocols ) : $this->field->get_default();
190
- }
191
-
192
- return $this->value;
193
- }
194
-
195
- public function colorpicker() {
196
- // for repeatable
197
- if ( is_array( $this->value ) ) {
198
- $check = $this->value;
199
- $this->value = array();
200
- foreach ( $check as $key => $val ) {
201
- if ( $val && '#' != $val ) {
202
- $this->value[ $key ] = esc_attr( $val );
203
- }
204
- }
205
- } else {
206
- $this->value = ! $this->value || '#' == $this->value ? '' : esc_attr( $this->value );
207
- }
208
- return $this->value;
209
- }
210
-
211
- /**
212
- * Validate email in a meta value
213
- *
214
- * @since 1.0.1
215
- * @return string Empty string or sanitized email
216
- */
217
- public function text_email() {
218
- // for repeatable
219
- if ( is_array( $this->value ) ) {
220
- foreach ( $this->value as $key => $val ) {
221
- $val = trim( $val );
222
- $this->value[ $key ] = is_email( $val ) ? $val : '';
223
- }
224
- } else {
225
- $this->value = trim( $this->value );
226
- $this->value = is_email( $this->value ) ? $this->value : '';
227
- }
228
-
229
- return $this->value;
230
- }
231
-
232
- /**
233
- * Validate money in a meta value
234
- *
235
- * @since 1.0.1
236
- * @return string Empty string or sanitized money value
237
- */
238
- public function text_money() {
239
- if ( ! $this->value ) {
240
- return '';
241
- }
242
-
243
- global $wp_locale;
244
-
245
- $search = array( $wp_locale->number_format['thousands_sep'], $wp_locale->number_format['decimal_point'] );
246
- $replace = array( '', '.' );
247
-
248
- // Strip slashes. Example: 2\'180.00.
249
- // See https://github.com/CMB2/CMB2/issues/1014
250
- $this->value = wp_unslash( $this->value );
251
-
252
- // for repeatable
253
- if ( is_array( $this->value ) ) {
254
- foreach ( $this->value as $key => $val ) {
255
- if ( $val ) {
256
- $this->value[ $key ] = number_format_i18n( (float) str_ireplace( $search, $replace, $val ), 2 );
257
- }
258
- }
259
- } else {
260
- $this->value = number_format_i18n( (float) str_ireplace( $search, $replace, $this->value ), 2 );
261
- }
262
-
263
- return $this->value;
264
- }
265
-
266
- /**
267
- * Converts text date to timestamp
268
- *
269
- * @since 1.0.2
270
- * @return string Timestring
271
- */
272
- public function text_date_timestamp() {
273
- // date_create_from_format if there is a slash in the value.
274
- $this->value = wp_unslash( $this->value );
275
-
276
- return is_array( $this->value )
277
- ? array_map( array( $this->field, 'get_timestamp_from_value' ), $this->value )
278
- : $this->field->get_timestamp_from_value( $this->value );
279
- }
280
-
281
- /**
282
- * Datetime to timestamp
283
- *
284
- * @since 1.0.1
285
- * @return string|array Timestring
286
- */
287
- public function text_datetime_timestamp( $repeat = false ) {
288
- // date_create_from_format if there is a slash in the value.
289
- $this->value = wp_unslash( $this->value );
290
-
291
- $test = is_array( $this->value ) ? array_filter( $this->value ) : '';
292
- if ( empty( $test ) ) {
293
- return '';
294
- }
295
-
296
- $repeat_value = $this->_check_repeat( __FUNCTION__, $repeat );
297
- if ( false !== $repeat_value ) {
298
- return $repeat_value;
299
- }
300
-
301
- if ( isset( $this->value['date'], $this->value['time'] ) ) {
302
- $this->value = $this->field->get_timestamp_from_value( $this->value['date'] . ' ' . $this->value['time'] );
303
- }
304
-
305
- if ( $tz_offset = $this->field->field_timezone_offset() ) {
306
- $this->value += (int) $tz_offset;
307
- }
308
-
309
- return $this->value;
310
- }
311
-
312
- /**
313
- * Datetime to timestamp with timezone
314
- *
315
- * @since 1.0.1
316
- * @return string Timestring
317
- */
318
- public function text_datetime_timestamp_timezone( $repeat = false ) {
319
- static $utc_values = array();
320
-
321
- $test = is_array( $this->value ) ? array_filter( $this->value ) : '';
322
- if ( empty( $test ) ) {
323
- return '';
324
- }
325
-
326
- // date_create_from_format if there is a slash in the value.
327
- $this->value = wp_unslash( $this->value );
328
-
329
- $utc_key = $this->field->_id() . '_utc';
330
-
331
- $repeat_value = $this->_check_repeat( __FUNCTION__, $repeat );
332
- if ( false !== $repeat_value ) {
333
- if ( ! empty( $utc_values[ $utc_key ] ) ) {
334
- $this->_save_utc_value( $utc_key, $utc_values[ $utc_key ] );
335
- unset( $utc_values[ $utc_key ] );
336
- }
337
-
338
- return $repeat_value;
339
- }
340
-
341
- $tzstring = null;
342
-
343
- if ( is_array( $this->value ) && array_key_exists( 'timezone', $this->value ) ) {
344
- $tzstring = $this->value['timezone'];
345
- }
346
-
347
- if ( empty( $tzstring ) ) {
348
- $tzstring = CMB2_Utils::timezone_string();
349
- }
350
-
351
- $offset = CMB2_Utils::timezone_offset( $tzstring );
352
-
353
- if ( 'UTC' === substr( $tzstring, 0, 3 ) ) {
354
- $tzstring = timezone_name_from_abbr( '', $offset, 0 );
355
- /*
356
- * timezone_name_from_abbr() returns false if not found based on offset.
357
- * Since there are currently some invalid timezones in wp_timezone_dropdown(),
358
- * fallback to an offset of 0 (UTC+0)
359
- * https://core.trac.wordpress.org/ticket/29205
360
- */
361
- $tzstring = false !== $tzstring ? $tzstring : timezone_name_from_abbr( '', 0, 0 );
362
- }
363
-
364
- $full_format = $this->field->args['date_format'] . ' ' . $this->field->args['time_format'];
365
- $full_date = $this->value['date'] . ' ' . $this->value['time'];
366
-
367
- try {
368
-
369
- $datetime = date_create_from_format( $full_format, $full_date );
370
-
371
- if ( ! is_object( $datetime ) ) {
372
- $this->value = $utc_stamp = '';
373
- } else {
374
- $timestamp = $datetime->setTimezone( new DateTimeZone( $tzstring ) )->getTimestamp();
375
- $utc_stamp = $timestamp - $offset;
376
- $this->value = serialize( $datetime );
377
- }
378
-
379
- if ( $this->field->group ) {
380
- $this->value = array(
381
- 'supporting_field_value' => $utc_stamp,
382
- 'supporting_field_id' => $utc_key,
383
- 'value' => $this->value,
384
- );
385
- } else {
386
- // Save the utc timestamp supporting field
387
- if ( $repeat ) {
388
- $utc_values[ $utc_key ][] = $utc_stamp;
389
- } else {
390
- $this->_save_utc_value( $utc_key, $utc_stamp );
391
- }
392
- }
393
- } catch ( Exception $e ) {
394
- $this->value = '';
395
- CMB2_Utils::log_if_debug( __METHOD__, __LINE__, $e->getMessage() );
396
- }
397
-
398
- return $this->value;
399
- }
400
-
401
- /**
402
- * Sanitize textareas and wysiwyg fields
403
- *
404
- * @since 1.0.1
405
- * @return string Sanitized data
406
- */
407
- public function textarea() {
408
- return is_array( $this->value ) ? array_map( 'wp_kses_post', $this->value ) : wp_kses_post( $this->value );
409
- }
410
-
411
- /**
412
- * Sanitize code textareas
413
- *
414
- * @since 1.0.2
415
- * @return string Sanitized data
416
- */
417
- public function textarea_code( $repeat = false ) {
418
- $repeat_value = $this->_check_repeat( __FUNCTION__, $repeat );
419
- if ( false !== $repeat_value ) {
420
- return $repeat_value;
421
- }
422
-
423
- return htmlspecialchars_decode( stripslashes( $this->value ) );
424
- }
425
-
426
- /**
427
- * Handles saving of attachment post ID and sanitizing file url
428
- *
429
- * @since 1.1.0
430
- * @return string Sanitized url
431
- */
432
- public function file() {
433
- $file_id_key = $this->field->_id() . '_id';
434
-
435
- if ( $this->field->group ) {
436
- // Return an array with url/id if saving a group field
437
- $this->value = $this->_get_group_file_value_array( $file_id_key );
438
- } else {
439
- $this->_save_file_id_value( $file_id_key );
440
- $this->text_url();
441
- }
442
-
443
- return $this->value;
444
- }
445
-
446
- /**
447
- * Gets the values for the `file` field type from the data being saved.
448
- *
449
- * @since 2.2.0
450
- */
451
- public function _get_group_file_value_array( $id_key ) {
452
- $alldata = $this->field->group->data_to_save;
453
- $base_id = $this->field->group->_id();
454
- $i = $this->field->group->index;
455
-
456
- // Check group $alldata data
457
- $id_val = isset( $alldata[ $base_id ][ $i ][ $id_key ] )
458
- ? absint( $alldata[ $base_id ][ $i ][ $id_key ] )
459
- : '';
460
-
461
- // We don't want to save 0 to the DB for file fields.
462
- if ( 0 === $id_val ) {
463
- $id_val = '';
464
- }
465
-
466
- return array(
467
- 'value' => $this->text_url(),
468
- 'supporting_field_value' => $id_val,
469
- 'supporting_field_id' => $id_key,
470
- );
471
- }
472
-
473
- /**
474
- * Peforms saving of `file` attachement's ID
475
- *
476
- * @since 1.1.0
477
- */
478
- public function _save_file_id_value( $file_id_key ) {
479
- $id_field = $this->_new_supporting_field( $file_id_key );
480
-
481
- // Check standard data_to_save data
482
- $id_val = isset( $this->field->data_to_save[ $file_id_key ] )
483
- ? $this->field->data_to_save[ $file_id_key ]
484
- : null;
485
-
486
- // If there is no ID saved yet, try to get it from the url
487
- if ( $this->value && ! $id_val ) {
488
- $id_val = CMB2_Utils::image_id_from_url( $this->value );
489
- }
490
-
491
- return $id_field->save_field( $id_val );
492
- }
493
-
494
- /**
495
- * Peforms saving of `text_datetime_timestamp_timezone` utc timestamp
496
- *
497
- * @since 2.2.0
498
- */
499
- public function _save_utc_value( $utc_key, $utc_stamp ) {
500
- return $this->_new_supporting_field( $utc_key )->save_field( $utc_stamp );
501
- }
502
-
503
- /**
504
- * Returns a new, supporting, CMB2_Field object based on a new field id.
505
- *
506
- * @since 2.2.0
507
- */
508
- public function _new_supporting_field( $new_field_id ) {
509
- return $this->field->get_field_clone( array(
510
- 'id' => $new_field_id,
511
- 'sanitization_cb' => false,
512
- ) );
513
- }
514
-
515
- /**
516
- * If repeating, loop through and re-apply sanitization method
517
- *
518
- * @since 1.1.0
519
- * @param string $method Class method
520
- * @param bool $repeat Whether repeating or not
521
- * @return mixed Sanitized value
522
- */
523
- public function _check_repeat( $method, $repeat ) {
524
- if ( $repeat || ! $this->field->args( 'repeatable' ) ) {
525
- return false;
526
- }
527
-
528
- $values_array = $this->value;
529
-
530
- $new_value = array();
531
- foreach ( $values_array as $iterator => $this->value ) {
532
- if ( $this->value ) {
533
- $val = $this->$method( true );
534
- if ( ! empty( $val ) ) {
535
- $new_value[] = $val;
536
- }
537
- }
538
- }
539
-
540
- $this->value = $new_value;
541
-
542
- return empty( $this->value ) ? null : $this->value;
543
- }
544
-
545
- /**
546
- * Determine if passed value is an empty array
547
- *
548
- * @since 2.0.6
549
- * @param mixed $to_check Value to check
550
- * @return boolean Whether value is an array that's empty
551
- */
552
- public function _is_empty_array( $to_check ) {
553
- if ( is_array( $to_check ) ) {
554
- $cleaned_up = array_filter( $to_check );
555
- return empty( $cleaned_up );
556
- }
557
- return false;
558
- }
559
-
560
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/CMB2_Show_Filters.php DELETED
@@ -1,178 +0,0 @@
1
- <?php
2
- /**
3
- * Show On Filters
4
- * Use the 'cmb2_show_on' filter to further refine the conditions
5
- * under which a metabox is displayed.
6
- * Below you can limit it by ID and page template
7
- *
8
- * All methods in this class are automatically filtered
9
- *
10
- * @since 1.0.0
11
- *
12
- * @category WordPress_Plugin
13
- * @package CMB2
14
- * @author CMB2 team
15
- * @license GPL-2.0+
16
- * @link https://cmb2.io
17
- */
18
- class CMB2_Show_Filters {
19
-
20
- /**
21
- * Get Show_on key. backwards compatible w/ 'key' indexes
22
- *
23
- * @since 2.0.0
24
- *
25
- * @param array $meta_box_args Metabox config array
26
- *
27
- * @return mixed show_on key or false
28
- */
29
- private static function get_show_on_key( $meta_box_args ) {
30
- $show_on = isset( $meta_box_args['show_on'] ) ? (array) $meta_box_args['show_on'] : false;
31
- if ( $show_on && is_array( $show_on ) ) {
32
-
33
- if ( array_key_exists( 'key', $show_on ) ) {
34
- return $show_on['key'];
35
- }
36
-
37
- $keys = array_keys( $show_on );
38
- return $keys[0];
39
- }
40
-
41
- return false;
42
- }
43
-
44
- /**
45
- * Get Show_on value. backwards compatible w/ 'value' indexes
46
- *
47
- * @since 2.0.0
48
- *
49
- * @param array $meta_box_args Metabox config array
50
- *
51
- * @return mixed show_on value or false
52
- */
53
- private static function get_show_on_value( $meta_box_args ) {
54
- $show_on = isset( $meta_box_args['show_on'] ) ? (array) $meta_box_args['show_on'] : false;
55
-
56
- if ( $show_on && is_array( $show_on ) ) {
57
-
58
- if ( array_key_exists( 'value', $show_on ) ) {
59
- return $show_on['value'];
60
- }
61
-
62
- $keys = array_keys( $show_on );
63
-
64
- return $show_on[ $keys[0] ];
65
- }
66
-
67
- return array();
68
- }
69
-
70
- /**
71
- * Add metaboxes for an specific ID
72
- *
73
- * @since 1.0.0
74
- * @param bool $display To display or not
75
- * @param array $meta_box_args Metabox config array
76
- * @param CMB2 $cmb The CMB2 instance.
77
- * @return bool Whether to display this metabox on the current page.
78
- */
79
- public static function check_id( $display, $meta_box_args, $cmb ) {
80
-
81
- $key = self::get_show_on_key( $meta_box_args );
82
- if ( ! $key || 'id' !== $key ) {
83
- return $display;
84
- }
85
-
86
- $object_id = is_admin() ? $cmb->object_id() : get_the_ID();
87
-
88
- if ( ! $object_id ) {
89
- return false;
90
- }
91
-
92
- // If current page id is in the included array, display the metabox
93
- return in_array( $object_id, (array) self::get_show_on_value( $meta_box_args ) );
94
- }
95
-
96
- /**
97
- * Add metaboxes for an specific Page Template
98
- *
99
- * @since 1.0.0
100
- * @param bool $display To display or not
101
- * @param array $meta_box_args Metabox config array
102
- * @return bool Whether to display this metabox on the current page.
103
- */
104
- public static function check_page_template( $display, $meta_box_args, $cmb ) {
105
-
106
- $key = self::get_show_on_key( $meta_box_args );
107
- if ( ! $key || 'page-template' !== $key ) {
108
- return $display;
109
- }
110
-
111
- $object_id = $cmb->object_id();
112
-
113
- if ( ! $object_id || 'post' !== $cmb->object_type() ) {
114
- return false;
115
- }
116
-
117
- // Get current template
118
- $current_template = get_post_meta( $object_id, '_wp_page_template', true );
119
-
120
- // See if there's a match
121
- if ( $current_template && in_array( $current_template, (array) self::get_show_on_value( $meta_box_args ) ) ) {
122
- return true;
123
- }
124
-
125
- return false;
126
- }
127
-
128
- /**
129
- * Only show options-page metaboxes on their options page (but only enforce on the admin side)
130
- *
131
- * @since 1.0.0
132
- * @param bool $display To display or not
133
- * @param array $meta_box_args Metabox config array
134
- * @return bool Whether to display this metabox on the current page.
135
- */
136
- public static function check_admin_page( $display, $meta_box_args ) {
137
-
138
- $key = self::get_show_on_key( $meta_box_args );
139
- // check if this is a 'options-page' metabox
140
- if ( ! $key || 'options-page' !== $key ) {
141
- return $display;
142
- }
143
-
144
- // Enforce 'show_on' filter in the admin
145
- if ( is_admin() ) {
146
-
147
- // If there is no 'page' query var, our filter isn't applicable
148
- if ( ! isset( $_GET['page'] ) ) {
149
- return $display;
150
- }
151
-
152
- $show_on = self::get_show_on_value( $meta_box_args );
153
-
154
- if ( empty( $show_on ) ) {
155
- return false;
156
- }
157
-
158
- if ( is_array( $show_on ) ) {
159
- foreach ( $show_on as $page ) {
160
- if ( $_GET['page'] == $page ) {
161
- return true;
162
- }
163
- }
164
- } else {
165
- if ( $_GET['page'] == $show_on ) {
166
- return true;
167
- }
168
- }
169
-
170
- return false;
171
-
172
- }
173
-
174
- // Allow options-page metaboxes to be displayed anywhere on the front-end
175
- return true;
176
- }
177
-
178
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/CMB2_Types.php DELETED
@@ -1,667 +0,0 @@
1
- <?php
2
- /**
3
- * CMB field type objects
4
- *
5
- * @since 1.0.0
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- *
13
- * @method string _id()
14
- * @method string _name()
15
- * @method string _desc()
16
- * @method string _text()
17
- * @method string concat_attrs()
18
- */
19
- class CMB2_Types {
20
-
21
- /**
22
- * An iterator value for repeatable fields
23
- *
24
- * @var integer
25
- * @since 1.0.0
26
- */
27
- public $iterator = 0;
28
-
29
- /**
30
- * Current CMB2_Field field object
31
- *
32
- * @var CMB2_Field object
33
- * @since 1.0.0
34
- */
35
- public $field;
36
-
37
- /**
38
- * Current CMB2_Type_Base object
39
- *
40
- * @var CMB2_Type_Base object
41
- * @since 2.2.2
42
- */
43
- public $type = null;
44
-
45
- public function __construct( CMB2_Field $field ) {
46
- $this->field = $field;
47
- }
48
-
49
- /**
50
- * Default fallback. Allows rendering fields via "cmb2_render_$fieldtype" hook
51
- *
52
- * @since 1.0.0
53
- * @param string $fieldtype Non-existent field type name
54
- * @param array $arguments All arguments passed to the method
55
- */
56
- public function __call( $fieldtype, $arguments ) {
57
-
58
- // Check for methods to be proxied to the CMB2_Type_Base object.
59
- if ( $exists = $this->maybe_proxy_method( $fieldtype, $arguments ) ) {
60
- return $exists['value'];
61
- }
62
-
63
- // Check for custom field type class.
64
- if ( $object = $this->maybe_custom_field_object( $fieldtype, $arguments ) ) {
65
- return $object->render();
66
- }
67
-
68
- /**
69
- * Pass non-existent field types through an action.
70
- *
71
- * The dynamic portion of the hook name, $fieldtype, refers to the field type.
72
- *
73
- * @param array $field The passed in `CMB2_Field` object
74
- * @param mixed $escaped_value The value of this field escaped.
75
- * It defaults to `sanitize_text_field`.
76
- * If you need the unescaped value, you can access it
77
- * via `$field->value()`
78
- * @param int $object_id The ID of the current object
79
- * @param string $object_type The type of object you are working with.
80
- * Most commonly, `post` (this applies to all post-types),
81
- * but could also be `comment`, `user` or `options-page`.
82
- * @param object $field_type_object This `CMB2_Types` object
83
- */
84
- do_action( "cmb2_render_{$fieldtype}", $this->field, $this->field->escaped_value(), $this->field->object_id, $this->field->object_type, $this );
85
- }
86
-
87
- /**
88
- * Render a field (and handle repeatable)
89
- *
90
- * @since 1.1.0
91
- */
92
- public function render() {
93
- if ( $this->field->args( 'repeatable' ) ) {
94
- $this->render_repeatable_field();
95
- } else {
96
- $this->_render();
97
- }
98
- }
99
-
100
- /**
101
- * Render a field type
102
- *
103
- * @since 1.1.0
104
- */
105
- protected function _render() {
106
- $this->field->peform_param_callback( 'before_field' );
107
- echo $this->{$this->field->type()}();
108
- $this->field->peform_param_callback( 'after_field' );
109
- }
110
-
111
- /**
112
- * Proxies the method call to the CMB2_Type_Base object, if it exists, otherwise returns a default fallback value.
113
- *
114
- * @since 2.2.2
115
- *
116
- * @param string $method Method to call on the CMB2_Type_Base object.
117
- * @param mixed $default Default fallback value if method is not found.
118
- * @param array $args Optional arguments to pass to proxy method.
119
- *
120
- * @return mixed Results from called method.
121
- */
122
- protected function proxy_method( $method, $default, $args = array() ) {
123
- if ( ! is_object( $this->type ) ) {
124
- $this->guess_type_object( $method );
125
- }
126
-
127
- if ( is_object( $this->type ) && method_exists( $this->type, $method ) ) {
128
-
129
- return empty( $args )
130
- ? $this->type->$method()
131
- : call_user_func_array( array( $this->type, $method ), $args );
132
- }
133
-
134
- return $default;
135
- }
136
-
137
- /**
138
- * If no CMB2_Types::$type object is initiated when a proxy method is called, it means
139
- * it's a custom field type (which SHOULD be instantiating a Type), but let's try and
140
- * guess the type object for them and instantiate it.
141
- *
142
- * @since 2.2.3
143
- *
144
- * @param string $method Method attempting to be called on the CMB2_Type_Base object.
145
- */
146
- protected function guess_type_object( $method ) {
147
- $fieldtype = $this->field->type();
148
-
149
- // Try to "guess" the Type object based on the method requested.
150
- switch ( $method ) {
151
- case 'select_option':
152
- case 'list_input':
153
- case 'list_input_checkbox':
154
- case 'concat_items':
155
- $this->get_new_render_type( $fieldtype, 'CMB2_Type_Select' );
156
- break;
157
- case 'is_valid_img_ext':
158
- case 'img_status_output':
159
- case 'file_status_output':
160
- $this->get_new_render_type( $fieldtype, 'CMB2_Type_File_Base' );
161
- break;
162
- case 'parse_picker_options':
163
- $this->get_new_render_type( $fieldtype, 'CMB2_Type_Text_Date' );
164
- break;
165
- case 'get_object_terms':
166
- case 'get_terms':
167
- $this->get_new_render_type( $fieldtype, 'CMB2_Type_Taxonomy_Multicheck' );
168
- break;
169
- case 'date_args':
170
- case 'time_args':
171
- $this->get_new_render_type( $fieldtype, 'CMB2_Type_Text_Datetime_Timestamp' );
172
- break;
173
- case 'parse_args':
174
- $this->get_new_render_type( $fieldtype, 'CMB2_Type_Text' );
175
- break;
176
- }
177
-
178
- return null !== $this->type;
179
- }
180
-
181
- /**
182
- * Check for methods to be proxied to the CMB2_Type_Base object.
183
- *
184
- * @since 2.2.4
185
- * @param string $method The possible method to proxy.
186
- * @param array $arguments All arguments passed to the method.
187
- * @return bool|array False if not proxied, else array with 'value' key being the return of the method.
188
- */
189
- public function maybe_proxy_method( $method, $arguments ) {
190
- $exists = false;
191
-
192
- $proxied = array(
193
- 'get_object_terms' => array(),
194
- 'is_valid_img_ext' => false,
195
- 'parse_args' => array(),
196
- 'concat_items' => '',
197
- 'select_option' => '',
198
- 'list_input' => '',
199
- 'list_input_checkbox' => '',
200
- 'img_status_output' => '',
201
- 'file_status_output' => '',
202
- 'parse_picker_options' => array(),
203
- );
204
- if ( isset( $proxied[ $method ] ) ) {
205
- $exists = array(
206
- // Ok, proxy the method call to the CMB2_Type_Base object.
207
- 'value' => $this->proxy_method( $method, $proxied[ $method ], $arguments ),
208
- );
209
- }
210
-
211
- return $exists;
212
- }
213
-
214
- /**
215
- * Checks for a custom field CMB2_Type_Base class to use for rendering.
216
- *
217
- * @since 2.2.4
218
- *
219
- * @param string $fieldtype Non-existent field type name.
220
- * @param array $args Optional field arguments.
221
- *
222
- * @return bool|CMB2_Type_Base Type object if custom field is an object, false if field was added with
223
- * `cmb2_render_{$field_type}` action.
224
- * @throws Exception if custom field type class does not extend CMB2_Type_Base.
225
- */
226
- public function maybe_custom_field_object( $fieldtype, $args = array() ) {
227
- if ( $render_class_name = $this->get_render_type_class( $fieldtype ) ) {
228
- $this->type = new $render_class_name( $this, $args );
229
-
230
- if ( ! ( $this->type instanceof CMB2_Type_Base ) ) {
231
- throw new Exception( __( 'Custom CMB2 field type classes must extend CMB2_Type_Base.', 'cmb2' ) );
232
- }
233
-
234
- return $this->type;
235
- }
236
-
237
- return false;
238
- }
239
-
240
- /**
241
- * Gets the render type CMB2_Type_Base object to use for rendering the field.
242
- *
243
- * @since 2.2.4
244
- * @param string $fieldtype The type of field being rendered.
245
- * @param string $render_class_name The default field type class to use. Defaults to null.
246
- * @param array $args Optional arguments to pass to type class.
247
- * @param mixed $additional Optional additional argument to pass to type class.
248
- * @return CMB2_Type_Base Type object.
249
- */
250
- public function get_new_render_type( $fieldtype, $render_class_name = null, $args = array(), $additional = '' ) {
251
- $render_class_name = $this->get_render_type_class( $fieldtype, $render_class_name );
252
- $this->type = new $render_class_name( $this, $args, $additional );
253
-
254
- return $this->type;
255
- }
256
-
257
- /**
258
- * Checks for the render type class to use for rendering the field.
259
- *
260
- * @since 2.2.4
261
- * @param string $fieldtype The type of field being rendered.
262
- * @param string $render_class_name The default field type class to use. Defaults to null.
263
- * @return string The field type class to use.
264
- */
265
- public function get_render_type_class( $fieldtype, $render_class_name = null ) {
266
- $render_class_name = $this->field->args( 'render_class' ) ? $this->field->args( 'render_class' ) : $render_class_name;
267
-
268
- if ( has_action( "cmb2_render_class_{$fieldtype}" ) ) {
269
-
270
- /**
271
- * Filters the custom field type class used for rendering the field. Class is required to extend CMB2_Type_Base.
272
- *
273
- * The dynamic portion of the hook name, $fieldtype, refers to the (custom) field type.
274
- *
275
- * @since 2.2.4
276
- *
277
- * @param string $render_class_name The custom field type class to use. Default null.
278
- * @param object $field_type_object This `CMB2_Types` object.
279
- */
280
- $render_class_name = apply_filters( "cmb2_render_class_{$fieldtype}", $render_class_name, $this );
281
- }
282
-
283
- return $render_class_name && class_exists( $render_class_name ) ? $render_class_name : false;
284
- }
285
-
286
- /**
287
- * Retrieve text parameter from field's options array (if it has one), or use fallback text
288
- *
289
- * @since 2.0.0
290
- * @param string $text_key Key in field's options array
291
- * @param string $fallback Fallback text
292
- * @return string Text
293
- */
294
- public function _text( $text_key, $fallback = '' ) {
295
- return $this->field->get_string( $text_key, $fallback );
296
- }
297
-
298
- /**
299
- * Determine a file's extension
300
- *
301
- * @since 1.0.0
302
- * @param string $file File url
303
- * @return string|false File extension or false
304
- */
305
- public function get_file_ext( $file ) {
306
- return CMB2_Utils::get_file_ext( $file );
307
- }
308
-
309
- /**
310
- * Get the file name from a url
311
- *
312
- * @since 2.0.0
313
- * @param string $value File url or path
314
- * @return string File name
315
- */
316
- public function get_file_name_from_path( $value ) {
317
- return CMB2_Utils::get_file_name_from_path( $value );
318
- }
319
-
320
- /**
321
- * Combines attributes into a string for a form element
322
- *
323
- * @since 1.1.0
324
- * @param array $attrs Attributes to concatenate
325
- * @param array $attr_exclude Attributes that should NOT be concatenated
326
- * @return string String of attributes for form element
327
- */
328
- public function concat_attrs( $attrs, $attr_exclude = array() ) {
329
- return CMB2_Utils::concat_attrs( $attrs, $attr_exclude );
330
- }
331
-
332
- /**
333
- * Generates repeatable field table markup
334
- *
335
- * @since 1.0.0
336
- */
337
- public function render_repeatable_field() {
338
- $table_id = $this->field->id() . '_repeat';
339
-
340
- $this->_desc( true, true, true );
341
- ?>
342
-
343
- <div id="<?php echo $table_id; ?>" class="cmb-repeat-table cmb-nested">
344
- <div class="cmb-tbody cmb-field-list">
345
- <?php $this->repeatable_rows(); ?>
346
- </div>
347
- </div>
348
- <p class="cmb-add-row">
349
- <button type="button" data-selector="<?php echo $table_id; ?>" class="cmb-add-row-button button-secondary"><?php echo esc_html( $this->_text( 'add_row_text', esc_html__( 'Add Row', 'cmb2' ) ) ); ?></button>
350
- </p>
351
-
352
- <?php
353
- // reset iterator
354
- $this->iterator = 0;
355
- }
356
-
357
- /**
358
- * Generates repeatable field rows
359
- *
360
- * @since 1.1.0
361
- */
362
- public function repeatable_rows() {
363
- $meta_value = array_filter( (array) $this->field->escaped_value() );
364
- // check for default content
365
- $default = $this->field->get_default();
366
-
367
- // check for saved data
368
- if ( ! empty( $meta_value ) ) {
369
- $meta_value = is_array( $meta_value ) ? array_filter( $meta_value ) : $meta_value;
370
- $meta_value = ! empty( $meta_value ) ? $meta_value : $default;
371
- } else {
372
- $meta_value = $default;
373
- }
374
-
375
- // Loop value array and add a row
376
- if ( ! empty( $meta_value ) ) {
377
- $count = count( $meta_value );
378
- foreach ( (array) $meta_value as $val ) {
379
- $this->field->escaped_value = $val;
380
- $this->repeat_row();
381
- $this->iterator++;
382
- }
383
- } else {
384
-
385
- // If value is empty (including empty array), then clear the value.
386
- $this->field->escaped_value = $this->field->value = null;
387
-
388
- // Otherwise add one row
389
- $this->repeat_row();
390
- }
391
-
392
- // Then add an empty row
393
- $this->field->escaped_value = '';
394
- $this->iterator = $this->iterator ? $this->iterator : 1;
395
- $this->repeat_row( 'empty-row hidden' );
396
- }
397
-
398
- /**
399
- * Generates a repeatable row's markup
400
- *
401
- * @since 1.1.0
402
- * @param string $class Repeatable table row's class
403
- */
404
- protected function repeat_row( $class = 'cmb-repeat-row' ) {
405
- ?>
406
-
407
- <div class="cmb-row <?php echo $class; ?>">
408
- <div class="cmb-td">
409
- <?php $this->_render(); ?>
410
- </div>
411
- <div class="cmb-td cmb-remove-row">
412
- <button type="button" class="button-secondary cmb-remove-row-button" title="<?php echo esc_attr( $this->_text( 'remove_row_button_title', esc_html__( 'Remove Row', 'cmb2' ) ) ); ?>"><?php echo esc_html( $this->_text( 'remove_row_text', esc_html__( 'Remove', 'cmb2' ) ) ); ?></button>
413
- </div>
414
- </div>
415
-
416
- <?php
417
- }
418
-
419
- /**
420
- * Generates description markup
421
- *
422
- * @since 1.0.0
423
- * @param boolean $paragraph Paragraph tag or span
424
- * @param boolean $echo Whether to echo description or only return it
425
- * @return string Field's description markup
426
- */
427
- public function _desc( $paragraph = false, $echo = false, $repeat_group = false ) {
428
- // Prevent description from printing multiple times for repeatable fields
429
- if ( ! $repeat_group && ( $this->field->args( 'repeatable' ) || $this->iterator > 0 ) ) {
430
- return '';
431
- }
432
-
433
- $desc = $this->field->args( 'description' );
434
-
435
- if ( ! $desc ) {
436
- return;
437
- }
438
-
439
- $tag = $paragraph ? 'p' : 'span';
440
- $desc = sprintf( "\n" . '<%1$s class="cmb2-metabox-description">%2$s</%1$s>' . "\n", $tag, $desc );
441
-
442
- if ( $echo ) {
443
- echo $desc;
444
- }
445
-
446
- return $desc;
447
- }
448
-
449
- /**
450
- * Generate field name attribute
451
- *
452
- * @since 1.1.0
453
- * @param string $suffix For multi-part fields
454
- * @return string Name attribute
455
- */
456
- public function _name( $suffix = '' ) {
457
- return $this->field->args( '_name' ) . ( $this->field->args( 'repeatable' ) ? '[' . $this->iterator . ']' : '' ) . $suffix;
458
- }
459
-
460
- /**
461
- * Generate field id attribute
462
- *
463
- * @since 1.1.0
464
- * @param string $suffix For multi-part fields
465
- * @return string Id attribute
466
- */
467
- public function _id( $suffix = '' ) {
468
- return $this->field->id() . $suffix . ( $this->field->args( 'repeatable' ) ? '_' . $this->iterator . '" data-iterator="' . $this->iterator : '' );
469
- }
470
-
471
- /**
472
- * Handles outputting an 'input' element
473
- *
474
- * @since 1.1.0
475
- * @param array $args Override arguments
476
- * @param string $type Field type
477
- * @return string Form input element
478
- */
479
- public function input( $args = array(), $type = __FUNCTION__ ) {
480
- return $this->get_new_render_type( 'text', 'CMB2_Type_Text', $args, $type )->render();
481
- }
482
-
483
- /**
484
- * Handles outputting an 'textarea' element
485
- *
486
- * @since 1.1.0
487
- * @param array $args Override arguments
488
- * @return string Form textarea element
489
- */
490
- public function textarea( $args = array() ) {
491
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Textarea', $args )->render();
492
- }
493
-
494
- /**
495
- * Begin Field Types
496
- */
497
-
498
- public function text() {
499
- return $this->input();
500
- }
501
-
502
- public function hidden() {
503
- $args = array(
504
- 'type' => 'hidden',
505
- 'desc' => '',
506
- 'class' => 'cmb2-hidden',
507
- );
508
- if ( $this->field->group ) {
509
- $args['data-groupid'] = $this->field->group->id();
510
- $args['data-iterator'] = $this->iterator;
511
- }
512
-
513
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Text', $args, 'input' )->render();
514
- }
515
-
516
- public function text_small() {
517
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Text', array(
518
- 'class' => 'cmb2-text-small',
519
- 'desc' => $this->_desc(),
520
- ), 'input' )->render();
521
- }
522
-
523
- public function text_medium() {
524
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Text', array(
525
- 'class' => 'cmb2-text-medium',
526
- 'desc' => $this->_desc(),
527
- ), 'input' )->render();
528
- }
529
-
530
- public function text_email() {
531
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Text', array(
532
- 'class' => 'cmb2-text-email cmb2-text-medium',
533
- 'type' => 'email',
534
- ), 'input' )->render();
535
- }
536
-
537
- public function text_url() {
538
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Text', array(
539
- 'class' => 'cmb2-text-url cmb2-text-medium regular-text',
540
- 'value' => $this->field->escaped_value( 'esc_url' ),
541
- ), 'input' )->render();
542
- }
543
-
544
- public function text_money() {
545
- $input = $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Text', array(
546
- 'class' => 'cmb2-text-money',
547
- 'desc' => $this->_desc(),
548
- ), 'input' )->render();
549
- return ( ! $this->field->get_param_callback_result( 'before_field' ) ? '$ ' : ' ' ) . $input;
550
- }
551
-
552
- public function textarea_small() {
553
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Textarea', array(
554
- 'class' => 'cmb2-textarea-small',
555
- 'rows' => 4,
556
- ) )->render();
557
- }
558
-
559
- public function textarea_code( $args = array() ) {
560
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Textarea_Code', $args )->render();
561
- }
562
-
563
- public function wysiwyg( $args = array() ) {
564
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Wysiwyg', $args )->render();
565
- }
566
-
567
- public function text_date( $args = array() ) {
568
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Text_Date', $args )->render();
569
- }
570
-
571
- // Alias for text_date
572
- public function text_date_timestamp( $args = array() ) {
573
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Text_Date', $args )->render();
574
- }
575
-
576
- public function text_time( $args = array() ) {
577
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Text_Time', $args )->render();
578
- }
579
-
580
- public function text_datetime_timestamp( $args = array() ) {
581
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Text_Datetime_Timestamp', $args )->render();
582
- }
583
-
584
- public function text_datetime_timestamp_timezone( $args = array() ) {
585
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Text_Datetime_Timestamp_Timezone', $args )->render();
586
- }
587
-
588
- public function select_timezone( $args = array() ) {
589
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Select_Timezone', $args )->render();
590
- }
591
-
592
- public function colorpicker( $args = array(), $meta_value = '' ) {
593
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Colorpicker', $args, $meta_value )->render();
594
- }
595
-
596
- public function title( $args = array() ) {
597
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Title', $args )->render();
598
- }
599
-
600
- public function select( $args = array() ) {
601
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Select', $args )->render();
602
- }
603
-
604
- public function taxonomy_select( $args = array() ) {
605
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Taxonomy_Select', $args )->render();
606
- }
607
-
608
- public function radio( $args = array(), $type = __FUNCTION__ ) {
609
- return $this->get_new_render_type( $type, 'CMB2_Type_Radio', $args, $type )->render();
610
- }
611
-
612
- public function radio_inline( $args = array() ) {
613
- return $this->radio( $args, __FUNCTION__ );
614
- }
615
-
616
- public function multicheck( $type = 'checkbox' ) {
617
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Multicheck', array(), $type )->render();
618
- }
619
-
620
- public function multicheck_inline() {
621
- return $this->multicheck( 'multicheck_inline' );
622
- }
623
-
624
- public function checkbox( $args = array(), $is_checked = null ) {
625
- // Avoid get_new_render_type since we need a different default for the 3rd argument than ''.
626
- $render_class_name = $this->get_render_type_class( __FUNCTION__, 'CMB2_Type_Checkbox' );
627
- $this->type = new $render_class_name( $this, $args, $is_checked );
628
- return $this->type->render();
629
- }
630
-
631
- public function taxonomy_radio( $args = array() ) {
632
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Taxonomy_Radio', $args )->render();
633
- }
634
-
635
- public function taxonomy_radio_hierarchical( $args = array() ) {
636
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Taxonomy_Radio_Hierarchical', $args )->render();
637
- }
638
-
639
- public function taxonomy_radio_inline( $args = array() ) {
640
- return $this->taxonomy_radio( $args );
641
- }
642
-
643
- public function taxonomy_multicheck( $args = array() ) {
644
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Taxonomy_Multicheck', $args )->render();
645
- }
646
-
647
- public function taxonomy_multicheck_hierarchical( $args = array() ) {
648
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Taxonomy_Multicheck_Hierarchical', $args )->render();
649
- }
650
-
651
- public function taxonomy_multicheck_inline( $args = array() ) {
652
- return $this->taxonomy_multicheck( $args );
653
- }
654
-
655
- public function oembed( $args = array() ) {
656
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_Oembed', $args )->render();
657
- }
658
-
659
- public function file_list( $args = array() ) {
660
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_File_List', $args )->render();
661
- }
662
-
663
- public function file( $args = array() ) {
664
- return $this->get_new_render_type( __FUNCTION__, 'CMB2_Type_File', $args )->render();
665
- }
666
-
667
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/CMB2_Utils.php DELETED
@@ -1,631 +0,0 @@
1
- <?php
2
- /**
3
- * CMB2 Utilities
4
- *
5
- * @since 1.1.0
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Utils {
14
-
15
- /**
16
- * The WordPress ABSPATH constant.
17
- *
18
- * @var string
19
- * @since 2.2.3
20
- */
21
- protected static $ABSPATH = ABSPATH;
22
-
23
- /**
24
- * The url which is used to load local resources.
25
- *
26
- * @var string
27
- * @since 2.0.0
28
- */
29
- protected static $url = '';
30
-
31
- /**
32
- * Utility method that attempts to get an attachment's ID by it's url
33
- *
34
- * @since 1.0.0
35
- * @param string $img_url Attachment url
36
- * @return int|false Attachment ID or false
37
- */
38
- public static function image_id_from_url( $img_url ) {
39
- $attachment_id = 0;
40
- $dir = wp_upload_dir();
41
-
42
- // Is URL in uploads directory?
43
- if ( false === strpos( $img_url, $dir['baseurl'] . '/' ) ) {
44
- return false;
45
- }
46
-
47
- $file = basename( $img_url );
48
-
49
- $query_args = array(
50
- 'post_type' => 'attachment',
51
- 'post_status' => 'inherit',
52
- 'fields' => 'ids',
53
- 'meta_query' => array(
54
- array(
55
- 'value' => $file,
56
- 'compare' => 'LIKE',
57
- 'key' => '_wp_attachment_metadata',
58
- ),
59
- ),
60
- );
61
-
62
- $query = new WP_Query( $query_args );
63
-
64
- if ( $query->have_posts() ) {
65
-
66
- foreach ( $query->posts as $post_id ) {
67
- $meta = wp_get_attachment_metadata( $post_id );
68
- $original_file = basename( $meta['file'] );
69
- $cropped_image_files = isset( $meta['sizes'] ) ? wp_list_pluck( $meta['sizes'], 'file' ) : array();
70
- if ( $original_file === $file || in_array( $file, $cropped_image_files ) ) {
71
- $attachment_id = $post_id;
72
- break;
73
- }
74
- }
75
- }
76
-
77
- return 0 === $attachment_id ? false : $attachment_id;
78
- }
79
-
80
- /**
81
- * Utility method to get a combined list of default and custom registered image sizes
82
- *
83
- * @since 2.2.4
84
- * @link http://core.trac.wordpress.org/ticket/18947
85
- * @global array $_wp_additional_image_sizes
86
- * @return array The image sizes
87
- */
88
- static function get_available_image_sizes() {
89
- global $_wp_additional_image_sizes;
90
-
91
- $default_image_sizes = array( 'thumbnail', 'medium', 'large' );
92
- foreach ( $default_image_sizes as $size ) {
93
- $image_sizes[ $size ] = array(
94
- 'height' => intval( get_option( "{$size}_size_h" ) ),
95
- 'width' => intval( get_option( "{$size}_size_w" ) ),
96
- 'crop' => get_option( "{$size}_crop" ) ? get_option( "{$size}_crop" ) : false,
97
- );
98
- }
99
-
100
- if ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) ) {
101
- $image_sizes = array_merge( $image_sizes, $_wp_additional_image_sizes );
102
- }
103
-
104
- return $image_sizes;
105
- }
106
-
107
- /**
108
- * Utility method to return the closest named size from an array of values
109
- *
110
- * Based off of WordPress's image_get_intermediate_size()
111
- * If the size matches an existing size then it will be used. If there is no
112
- * direct match, then the nearest image size larger than the specified size
113
- * will be used. If nothing is found, then the function will return false.
114
- * Uses get_available_image_sizes() to get all available sizes.
115
- *
116
- * @since 2.2.4
117
- * @param array|string $size Image size. Accepts an array of width and height (in that order)
118
- * @return false|string Named image size e.g. 'thumbnail'
119
- */
120
- public static function get_named_size( $size ) {
121
- $data = array();
122
-
123
- // Find the best match when '$size' is an array.
124
- if ( is_array( $size ) ) {
125
- $image_sizes = self::get_available_image_sizes();
126
- $candidates = array();
127
-
128
- foreach ( $image_sizes as $_size => $data ) {
129
-
130
- // If there's an exact match to an existing image size, short circuit.
131
- if ( $data['width'] == $size[0] && $data['height'] == $size[1] ) {
132
- $candidates[ $data['width'] * $data['height'] ] = array( $_size, $data );
133
- break;
134
- }
135
-
136
- // If it's not an exact match, consider larger sizes with the same aspect ratio.
137
- if ( $data['width'] >= $size[0] && $data['height'] >= $size[1] ) {
138
-
139
- /*
140
- * To test for varying crops, we constrain the dimensions of the larger image
141
- * to the dimensions of the smaller image and see if they match.
142
- */
143
- if ( $data['width'] > $size[0] ) {
144
- $constrained_size = wp_constrain_dimensions( $data['width'], $data['height'], $size[0] );
145
- $expected_size = array( $size[0], $size[1] );
146
- } else {
147
- $constrained_size = wp_constrain_dimensions( $size[0], $size[1], $data['width'] );
148
- $expected_size = array( $data['width'], $data['height'] );
149
- }
150
-
151
- // If the image dimensions are within 1px of the expected size, we consider it a match.
152
- $matched = ( abs( $constrained_size[0] - $expected_size[0] ) <= 1 && abs( $constrained_size[1] - $expected_size[1] ) <= 1 );
153
-
154
- if ( $matched ) {
155
- $candidates[ $data['width'] * $data['height'] ] = array( $_size, $data );
156
- }
157
- }
158
- }
159
-
160
- if ( ! empty( $candidates ) ) {
161
- // Sort the array by size if we have more than one candidate.
162
- if ( 1 < count( $candidates ) ) {
163
- ksort( $candidates );
164
- }
165
-
166
- $data = array_shift( $candidates );
167
- $data = $data[0];
168
- } elseif ( ! empty( $image_sizes['thumbnail'] ) && $image_sizes['thumbnail']['width'] >= $size[0] && $image_sizes['thumbnail']['width'] >= $size[1] ) {
169
- /*
170
- * When the size requested is smaller than the thumbnail dimensions, we
171
- * fall back to the thumbnail size.
172
- */
173
- $data = 'thumbnail';
174
- } else {
175
- return false;
176
- }
177
- } elseif ( ! empty( $image_sizes[ $size ] ) ) {
178
- $data = $size;
179
- }// End if().
180
-
181
- // If we still don't have a match at this point, return false.
182
- if ( empty( $data ) ) {
183
- return false;
184
- }
185
-
186
- return $data;
187
- }
188
-
189
- /**
190
- * Utility method that returns time string offset by timezone
191
- *
192
- * @since 1.0.0
193
- * @param string $tzstring Time string
194
- * @return string Offset time string
195
- */
196
- public static function timezone_offset( $tzstring ) {
197
- $tz_offset = 0;
198
-
199
- if ( ! empty( $tzstring ) && is_string( $tzstring ) ) {
200
- if ( 'UTC' === substr( $tzstring, 0, 3 ) ) {
201
- $tzstring = str_replace( array( ':15', ':30', ':45' ), array( '.25', '.5', '.75' ), $tzstring );
202
- return intval( floatval( substr( $tzstring, 3 ) ) * HOUR_IN_SECONDS );
203
- }
204
-
205
- try {
206
- $date_time_zone_selected = new DateTimeZone( $tzstring );
207
- $tz_offset = timezone_offset_get( $date_time_zone_selected, date_create() );
208
- } catch ( Exception $e ) {
209
- self::log_if_debug( __METHOD__, __LINE__, $e->getMessage() );
210
- }
211
- }
212
-
213
- return $tz_offset;
214
- }
215
-
216
- /**
217
- * Utility method that returns a timezone string representing the default timezone for the site.
218
- *
219
- * Roughly copied from WordPress, as get_option('timezone_string') will return
220
- * an empty string if no value has been set on the options page.
221
- * A timezone string is required by the wp_timezone_choice() used by the
222
- * select_timezone field.
223
- *
224
- * @since 1.0.0
225
- * @return string Timezone string
226
- */
227
- public static function timezone_string() {
228
- $current_offset = get_option( 'gmt_offset' );
229
- $tzstring = get_option( 'timezone_string' );
230
-
231
- // Remove old Etc mappings. Fallback to gmt_offset.
232
- if ( false !== strpos( $tzstring, 'Etc/GMT' ) ) {
233
- $tzstring = '';
234
- }
235
-
236
- if ( empty( $tzstring ) ) { // Create a UTC+- zone if no timezone string exists
237
- if ( 0 == $current_offset ) {
238
- $tzstring = 'UTC+0';
239
- } elseif ( $current_offset < 0 ) {
240
- $tzstring = 'UTC' . $current_offset;
241
- } else {
242
- $tzstring = 'UTC+' . $current_offset;
243
- }
244
- }
245
-
246
- return $tzstring;
247
- }
248
-
249
- /**
250
- * Returns a timestamp, first checking if value already is a timestamp.
251
- *
252
- * @since 2.0.0
253
- * @param string|int $string Possible timestamp string
254
- * @return int Time stamp
255
- */
256
- public static function make_valid_time_stamp( $string ) {
257
- if ( ! $string ) {
258
- return 0;
259
- }
260
-
261
- return self::is_valid_time_stamp( $string )
262
- ? (int) $string :
263
- strtotime( (string) $string );
264
- }
265
-
266
- /**
267
- * Determine if a value is a valid timestamp
268
- *
269
- * @since 2.0.0
270
- * @param mixed $timestamp Value to check
271
- * @return boolean Whether value is a valid timestamp
272
- */
273
- public static function is_valid_time_stamp( $timestamp ) {
274
- return (string) (int) $timestamp === (string) $timestamp
275
- && $timestamp <= PHP_INT_MAX
276
- && $timestamp >= ~PHP_INT_MAX;
277
- }
278
-
279
- /**
280
- * Checks if a value is 'empty'. Still accepts 0.
281
- *
282
- * @since 2.0.0
283
- * @param mixed $value Value to check
284
- * @return bool True or false
285
- */
286
- public static function isempty( $value ) {
287
- return null === $value || '' === $value || false === $value || array() === $value;
288
- }
289
-
290
- /**
291
- * Checks if a value is not 'empty'. 0 doesn't count as empty.
292
- *
293
- * @since 2.2.2
294
- * @param mixed $value Value to check
295
- * @return bool True or false
296
- */
297
- public static function notempty( $value ) {
298
- return null !== $value && '' !== $value && false !== $value && array() !== $value;
299
- }
300
-
301
- /**
302
- * Filters out empty values (not including 0).
303
- *
304
- * @since 2.2.2
305
- * @param mixed $value Value to check
306
- * @return bool True or false
307
- */
308
- public static function filter_empty( $value ) {
309
- return array_filter( $value, array( __CLASS__, 'notempty' ) );
310
- }
311
-
312
- /**
313
- * Insert a single array item inside another array at a set position
314
- *
315
- * @since 2.0.2
316
- * @param array &$array Array to modify. Is passed by reference, and no return is needed.
317
- * @param array $new New array to insert
318
- * @param int $position Position in the main array to insert the new array
319
- */
320
- public static function array_insert( &$array, $new, $position ) {
321
- $before = array_slice( $array, 0, $position - 1 );
322
- $after = array_diff_key( $array, $before );
323
- $array = array_merge( $before, $new, $after );
324
- }
325
-
326
- /**
327
- * Defines the url which is used to load local resources.
328
- * This may need to be filtered for local Window installations.
329
- * If resources do not load, please check the wiki for details.
330
- *
331
- * @since 1.0.1
332
- * @return string URL to CMB2 resources
333
- */
334
- public static function url( $path = '' ) {
335
- if ( self::$url ) {
336
- return self::$url . $path;
337
- }
338
-
339
- $cmb2_url = self::get_url_from_dir( cmb2_dir() );
340
-
341
- /**
342
- * Filter the CMB location url
343
- *
344
- * @param string $cmb2_url Currently registered url
345
- */
346
- self::$url = trailingslashit( apply_filters( 'cmb2_meta_box_url', $cmb2_url, CMB2_VERSION ) );
347
-
348
- return self::$url . $path;
349
- }
350
-
351
- /**
352
- * Converts a system path to a URL
353
- *
354
- * @since 2.2.2
355
- * @param string $dir Directory path to convert.
356
- * @return string Converted URL.
357
- */
358
- public static function get_url_from_dir( $dir ) {
359
- $dir = self::normalize_path( $dir );
360
-
361
- // Let's test if We are in the plugins or mu-plugins dir.
362
- $test_dir = trailingslashit( $dir ) . 'unneeded.php';
363
- if (
364
- 0 === strpos( $test_dir, self::normalize_path( WPMU_PLUGIN_DIR ) )
365
- || 0 === strpos( $test_dir, self::normalize_path( WP_PLUGIN_DIR ) )
366
- ) {
367
- // Ok, then use plugins_url, as it is more reliable.
368
- return trailingslashit( plugins_url( '', $test_dir ) );
369
- }
370
-
371
- // Ok, now let's test if we are in the theme dir.
372
- $theme_root = self::normalize_path( get_theme_root() );
373
- if ( 0 === strpos( $dir, $theme_root ) ) {
374
- // Ok, then use get_theme_root_uri.
375
- return set_url_scheme(
376
- trailingslashit(
377
- str_replace(
378
- untrailingslashit( $theme_root ),
379
- untrailingslashit( get_theme_root_uri() ),
380
- $dir
381
- )
382
- )
383
- );
384
- }
385
-
386
- // Check to see if it's anywhere in the root directory
387
- $site_dir = self::normalize_path( self::$ABSPATH );
388
- $site_url = trailingslashit( is_multisite() ? network_site_url() : site_url() );
389
-
390
- $url = str_replace(
391
- array( $site_dir, WP_PLUGIN_DIR ),
392
- array( $site_url, WP_PLUGIN_URL ),
393
- $dir
394
- );
395
-
396
- return set_url_scheme( $url );
397
- }
398
-
399
- /**
400
- * `wp_normalize_path` wrapper for back-compat. Normalize a filesystem path.
401
- *
402
- * On windows systems, replaces backslashes with forward slashes
403
- * and forces upper-case drive letters.
404
- * Allows for two leading slashes for Windows network shares, but
405
- * ensures that all other duplicate slashes are reduced to a single.
406
- *
407
- * @since 2.2.0
408
- *
409
- * @param string $path Path to normalize.
410
- * @return string Normalized path.
411
- */
412
- protected static function normalize_path( $path ) {
413
- if ( function_exists( 'wp_normalize_path' ) ) {
414
- return wp_normalize_path( $path );
415
- }
416
-
417
- // Replace newer WP's version of wp_normalize_path.
418
- $path = str_replace( '\\', '/', $path );
419
- $path = preg_replace( '|(?<=.)/+|', '/', $path );
420
- if ( ':' === substr( $path, 1, 1 ) ) {
421
- $path = ucfirst( $path );
422
- }
423
-
424
- return $path;
425
- }
426
-
427
- /**
428
- * Get timestamp from text date
429
- *
430
- * @since 2.2.0
431
- * @param string $value Date value
432
- * @param string $date_format Expected date format
433
- * @return mixed Unix timestamp representing the date.
434
- */
435
- public static function get_timestamp_from_value( $value, $date_format ) {
436
- $date_object = date_create_from_format( $date_format, $value );
437
- return $date_object ? $date_object->setTime( 0, 0, 0 )->getTimeStamp() : strtotime( $value );
438
- }
439
-
440
- /**
441
- * Takes a php date() format string and returns a string formatted to suit for the date/time pickers
442
- * It will work with only with the following subset ot date() options:
443
- *
444
- * d, j, z, m, n, y, and Y.
445
- *
446
- * A slight effort is made to deal with escaped characters.
447
- *
448
- * Other options are ignored, because they would either bring compatibility problems between PHP and JS, or
449
- * bring even more translation troubles.
450
- *
451
- * @since 2.2.0
452
- * @param string $format php date format
453
- * @return string reformatted string
454
- */
455
- public static function php_to_js_dateformat( $format ) {
456
-
457
- // order is relevant here, since the replacement will be done sequentially.
458
- $supported_options = array(
459
- 'd' => 'dd', // Day, leading 0
460
- 'j' => 'd', // Day, no 0
461
- 'z' => 'o', // Day of the year, no leading zeroes,
462
- // 'D' => 'D', // Day name short, not sure how it'll work with translations
463
- // 'l' => 'DD', // Day name full, idem before
464
- 'm' => 'mm', // Month of the year, leading 0
465
- 'n' => 'm', // Month of the year, no leading 0
466
- // 'M' => 'M', // Month, Short name
467
- // 'F' => 'MM', // Month, full name,
468
- 'y' => 'y', // Year, two digit
469
- 'Y' => 'yy', // Year, full
470
- 'H' => 'HH', // Hour with leading 0 (24 hour)
471
- 'G' => 'H', // Hour with no leading 0 (24 hour)
472
- 'h' => 'hh', // Hour with leading 0 (12 hour)
473
- 'g' => 'h', // Hour with no leading 0 (12 hour),
474
- 'i' => 'mm', // Minute with leading 0,
475
- 's' => 'ss', // Second with leading 0,
476
- 'a' => 'tt', // am/pm
477
- 'A' => 'TT',// AM/PM
478
- );
479
-
480
- foreach ( $supported_options as $php => $js ) {
481
- // replaces every instance of a supported option, but skips escaped characters
482
- $format = preg_replace( "~(?<!\\\\)$php~", $js, $format );
483
- }
484
-
485
- $format = preg_replace_callback( '~(?:\\\.)+~', array( __CLASS__, 'wrap_escaped_chars' ), $format );
486
-
487
- return $format;
488
- }
489
-
490
- /**
491
- * Helper function for CMB_Utils->php_to_js_dateformat, because php 5.2 was retarded.
492
- *
493
- * @since 2.2.0
494
- * @param $value Value to wrap/escape
495
- * @return string Modified value
496
- */
497
- public static function wrap_escaped_chars( $value ) {
498
- return '&#39;' . str_replace( '\\', '', $value[0] ) . '&#39;';
499
- }
500
-
501
- /**
502
- * Send to debug.log if WP_DEBUG is defined and true
503
- *
504
- * @since 2.2.0
505
- *
506
- * @param string $function Function name
507
- * @param int $line Line number
508
- * @param mixed $msg Message to output
509
- * @param mixed $debug Variable to print_r
510
- */
511
- public static function log_if_debug( $function, $line, $msg, $debug = null ) {
512
- if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
513
- error_log( "In $function, $line:" . print_r( $msg, true ) . ( $debug ? print_r( $debug, true ) : '' ) );
514
- }
515
- }
516
-
517
- /**
518
- * Determine a file's extension
519
- *
520
- * @since 1.0.0
521
- * @param string $file File url
522
- * @return string|false File extension or false
523
- */
524
- public static function get_file_ext( $file ) {
525
- $parsed = parse_url( $file, PHP_URL_PATH );
526
- return $parsed ? strtolower( pathinfo( $parsed, PATHINFO_EXTENSION ) ) : false;
527
- }
528
-
529
- /**
530
- * Get the file name from a url
531
- *
532
- * @since 2.0.0
533
- * @param string $value File url or path
534
- * @return string File name
535
- */
536
- public static function get_file_name_from_path( $value ) {
537
- $parts = explode( '/', $value );
538
- return is_array( $parts ) ? end( $parts ) : $value;
539
- }
540
-
541
- /**
542
- * Check if WP version is at least $version.
543
- *
544
- * @since 2.2.2
545
- * @param string $version WP version string to compare.
546
- * @return bool Result of comparison check.
547
- */
548
- public static function wp_at_least( $version ) {
549
- return version_compare( get_bloginfo( 'version' ), $version, '>=' );
550
- }
551
-
552
- /**
553
- * Combines attributes into a string for a form element.
554
- *
555
- * @since 1.1.0
556
- * @param array $attrs Attributes to concatenate.
557
- * @param array $attr_exclude Attributes that should NOT be concatenated.
558
- * @return string String of attributes for form element.
559
- */
560
- public static function concat_attrs( $attrs, $attr_exclude = array() ) {
561
- $attr_exclude[] = 'rendered';
562
- $attributes = '';
563
- foreach ( $attrs as $attr => $val ) {
564
- $excluded = in_array( $attr, (array) $attr_exclude, true );
565
- $empty = false === $val && 'value' !== $attr;
566
- if ( ! $excluded && ! $empty ) {
567
- // if data attribute, use single quote wraps, else double
568
- $quotes = self::is_data_attribute( $attr, 'data-' ) ? "'" : '"';
569
- $attributes .= sprintf( ' %1$s=%3$s%2$s%3$s', $attr, $val, $quotes );
570
- }
571
- }
572
- return $attributes;
573
- }
574
-
575
- /**
576
- * Check if given attribute is a data attribute.
577
- *
578
- * @since 2.2.5
579
- *
580
- * @param string $att HTML attribute
581
- *
582
- * @return boolean
583
- */
584
- public static function is_data_attribute( $att ) {
585
- return 0 === stripos( $att, 'data-' );
586
- }
587
-
588
- /**
589
- * Ensures value is an array.
590
- *
591
- * @since 2.2.3
592
- *
593
- * @param mixed $value Value to ensure is array.
594
- * @param array $default Default array. Defaults to empty array.
595
- *
596
- * @return array The array.
597
- */
598
- public static function ensure_array( $value, $default = array() ) {
599
- if ( empty( $value ) ) {
600
- return $default;
601
- }
602
-
603
- if ( is_array( $value ) || is_object( $value ) ) {
604
- return (array) $value;
605
- }
606
-
607
- // Not sure anything would be non-scalar that is not an array or object?
608
- if ( ! is_scalar( $value ) ) {
609
- return $default;
610
- }
611
-
612
- return (array) $value;
613
- }
614
-
615
- /**
616
- * If number is numeric, normalize it with floatval or intval, depending on if decimal is found.
617
- *
618
- * @since 2.2.6
619
- *
620
- * @param mixed $value Value to normalize (if numeric).
621
- *
622
- * @return mixed Possibly normalized value.
623
- */
624
- public static function normalize_if_numeric( $value ) {
625
- if ( is_numeric( $value ) ) {
626
- $value = false !== strpos( $value, '.' ) ? floatval( $value ) : intval( $value );
627
- }
628
-
629
- return $value;
630
- }
631
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/CMB2_hookup.php DELETED
@@ -1,913 +0,0 @@
1
- <?php
2
- /**
3
- * Handles hooking CMB2 forms/metaboxes into the post/attachement/user screens
4
- * and handles hooking in and saving those fields.
5
- *
6
- * @since 2.0.0
7
- *
8
- * @category WordPress_Plugin
9
- * @package CMB2
10
- * @author CMB2 team
11
- * @license GPL-2.0+
12
- * @link https://cmb2.io
13
- */
14
- class CMB2_hookup extends CMB2_Hookup_Base {
15
-
16
- /**
17
- * Only allow JS registration once
18
- *
19
- * @var bool
20
- * @since 2.0.7
21
- */
22
- protected static $js_registration_done = false;
23
-
24
- /**
25
- * Only allow CSS registration once
26
- *
27
- * @var bool
28
- * @since 2.0.7
29
- */
30
- protected static $css_registration_done = false;
31
-
32
- /**
33
- * CMB taxonomies array for term meta
34
- *
35
- * @var array
36
- * @since 2.2.0
37
- */
38
- protected $taxonomies = array();
39
-
40
- /**
41
- * Custom field columns.
42
- *
43
- * @var array
44
- * @since 2.2.2
45
- */
46
- protected $columns = array();
47
-
48
- /**
49
- * Array of CMB2_Options_Hookup instances if options page metabox.
50
- *
51
- * @var CMB2_Options_Hookup[]|null
52
- * @since 2.2.5
53
- */
54
- protected $options_hookup = null;
55
-
56
- /**
57
- * A functionalized constructor, used for the hookup action callbacks.
58
- *
59
- * @since 2.2.6
60
- *
61
- * @param CMB2 $cmb The CMB2 object to hookup
62
- *
63
- * @return CMB2_Hookup_Base $hookup The hookup object.
64
- */
65
- public static function maybe_init_and_hookup( CMB2 $cmb ) {
66
- if ( $cmb->prop( 'hookup' ) ) {
67
-
68
- $hookup = new self( $cmb );
69
-
70
- // Hook in the hookup... how meta.
71
- return $hookup->universal_hooks();
72
- }
73
-
74
- return false;
75
- }
76
-
77
- public function universal_hooks() {
78
- foreach ( get_class_methods( 'CMB2_Show_Filters' ) as $filter ) {
79
- add_filter( 'cmb2_show_on', array( 'CMB2_Show_Filters', $filter ), 10, 3 );
80
- }
81
-
82
- if ( is_admin() ) {
83
- // register our scripts and styles for cmb
84
- $this->once( 'admin_enqueue_scripts', array( __CLASS__, 'register_scripts' ), 8 );
85
- $this->once( 'admin_enqueue_scripts', array( $this, 'do_scripts' ) );
86
-
87
- $this->maybe_enqueue_column_display_styles();
88
-
89
- switch ( $this->object_type ) {
90
- case 'post':
91
- return $this->post_hooks();
92
- case 'comment':
93
- return $this->comment_hooks();
94
- case 'user':
95
- return $this->user_hooks();
96
- case 'term':
97
- return $this->term_hooks();
98
- case 'options-page':
99
- return $this->options_page_hooks();
100
- }
101
- }
102
-
103
- return $this;
104
- }
105
-
106
- public function post_hooks() {
107
-
108
- // Fetch the context we set in our call.
109
- $context = $this->cmb->prop( 'context' ) ? $this->cmb->prop( 'context' ) : 'normal';
110
-
111
- // Call the proper hook based on the context provided.
112
- switch ( $context ) {
113
-
114
- case 'form_top':
115
- add_action( 'edit_form_top', array( $this, 'add_context_metaboxes' ) );
116
- break;
117
-
118
- case 'before_permalink':
119
- add_action( 'edit_form_before_permalink', array( $this, 'add_context_metaboxes' ) );
120
- break;
121
-
122
- case 'after_title':
123
- add_action( 'edit_form_after_title', array( $this, 'add_context_metaboxes' ) );
124
- break;
125
-
126
- case 'after_editor':
127
- add_action( 'edit_form_after_editor', array( $this, 'add_context_metaboxes' ) );
128
- break;
129
-
130
- default:
131
- add_action( 'add_meta_boxes', array( $this, 'add_metaboxes' ) );
132
- }
133
-
134
- add_action( 'add_attachment', array( $this, 'save_post' ) );
135
- add_action( 'edit_attachment', array( $this, 'save_post' ) );
136
- add_action( 'save_post', array( $this, 'save_post' ), 10, 2 );
137
-
138
- if ( $this->cmb->has_columns ) {
139
- foreach ( $this->cmb->box_types() as $post_type ) {
140
- add_filter( "manage_{$post_type}_posts_columns", array( $this, 'register_column_headers' ) );
141
- add_action( "manage_{$post_type}_posts_custom_column", array( $this, 'column_display' ), 10, 2 );
142
- }
143
- }
144
-
145
- return $this;
146
- }
147
-
148
- public function comment_hooks() {
149
- add_action( 'add_meta_boxes_comment', array( $this, 'add_metaboxes' ) );
150
- add_action( 'edit_comment', array( $this, 'save_comment' ) );
151
-
152
- if ( $this->cmb->has_columns ) {
153
- add_filter( 'manage_edit-comments_columns', array( $this, 'register_column_headers' ) );
154
- add_action( 'manage_comments_custom_column', array( $this, 'column_display' ), 10, 3 );
155
- }
156
-
157
- return $this;
158
- }
159
-
160
- public function user_hooks() {
161
- $priority = $this->get_priority();
162
-
163
- add_action( 'show_user_profile', array( $this, 'user_metabox' ), $priority );
164
- add_action( 'edit_user_profile', array( $this, 'user_metabox' ), $priority );
165
- add_action( 'user_new_form', array( $this, 'user_new_metabox' ), $priority );
166
-
167
- add_action( 'personal_options_update', array( $this, 'save_user' ) );
168
- add_action( 'edit_user_profile_update', array( $this, 'save_user' ) );
169
- add_action( 'user_register', array( $this, 'save_user' ) );
170
-
171
- if ( $this->cmb->has_columns ) {
172
- add_filter( 'manage_users_columns', array( $this, 'register_column_headers' ) );
173
- add_filter( 'manage_users_custom_column', array( $this, 'return_column_display' ), 10, 3 );
174
- }
175
-
176
- return $this;
177
- }
178
-
179
- public function term_hooks() {
180
- if ( ! function_exists( 'get_term_meta' ) ) {
181
- wp_die( esc_html__( 'Term Metadata is a WordPress 4.4+ feature. Please upgrade your WordPress install.', 'cmb2' ) );
182
- }
183
-
184
- if ( ! $this->cmb->prop( 'taxonomies' ) ) {
185
- wp_die( esc_html__( 'Term metaboxes configuration requires a "taxonomies" parameter.', 'cmb2' ) );
186
- }
187
-
188
- $this->taxonomies = (array) $this->cmb->prop( 'taxonomies' );
189
- $show_on_term_add = $this->cmb->prop( 'new_term_section' );
190
- $priority = $this->get_priority( 8 );
191
-
192
- foreach ( $this->taxonomies as $taxonomy ) {
193
- // Display our form data
194
- add_action( "{$taxonomy}_edit_form", array( $this, 'term_metabox' ), $priority, 2 );
195
-
196
- $show_on_add = is_array( $show_on_term_add )
197
- ? in_array( $taxonomy, $show_on_term_add )
198
- : (bool) $show_on_term_add;
199
-
200
- /**
201
- * Filter to determine if the term's fields should show in the "Add term" section.
202
- *
203
- * The dynamic portion of the hook name, $cmb_id, is the metabox id.
204
- *
205
- * @param bool $show_on_add Default is the value of the new_term_section cmb parameter.
206
- * @param object $cmb The CMB2 instance
207
- */
208
- $show_on_add = apply_filters( "cmb2_show_on_term_add_form_{$this->cmb->cmb_id}", $show_on_add, $this->cmb );
209
-
210
- // Display form in add-new section (unless specified not to)
211
- if ( $show_on_add ) {
212
- add_action( "{$taxonomy}_add_form_fields", array( $this, 'term_metabox' ), $priority, 2 );
213
- }
214
-
215
- if ( $this->cmb->has_columns ) {
216
- add_filter( "manage_edit-{$taxonomy}_columns", array( $this, 'register_column_headers' ) );
217
- add_filter( "manage_{$taxonomy}_custom_column", array( $this, 'return_column_display' ), 10, 3 );
218
- }
219
- }
220
-
221
- add_action( 'created_term', array( $this, 'save_term' ), 10, 3 );
222
- add_action( 'edited_terms', array( $this, 'save_term' ), 10, 2 );
223
- add_action( 'delete_term', array( $this, 'delete_term' ), 10, 3 );
224
-
225
- return $this;
226
- }
227
-
228
- public function options_page_hooks() {
229
- $option_keys = $this->cmb->options_page_keys();
230
-
231
- if ( ! empty( $option_keys ) ) {
232
- foreach ( $option_keys as $option_key ) {
233
- $this->options_hookup[ $option_key ] = new CMB2_Options_Hookup( $this->cmb, $option_key );
234
- $this->options_hookup[ $option_key ]->hooks();
235
- }
236
- }
237
-
238
- return $this;
239
- }
240
-
241
- /**
242
- * Registers styles for CMB2
243
- *
244
- * @since 2.0.7
245
- */
246
- protected static function register_styles() {
247
- if ( self::$css_registration_done ) {
248
- return;
249
- }
250
-
251
- // Only use minified files if SCRIPT_DEBUG is off
252
- $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
253
- $front = is_admin() ? '' : '-front';
254
- $rtl = is_rtl() ? '-rtl' : '';
255
-
256
- /**
257
- * Filters the registered style dependencies for the cmb2 stylesheet.
258
- *
259
- * @param array $dependencies The registered style dependencies for the cmb2 stylesheet.
260
- */
261
- $dependencies = apply_filters( 'cmb2_style_dependencies', array() );
262
- wp_register_style( 'cmb2-styles', CMB2_Utils::url( "css/cmb2{$front}{$rtl}{$min}.css" ), $dependencies );
263
- wp_register_style( 'cmb2-display-styles', CMB2_Utils::url( "css/cmb2-display{$rtl}{$min}.css" ), $dependencies );
264
-
265
- self::$css_registration_done = true;
266
- }
267
-
268
- /**
269
- * Registers scripts for CMB2
270
- *
271
- * @since 2.0.7
272
- */
273
- protected static function register_js() {
274
- if ( self::$js_registration_done ) {
275
- return;
276
- }
277
-
278
- $hook = is_admin() ? 'admin_footer' : 'wp_footer';
279
- add_action( $hook, array( 'CMB2_JS', 'enqueue' ), 8 );
280
-
281
- self::$js_registration_done = true;
282
- }
283
-
284
- /**
285
- * Registers scripts and styles for CMB2
286
- *
287
- * @since 1.0.0
288
- */
289
- public static function register_scripts() {
290
- self::register_styles();
291
- self::register_js();
292
- }
293
-
294
- /**
295
- * Enqueues scripts and styles for CMB2 in admin_head.
296
- *
297
- * @since 1.0.0
298
- */
299
- public function do_scripts( $hook ) {
300
- $hooks = array(
301
- 'post.php',
302
- 'post-new.php',
303
- 'page-new.php',
304
- 'page.php',
305
- 'comment.php',
306
- 'edit-tags.php',
307
- 'term.php',
308
- 'user-new.php',
309
- 'profile.php',
310
- 'user-edit.php',
311
- );
312
- // only pre-enqueue our scripts/styles on the proper pages
313
- // show_form_for_type will have us covered if we miss something here.
314
- if ( in_array( $hook, $hooks, true ) ) {
315
- if ( $this->cmb->prop( 'cmb_styles' ) ) {
316
- self::enqueue_cmb_css();
317
- }
318
- if ( $this->cmb->prop( 'enqueue_js' ) ) {
319
- self::enqueue_cmb_js();
320
- }
321
- }
322
- }
323
-
324
- /**
325
- * Register the CMB2 field column headers.
326
- *
327
- * @since 2.2.2
328
- */
329
- public function register_column_headers( $columns ) {
330
- $fields = $this->cmb->prop( 'fields' );
331
-
332
- foreach ( $fields as $key => $field ) {
333
- if ( ! isset( $field['column'] ) ) {
334
- continue;
335
- }
336
-
337
- $column = $field['column'];
338
-
339
- if ( false === $column['position'] ) {
340
-
341
- $columns[ $field['id'] ] = $column['name'];
342
-
343
- } else {
344
-
345
- $before = array_slice( $columns, 0, absint( $column['position'] ) );
346
- $before[ $field['id'] ] = $column['name'];
347
- $columns = $before + $columns;
348
- }
349
-
350
- $column['field'] = $field;
351
- $this->columns[ $field['id'] ] = $column;
352
- }
353
-
354
- return $columns;
355
- }
356
-
357
- /**
358
- * The CMB2 field column display output.
359
- *
360
- * @since 2.2.2
361
- */
362
- public function column_display( $column_name, $object_id ) {
363
- if ( isset( $this->columns[ $column_name ] ) ) {
364
- $field = new CMB2_Field( array(
365
- 'field_args' => $this->columns[ $column_name ]['field'],
366
- 'object_type' => $this->object_type,
367
- 'object_id' => $this->cmb->object_id( $object_id ),
368
- 'cmb_id' => $this->cmb->cmb_id,
369
- ) );
370
-
371
- $this->cmb->get_field( $field )->render_column();
372
- }
373
- }
374
-
375
- /**
376
- * Returns the column display.
377
- *
378
- * @since 2.2.2
379
- */
380
- public function return_column_display( $empty, $custom_column, $object_id ) {
381
- ob_start();
382
- $this->column_display( $custom_column, $object_id );
383
- $column = ob_get_clean();
384
-
385
- return $column ? $column : $empty;
386
- }
387
-
388
- /**
389
- * Output the CMB2 box/fields in an alternate context (not in a standard metabox area).
390
- *
391
- * @since 2.2.4
392
- */
393
- public function add_context_metaboxes() {
394
-
395
- if ( ! $this->show_on() ) {
396
- return;
397
- }
398
-
399
- $page = get_current_screen()->id;
400
-
401
- foreach ( $this->cmb->box_types() as $object_type ) {
402
- $screen = convert_to_screen( $object_type );
403
-
404
- // If we're on the right post-type/object...
405
- if ( isset( $screen->id ) && $screen->id === $page ) {
406
-
407
- // Show the box.
408
- $this->output_context_metabox();
409
- }
410
- }
411
- }
412
-
413
- /**
414
- * Output the CMB2 box/fields in an alternate context (not in a standard metabox area).
415
- *
416
- * @since 2.2.4
417
- */
418
- public function output_context_metabox() {
419
- $title = $this->cmb->prop( 'title' );
420
-
421
- /*
422
- * To keep from outputting the open/close markup, do not include
423
- * a 'title' property in your metabox registration array.
424
- *
425
- * To output the fields 'naked' (without a postbox wrapper/style), then
426
- * add a `'remove_box_wrap' => true` to your metabox registration array.
427
- */
428
- $add_wrap = ! empty( $title ) || ! $this->cmb->prop( 'remove_box_wrap' );
429
- $add_handle = $add_wrap && ! empty( $title );
430
-
431
- // Open the context-box wrap.
432
- $this->context_box_title_markup_open( $add_handle );
433
-
434
- // Show the form fields.
435
- $this->cmb->show_form();
436
-
437
- // Close the context-box wrap.
438
- $this->context_box_title_markup_close( $add_handle );
439
- }
440
-
441
- /**
442
- * Output the opening markup for a context box.
443
- *
444
- * @since 2.2.4
445
- * @param $add_handle Whether to add the metabox handle and opening div for .inside
446
- */
447
- public function context_box_title_markup_open( $add_handle = true ) {
448
- $title = $this->cmb->prop( 'title' );
449
-
450
- $page = get_current_screen()->id;
451
- add_filter( "postbox_classes_{$page}_{$this->cmb->cmb_id}", array( $this, 'postbox_classes' ) );
452
-
453
- echo '<div id="' . $this->cmb->cmb_id . '" class="' . postbox_classes( $this->cmb->cmb_id, $page ) . '">' . "\n";
454
-
455
- if ( $add_handle ) {
456
-
457
- echo '<button type="button" class="handlediv button-link" aria-expanded="true">';
458
- echo '<span class="screen-reader-text">' . sprintf( __( 'Toggle panel: %s' ), $title ) . '</span>';
459
- echo '<span class="toggle-indicator" aria-hidden="true"></span>';
460
- echo '</button>';
461
-
462
- echo '<h2 class="hndle"><span>' . esc_attr( $title ) . '</span></h2>' . "\n";
463
- echo '<div class="inside">' . "\n";
464
- }
465
- }
466
-
467
- /**
468
- * Output the closing markup for a context box.
469
- *
470
- * @since 2.2.4
471
- * @param $add_inside_close Whether to add closing div for .inside.
472
- */
473
- public function context_box_title_markup_close( $add_inside_close = true ) {
474
-
475
- // Load the closing divs for a title box.
476
- if ( $add_inside_close ) {
477
- echo '</div>' . "\n"; // .inside
478
- }
479
-
480
- echo '</div>' . "\n"; // .context-box
481
- }
482
-
483
- /**
484
- * Add metaboxes (to 'post' or 'comment' object types)
485
- *
486
- * @since 1.0.0
487
- */
488
- public function add_metaboxes() {
489
-
490
- if ( ! $this->show_on() ) {
491
- return;
492
- }
493
-
494
- /*
495
- * To keep from registering an actual post-screen metabox,
496
- * omit the 'title' property from the metabox registration array.
497
- *
498
- * (WordPress will not display metaboxes without titles anyway)
499
- *
500
- * This is a good solution if you want to handle outputting your
501
- * metaboxes/fields elsewhere in the post-screen.
502
- */
503
- if ( ! $this->cmb->prop( 'title' ) ) {
504
- return;
505
- }
506
-
507
- $page = get_current_screen()->id;
508
- add_filter( "postbox_classes_{$page}_{$this->cmb->cmb_id}", array( $this, 'postbox_classes' ) );
509
-
510
- foreach ( $this->cmb->box_types() as $object_type ) {
511
- if ( count( $this->cmb->tax_metaboxes_to_remove ) ) {
512
- $this->remove_default_tax_metaboxes( $object_type );
513
- }
514
-
515
- add_meta_box( $this->cmb->cmb_id, $this->cmb->prop( 'title' ), array( $this, 'metabox_callback' ), $object_type, $this->cmb->prop( 'context' ), $this->cmb->prop( 'priority' ) );
516
- }
517
- }
518
-
519
- /**
520
- * Remove the specified default taxonomy metaboxes for a post-type.
521
- *
522
- * @since 2.2.3
523
- * @param string $post_type Post type to remove the metabox for.
524
- */
525
- protected function remove_default_tax_metaboxes( $post_type ) {
526
- foreach ( $this->cmb->tax_metaboxes_to_remove as $taxonomy ) {
527
- if ( ! taxonomy_exists( $taxonomy ) ) {
528
- continue;
529
- }
530
-
531
- $mb_id = is_taxonomy_hierarchical( $taxonomy ) ? "{$taxonomy}div" : "tagsdiv-{$taxonomy}";
532
- remove_meta_box( $mb_id, $post_type, 'side' );
533
- }
534
- }
535
-
536
- /**
537
- * Modify metabox postbox classes.
538
- *
539
- * @since 2.2.4
540
- * @param array $classes Array of classes
541
- * @return array Modified array of classes
542
- */
543
- public function postbox_classes( $classes ) {
544
- if ( $this->cmb->prop( 'closed' ) && ! in_array( 'closed', $classes ) ) {
545
- $classes[] = 'closed';
546
- }
547
-
548
- if ( $this->cmb->is_alternate_context_box() ) {
549
- $classes = $this->alternate_context_postbox_classes( $classes );
550
- } else {
551
- $classes[] = 'cmb2-postbox';
552
- }
553
-
554
- return $classes;
555
- }
556
-
557
- /**
558
- * Modify metabox altnernate context postbox classes.
559
- *
560
- * @since 2.2.4
561
- * @param array $classes Array of classes
562
- * @return array Modified array of classes
563
- */
564
- protected function alternate_context_postbox_classes( $classes ) {
565
- $classes[] = 'context-box';
566
- $classes[] = 'context-' . $this->cmb->prop( 'context' ) . '-box';
567
-
568
- if ( in_array( $this->cmb->cmb_id, get_hidden_meta_boxes( get_current_screen() ) ) ) {
569
- $classes[] = 'hide-if-js';
570
- }
571
-
572
- $add_wrap = $this->cmb->prop( 'title' ) || ! $this->cmb->prop( 'remove_box_wrap' );
573
-
574
- if ( $add_wrap ) {
575
- $classes[] = 'cmb2-postbox postbox';
576
- } else {
577
- $classes[] = 'cmb2-no-box-wrap';
578
- }
579
-
580
- return $classes;
581
- }
582
-
583
- /**
584
- * Display metaboxes for a post or comment object
585
- *
586
- * @since 1.0.0
587
- */
588
- public function metabox_callback() {
589
- $object_id = 'comment' == $this->object_type ? get_comment_ID() : get_the_ID();
590
- $this->cmb->show_form( $object_id, $this->object_type );
591
- }
592
-
593
- /**
594
- * Display metaboxes for new user page
595
- *
596
- * @since 1.0.0
597
- */
598
- public function user_new_metabox( $section ) {
599
- if ( $section == $this->cmb->prop( 'new_user_section' ) ) {
600
- $object_id = $this->cmb->object_id();
601
- $this->cmb->object_id( isset( $_REQUEST['user_id'] ) ? $_REQUEST['user_id'] : $object_id );
602
- $this->user_metabox();
603
- }
604
- }
605
-
606
- /**
607
- * Display metaboxes for a user object.
608
- *
609
- * @since 1.0.0
610
- */
611
- public function user_metabox() {
612
- $this->show_form_for_type( 'user' );
613
- }
614
-
615
- /**
616
- * Display metaboxes for a taxonomy term object.
617
- *
618
- * @since 2.2.0
619
- */
620
- public function term_metabox() {
621
- $this->show_form_for_type( 'term' );
622
- }
623
-
624
- /**
625
- * Display metaboxes for an object type.
626
- *
627
- * @since 2.2.0
628
- * @param string $type Object type
629
- * @return void
630
- */
631
- public function show_form_for_type( $type ) {
632
- if ( $type != $this->object_type ) {
633
- return;
634
- }
635
-
636
- if ( ! $this->show_on() ) {
637
- return;
638
- }
639
-
640
- if ( $this->cmb->prop( 'cmb_styles' ) ) {
641
- self::enqueue_cmb_css();
642
- }
643
- if ( $this->cmb->prop( 'enqueue_js' ) ) {
644
- self::enqueue_cmb_js();
645
- }
646
-
647
- $this->cmb->show_form( 0, $type );
648
- }
649
-
650
- /**
651
- * Determines if metabox should be shown in current context
652
- *
653
- * @since 2.0.0
654
- * @return bool Whether metabox should be added/shown
655
- */
656
- public function show_on() {
657
- // If metabox is requesting to be conditionally shown
658
- $show = $this->cmb->should_show();
659
-
660
- /**
661
- * Filter to determine if metabox should show. Default is true
662
- *
663
- * @param array $show Default is true, show the metabox
664
- * @param mixed $meta_box_args Array of the metabox arguments
665
- * @param mixed $cmb The CMB2 instance
666
- */
667
- $show = (bool) apply_filters( 'cmb2_show_on', $show, $this->cmb->meta_box, $this->cmb );
668
-
669
- return $show;
670
- }
671
-
672
- /**
673
- * Get the CMB priority property set to numeric hook priority.
674
- *
675
- * @since 2.2.0
676
- * @param integer $default Default display hook priority.
677
- * @return integer Hook priority.
678
- */
679
- public function get_priority( $default = 10 ) {
680
- $priority = $this->cmb->prop( 'priority' );
681
-
682
- if ( ! is_numeric( $priority ) ) {
683
- switch ( $priority ) {
684
-
685
- case 'high':
686
- $priority = 5;
687
- break;
688
-
689
- case 'low':
690
- $priority = 20;
691
- break;
692
-
693
- default:
694
- $priority = $default;
695
- break;
696
- }
697
- }
698
-
699
- return $priority;
700
- }
701
-
702
- /**
703
- * Save data from post metabox
704
- *
705
- * @since 1.0.0
706
- * @param int $post_id Post ID
707
- * @param mixed $post Post object
708
- * @return void
709
- */
710
- public function save_post( $post_id, $post = false ) {
711
-
712
- $post_type = $post ? $post->post_type : get_post_type( $post_id );
713
-
714
- $do_not_pass_go = (
715
- ! $this->can_save( $post_type )
716
- // check user editing permissions
717
- || ( 'page' == $post_type && ! current_user_can( 'edit_page', $post_id ) )
718
- || ! current_user_can( 'edit_post', $post_id )
719
- );
720
-
721
- if ( $do_not_pass_go ) {
722
- // do not collect $200
723
- return;
724
- }
725
-
726
- // take a trip to reading railroad – if you pass go collect $200
727
- $this->cmb->save_fields( $post_id, 'post', $_POST );
728
- }
729
-
730
- /**
731
- * Save data from comment metabox
732
- *
733
- * @since 2.0.9
734
- * @param int $comment_id Comment ID
735
- * @return void
736
- */
737
- public function save_comment( $comment_id ) {
738
-
739
- $can_edit = current_user_can( 'moderate_comments', $comment_id );
740
-
741
- if ( $this->can_save( get_comment_type( $comment_id ) ) && $can_edit ) {
742
- $this->cmb->save_fields( $comment_id, 'comment', $_POST );
743
- }
744
- }
745
-
746
- /**
747
- * Save data from user fields
748
- *
749
- * @since 1.0.x
750
- * @param int $user_id User ID
751
- * @return void
752
- */
753
- public function save_user( $user_id ) {
754
- // check permissions
755
- if ( $this->can_save( 'user' ) ) {
756
- $this->cmb->save_fields( $user_id, 'user', $_POST );
757
- }
758
- }
759
-
760
- /**
761
- * Save data from term fields
762
- *
763
- * @since 2.2.0
764
- * @param int $term_id Term ID
765
- * @param int $tt_id Term Taxonomy ID
766
- * @param string $taxonomy Taxonomy
767
- * @return void
768
- */
769
- public function save_term( $term_id, $tt_id, $taxonomy = '' ) {
770
- $taxonomy = $taxonomy ? $taxonomy : $tt_id;
771
-
772
- // check permissions
773
- if ( $this->taxonomy_can_save( $taxonomy ) && $this->can_save( 'term' ) ) {
774
- $this->cmb->save_fields( $term_id, 'term', $_POST );
775
- }
776
- }
777
-
778
- /**
779
- * Delete term meta when a term is deleted.
780
- *
781
- * @since 2.2.0
782
- * @param int $term_id Term ID
783
- * @param int $tt_id Term Taxonomy ID
784
- * @param string $taxonomy Taxonomy
785
- * @return void
786
- */
787
- public function delete_term( $term_id, $tt_id, $taxonomy = '' ) {
788
- if ( $this->taxonomy_can_save( $taxonomy ) ) {
789
-
790
- $data_to_delete = array();
791
- foreach ( $this->cmb->prop( 'fields' ) as $field ) {
792
- $data_to_delete[ $field['id'] ] = '';
793
- }
794
-
795
- $this->cmb->save_fields( $term_id, 'term', $data_to_delete );
796
- }
797
- }
798
-
799
- /**
800
- * Determines if the current object is able to be saved
801
- *
802
- * @since 2.0.9
803
- * @param string $type Current object type.
804
- * @return bool Whether object can be saved
805
- */
806
- public function can_save( $type = '' ) {
807
-
808
- $can_save = (
809
- $this->cmb->prop( 'save_fields' )
810
- // check nonce
811
- && isset( $_POST[ $this->cmb->nonce() ] )
812
- && wp_verify_nonce( $_POST[ $this->cmb->nonce() ], $this->cmb->nonce() )
813
- // check if autosave
814
- && ! ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
815
- // get the metabox types & compare it to this type
816
- && ( $type && in_array( $type, $this->cmb->box_types() ) )
817
- // Don't do updates during a switch-to-blog instance.
818
- && ! ( is_multisite() && ms_is_switched() )
819
- );
820
-
821
- /**
822
- * Filter to determine if metabox is allowed to save.
823
- *
824
- * @param bool $can_save Whether the current metabox can save.
825
- * @param object $cmb The CMB2 instance
826
- */
827
- return apply_filters( 'cmb2_can_save', $can_save, $this->cmb );
828
- }
829
-
830
- /**
831
- * Determine if taxonomy of term being modified is cmb2-editable.
832
- *
833
- * @since 2.2.0
834
- * @param string $taxonomy Taxonomy of term being modified.
835
- * @return bool Whether taxonomy is editable.
836
- */
837
- public function taxonomy_can_save( $taxonomy ) {
838
- if ( empty( $this->taxonomies ) || ! in_array( $taxonomy, $this->taxonomies ) ) {
839
- return false;
840
- }
841
-
842
- $taxonomy_object = get_taxonomy( $taxonomy );
843
- // Can the user edit this term?
844
- if ( ! isset( $taxonomy_object->cap ) || ! current_user_can( $taxonomy_object->cap->edit_terms ) ) {
845
- return false;
846
- }
847
-
848
- return true;
849
- }
850
-
851
- /**
852
- * Enqueues the 'cmb2-display-styles' if the conditions match (has columns, on the right page, etc).
853
- *
854
- * @since 2.2.2.1
855
- */
856
- protected function maybe_enqueue_column_display_styles() {
857
- global $pagenow;
858
- if (
859
- $pagenow
860
- && $this->cmb->has_columns
861
- && $this->cmb->prop( 'cmb_styles' )
862
- && in_array( $pagenow, array( 'edit.php', 'users.php', 'edit-comments.php', 'edit-tags.php' ), 1 )
863
- ) {
864
- self::enqueue_cmb_css( 'cmb2-display-styles' );
865
- }
866
- }
867
-
868
- /**
869
- * Includes CMB2 styles
870
- *
871
- * @since 2.0.0
872
- */
873
- public static function enqueue_cmb_css( $handle = 'cmb2-styles' ) {
874
-
875
- /**
876
- * Filter to determine if CMB2'S css should be enqueued.
877
- *
878
- * @param bool $enqueue_css Default is true.
879
- */
880
- if ( ! apply_filters( 'cmb2_enqueue_css', true ) ) {
881
- return false;
882
- }
883
-
884
- self::register_styles();
885
-
886
- /*
887
- * White list the options as this method can be used as a hook callback
888
- * and have a different argument passed.
889
- */
890
- return wp_enqueue_style( 'cmb2-display-styles' === $handle ? $handle : 'cmb2-styles' );
891
- }
892
-
893
- /**
894
- * Includes CMB2 JS
895
- *
896
- * @since 2.0.0
897
- */
898
- public static function enqueue_cmb_js() {
899
-
900
- /**
901
- * Filter to determine if CMB2'S JS should be enqueued.
902
- *
903
- * @param bool $enqueue_js Default is true.
904
- */
905
- if ( ! apply_filters( 'cmb2_enqueue_js', true ) ) {
906
- return false;
907
- }
908
-
909
- self::register_js();
910
- return true;
911
- }
912
-
913
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/helper-functions.php DELETED
@@ -1,406 +0,0 @@
1
- <?php
2
- /**
3
- * CMB2 Helper Functions
4
- *
5
- * @category WordPress_Plugin
6
- * @package CMB2
7
- * @author CMB2 team
8
- * @license GPL-2.0+
9
- * @link https://cmb2.io
10
- */
11
-
12
- /**
13
- * Helper function to provide directory path to CMB2
14
- *
15
- * @since 2.0.0
16
- * @param string $path Path to append
17
- * @return string Directory with optional path appended
18
- */
19
- function cmb2_dir( $path = '' ) {
20
- return CMB2_DIR . $path;
21
- }
22
-
23
- /**
24
- * Autoloads files with CMB2 classes when needed
25
- *
26
- * @since 1.0.0
27
- * @param string $class_name Name of the class being requested
28
- */
29
- function cmb2_autoload_classes( $class_name ) {
30
- if ( 0 !== strpos( $class_name, 'CMB2' ) ) {
31
- return;
32
- }
33
-
34
- $path = 'includes';
35
-
36
- if ( 'CMB2_Type' === $class_name || 0 === strpos( $class_name, 'CMB2_Type_' ) ) {
37
- $path .= '/types';
38
- }
39
-
40
- if ( 'CMB2_REST' === $class_name || 0 === strpos( $class_name, 'CMB2_REST_' ) ) {
41
- $path .= '/rest-api';
42
- }
43
-
44
- include_once( cmb2_dir( "$path/{$class_name}.php" ) );
45
- }
46
-
47
- /**
48
- * Get instance of the CMB2_Utils class
49
- *
50
- * @since 2.0.0
51
- * @return CMB2_Utils object CMB2 utilities class
52
- */
53
- function cmb2_utils() {
54
- static $cmb2_utils;
55
- $cmb2_utils = $cmb2_utils ? $cmb2_utils : new CMB2_Utils();
56
- return $cmb2_utils;
57
- }
58
-
59
- /**
60
- * Get instance of the CMB2_Ajax class
61
- *
62
- * @since 2.0.0
63
- * @return CMB2_Ajax object CMB2 ajax class
64
- */
65
- function cmb2_ajax() {
66
- return CMB2_Ajax::get_instance();
67
- }
68
-
69
- /**
70
- * Get instance of the CMB2_Option class for the passed metabox ID
71
- *
72
- * @since 2.0.0
73
- * @return CMB2_Option object Options class for setting/getting options for metabox
74
- */
75
- function cmb2_options( $key ) {
76
- return CMB2_Options::get( $key );
77
- }
78
-
79
- /**
80
- * Get a cmb oEmbed. Handles oEmbed getting for non-post objects
81
- *
82
- * @since 2.0.0
83
- * @param array $args Arguments. Accepts:
84
- *
85
- * 'url' - URL to retrieve the oEmbed from,
86
- * 'object_id' - $post_id,
87
- * 'object_type' - 'post',
88
- * 'oembed_args' - $embed_args, // array containing 'width', etc
89
- * 'field_id' - false,
90
- * 'cache_key' - false,
91
- * 'wp_error' - true/false, // To return a wp_error object if no embed found.
92
- *
93
- * @return string oEmbed string
94
- */
95
- function cmb2_get_oembed( $args = array() ) {
96
- $oembed = cmb2_ajax()->get_oembed_no_edit( $args );
97
-
98
- // Send back our embed
99
- if ( $oembed['embed'] && $oembed['embed'] != $oembed['fallback'] ) {
100
- return '<div class="cmb2-oembed">' . $oembed['embed'] . '</div>';
101
- }
102
-
103
- $error = sprintf(
104
- /* translators: 1: results for. 2: link to codex.wordpress.org/Embeds */
105
- esc_html__( 'No oEmbed Results Found for %1$s. View more info at %2$s.', 'cmb2' ),
106
- $oembed['fallback'],
107
- '<a href="https://codex.wordpress.org/Embeds" target="_blank">codex.wordpress.org/Embeds</a>'
108
- );
109
-
110
- if ( isset( $args['wp_error'] ) && $args['wp_error'] ) {
111
- return new WP_Error( 'cmb2_get_oembed_result', $error, compact( 'oembed', 'args' ) );
112
- }
113
-
114
- // Otherwise, send back error info that no oEmbeds were found
115
- return '<p class="ui-state-error-text">' . $error . '</p>';
116
- }
117
-
118
- /**
119
- * Outputs the return of cmb2_get_oembed.
120
- *
121
- * @since 2.2.2
122
- * @see cmb2_get_oembed
123
- */
124
- function cmb2_do_oembed( $args = array() ) {
125
- echo cmb2_get_oembed( $args );
126
- }
127
- add_action( 'cmb2_do_oembed', 'cmb2_do_oembed' );
128
-
129
- /**
130
- * A helper function to get an option from a CMB2 options array
131
- *
132
- * @since 1.0.1
133
- * @param string $option_key Option key
134
- * @param string $field_id Option array field key
135
- * @param mixed $default Optional default fallback value
136
- * @return array Options array or specific field
137
- */
138
- function cmb2_get_option( $option_key, $field_id = '', $default = false ) {
139
- return cmb2_options( $option_key )->get( $field_id, $default );
140
- }
141
-
142
- /**
143
- * A helper function to update an option in a CMB2 options array
144
- *
145
- * @since 2.0.0
146
- * @param string $option_key Option key
147
- * @param string $field_id Option array field key
148
- * @param mixed $value Value to update data with
149
- * @param boolean $single Whether data should not be an array
150
- * @return boolean Success/Failure
151
- */
152
- function cmb2_update_option( $option_key, $field_id, $value, $single = true ) {
153
- if ( cmb2_options( $option_key )->update( $field_id, $value, false, $single ) ) {
154
- return cmb2_options( $option_key )->set();
155
- }
156
-
157
- return false;
158
- }
159
-
160
- /**
161
- * Get a CMB2 field object.
162
- *
163
- * @since 1.1.0
164
- * @param array $meta_box Metabox ID or Metabox config array
165
- * @param array $field_id Field ID or all field arguments
166
- * @param int $object_id Object ID
167
- * @param string $object_type Type of object being saved. (e.g., post, user, comment, or options-page).
168
- * Defaults to metabox object type.
169
- * @return CMB2_Field|null CMB2_Field object unless metabox config cannot be found
170
- */
171
- function cmb2_get_field( $meta_box, $field_id, $object_id = 0, $object_type = '' ) {
172
-
173
- $object_id = $object_id ? $object_id : get_the_ID();
174
- $cmb = $meta_box instanceof CMB2 ? $meta_box : cmb2_get_metabox( $meta_box, $object_id );
175
-
176
- if ( ! $cmb ) {
177
- return;
178
- }
179
-
180
- $cmb->object_type( $object_type ? $object_type : $cmb->mb_object_type() );
181
-
182
- return $cmb->get_field( $field_id );
183
- }
184
-
185
- /**
186
- * Get a field's value.
187
- *
188
- * @since 1.1.0
189
- * @param array $meta_box Metabox ID or Metabox config array
190
- * @param array $field_id Field ID or all field arguments
191
- * @param int $object_id Object ID
192
- * @param string $object_type Type of object being saved. (e.g., post, user, comment, or options-page).
193
- * Defaults to metabox object type.
194
- * @return mixed Maybe escaped value
195
- */
196
- function cmb2_get_field_value( $meta_box, $field_id, $object_id = 0, $object_type = '' ) {
197
- $field = cmb2_get_field( $meta_box, $field_id, $object_id, $object_type );
198
- return $field->escaped_value();
199
- }
200
-
201
- /**
202
- * Because OOP can be scary
203
- *
204
- * @since 2.0.2
205
- * @param array $meta_box_config Metabox Config array
206
- * @return CMB2 object Instantiated CMB2 object
207
- */
208
- function new_cmb2_box( array $meta_box_config ) {
209
- return cmb2_get_metabox( $meta_box_config );
210
- }
211
-
212
- /**
213
- * Retrieve a CMB2 instance by the metabox ID
214
- *
215
- * @since 2.0.0
216
- * @param mixed $meta_box Metabox ID or Metabox config array
217
- * @param int $object_id Object ID
218
- * @param string $object_type Type of object being saved. (e.g., post, user, comment, or options-page).
219
- * Defaults to metabox object type.
220
- * @return CMB2 object
221
- */
222
- function cmb2_get_metabox( $meta_box, $object_id = 0, $object_type = '' ) {
223
-
224
- if ( $meta_box instanceof CMB2 ) {
225
- return $meta_box;
226
- }
227
-
228
- if ( is_string( $meta_box ) ) {
229
- $cmb = CMB2_Boxes::get( $meta_box );
230
- } else {
231
- // See if we already have an instance of this metabox
232
- $cmb = CMB2_Boxes::get( $meta_box['id'] );
233
- // If not, we'll initate a new metabox
234
- $cmb = $cmb ? $cmb : new CMB2( $meta_box, $object_id );
235
- }
236
-
237
- if ( $cmb && $object_id ) {
238
- $cmb->object_id( $object_id );
239
- }
240
-
241
- if ( $cmb && $object_type ) {
242
- $cmb->object_type( $object_type );
243
- }
244
-
245
- return $cmb;
246
- }
247
-
248
- /**
249
- * Returns array of sanitized field values from a metabox (without saving them)
250
- *
251
- * @since 2.0.3
252
- * @param mixed $meta_box Metabox ID or Metabox config array
253
- * @param array $data_to_sanitize Array of field_id => value data for sanitizing (likely $_POST data).
254
- * @return mixed Array of sanitized values or false if no CMB2 object found
255
- */
256
- function cmb2_get_metabox_sanitized_values( $meta_box, array $data_to_sanitize ) {
257
- $cmb = cmb2_get_metabox( $meta_box );
258
- return $cmb ? $cmb->get_sanitized_values( $data_to_sanitize ) : false;
259
- }
260
-
261
- /**
262
- * Retrieve a metabox form
263
- *
264
- * @since 2.0.0
265
- * @param mixed $meta_box Metabox config array or Metabox ID
266
- * @param int $object_id Object ID
267
- * @param array $args Optional arguments array
268
- * @return string CMB2 html form markup
269
- */
270
- function cmb2_get_metabox_form( $meta_box, $object_id = 0, $args = array() ) {
271
-
272
- $object_id = $object_id ? $object_id : get_the_ID();
273
- $cmb = cmb2_get_metabox( $meta_box, $object_id );
274
-
275
- ob_start();
276
- // Get cmb form
277
- cmb2_print_metabox_form( $cmb, $object_id, $args );
278
- $form = ob_get_clean();
279
-
280
- return apply_filters( 'cmb2_get_metabox_form', $form, $object_id, $cmb );
281
- }
282
-
283
- /**
284
- * Display a metabox form & save it on submission
285
- *
286
- * @since 1.0.0
287
- * @param mixed $meta_box Metabox config array or Metabox ID
288
- * @param int $object_id Object ID
289
- * @param array $args Optional arguments array
290
- */
291
- function cmb2_print_metabox_form( $meta_box, $object_id = 0, $args = array() ) {
292
-
293
- $object_id = $object_id ? $object_id : get_the_ID();
294
- $cmb = cmb2_get_metabox( $meta_box, $object_id );
295
-
296
- // if passing a metabox ID, and that ID was not found
297
- if ( ! $cmb ) {
298
- return;
299
- }
300
-
301
- $args = wp_parse_args( $args, array(
302
- 'form_format' => '<form class="cmb-form" method="post" id="%1$s" enctype="multipart/form-data" encoding="multipart/form-data"><input type="hidden" name="object_id" value="%2$s">%3$s<input type="submit" name="submit-cmb" value="%4$s" class="button-primary"></form>',
303
- 'save_button' => esc_html__( 'Save', 'cmb2' ),
304
- 'object_type' => $cmb->mb_object_type(),
305
- 'cmb_styles' => $cmb->prop( 'cmb_styles' ),
306
- 'enqueue_js' => $cmb->prop( 'enqueue_js' ),
307
- ) );
308
-
309
- // Set object type explicitly (rather than trying to guess from context)
310
- $cmb->object_type( $args['object_type'] );
311
-
312
- // Save the metabox if it's been submitted
313
- // check permissions
314
- // @todo more hardening?
315
- if (
316
- $cmb->prop( 'save_fields' )
317
- // check nonce
318
- && isset( $_POST['submit-cmb'], $_POST['object_id'], $_POST[ $cmb->nonce() ] )
319
- && wp_verify_nonce( $_POST[ $cmb->nonce() ], $cmb->nonce() )
320
- && $object_id && $_POST['object_id'] == $object_id
321
- ) {
322
- $cmb->save_fields( $object_id, $cmb->object_type(), $_POST );
323
- }
324
-
325
- // Enqueue JS/CSS
326
- if ( $args['cmb_styles'] ) {
327
- CMB2_hookup::enqueue_cmb_css();
328
- }
329
-
330
- if ( $args['enqueue_js'] ) {
331
- CMB2_hookup::enqueue_cmb_js();
332
- }
333
-
334
- $form_format = apply_filters( 'cmb2_get_metabox_form_format', $args['form_format'], $object_id, $cmb );
335
-
336
- $format_parts = explode( '%3$s', $form_format );
337
-
338
- // Show cmb form
339
- printf( $format_parts[0], $cmb->cmb_id, $object_id );
340
- $cmb->show_form();
341
-
342
- if ( isset( $format_parts[1] ) && $format_parts[1] ) {
343
- printf( str_ireplace( '%4$s', '%1$s', $format_parts[1] ), $args['save_button'] );
344
- }
345
-
346
- }
347
-
348
- /**
349
- * Display a metabox form (or optionally return it) & save it on submission
350
- *
351
- * @since 1.0.0
352
- * @param mixed $meta_box Metabox config array or Metabox ID
353
- * @param int $object_id Object ID
354
- * @param array $args Optional arguments array
355
- */
356
- function cmb2_metabox_form( $meta_box, $object_id = 0, $args = array() ) {
357
- if ( ! isset( $args['echo'] ) || $args['echo'] ) {
358
- cmb2_print_metabox_form( $meta_box, $object_id, $args );
359
- } else {
360
- return cmb2_get_metabox_form( $meta_box, $object_id, $args );
361
- }
362
- }
363
-
364
- if ( ! function_exists( 'date_create_from_format' ) ) {
365
-
366
- /**
367
- * Reimplementation of DateTime::createFromFormat for PHP < 5.3. :(
368
- * Borrowed from http://stackoverflow.com/questions/5399075/php-datetimecreatefromformat-in-5-2
369
- *
370
- * @param $date_format
371
- * @param $date_value
372
- *
373
- * @return DateTime
374
- */
375
- function date_create_from_format( $date_format, $date_value ) {
376
-
377
- $schedule_format = str_replace(
378
- array( 'M', 'Y', 'm', 'd', 'H', 'i', 'a' ),
379
- array( '%b', '%Y', '%m', '%d', '%H', '%M', '%p' ),
380
- $date_format
381
- );
382
-
383
- /*
384
- * %Y, %m and %d correspond to date()'s Y m and d.
385
- * %I corresponds to H, %M to i and %p to a
386
- */
387
- $parsed_time = strptime( $date_value, $schedule_format );
388
-
389
- $ymd = sprintf(
390
- /*
391
- * This is a format string that takes six total decimal
392
- * arguments, then left-pads them with zeros to either
393
- * 4 or 2 characters, as needed
394
- */
395
- '%04d-%02d-%02d %02d:%02d:%02d',
396
- $parsed_time['tm_year'] + 1900, // This will be "111", so we need to add 1900.
397
- $parsed_time['tm_mon'] + 1, // This will be the month minus one, so we add one.
398
- $parsed_time['tm_mday'],
399
- $parsed_time['tm_hour'],
400
- $parsed_time['tm_min'],
401
- $parsed_time['tm_sec']
402
- );
403
-
404
- return new DateTime( $ymd );
405
- }
406
- }// End if().
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/index.php DELETED
@@ -1,2 +0,0 @@
1
- <?php
2
- // Silence is golden
 
 
trunk/vendor/webdevstudios/cmb2/includes/rest-api/CMB2_REST.php DELETED
@@ -1,794 +0,0 @@
1
- <?php
2
- /**
3
- * Handles hooking CMB2 objects/fields into the WordPres REST API
4
- * which can allow fields to be read and/or updated.
5
- *
6
- * @since 2.2.3
7
- *
8
- * @category WordPress_Plugin
9
- * @package CMB2
10
- * @author CMB2 team
11
- * @license GPL-2.0+
12
- * @link https://cmb2.io
13
- *
14
- * @property-read read_fields Array of readable field objects.
15
- * @property-read edit_fields Array of editable field objects.
16
- * @property-read rest_read Whether CMB2 object is readable via the rest api.
17
- * @property-read rest_edit Whether CMB2 object is editable via the rest api.
18
- */
19
- class CMB2_REST extends CMB2_Hookup_Base {
20
-
21
- /**
22
- * The current CMB2 REST endpoint version
23
- *
24
- * @var string
25
- * @since 2.2.3
26
- */
27
- const VERSION = '1';
28
-
29
- /**
30
- * The CMB2 REST base namespace (v should always be followed by $version)
31
- *
32
- * @var string
33
- * @since 2.2.3
34
- */
35
- const NAME_SPACE = 'cmb2/v1';
36
-
37
- /**
38
- * @var CMB2 object
39
- * @since 2.2.3
40
- */
41
- public $cmb;
42
-
43
- /**
44
- * @var CMB2_REST[] objects
45
- * @since 2.2.3
46
- */
47
- protected static $boxes = array();
48
-
49
- /**
50
- * @var array Array of cmb ids for each type.
51
- * @since 2.2.3
52
- */
53
- protected static $type_boxes = array(
54
- 'post' => array(),
55
- 'user' => array(),
56
- 'comment' => array(),
57
- 'term' => array(),
58
- );
59
-
60
- /**
61
- * Array of readable field objects.
62
- *
63
- * @var CMB2_Field[]
64
- * @since 2.2.3
65
- */
66
- protected $read_fields = array();
67
-
68
- /**
69
- * Array of editable field objects.
70
- *
71
- * @var CMB2_Field[]
72
- * @since 2.2.3
73
- */
74
- protected $edit_fields = array();
75
-
76
- /**
77
- * Whether CMB2 object is readable via the rest api.
78
- *
79
- * @var boolean
80
- */
81
- protected $rest_read = false;
82
-
83
- /**
84
- * Whether CMB2 object is editable via the rest api.
85
- *
86
- * @var boolean
87
- */
88
- protected $rest_edit = false;
89
-
90
- /**
91
- * A functionalized constructor, used for the hookup action callbacks.
92
- *
93
- * @since 2.2.6
94
- *
95
- * @param CMB2 $cmb The CMB2 object to hookup
96
- *
97
- * @return CMB2_Hookup_Base $hookup The hookup object.
98
- */
99
- public static function maybe_init_and_hookup( CMB2 $cmb ) {
100
- if ( $cmb->prop( 'show_in_rest' ) && function_exists( 'rest_get_server' ) ) {
101
-
102
- $hookup = new self( $cmb );
103
-
104
- return $hookup->universal_hooks();
105
- }
106
-
107
- return false;
108
- }
109
-
110
- /**
111
- * Constructor
112
- *
113
- * @since 2.2.3
114
- *
115
- * @param CMB2 $cmb The CMB2 object to be registered for the API.
116
- */
117
- public function __construct( CMB2 $cmb ) {
118
- $this->cmb = $cmb;
119
- self::$boxes[ $cmb->cmb_id ] = $this;
120
-
121
- $show_value = $this->cmb->prop( 'show_in_rest' );
122
-
123
- $this->rest_read = self::is_readable( $show_value );
124
- $this->rest_edit = self::is_editable( $show_value );
125
- }
126
-
127
- /**
128
- * Hooks to register on frontend and backend.
129
- *
130
- * @since 2.2.3
131
- *
132
- * @return void
133
- */
134
- public function universal_hooks() {
135
- // hook up the CMB rest endpoint classes
136
- $this->once( 'rest_api_init', array( __CLASS__, 'init_routes' ), 0 );
137
-
138
- if ( function_exists( 'register_rest_field' ) ) {
139
- $this->once( 'rest_api_init', array( __CLASS__, 'register_cmb2_fields' ), 50 );
140
- }
141
-
142
- $this->declare_read_edit_fields();
143
-
144
- add_filter( 'is_protected_meta', array( $this, 'is_protected_meta' ), 10, 3 );
145
-
146
- return $this;
147
- }
148
-
149
- /**
150
- * Initiate the CMB2 Boxes and Fields routes
151
- *
152
- * @since 2.2.3
153
- *
154
- * @return void
155
- */
156
- public static function init_routes() {
157
- $wp_rest_server = rest_get_server();
158
-
159
- $boxes_controller = new CMB2_REST_Controller_Boxes( $wp_rest_server );
160
- $boxes_controller->register_routes();
161
-
162
- $fields_controller = new CMB2_REST_Controller_Fields( $wp_rest_server );
163
- $fields_controller->register_routes();
164
- }
165
-
166
- /**
167
- * Loop through REST boxes and call register_rest_field for each object type.
168
- *
169
- * @since 2.2.3
170
- *
171
- * @return void
172
- */
173
- public static function register_cmb2_fields() {
174
- $alltypes = $taxonomies = array();
175
-
176
- foreach ( self::$boxes as $cmb_id => $rest_box ) {
177
- $types = array_flip( $rest_box->cmb->box_types( array( 'post' ) ) );
178
-
179
- if ( isset( $types['user'] ) ) {
180
- unset( $types['user'] );
181
- self::$type_boxes['user'][ $cmb_id ] = $cmb_id;
182
- }
183
-
184
- if ( isset( $types['comment'] ) ) {
185
- unset( $types['comment'] );
186
- self::$type_boxes['comment'][ $cmb_id ] = $cmb_id;
187
- }
188
-
189
- if ( isset( $types['term'] ) ) {
190
- unset( $types['term'] );
191
-
192
- $taxonomies = array_merge(
193
- $taxonomies,
194
- CMB2_Utils::ensure_array( $rest_box->cmb->prop( 'taxonomies' ) )
195
- );
196
-
197
- self::$type_boxes['term'][ $cmb_id ] = $cmb_id;
198
- }
199
-
200
- if ( ! empty( $types ) ) {
201
- $alltypes = array_merge( $alltypes, array_flip( $types ) );
202
- self::$type_boxes['post'][ $cmb_id ] = $cmb_id;
203
- }
204
- }
205
-
206
- $alltypes = array_unique( $alltypes );
207
-
208
- if ( ! empty( $alltypes ) ) {
209
- self::register_rest_field( $alltypes, 'post' );
210
- }
211
-
212
- if ( ! empty( self::$type_boxes['user'] ) ) {
213
- self::register_rest_field( 'user', 'user' );
214
- }
215
-
216
- if ( ! empty( self::$type_boxes['comment'] ) ) {
217
- self::register_rest_field( 'comment', 'comment' );
218
- }
219
-
220
- if ( ! empty( self::$type_boxes['term'] ) ) {
221
- self::register_rest_field( $taxonomies, 'term' );
222
- }
223
- }
224
-
225
- /**
226
- * Wrapper for register_rest_field.
227
- *
228
- * @since 2.2.3
229
- *
230
- * @param string|array $object_types Object(s) the field is being registered
231
- * to, "post"|"term"|"comment" etc.
232
- * @param string $object_types Canonical object type for callbacks.
233
- *
234
- * @return void
235
- */
236
- protected static function register_rest_field( $object_types, $object_type ) {
237
- register_rest_field( $object_types, 'cmb2', array(
238
- 'get_callback' => array( __CLASS__, "get_{$object_type}_rest_values" ),
239
- 'update_callback' => array( __CLASS__, "update_{$object_type}_rest_values" ),
240
- 'schema' => null, // @todo add schema
241
- ) );
242
- }
243
-
244
- /**
245
- * Setup readable and editable fields.
246
- *
247
- * @since 2.2.3
248
- *
249
- * @return void
250
- */
251
- protected function declare_read_edit_fields() {
252
- foreach ( $this->cmb->prop( 'fields' ) as $field ) {
253
- $show_in_rest = isset( $field['show_in_rest'] ) ? $field['show_in_rest'] : null;
254
-
255
- if ( false === $show_in_rest ) {
256
- continue;
257
- }
258
-
259
- if ( $this->can_read( $show_in_rest ) ) {
260
- $this->read_fields[] = $field['id'];
261
- }
262
-
263
- if ( $this->can_edit( $show_in_rest ) ) {
264
- $this->edit_fields[] = $field['id'];
265
- }
266
- }
267
- }
268
-
269
- /**
270
- * Determines if a field is readable based on it's show_in_rest value
271
- * and the box's show_in_rest value.
272
- *
273
- * @since 2.2.3
274
- *
275
- * @param bool $show_in_rest Field's show_in_rest value. Default null.
276
- *
277
- * @return bool Whether field is readable.
278
- */
279
- protected function can_read( $show_in_rest ) {
280
- // if 'null', then use default box value.
281
- if ( null === $show_in_rest ) {
282
- return $this->rest_read;
283
- }
284
-
285
- // Else check if the value represents readable.
286
- return self::is_readable( $show_in_rest );
287
- }
288
-
289
- /**
290
- * Determines if a field is editable based on it's show_in_rest value
291
- * and the box's show_in_rest value.
292
- *
293
- * @since 2.2.3
294
- *
295
- * @param bool $show_in_rest Field's show_in_rest value. Default null.
296
- *
297
- * @return bool Whether field is editable.
298
- */
299
- protected function can_edit( $show_in_rest ) {
300
- // if 'null', then use default box value.
301
- if ( null === $show_in_rest ) {
302
- return $this->rest_edit;
303
- }
304
-
305
- // Else check if the value represents editable.
306
- return self::is_editable( $show_in_rest );
307
- }
308
-
309
- /**
310
- * Handler for getting post custom field data.
311
- *
312
- * @since 2.2.3
313
- *
314
- * @param array $object The object data from the response
315
- * @param string $field_name Name of field
316
- * @param WP_REST_Request $request Current request
317
- * @param string $object_type The request object type
318
- *
319
- * @return mixed
320
- */
321
- public static function get_post_rest_values( $object, $field_name, $request, $object_type ) {
322
- if ( 'cmb2' === $field_name ) {
323
- return self::get_rest_values( $object, $request, $object_type, 'post' );
324
- }
325
- }
326
-
327
- /**
328
- * Handler for getting user custom field data.
329
- *
330
- * @since 2.2.3
331
- *
332
- * @param array $object The object data from the response
333
- * @param string $field_name Name of field
334
- * @param WP_REST_Request $request Current request
335
- * @param string $object_type The request object type
336
- *
337
- * @return mixed
338
- */
339
- public static function get_user_rest_values( $object, $field_name, $request, $object_type ) {
340
- if ( 'cmb2' === $field_name ) {
341
- return self::get_rest_values( $object, $request, $object_type, 'user' );
342
- }
343
- }
344
-
345
- /**
346
- * Handler for getting comment custom field data.
347
- *
348
- * @since 2.2.3
349
- *
350
- * @param array $object The object data from the response
351
- * @param string $field_name Name of field
352
- * @param WP_REST_Request $request Current request
353
- * @param string $object_type The request object type
354
- *
355
- * @return mixed
356
- */
357
- public static function get_comment_rest_values( $object, $field_name, $request, $object_type ) {
358
- if ( 'cmb2' === $field_name ) {
359
- return self::get_rest_values( $object, $request, $object_type, 'comment' );
360
- }
361
- }
362
-
363
- /**
364
- * Handler for getting term custom field data.
365
- *
366
- * @since 2.2.3
367
- *
368
- * @param array $object The object data from the response
369
- * @param string $field_name Name of field
370
- * @param WP_REST_Request $request Current request
371
- * @param string $object_type The request object type
372
- *
373
- * @return mixed
374
- */
375
- public static function get_term_rest_values( $object, $field_name, $request, $object_type ) {
376
- if ( 'cmb2' === $field_name ) {
377
- return self::get_rest_values( $object, $request, $object_type, 'term' );
378
- }
379
- }
380
-
381
- /**
382
- * Handler for getting custom field data.
383
- *
384
- * @since 2.2.3
385
- *
386
- * @param array $object The object data from the response
387
- * @param WP_REST_Request $request Current request
388
- * @param string $object_type The request object type
389
- * @param string $main_object_type The cmb main object type
390
- *
391
- * @return mixed
392
- */
393
- protected static function get_rest_values( $object, $request, $object_type, $main_object_type = 'post' ) {
394
- if ( ! isset( $object['id'] ) ) {
395
- return;
396
- }
397
-
398
- $values = array();
399
-
400
- if ( ! empty( self::$type_boxes[ $main_object_type ] ) ) {
401
- foreach ( self::$type_boxes[ $main_object_type ] as $cmb_id ) {
402
- $rest_box = self::$boxes[ $cmb_id ];
403
-
404
- foreach ( $rest_box->read_fields as $field_id ) {
405
- $rest_box->cmb->object_id( $object['id'] );
406
- $rest_box->cmb->object_type( $main_object_type );
407
-
408
- $field = $rest_box->cmb->get_field( $field_id );
409
-
410
- $field->object_id( $object['id'] );
411
- $field->object_type( $main_object_type );
412
-
413
- $values[ $cmb_id ][ $field->id( true ) ] = $field->get_data();
414
- }
415
- }
416
- }
417
-
418
- return $values;
419
- }
420
-
421
- /**
422
- * Handler for updating post custom field data.
423
- *
424
- * @since 2.2.3
425
- *
426
- * @param mixed $values The value of the field
427
- * @param object $object The object from the response
428
- * @param string $field_name Name of field
429
- * @param WP_REST_Request $request Current request
430
- * @param string $object_type The request object type
431
- *
432
- * @return bool|int
433
- */
434
- public static function update_post_rest_values( $values, $object, $field_name, $request, $object_type ) {
435
- if ( 'cmb2' === $field_name ) {
436
- return self::update_rest_values( $values, $object, $request, $object_type, 'post' );
437
- }
438
- }
439
-
440
- /**
441
- * Handler for updating user custom field data.
442
- *
443
- * @since 2.2.3
444
- *
445
- * @param mixed $values The value of the field
446
- * @param object $object The object from the response
447
- * @param string $field_name Name of field
448
- * @param WP_REST_Request $request Current request
449
- * @param string $object_type The request object type
450
- *
451
- * @return bool|int
452
- */
453
- public static function update_user_rest_values( $values, $object, $field_name, $request, $object_type ) {
454
- if ( 'cmb2' === $field_name ) {
455
- return self::update_rest_values( $values, $object, $request, $object_type, 'user' );
456
- }
457
- }
458
-
459
- /**
460
- * Handler for updating comment custom field data.
461
- *
462
- * @since 2.2.3
463
- *
464
- * @param mixed $values The value of the field
465
- * @param object $object The object from the response
466
- * @param string $field_name Name of field
467
- * @param WP_REST_Request $request Current request
468
- * @param string $object_type The request object type
469
- *
470
- * @return bool|int
471
- */
472
- public static function update_comment_rest_values( $values, $object, $field_name, $request, $object_type ) {
473
- if ( 'cmb2' === $field_name ) {
474
- return self::update_rest_values( $values, $object, $request, $object_type, 'comment' );
475
- }
476
- }
477
-
478
- /**
479
- * Handler for updating term custom field data.
480
- *
481
- * @since 2.2.3
482
- *
483
- * @param mixed $values The value of the field
484
- * @param object $object The object from the response
485
- * @param string $field_name Name of field
486
- * @param WP_REST_Request $request Current request
487
- * @param string $object_type The request object type
488
- *
489
- * @return bool|int
490
- */
491
- public static function update_term_rest_values( $values, $object, $field_name, $request, $object_type ) {
492
- if ( 'cmb2' === $field_name ) {
493
- return self::update_rest_values( $values, $object, $request, $object_type, 'term' );
494
- }
495
- }
496
-
497
- /**
498
- * Handler for updating custom field data.
499
- *
500
- * @since 2.2.3
501
- *
502
- * @param mixed $values The value of the field
503
- * @param object $object The object from the response
504
- * @param WP_REST_Request $request Current request
505
- * @param string $object_type The request object type
506
- * @param string $main_object_type The cmb main object type
507
- *
508
- * @return bool|int
509
- */
510
- protected static function update_rest_values( $values, $object, $request, $object_type, $main_object_type = 'post' ) {
511
- if ( empty( $values ) || ! is_array( $values ) ) {
512
- return;
513
- }
514
-
515
- $object_id = self::get_object_id( $object, $main_object_type );
516
-
517
- if ( ! $object_id ) {
518
- return;
519
- }
520
-
521
- $updated = array();
522
-
523
- if ( ! empty( self::$type_boxes[ $main_object_type ] ) ) {
524
- foreach ( self::$type_boxes[ $main_object_type ] as $cmb_id ) {
525
- $rest_box = self::$boxes[ $cmb_id ];
526
-
527
- if ( ! array_key_exists( $cmb_id, $values ) ) {
528
- continue;
529
- }
530
-
531
- $rest_box->cmb->object_id( $object_id );
532
- $rest_box->cmb->object_type( $main_object_type );
533
-
534
- $updated[ $cmb_id ] = $rest_box->sanitize_box_values( $values );
535
- }
536
- }
537
-
538
- return $updated;
539
- }
540
-
541
- /**
542
- * Loop through box fields and sanitize the values.
543
- *
544
- * @since 2.2.o
545
- *
546
- * @param array $values Array of values being provided.
547
- * @return array Array of updated/sanitized values.
548
- */
549
- public function sanitize_box_values( array $values ) {
550
- $updated = array();
551
-
552
- $this->cmb->pre_process();
553
-
554
- foreach ( $this->edit_fields as $field_id ) {
555
- $updated[ $field_id ] = $this->sanitize_field_value( $values, $field_id );
556
- }
557
-
558
- $this->cmb->after_save();
559
-
560
- return $updated;
561
- }
562
-
563
- /**
564
- * Handles returning a sanitized field value.
565
- *
566
- * @since 2.2.3
567
- *
568
- * @param array $values Array of values being provided.
569
- * @param string $field_id The id of the field to update.
570
- *
571
- * @return mixed The results of saving/sanitizing a field value.
572
- */
573
- protected function sanitize_field_value( array $values, $field_id ) {
574
- if ( ! array_key_exists( $field_id, $values[ $this->cmb->cmb_id ] ) ) {
575
- return;
576
- }
577
-
578
- $field = $this->cmb->get_field( $field_id );
579
-
580
- if ( 'title' == $field->type() ) {
581
- return;
582
- }
583
-
584
- $field->object_id( $this->cmb->object_id() );
585
- $field->object_type( $this->cmb->object_type() );
586
-
587
- if ( 'group' == $field->type() ) {
588
- return $this->sanitize_group_value( $values, $field );
589
- }
590
-
591
- return $field->save_field( $values[ $this->cmb->cmb_id ][ $field_id ] );
592
- }
593
-
594
- /**
595
- * Handles returning a sanitized group field value.
596
- *
597
- * @since 2.2.3
598
- *
599
- * @param array $values Array of values being provided.
600
- * @param CMB2_Field $field CMB2_Field object.
601
- *
602
- * @return mixed The results of saving/sanitizing the group field value.
603
- */
604
- protected function sanitize_group_value( array $values, CMB2_Field $field ) {
605
- $fields = $field->fields();
606
- if ( empty( $fields ) ) {
607
- return;
608
- }
609
-
610
- $this->cmb->data_to_save[ $field->_id() ] = $values[ $this->cmb->cmb_id ][ $field->_id() ];
611
-
612
- return $this->cmb->save_group_field( $field );
613
- }
614
-
615
- /**
616
- * Filter whether a meta key is protected.
617
- *
618
- * @since 2.2.3
619
- *
620
- * @param bool $protected Whether the key is protected. Default false.
621
- * @param string $meta_key Meta key.
622
- * @param string $meta_type Meta type.
623
- */
624
- public function is_protected_meta( $protected, $meta_key, $meta_type ) {
625
- if ( $this->field_can_edit( $meta_key ) ) {
626
- return false;
627
- }
628
-
629
- return $protected;
630
- }
631
-
632
- protected static function get_object_id( $object, $object_type = 'post' ) {
633
- switch ( $object_type ) {
634
- case 'user':
635
- case 'post':
636
- if ( isset( $object->ID ) ) {
637
- return intval( $object->ID );
638
- }
639
- case 'comment':
640
- if ( isset( $object->comment_ID ) ) {
641
- return intval( $object->comment_ID );
642
- }
643
- case 'term':
644
- if ( is_array( $object ) && isset( $object['term_id'] ) ) {
645
- return intval( $object['term_id'] );
646
- } elseif ( isset( $object->term_id ) ) {
647
- return intval( $object->term_id );
648
- }
649
- }
650
-
651
- return 0;
652
- }
653
-
654
- /**
655
- * Checks if a given field can be read.
656
- *
657
- * @since 2.2.3
658
- *
659
- * @param string|CMB2_Field $field_id Field ID or CMB2_Field object.
660
- * @param boolean $return_object Whether to return the Field object.
661
- *
662
- * @return mixed False if field can't be read or true|CMB2_Field object.
663
- */
664
- public function field_can_read( $field_id, $return_object = false ) {
665
- return $this->field_can( 'read_fields', $field_id, $return_object );
666
- }
667
-
668
- /**
669
- * Checks if a given field can be edited.
670
- *
671
- * @since 2.2.3
672
- *
673
- * @param string|CMB2_Field $field_id Field ID or CMB2_Field object.
674
- * @param boolean $return_object Whether to return the Field object.
675
- *
676
- * @return mixed False if field can't be edited or true|CMB2_Field object.
677
- */
678
- public function field_can_edit( $field_id, $return_object = false ) {
679
- return $this->field_can( 'edit_fields', $field_id, $return_object );
680
- }
681
-
682
- /**
683
- * Checks if a given field can be read or edited.
684
- *
685
- * @since 2.2.3
686
- *
687
- * @param string $type Whether we are checking for read or edit fields.
688
- * @param string|CMB2_Field $field_id Field ID or CMB2_Field object.
689
- * @param boolean $return_object Whether to return the Field object.
690
- *
691
- * @return mixed False if field can't be read or edited or true|CMB2_Field object.
692
- */
693
- protected function field_can( $type = 'read_fields', $field_id, $return_object = false ) {
694
- if ( ! in_array( $field_id instanceof CMB2_Field ? $field_id->id() : $field_id, $this->{$type}, true ) ) {
695
- return false;
696
- }
697
-
698
- return $return_object ? $this->cmb->get_field( $field_id ) : true;
699
- }
700
-
701
- /**
702
- * Get a CMB2_REST instance object from the registry by a CMB2 id.
703
- *
704
- * @since 2.2.3
705
- *
706
- * @param string $cmb_id CMB2 config id
707
- *
708
- * @return CMB2_REST|false The CMB2_REST object or false.
709
- */
710
- public static function get_rest_box( $cmb_id ) {
711
- return isset( self::$boxes[ $cmb_id ] ) ? self::$boxes[ $cmb_id ] : false;
712
- }
713
-
714
- /**
715
- * Remove a CMB2_REST instance object from the registry.
716
- *
717
- * @since 2.2.3
718
- *
719
- * @param string $cmb_id A CMB2 instance id.
720
- */
721
- public static function remove( $cmb_id ) {
722
- if ( array_key_exists( $cmb_id, self::$boxes ) ) {
723
- unset( self::$boxes[ $cmb_id ] );
724
- }
725
- }
726
-
727
- /**
728
- * Retrieve all CMB2_REST instances from the registry.
729
- *
730
- * @since 2.2.3
731
- * @return CMB2[] Array of all registered CMB2_REST instances.
732
- */
733
- public static function get_all() {
734
- return self::$boxes;
735
- }
736
-
737
- /**
738
- * Checks if given value is readable.
739
- *
740
- * Value is considered readable if it is not empty and if it does not match the editable blacklist.
741
- *
742
- * @since 2.2.3
743
- *
744
- * @param mixed $value Value to check.
745
- *
746
- * @return boolean Whether value is considered readable.
747
- */
748
- public static function is_readable( $value ) {
749
- return ! empty( $value ) && ! in_array( $value, array(
750
- WP_REST_Server::CREATABLE,
751
- WP_REST_Server::EDITABLE,
752
- WP_REST_Server::DELETABLE,
753
- ), true );
754
- }
755
-
756
- /**
757
- * Checks if given value is editable.
758
- *
759
- * Value is considered editable if matches the editable whitelist.
760
- *
761
- * @since 2.2.3
762
- *
763
- * @param mixed $value Value to check.
764
- *
765
- * @return boolean Whether value is considered editable.
766
- */
767
- public static function is_editable( $value ) {
768
- return in_array( $value, array(
769
- WP_REST_Server::EDITABLE,
770
- WP_REST_Server::ALLMETHODS,
771
- ), true );
772
- }
773
-
774
- /**
775
- * Magic getter for our object.
776
- *
777
- * @param string $field
778
- * @throws Exception Throws an exception if the field is invalid.
779
- *
780
- * @return mixed
781
- */
782
- public function __get( $field ) {
783
- switch ( $field ) {
784
- case 'read_fields':
785
- case 'edit_fields':
786
- case 'rest_read':
787
- case 'rest_edit':
788
- return $this->{$field};
789
- default:
790
- throw new Exception( 'Invalid ' . __CLASS__ . ' property: ' . $field );
791
- }
792
- }
793
-
794
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/rest-api/CMB2_REST_Controller.php DELETED
@@ -1,448 +0,0 @@
1
- <?php
2
- if ( ! class_exists( 'WP_REST_Controller' ) ) {
3
- // Shim the WP_REST_Controller class if wp-api plugin not installed, & not in core.
4
- require_once cmb2_dir( 'includes/shim/WP_REST_Controller.php' );
5
- }
6
-
7
- /**
8
- * Creates CMB2 objects/fields endpoint for WordPres REST API.
9
- * Allows access to fields registered to a specific post type and more.
10
- *
11
- * @todo Add better documentation.
12
- * @todo Research proper schema.
13
- *
14
- * @since 2.2.3
15
- *
16
- * @category WordPress_Plugin
17
- * @package CMB2
18
- * @author CMB2 team
19
- * @license GPL-2.0+
20
- * @link https://cmb2.io
21
- */
22
- abstract class CMB2_REST_Controller extends WP_REST_Controller {
23
-
24
- /**
25
- * The namespace of this controller's route.
26
- *
27
- * @var string
28
- */
29
- protected $namespace = CMB2_REST::NAME_SPACE;
30
-
31
- /**
32
- * The base of this controller's route.
33
- *
34
- * @var string
35
- */
36
- protected $rest_base;
37
-
38
- /**
39
- * The current request object
40
- *
41
- * @var WP_REST_Request $request
42
- * @since 2.2.3
43
- */
44
- public $request;
45
-
46
- /**
47
- * The current server object
48
- *
49
- * @var WP_REST_Server $server
50
- * @since 2.2.3
51
- */
52
- public $server;
53
-
54
- /**
55
- * Box object id
56
- *
57
- * @var mixed
58
- * @since 2.2.3
59
- */
60
- public $object_id = null;
61
-
62
- /**
63
- * Box object type
64
- *
65
- * @var string
66
- * @since 2.2.3
67
- */
68
- public $object_type = '';
69
-
70
- /**
71
- * CMB2 Instance
72
- *
73
- * @var CMB2_REST
74
- */
75
- protected $rest_box;
76
-
77
- /**
78
- * CMB2_Field Instance
79
- *
80
- * @var CMB2_Field
81
- */
82
- protected $field;
83
-
84
- /**
85
- * The initial route
86
- *
87
- * @var string
88
- * @since 2.2.3
89
- */
90
- protected static $route = '';
91
-
92
- /**
93
- * Defines which endpoint the initial request is.
94
- *
95
- * @var string $request_type
96
- * @since 2.2.3
97
- */
98
- protected static $request_type = '';
99
-
100
- /**
101
- * Constructor
102
- *
103
- * @since 2.2.3
104
- */
105
- public function __construct( WP_REST_Server $wp_rest_server ) {
106
- $this->server = $wp_rest_server;
107
- }
108
-
109
- /**
110
- * A wrapper for `apply_filters` which checks for box/field properties to hook to the filter.
111
- *
112
- * Checks if a CMB object callback property exists, and if it does,
113
- * hook it to the permissions filter.
114
- *
115
- * @since 2.2.3
116
- *
117
- * @param string $filter The name of the filter to apply.
118
- * @param bool $default_access The default access for this request.
119
- *
120
- * @return void
121
- */
122
- public function maybe_hook_callback_and_apply_filters( $filter, $default_access ) {
123
- if ( ! $this->rest_box && $this->request->get_param( 'cmb_id' ) ) {
124
- $this->rest_box = CMB2_REST::get_rest_box( $this->request->get_param( 'cmb_id' ) );
125
- }
126
-
127
- $default_access = $this->maybe_hook_registered_callback( $filter, $default_access );
128
-
129
- /**
130
- * Apply the permissions check filter.
131
- *
132
- * @since 2.2.3
133
- *
134
- * @param bool $default_access Whether this CMB2 endpoint can be accessed.
135
- * @param object $controller This CMB2_REST_Controller object.
136
- */
137
- $default_access = apply_filters( $filter, $default_access, $this );
138
-
139
- $this->maybe_unhook_registered_callback( $filter );
140
-
141
- return $default_access;
142
- }
143
-
144
- /**
145
- * Checks if the CMB2 box has any registered callback parameters for the given filter.
146
- *
147
- * The registered handlers will have a property name which matches the filter, except:
148
- * - The 'cmb2_api' prefix will be removed
149
- * - A '_cb' suffix will be added (to stay inline with other '*_cb' parameters).
150
- *
151
- * @since 2.2.3
152
- *
153
- * @param string $filter The filter name.
154
- * @param bool $default_val The default filter value.
155
- *
156
- * @return bool The possibly-modified filter value (if the '*_cb' param is non-callable).
157
- */
158
- public function maybe_hook_registered_callback( $filter, $default_val ) {
159
- if ( ! $this->rest_box || is_wp_error( $this->rest_box ) ) {
160
- return $default_val;
161
- }
162
-
163
- // Hook box specific filter callbacks.
164
- $val = $this->rest_box->cmb->maybe_hook_parameter( $filter, $default_val );
165
- if ( null !== $val ) {
166
- $default_val = $val;
167
- }
168
-
169
- return $default_val;
170
- }
171
-
172
- /**
173
- * Unhooks any CMB2 box registered callback parameters for the given filter.
174
- *
175
- * @since 2.2.3
176
- *
177
- * @param string $filter The filter name.
178
- *
179
- * @return void
180
- */
181
- public function maybe_unhook_registered_callback( $filter ) {
182
- if ( ! $this->rest_box || is_wp_error( $this->rest_box ) ) {
183
- return;
184
- }
185
-
186
- // Unhook box specific filter callbacks.
187
- $this->rest_box->cmb->maybe_hook_parameter( $filter, null, 'remove_filter' );
188
- }
189
-
190
- /**
191
- * Prepare a CMB2 object for serialization
192
- *
193
- * @since 2.2.3
194
- *
195
- * @param mixed $data
196
- * @return array $data
197
- */
198
- public function prepare_item( $data ) {
199
- return $this->prepare_item_for_response( $data, $this->request );
200
- }
201
-
202
- /**
203
- * Output buffers a callback and returns the results.
204
- *
205
- * @since 2.2.3
206
- *
207
- * @param mixed $cb Callable function/method.
208
- * @return mixed Results of output buffer after calling function/method.
209
- */
210
- public function get_cb_results( $cb ) {
211
- $args = func_get_args();
212
- array_shift( $args ); // ignore $cb
213
- ob_start();
214
- call_user_func_array( $cb, $args );
215
-
216
- return ob_get_clean();
217
- }
218
-
219
- /**
220
- * Prepare the CMB2 item for the REST response.
221
- *
222
- * @since 2.2.3
223
- *
224
- * @param mixed $item WordPress representation of the item.
225
- * @param WP_REST_Request $request Request object.
226
- * @return WP_REST_Response $response
227
- */
228
- public function prepare_item_for_response( $data, $request = null ) {
229
- $data = $this->filter_response_by_context( $data, $this->request['context'] );
230
-
231
- /**
232
- * Filter the prepared CMB2 item response.
233
- *
234
- * @since 2.2.3
235
- *
236
- * @param mixed $data Prepared data
237
- * @param object $request The WP_REST_Request object
238
- * @param object $cmb2_endpoints This endpoints object
239
- */
240
- return apply_filters( 'cmb2_rest_prepare', rest_ensure_response( $data ), $this->request, $this );
241
- }
242
-
243
- /**
244
- * Initiates the request property and the rest_box property if box is readable.
245
- *
246
- * @since 2.2.3
247
- *
248
- * @param WP_REST_Request $request Request object.
249
- * @param string $request_type A description of the type of request being made.
250
- *
251
- * @return void
252
- */
253
- protected function initiate_rest_read_box( $request, $request_type ) {
254
- $this->initiate_rest_box( $request, $request_type );
255
-
256
- if ( ! is_wp_error( $this->rest_box ) && ! $this->rest_box->rest_read ) {
257
- $this->rest_box = new WP_Error( 'cmb2_rest_no_read_error', __( 'This box does not have read permissions.', 'cmb2' ), array(
258
- 'status' => 403,
259
- ) );
260
- }
261
- }
262
-
263
- /**
264
- * Initiates the request property and the rest_box property if box is writeable.
265
- *
266
- * @since 2.2.3
267
- *
268
- * @param WP_REST_Request $request Request object.
269
- * @param string $request_type A description of the type of request being made.
270
- *
271
- * @return void
272
- */
273
- protected function initiate_rest_edit_box( $request, $request_type ) {
274
- $this->initiate_rest_box( $request, $request_type );
275
-
276
- if ( ! is_wp_error( $this->rest_box ) && ! $this->rest_box->rest_edit ) {
277
- $this->rest_box = new WP_Error( 'cmb2_rest_no_write_error', __( 'This box does not have write permissions.', 'cmb2' ), array(
278
- 'status' => 403,
279
- ) );
280
- }
281
- }
282
-
283
- /**
284
- * Initiates the request property and the rest_box property.
285
- *
286
- * @since 2.2.3
287
- *
288
- * @param WP_REST_Request $request Request object.
289
- * @param string $request_type A description of the type of request being made.
290
- *
291
- * @return void
292
- */
293
- protected function initiate_rest_box( $request, $request_type ) {
294
- $this->initiate_request( $request, $request_type );
295
-
296
- $this->rest_box = CMB2_REST::get_rest_box( $this->request->get_param( 'cmb_id' ) );
297
-
298
- if ( ! $this->rest_box ) {
299
-
300
- $this->rest_box = new WP_Error( 'cmb2_rest_box_not_found_error', __( 'No box found by that id. A box needs to be registered with the "show_in_rest" parameter configured.', 'cmb2' ), array(
301
- 'status' => 403,
302
- ) );
303
-
304
- } else {
305
-
306
- if ( isset( $this->request['object_id'] ) ) {
307
- $this->rest_box->cmb->object_id( sanitize_text_field( $this->request['object_id'] ) );
308
- }
309
-
310
- if ( isset( $this->request['object_type'] ) ) {
311
- $this->rest_box->cmb->object_type( sanitize_text_field( $this->request['object_type'] ) );
312
- }
313
- }
314
- }
315
-
316
- /**
317
- * Initiates the request property and sets up the initial static properties.
318
- *
319
- * @since 2.2.3
320
- *
321
- * @param WP_REST_Request $request Request object.
322
- * @param string $request_type A description of the type of request being made.
323
- *
324
- * @return void
325
- */
326
- public function initiate_request( $request, $request_type ) {
327
- $this->request = $request;
328
-
329
- if ( ! isset( $this->request['context'] ) || empty( $this->request['context'] ) ) {
330
- $this->request['context'] = 'view';
331
- }
332
-
333
- if ( ! self::$request_type ) {
334
- self::$request_type = $request_type;
335
- }
336
-
337
- if ( ! self::$route ) {
338
- self::$route = $this->request->get_route();
339
- }
340
- }
341
-
342
- /**
343
- * Useful when getting `_embed`-ed items
344
- *
345
- * @since 2.2.3
346
- *
347
- * @return string Initial requested type.
348
- */
349
- public static function get_intial_request_type() {
350
- return self::$request_type;
351
- }
352
-
353
- /**
354
- * Useful when getting `_embed`-ed items
355
- *
356
- * @since 2.2.3
357
- *
358
- * @return string Initial requested route.
359
- */
360
- public static function get_intial_route() {
361
- return self::$route;
362
- }
363
-
364
- /**
365
- * Get CMB2 fields schema, conforming to JSON Schema
366
- *
367
- * @since 2.2.3
368
- *
369
- * @return array
370
- */
371
- public function get_item_schema() {
372
- $schema = array(
373
- '$schema' => 'http://json-schema.org/draft-04/schema#',
374
- 'title' => 'CMB2',
375
- 'type' => 'object',
376
- 'properties' => array(
377
- 'description' => array(
378
- 'description' => __( 'A human-readable description of the object.', 'cmb2' ),
379
- 'type' => 'string',
380
- 'context' => array(
381
- 'view',
382
- ),
383
- ),
384
- 'name' => array(
385
- 'description' => __( 'The id for the object.', 'cmb2' ),
386
- 'type' => 'integer',
387
- 'context' => array(
388
- 'view',
389
- ),
390
- ),
391
- 'name' => array(
392
- 'description' => __( 'The title for the object.', 'cmb2' ),
393
- 'type' => 'string',
394
- 'context' => array(
395
- 'view',
396
- ),
397
- ),
398
- ),
399
- );
400
-
401
- return $this->add_additional_fields_schema( $schema );
402
- }
403
-
404
- /**
405
- * Return an array of contextual links for endpoint/object
406
- *
407
- * @link http://v2.wp-api.org/extending/linking/
408
- * @link http://www.iana.org/assignments/link-relations/link-relations.xhtml
409
- *
410
- * @since 2.2.3
411
- *
412
- * @param mixed $object Object to build links from.
413
- *
414
- * @return array Array of links
415
- */
416
- abstract protected function prepare_links( $object );
417
-
418
- /**
419
- * Get whitelisted query strings from URL for appending to link URLS.
420
- *
421
- * @since 2.2.3
422
- *
423
- * @return string URL query stringl
424
- */
425
- public function get_query_string() {
426
- $defaults = array(
427
- 'object_id' => 0,
428
- 'object_type' => '',
429
- '_rendered' => '',
430
- // '_embed' => '',
431
- );
432
-
433
- $query_string = '';
434
-
435
- foreach ( $defaults as $key => $value ) {
436
- if ( isset( $this->request[ $key ] ) ) {
437
- $query_string .= $query_string ? '&' : '?';
438
- $query_string .= $key;
439
- if ( $value = sanitize_text_field( $this->request[ $key ] ) ) {
440
- $query_string .= '=' . $value;
441
- }
442
- }
443
- }
444
-
445
- return $query_string;
446
- }
447
-
448
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php DELETED
@@ -1,270 +0,0 @@
1
- <?php
2
- /**
3
- * CMB2 objects/boxes endpoint for WordPres REST API.
4
- * Allows access to boxes configuration data.
5
- *
6
- * @todo Add better documentation.
7
- * @todo Research proper schema.
8
- *
9
- * @since 2.2.3
10
- *
11
- * @category WordPress_Plugin
12
- * @package CMB2
13
- * @author CMB2 team
14
- * @license GPL-2.0+
15
- * @link https://cmb2.io
16
- */
17
- class CMB2_REST_Controller_Boxes extends CMB2_REST_Controller {
18
-
19
- /**
20
- * The base of this controller's route.
21
- *
22
- * @var string
23
- */
24
- protected $rest_base = 'boxes';
25
-
26
- /**
27
- * The combined $namespace and $rest_base for these routes.
28
- *
29
- * @var string
30
- */
31
- protected $namespace_base = '';
32
-
33
- /**
34
- * Constructor
35
- *
36
- * @since 2.2.3
37
- */
38
- public function __construct( WP_REST_Server $wp_rest_server ) {
39
- $this->namespace_base = $this->namespace . '/' . $this->rest_base;
40
- parent::__construct( $wp_rest_server );
41
- }
42
-
43
- /**
44
- * Register the routes for the objects of the controller.
45
- *
46
- * @since 2.2.3
47
- */
48
- public function register_routes() {
49
- $args = array(
50
- '_embed' => array(
51
- 'description' => __( 'Includes the registered fields for the box in the response.', 'cmb2' ),
52
- ),
53
- );
54
-
55
- // @todo determine what belongs in the context param.
56
- // $args['context'] = $this->get_context_param();
57
- // $args['context']['required'] = false;
58
- // $args['context']['default'] = 'view';
59
- // $args['context']['enum'] = array( 'view', 'embed' );
60
- // Returns all boxes data.
61
- register_rest_route( $this->namespace, '/' . $this->rest_base, array(
62
- array(
63
- 'methods' => WP_REST_Server::READABLE,
64
- 'permission_callback' => array( $this, 'get_items_permissions_check' ),
65
- 'callback' => array( $this, 'get_items' ),
66
- 'args' => $args,
67
- ),
68
- 'schema' => array( $this, 'get_item_schema' ),
69
- ) );
70
-
71
- $args['_rendered'] = array(
72
- 'description' => __( 'Includes the fully rendered attributes, \'form_open\', \'form_close\', as well as the enqueued \'js_dependencies\' script handles, and \'css_dependencies\' stylesheet handles.', 'cmb2' ),
73
- );
74
-
75
- // Returns specific box's data.
76
- register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<cmb_id>[\w-]+)', array(
77
- array(
78
- 'methods' => WP_REST_Server::READABLE,
79
- 'permission_callback' => array( $this, 'get_item_permissions_check' ),
80
- 'callback' => array( $this, 'get_item' ),
81
- 'args' => $args,
82
- ),
83
- 'schema' => array( $this, 'get_item_schema' ),
84
- ) );
85
- }
86
-
87
- /**
88
- * Check if a given request has access to get boxes.
89
- *
90
- * @since 2.2.3
91
- *
92
- * @param WP_REST_Request $request Full data about the request.
93
- * @return WP_Error|boolean
94
- */
95
- public function get_items_permissions_check( $request ) {
96
- $this->initiate_request( $request, __FUNCTION__ );
97
-
98
- /**
99
- * By default, no special permissions needed.
100
- *
101
- * @since 2.2.3
102
- *
103
- * @param bool $can_access Whether this CMB2 endpoint can be accessed.
104
- * @param object $controller This CMB2_REST_Controller object.
105
- */
106
- return apply_filters( 'cmb2_api_get_boxes_permissions_check', true, $this );
107
- }
108
-
109
- /**
110
- * Get all public CMB2 boxes.
111
- *
112
- * @since 2.2.3
113
- *
114
- * @param WP_REST_Request $request Full data about the request.
115
- * @return WP_Error|WP_REST_Response
116
- */
117
- public function get_items( $request ) {
118
- $this->initiate_request( $request, 'boxes_read' );
119
-
120
- $boxes = CMB2_REST::get_all();
121
- if ( empty( $boxes ) ) {
122
- return new WP_Error( 'cmb2_rest_no_boxes', __( 'No boxes found.', 'cmb2' ), array(
123
- 'status' => 403,
124
- ) );
125
- }
126
-
127
- $boxes_data = array();
128
-
129
- // Loop and prepare boxes data.
130
- foreach ( $boxes as $this->rest_box ) {
131
- if (
132
- // Make sure this box can be read
133
- $this->rest_box->rest_read
134
- // And make sure current user can view this box.
135
- && $this->get_item_permissions_check_filter( $this->request )
136
- ) {
137
- $boxes_data[] = $this->server->response_to_data(
138
- $this->get_rest_box(),
139
- isset( $this->request['_embed'] )
140
- );
141
- }
142
- }
143
-
144
- return $this->prepare_item( $boxes_data );
145
- }
146
-
147
- /**
148
- * Check if a given request has access to a box.
149
- * By default, no special permissions needed, but filtering return value.
150
- *
151
- * @since 2.2.3
152
- *
153
- * @param WP_REST_Request $request Full details about the request.
154
- * @return WP_Error|boolean
155
- */
156
- public function get_item_permissions_check( $request ) {
157
- $this->initiate_rest_read_box( $request, 'box_read' );
158
-
159
- return $this->get_item_permissions_check_filter();
160
- }
161
-
162
- /**
163
- * Check by filter if a given request has access to a box.
164
- * By default, no special permissions needed, but filtering return value.
165
- *
166
- * @since 2.2.3
167
- *
168
- * @param bool $can_access Whether the current request has access to view the box by default.
169
- * @return WP_Error|boolean
170
- */
171
- public function get_item_permissions_check_filter( $can_access = true ) {
172
- /**
173
- * By default, no special permissions needed.
174
- *
175
- * @since 2.2.3
176
- *
177
- * @param bool $can_access Whether this CMB2 endpoint can be accessed.
178
- * @param object $controller This CMB2_REST_Controller object.
179
- */
180
- return $this->maybe_hook_callback_and_apply_filters( 'cmb2_api_get_box_permissions_check', $can_access );
181
- }
182
-
183
- /**
184
- * Get one CMB2 box from the collection.
185
- *
186
- * @since 2.2.3
187
- *
188
- * @param WP_REST_Request $request Full data about the request.
189
- * @return WP_Error|WP_REST_Response
190
- */
191
- public function get_item( $request ) {
192
- $this->initiate_rest_read_box( $request, 'box_read' );
193
-
194
- if ( is_wp_error( $this->rest_box ) ) {
195
- return $this->rest_box;
196
- }
197
-
198
- return $this->prepare_item( $this->get_rest_box() );
199
- }
200
-
201
- /**
202
- * Get a CMB2 box prepared for REST
203
- *
204
- * @since 2.2.3
205
- *
206
- * @return array
207
- */
208
- public function get_rest_box() {
209
- $cmb = $this->rest_box->cmb;
210
-
211
- $boxes_data = $cmb->meta_box;
212
-
213
- if ( isset( $this->request['_rendered'] ) && $this->namespace_base !== ltrim( CMB2_REST_Controller::get_intial_route(), '/' ) ) {
214
- $boxes_data['form_open'] = $this->get_cb_results( array( $cmb, 'render_form_open' ) );
215
- $boxes_data['form_close'] = $this->get_cb_results( array( $cmb, 'render_form_close' ) );
216
-
217
- global $wp_scripts, $wp_styles;
218
- $before_css = $wp_styles->queue;
219
- $before_js = $wp_scripts->queue;
220
-
221
- CMB2_JS::enqueue();
222
-
223
- $boxes_data['js_dependencies'] = array_values( array_diff( $wp_scripts->queue, $before_js ) );
224
- $boxes_data['css_dependencies'] = array_values( array_diff( $wp_styles->queue, $before_css ) );
225
- }
226
-
227
- // TODO: look into 'embed' parameter.
228
- // http://demo.wp-api.org/wp-json/wp/v2/posts?_embed
229
- unset( $boxes_data['fields'] );
230
- // Handle callable properties.
231
- unset( $boxes_data['show_on_cb'] );
232
-
233
- $response = rest_ensure_response( $boxes_data );
234
-
235
- $response->add_links( $this->prepare_links( $cmb ) );
236
-
237
- return $response;
238
- }
239
-
240
- /**
241
- * Return an array of contextual links for box/boxes.
242
- *
243
- * @since 2.2.3
244
- *
245
- * @param CMB2_REST $cmb CMB2_REST object to build links from.
246
- *
247
- * @return array Array of links
248
- */
249
- protected function prepare_links( $cmb ) {
250
- $boxbase = $this->namespace_base . '/' . $cmb->cmb_id;
251
- $query_string = $this->get_query_string();
252
-
253
- return array(
254
- // Standard Link Relations -- http://v2.wp-api.org/extending/linking/
255
- 'self' => array(
256
- 'href' => rest_url( $boxbase . $query_string ),
257
- ),
258
- 'collection' => array(
259
- 'href' => rest_url( $this->namespace_base . $query_string ),
260
- ),
261
- // Custom Link Relations -- http://v2.wp-api.org/extending/linking/
262
- // TODO URL should document relationship.
263
- 'https://cmb2.io/fields' => array(
264
- 'href' => rest_url( trailingslashit( $boxbase ) . 'fields' . $query_string ),
265
- 'embeddable' => true,
266
- ),
267
- );
268
- }
269
-
270
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php DELETED
@@ -1,502 +0,0 @@
1
- <?php
2
- /**
3
- * CMB2 objects/fields endpoint for WordPres REST API.
4
- * Allows access to fields registered to a specific box.
5
- *
6
- * @todo Add better documentation.
7
- * @todo Research proper schema.
8
- *
9
- * @since 2.2.3
10
- *
11
- * @category WordPress_Plugin
12
- * @package CMB2
13
- * @author CMB2 team
14
- * @license GPL-2.0+
15
- * @link https://cmb2.io
16
- */
17
- class CMB2_REST_Controller_Fields extends CMB2_REST_Controller_Boxes {
18
-
19
- /**
20
- * Register the routes for the objects of the controller.
21
- *
22
- * @since 2.2.3
23
- */
24
- public function register_routes() {
25
- $args = array(
26
- '_embed' => array(
27
- 'description' => __( 'Includes the box object which the fields are registered to in the response.', 'cmb2' ),
28
- ),
29
- '_rendered' => array(
30
- 'description' => __( 'When the \'_rendered\' argument is passed, the renderable field attributes will be returned fully rendered. By default, the names of the callback handers for the renderable attributes will be returned.', 'cmb2' ),
31
- ),
32
- 'object_id' => array(
33
- 'description' => __( 'To view or modify the field\'s value, the \'object_id\' and \'object_type\' arguments are required.', 'cmb2' ),
34
- ),
35
- 'object_type' => array(
36
- 'description' => __( 'To view or modify the field\'s value, the \'object_id\' and \'object_type\' arguments are required.', 'cmb2' ),
37
- ),
38
- );
39
-
40
- // Returns specific box's fields.
41
- register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<cmb_id>[\w-]+)/fields/', array(
42
- array(
43
- 'methods' => WP_REST_Server::READABLE,
44
- 'permission_callback' => array( $this, 'get_items_permissions_check' ),
45
- 'callback' => array( $this, 'get_items' ),
46
- 'args' => $args,
47
- ),
48
- 'schema' => array( $this, 'get_item_schema' ),
49
- ) );
50
-
51
- $delete_args = $args;
52
- $delete_args['object_id']['required'] = true;
53
- $delete_args['object_type']['required'] = true;
54
-
55
- // Returns specific field data.
56
- register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<cmb_id>[\w-]+)/fields/(?P<field_id>[\w-]+)', array(
57
- array(
58
- 'methods' => WP_REST_Server::READABLE,
59
- 'permission_callback' => array( $this, 'get_item_permissions_check' ),
60
- 'callback' => array( $this, 'get_item' ),
61
- 'args' => $args,
62
- ),
63
- array(
64
- 'methods' => WP_REST_Server::EDITABLE,
65
- 'permission_callback' => array( $this, 'update_item_permissions_check' ),
66
- 'callback' => array( $this, 'update_item' ),
67
- 'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),
68
- 'args' => $args,
69
- ),
70
- array(
71
- 'methods' => WP_REST_Server::DELETABLE,
72
- 'permission_callback' => array( $this, 'delete_item_permissions_check' ),
73
- 'callback' => array( $this, 'delete_item' ),
74
- 'args' => $delete_args,
75
- ),
76
- 'schema' => array( $this, 'get_item_schema' ),
77
- ) );
78
- }
79
-
80
- /**
81
- * Check if a given request has access to get fields.
82
- * By default, no special permissions needed, but filtering return value.
83
- *
84
- * @since 2.2.3
85
- *
86
- * @param WP_REST_Request $request Full data about the request.
87
- * @return WP_Error|boolean
88
- */
89
- public function get_items_permissions_check( $request ) {
90
- $this->initiate_rest_read_box( $request, 'fields_read' );
91
- $can_access = true;
92
-
93
- /**
94
- * By default, no special permissions needed.
95
- *
96
- * @since 2.2.3
97
- *
98
- * @param bool $can_access Whether this CMB2 endpoint can be accessed.
99
- * @param object $controller This CMB2_REST_Controller object.
100
- */
101
- return $this->maybe_hook_callback_and_apply_filters( 'cmb2_api_get_fields_permissions_check', $can_access );
102
- }
103
-
104
- /**
105
- * Get all public CMB2 box fields.
106
- *
107
- * @since 2.2.3
108
- *
109
- * @param WP_REST_Request $request Full data about the request.
110
- * @return WP_Error|WP_REST_Response
111
- */
112
- public function get_items( $request ) {
113
- if ( ! $this->rest_box ) {
114
- $this->initiate_rest_read_box( $request, 'fields_read' );
115
- }
116
-
117
- if ( is_wp_error( $this->rest_box ) ) {
118
- return $this->rest_box;
119
- }
120
-
121
- $fields = array();
122
- foreach ( $this->rest_box->cmb->prop( 'fields', array() ) as $field ) {
123
-
124
- // Make sure this field can be read.
125
- $this->field = $this->rest_box->field_can_read( $field['id'], true );
126
-
127
- // And make sure current user can view this box.
128
- if ( $this->field && $this->get_item_permissions_check_filter() ) {
129
- $fields[ $field['id'] ] = $this->server->response_to_data(
130
- $this->prepare_field_response(),
131
- isset( $this->request['_embed'] )
132
- );
133
- }
134
- }
135
-
136
- return $this->prepare_item( $fields );
137
- }
138
-
139
- /**
140
- * Check if a given request has access to a field.
141
- * By default, no special permissions needed, but filtering return value.
142
- *
143
- * @since 2.2.3
144
- *
145
- * @param WP_REST_Request $request Full details about the request.
146
- * @return WP_Error|boolean
147
- */
148
- public function get_item_permissions_check( $request ) {
149
- $this->initiate_rest_read_box( $request, 'field_read' );
150
- if ( ! is_wp_error( $this->rest_box ) ) {
151
- $this->field = $this->rest_box->field_can_read( $this->request->get_param( 'field_id' ), true );
152
- }
153
-
154
- return $this->get_item_permissions_check_filter();
155
- }
156
-
157
- /**
158
- * Check by filter if a given request has access to a field.
159
- * By default, no special permissions needed, but filtering return value.
160
- *
161
- * @since 2.2.3
162
- *
163
- * @param bool $can_access Whether the current request has access to view the field by default.
164
- * @return WP_Error|boolean
165
- */
166
- public function get_item_permissions_check_filter( $can_access = true ) {
167
- /**
168
- * By default, no special permissions needed.
169
- *
170
- * @since 2.2.3
171
- *
172
- * @param bool $can_access Whether this CMB2 endpoint can be accessed.
173
- * @param object $controller This CMB2_REST_Controller object.
174
- */
175
- return $this->maybe_hook_callback_and_apply_filters( 'cmb2_api_get_field_permissions_check', $can_access );
176
- }
177
-
178
- /**
179
- * Get one CMB2 field from the collection.
180
- *
181
- * @since 2.2.3
182
- *
183
- * @param WP_REST_Request $request Full data about the request.
184
- * @return WP_Error|WP_REST_Response
185
- */
186
- public function get_item( $request ) {
187
- $this->initiate_rest_read_box( $request, 'field_read' );
188
-
189
- if ( is_wp_error( $this->rest_box ) ) {
190
- return $this->rest_box;
191
- }
192
-
193
- return $this->prepare_read_field( $this->request->get_param( 'field_id' ) );
194
- }
195
-
196
- /**
197
- * Check if a given request has access to update a field value.
198
- * By default, requires 'edit_others_posts' capability, but filtering return value.
199
- *
200
- * @since 2.2.3
201
- *
202
- * @param WP_REST_Request $request Full details about the request.
203
- * @return WP_Error|boolean
204
- */
205
- public function update_item_permissions_check( $request ) {
206
- $this->initiate_rest_read_box( $request, 'field_value_update' );
207
- if ( ! is_wp_error( $this->rest_box ) ) {
208
- $this->field = $this->rest_box->field_can_edit( $this->request->get_param( 'field_id' ), true );
209
- }
210
-
211
- $can_update = current_user_can( 'edit_others_posts' );
212
-
213
- /**
214
- * By default, 'edit_others_posts' is required capability.
215
- *
216
- * @since 2.2.3
217
- *
218
- * @param bool $can_update Whether this CMB2 endpoint can be accessed.
219
- * @param object $controller This CMB2_REST_Controller object.
220
- */
221
- return $this->maybe_hook_callback_and_apply_filters( 'cmb2_api_update_field_value_permissions_check', $can_update );
222
- }
223
-
224
- /**
225
- * Update CMB2 field value.
226
- *
227
- * @since 2.2.3
228
- *
229
- * @param WP_REST_Request $request Full data about the request.
230
- * @return WP_Error|WP_REST_Response
231
- */
232
- public function update_item( $request ) {
233
- $this->initiate_rest_read_box( $request, 'field_value_update' );
234
-
235
- if ( ! $this->request['value'] ) {
236
- return new WP_Error( 'cmb2_rest_update_field_error', __( 'CMB2 Field value cannot be updated without the value parameter specified.', 'cmb2' ), array(
237
- 'status' => 400,
238
- ) );
239
- }
240
-
241
- return $this->modify_field_value( 'updated' );
242
- }
243
-
244
- /**
245
- * Check if a given request has access to delete a field value.
246
- * By default, requires 'delete_others_posts' capability, but filtering return value.
247
- *
248
- * @since 2.2.3
249
- *
250
- * @param WP_REST_Request $request Full details about the request.
251
- * @return WP_Error|boolean
252
- */
253
- public function delete_item_permissions_check( $request ) {
254
- $this->initiate_rest_read_box( $request, 'field_value_delete' );
255
- if ( ! is_wp_error( $this->rest_box ) ) {
256
- $this->field = $this->rest_box->field_can_edit( $this->request->get_param( 'field_id' ), true );
257
- }
258
-
259
- $can_delete = current_user_can( 'delete_others_posts' );
260
-
261
- /**
262
- * By default, 'delete_others_posts' is required capability.
263
- *
264
- * @since 2.2.3
265
- *
266
- * @param bool $can_delete Whether this CMB2 endpoint can be accessed.
267
- * @param object $controller This CMB2_REST_Controller object.
268
- */
269
- return $this->maybe_hook_callback_and_apply_filters( 'cmb2_api_delete_field_value_permissions_check', $can_delete );
270
- }
271
-
272
- /**
273
- * Delete CMB2 field value.
274
- *
275
- * @since 2.2.3
276
- *
277
- * @param WP_REST_Request $request Full data about the request.
278
- * @return WP_Error|WP_REST_Response
279
- */
280
- public function delete_item( $request ) {
281
- $this->initiate_rest_read_box( $request, 'field_value_delete' );
282
-
283
- return $this->modify_field_value( 'deleted' );
284
- }
285
-
286
- /**
287
- * Modify CMB2 field value.
288
- *
289
- * @since 2.2.3
290
- *
291
- * @param string $activity The modification activity (updated or deleted).
292
- * @return WP_Error|WP_REST_Response
293
- */
294
- public function modify_field_value( $activity ) {
295
-
296
- if ( ! $this->request['object_id'] || ! $this->request['object_type'] ) {
297
- return new WP_Error( 'cmb2_rest_modify_field_value_error', __( 'CMB2 Field value cannot be modified without the object_id and object_type parameters specified.', 'cmb2' ), array(
298
- 'status' => 400,
299
- ) );
300
- }
301
-
302
- if ( is_wp_error( $this->rest_box ) ) {
303
- return $this->rest_box;
304
- }
305
-
306
- $this->field = $this->rest_box->field_can_edit(
307
- $this->field ? $this->field : $this->request->get_param( 'field_id' ),
308
- true
309
- );
310
-
311
- if ( ! $this->field ) {
312
- return new WP_Error( 'cmb2_rest_no_field_by_id_error', __( 'No field found by that id.', 'cmb2' ), array(
313
- 'status' => 403,
314
- ) );
315
- }
316
-
317
- $this->field->args[ "value_{$activity}" ] = (bool) 'deleted' === $activity
318
- ? $this->field->remove_data()
319
- : $this->field->save_field( $this->request['value'] );
320
-
321
- // If options page, save the $activity options
322
- if ( 'options-page' == $this->request['object_type'] ) {
323
- $this->field->args[ "value_{$activity}" ] = cmb2_options( $this->request['object_id'] )->set();
324
- }
325
-
326
- return $this->prepare_read_field( $this->field );
327
- }
328
-
329
- /**
330
- * Get a response object for a specific field ID.
331
- *
332
- * @since 2.2.3
333
- *
334
- * @param string\CMB2_Field Field id or Field object.
335
- * @return WP_Error|WP_REST_Response
336
- */
337
- public function prepare_read_field( $field ) {
338
- $this->field = $this->rest_box->field_can_read( $field, true );
339
-
340
- if ( ! $this->field ) {
341
- return new WP_Error( 'cmb2_rest_no_field_by_id_error', __( 'No field found by that id.', 'cmb2' ), array(
342
- 'status' => 403,
343
- ) );
344
- }
345
-
346
- return $this->prepare_item( $this->prepare_field_response() );
347
- }
348
-
349
- /**
350
- * Get a specific field response.
351
- *
352
- * @since 2.2.3
353
- *
354
- * @param CMB2_Field Field object.
355
- * @return array Response array.
356
- */
357
- public function prepare_field_response() {
358
- $field_data = $this->prepare_field_data( $this->field );
359
- $response = rest_ensure_response( $field_data );
360
-
361
- $response->add_links( $this->prepare_links( $this->field ) );
362
-
363
- return $response;
364
- }
365
-
366
- /**
367
- * Prepare the field data array for JSON.
368
- *
369
- * @since 2.2.3
370
- *
371
- * @param CMB2_Field $field field object.
372
- *
373
- * @return array Array of field data.
374
- */
375
- protected function prepare_field_data( CMB2_Field $field ) {
376
- $field_data = array();
377
- $params_to_ignore = array( 'show_in_rest', 'options' );
378
- $params_to_rename = array(
379
- 'label_cb' => 'label',
380
- 'options_cb' => 'options',
381
- );
382
-
383
- // Run this first so the js_dependencies arg is populated.
384
- $rendered = ( $cb = $field->maybe_callback( 'render_row_cb' ) )
385
- // Ok, callback is good, let's run it.
386
- ? $this->get_cb_results( $cb, $field->args(), $field )
387
- : false;
388
-
389
- $field_args = $field->args();
390
-
391
- foreach ( $field_args as $key => $value ) {
392
- if ( in_array( $key, $params_to_ignore, true ) ) {
393
- continue;
394
- }
395
-
396
- if ( 'options_cb' === $key ) {
397
- $value = $field->options();
398
- } elseif ( in_array( $key, CMB2_Field::$callable_fields, true ) ) {
399
-
400
- if ( isset( $this->request['_rendered'] ) ) {
401
- $value = $key === 'render_row_cb' ? $rendered : $field->get_param_callback_result( $key );
402
- } elseif ( is_array( $value ) ) {
403
- // We need to rewrite callbacks as string as they will cause
404
- // JSON recursion errors.
405
- $class = is_string( $value[0] ) ? $value[0] : get_class( $value[0] );
406
- $value = $class . '::' . $value[1];
407
- }
408
- }
409
-
410
- $key = isset( $params_to_rename[ $key ] ) ? $params_to_rename[ $key ] : $key;
411
-
412
- if ( empty( $value ) || is_scalar( $value ) || is_array( $value ) ) {
413
- $field_data[ $key ] = $value;
414
- } else {
415
- $field_data[ $key ] = sprintf( __( 'Value Error for %s', 'cmb2' ), $key );
416
- }
417
- }
418
-
419
- if ( $this->request['object_id'] && $this->request['object_type'] ) {
420
- $field_data['value'] = $field->get_data();
421
- }
422
-
423
- return $field_data;
424
- }
425
-
426
- /**
427
- * Return an array of contextual links for field/fields.
428
- *
429
- * @since 2.2.3
430
- *
431
- * @param CMB2_Field $field Field object to build links from.
432
- *
433
- * @return array Array of links
434
- */
435
- protected function prepare_links( $field ) {
436
- $boxbase = $this->namespace_base . '/' . $this->rest_box->cmb->cmb_id;
437
- $query_string = $this->get_query_string();
438
-
439
- $links = array(
440
- 'self' => array(
441
- 'href' => rest_url( trailingslashit( $boxbase ) . 'fields/' . $field->_id() . $query_string ),
442
- ),
443
- 'collection' => array(
444
- 'href' => rest_url( trailingslashit( $boxbase ) . 'fields' . $query_string ),
445
- ),
446
- 'up' => array(
447
- 'embeddable' => true,
448
- 'href' => rest_url( $boxbase . $query_string ),
449
- ),
450
- );
451
-
452
- return $links;
453
- }
454
-
455
- /**
456
- * Checks if the CMB2 box or field has any registered callback parameters for the given filter.
457
- *
458
- * The registered handlers will have a property name which matches the filter, except:
459
- * - The 'cmb2_api' prefix will be removed
460
- * - A '_cb' suffix will be added (to stay inline with other '*_cb' parameters).
461
- *
462
- * @since 2.2.3
463
- *
464
- * @param string $filter The filter name.
465
- * @param bool $default_val The default filter value.
466
- *
467
- * @return bool The possibly-modified filter value (if the _cb param is a non-callable).
468
- */
469
- public function maybe_hook_registered_callback( $filter, $default_val ) {
470
- $default_val = parent::maybe_hook_registered_callback( $filter, $default_val );
471
-
472
- if ( $this->field ) {
473
-
474
- // Hook field specific filter callbacks.
475
- $val = $this->field->maybe_hook_parameter( $filter, $default_val );
476
- if ( null !== $val ) {
477
- $default_val = $val;
478
- }
479
- }
480
-
481
- return $default_val;
482
- }
483
-
484
- /**
485
- * Unhooks any CMB2 box or field registered callback parameters for the given filter.
486
- *
487
- * @since 2.2.3
488
- *
489
- * @param string $filter The filter name.
490
- *
491
- * @return void
492
- */
493
- public function maybe_unhook_registered_callback( $filter ) {
494
- parent::maybe_unhook_registered_callback( $filter );
495
-
496
- if ( $this->field ) {
497
- // Unhook field specific filter callbacks.
498
- $this->field->maybe_hook_parameter( $filter, null, 'remove_filter' );
499
- }
500
- }
501
-
502
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/shim/WP_REST_Controller.php DELETED
@@ -1,540 +0,0 @@
1
- <?php
2
-
3
-
4
- abstract class WP_REST_Controller {
5
-
6
- /**
7
- * The namespace of this controller's route.
8
- *
9
- * @var string
10
- */
11
- protected $namespace;
12
-
13
- /**
14
- * The base of this controller's route.
15
- *
16
- * @var string
17
- */
18
- protected $rest_base;
19
-
20
- /**
21
- * Register the routes for the objects of the controller.
22
- */
23
- public function register_routes() {
24
- _doing_it_wrong( 'WP_REST_Controller::register_routes', __( 'The register_routes() method must be overridden' ), 'WPAPI-2.0' );
25
- }
26
-
27
- /**
28
- * Check if a given request has access to get items.
29
- *
30
- * @param WP_REST_Request $request Full data about the request.
31
- * @return WP_Error|boolean
32
- */
33
- public function get_items_permissions_check( $request ) {
34
- return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
35
- 'status' => 405,
36
- ) );
37
- }
38
-
39
- /**
40
- * Get a collection of items.
41
- *
42
- * @param WP_REST_Request $request Full data about the request.
43
- * @return WP_Error|WP_REST_Response
44
- */
45
- public function get_items( $request ) {
46
- return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
47
- 'status' => 405,
48
- ) );
49
- }
50
-
51
- /**
52
- * Check if a given request has access to get a specific item.
53
- *
54
- * @param WP_REST_Request $request Full data about the request.
55
- * @return WP_Error|boolean
56
- */
57
- public function get_item_permissions_check( $request ) {
58
- return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
59
- 'status' => 405,
60
- ) );
61
- }
62
-
63
- /**
64
- * Get one item from the collection.
65
- *
66
- * @param WP_REST_Request $request Full data about the request.
67
- * @return WP_Error|WP_REST_Response
68
- */
69
- public function get_item( $request ) {
70
- return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
71
- 'status' => 405,
72
- ) );
73
- }
74
-
75
- /**
76
- * Check if a given request has access to create items.
77
- *
78
- * @param WP_REST_Request $request Full data about the request.
79
- * @return WP_Error|boolean
80
- */
81
- public function create_item_permissions_check( $request ) {
82
- return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
83
- 'status' => 405,
84
- ) );
85
- }
86
-
87
- /**
88
- * Create one item from the collection.
89
- *
90
- * @param WP_REST_Request $request Full data about the request.
91
- * @return WP_Error|WP_REST_Response
92
- */
93
- public function create_item( $request ) {
94
- return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
95
- 'status' => 405,
96
- ) );
97
- }
98
-
99
- /**
100
- * Check if a given request has access to update a specific item.
101
- *
102
- * @param WP_REST_Request $request Full data about the request.
103
- * @return WP_Error|boolean
104
- */
105
- public function update_item_permissions_check( $request ) {
106
- return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
107
- 'status' => 405,
108
- ) );
109
- }
110
-
111
- /**
112
- * Update one item from the collection.
113
- *
114
- * @param WP_REST_Request $request Full data about the request.
115
- * @return WP_Error|WP_REST_Response
116
- */
117
- public function update_item( $request ) {
118
- return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
119
- 'status' => 405,
120
- ) );
121
- }
122
-
123
- /**
124
- * Check if a given request has access to delete a specific item.
125
- *
126
- * @param WP_REST_Request $request Full data about the request.
127
- * @return WP_Error|boolean
128
- */
129
- public function delete_item_permissions_check( $request ) {
130
- return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
131
- 'status' => 405,
132
- ) );
133
- }
134
-
135
- /**
136
- * Delete one item from the collection.
137
- *
138
- * @param WP_REST_Request $request Full data about the request.
139
- * @return WP_Error|WP_REST_Response
140
- */
141
- public function delete_item( $request ) {
142
- return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
143
- 'status' => 405,
144
- ) );
145
- }
146
-
147
- /**
148
- * Prepare the item for create or update operation.
149
- *
150
- * @param WP_REST_Request $request Request object.
151
- * @return WP_Error|object $prepared_item
152
- */
153
- protected function prepare_item_for_database( $request ) {
154
- return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
155
- 'status' => 405,
156
- ) );
157
- }
158
-
159
- /**
160
- * Prepare the item for the REST response.
161
- *
162
- * @param mixed $item WordPress representation of the item.
163
- * @param WP_REST_Request $request Request object.
164
- * @return WP_REST_Response $response
165
- */
166
- public function prepare_item_for_response( $item, $request ) {
167
- return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
168
- 'status' => 405,
169
- ) );
170
- }
171
-
172
- /**
173
- * Prepare a response for inserting into a collection.
174
- *
175
- * @param WP_REST_Response $response Response object.
176
- * @return array Response data, ready for insertion into collection data.
177
- */
178
- public function prepare_response_for_collection( $response ) {
179
- if ( ! ( $response instanceof WP_REST_Response ) ) {
180
- return $response;
181
- }
182
-
183
- $data = (array) $response->get_data();
184
- $server = rest_get_server();
185
-
186
- if ( method_exists( $server, 'get_compact_response_links' ) ) {
187
- $links = call_user_func( array( $server, 'get_compact_response_links' ), $response );
188
- } else {
189
- $links = call_user_func( array( $server, 'get_response_links' ), $response );
190
- }
191
-
192
- if ( ! empty( $links ) ) {
193
- $data['_links'] = $links;
194
- }
195
-
196
- return $data;
197
- }
198
-
199
- /**
200
- * Filter a response based on the context defined in the schema.
201
- *
202
- * @param array $data
203
- * @param string $context
204
- * @return array
205
- */
206
- public function filter_response_by_context( $data, $context ) {
207
-
208
- $schema = $this->get_item_schema();
209
- foreach ( $data as $key => $value ) {
210
- if ( empty( $schema['properties'][ $key ] ) || empty( $schema['properties'][ $key ]['context'] ) ) {
211
- continue;
212
- }
213
-
214
- if ( ! in_array( $context, $schema['properties'][ $key ]['context'] ) ) {
215
- unset( $data[ $key ] );
216
- continue;
217
- }
218
-
219
- if ( 'object' === $schema['properties'][ $key ]['type'] && ! empty( $schema['properties'][ $key ]['properties'] ) ) {
220
- foreach ( $schema['properties'][ $key ]['properties'] as $attribute => $details ) {
221
- if ( empty( $details['context'] ) ) {
222
- continue;
223
- }
224
- if ( ! in_array( $context, $details['context'] ) ) {
225
- if ( isset( $data[ $key ][ $attribute ] ) ) {
226
- unset( $data[ $key ][ $attribute ] );
227
- }
228
- }
229
- }
230
- }
231
- }
232
-
233
- return $data;
234
- }
235
-
236
- /**
237
- * Get the item's schema, conforming to JSON Schema.
238
- *
239
- * @return array
240
- */
241
- public function get_item_schema() {
242
- return $this->add_additional_fields_schema( array() );
243
- }
244
-
245
- /**
246
- * Get the item's schema for display / public consumption purposes.
247
- *
248
- * @return array
249
- */
250
- public function get_public_item_schema() {
251
-
252
- $schema = $this->get_item_schema();
253
-
254
- foreach ( $schema['properties'] as &$property ) {
255
- if ( isset( $property['arg_options'] ) ) {
256
- unset( $property['arg_options'] );
257
- }
258
- }
259
-
260
- return $schema;
261
- }
262
-
263
- /**
264
- * Get the query params for collections.
265
- *
266
- * @return array
267
- */
268
- public function get_collection_params() {
269
- return array(
270
- 'context' => $this->get_context_param(),
271
- 'page' => array(
272
- 'description' => __( 'Current page of the collection.' ),
273
- 'type' => 'integer',
274
- 'default' => 1,
275
- 'sanitize_callback' => 'absint',
276
- 'validate_callback' => 'rest_validate_request_arg',
277
- 'minimum' => 1,
278
- ),
279
- 'per_page' => array(
280
- 'description' => __( 'Maximum number of items to be returned in result set.' ),
281
- 'type' => 'integer',
282
- 'default' => 10,
283
- 'minimum' => 1,
284
- 'maximum' => 100,
285
- 'sanitize_callback' => 'absint',
286
- 'validate_callback' => 'rest_validate_request_arg',
287
- ),
288
- 'search' => array(
289
- 'description' => __( 'Limit results to those matching a string.' ),
290
- 'type' => 'string',
291
- 'sanitize_callback' => 'sanitize_text_field',
292
- 'validate_callback' => 'rest_validate_request_arg',
293
- ),
294
- );
295
- }
296
-
297
- /**
298
- * Get the magical context param.
299
- *
300
- * Ensures consistent description between endpoints, and populates enum from schema.
301
- *
302
- * @param array $args
303
- * @return array
304
- */
305
- public function get_context_param( $args = array() ) {
306
- $param_details = array(
307
- 'description' => __( 'Scope under which the request is made; determines fields present in response.' ),
308
- 'type' => 'string',
309
- 'sanitize_callback' => 'sanitize_key',
310
- 'validate_callback' => 'rest_validate_request_arg',
311
- );
312
- $schema = $this->get_item_schema();
313
- if ( empty( $schema['properties'] ) ) {
314
- return array_merge( $param_details, $args );
315
- }
316
- $contexts = array();
317
- foreach ( $schema['properties'] as $attributes ) {
318
- if ( ! empty( $attributes['context'] ) ) {
319
- $contexts = array_merge( $contexts, $attributes['context'] );
320
- }
321
- }
322
- if ( ! empty( $contexts ) ) {
323
- $param_details['enum'] = array_unique( $contexts );
324
- rsort( $param_details['enum'] );
325
- }
326
- return array_merge( $param_details, $args );
327
- }
328
-
329
- /**
330
- * Add the values from additional fields to a data object.
331
- *
332
- * @param array $object
333
- * @param WP_REST_Request $request
334
- * @return array modified object with additional fields.
335
- */
336
- protected function add_additional_fields_to_object( $object, $request ) {
337
-
338
- $additional_fields = $this->get_additional_fields();
339
-
340
- foreach ( $additional_fields as $field_name => $field_options ) {
341
-
342
- if ( ! $field_options['get_callback'] ) {
343
- continue;
344
- }
345
-
346
- $object[ $field_name ] = call_user_func( $field_options['get_callback'], $object, $field_name, $request, $this->get_object_type() );
347
- }
348
-
349
- return $object;
350
- }
351
-
352
- /**
353
- * Update the values of additional fields added to a data object.
354
- *
355
- * @param array $object
356
- * @param WP_REST_Request $request
357
- */
358
- protected function update_additional_fields_for_object( $object, $request ) {
359
-
360
- $additional_fields = $this->get_additional_fields();
361
-
362
- foreach ( $additional_fields as $field_name => $field_options ) {
363
-
364
- if ( ! $field_options['update_callback'] ) {
365
- continue;
366
- }
367
-
368
- // Don't run the update callbacks if the data wasn't passed in the request.
369
- if ( ! isset( $request[ $field_name ] ) ) {
370
- continue;
371
- }
372
-
373
- call_user_func( $field_options['update_callback'], $request[ $field_name ], $object, $field_name, $request, $this->get_object_type() );
374
- }
375
- }
376
-
377
- /**
378
- * Add the schema from additional fields to an schema array.
379
- *
380
- * The type of object is inferred from the passed schema.
381
- *
382
- * @param array $schema Schema array.
383
- */
384
- protected function add_additional_fields_schema( $schema ) {
385
- if ( empty( $schema['title'] ) ) {
386
- return $schema;
387
- }
388
-
389
- /**
390
- * Can't use $this->get_object_type otherwise we cause an inf loop.
391
- */
392
- $object_type = $schema['title'];
393
-
394
- $additional_fields = $this->get_additional_fields( $object_type );
395
-
396
- foreach ( $additional_fields as $field_name => $field_options ) {
397
- if ( ! $field_options['schema'] ) {
398
- continue;
399
- }
400
-
401
- $schema['properties'][ $field_name ] = $field_options['schema'];
402
- }
403
-
404
- return $schema;
405
- }
406
-
407
- /**
408
- * Get all the registered additional fields for a given object-type.
409
- *
410
- * @param string $object_type
411
- * @return array
412
- */
413
- protected function get_additional_fields( $object_type = null ) {
414
-
415
- if ( ! $object_type ) {
416
- $object_type = $this->get_object_type();
417
- }
418
-
419
- if ( ! $object_type ) {
420
- return array();
421
- }
422
-
423
- global $wp_rest_additional_fields;
424
-
425
- if ( ! $wp_rest_additional_fields || ! isset( $wp_rest_additional_fields[ $object_type ] ) ) {
426
- return array();
427
- }
428
-
429
- return $wp_rest_additional_fields[ $object_type ];
430
- }
431
-
432
- /**
433
- * Get the object type this controller is responsible for managing.
434
- *
435
- * @return string
436
- */
437
- protected function get_object_type() {
438
- $schema = $this->get_item_schema();
439
-
440
- if ( ! $schema || ! isset( $schema['title'] ) ) {
441
- return null;
442
- }
443
-
444
- return $schema['title'];
445
- }
446
-
447
- /**
448
- * Get an array of endpoint arguments from the item schema for the controller.
449
- *
450
- * @param string $method HTTP method of the request. The arguments
451
- * for `CREATABLE` requests are checked for required
452
- * values and may fall-back to a given default, this
453
- * is not done on `EDITABLE` requests. Default is
454
- * WP_REST_Server::CREATABLE.
455
- * @return array $endpoint_args
456
- */
457
- public function get_endpoint_args_for_item_schema( $method = WP_REST_Server::CREATABLE ) {
458
-
459
- $schema = $this->get_item_schema();
460
- $schema_properties = ! empty( $schema['properties'] ) ? $schema['properties'] : array();
461
- $endpoint_args = array();
462
-
463
- foreach ( $schema_properties as $field_id => $params ) {
464
-
465
- // Arguments specified as `readonly` are not allowed to be set.
466
- if ( ! empty( $params['readonly'] ) ) {
467
- continue;
468
- }
469
-
470
- $endpoint_args[ $field_id ] = array(
471
- 'validate_callback' => 'rest_validate_request_arg',
472
- 'sanitize_callback' => 'rest_sanitize_request_arg',
473
- );
474
-
475
- if ( isset( $params['description'] ) ) {
476
- $endpoint_args[ $field_id ]['description'] = $params['description'];
477
- }
478
-
479
- if ( WP_REST_Server::CREATABLE === $method && isset( $params['default'] ) ) {
480
- $endpoint_args[ $field_id ]['default'] = $params['default'];
481
- }
482
-
483
- if ( WP_REST_Server::CREATABLE === $method && ! empty( $params['required'] ) ) {
484
- $endpoint_args[ $field_id ]['required'] = true;
485
- }
486
-
487
- foreach ( array( 'type', 'format', 'enum' ) as $schema_prop ) {
488
- if ( isset( $params[ $schema_prop ] ) ) {
489
- $endpoint_args[ $field_id ][ $schema_prop ] = $params[ $schema_prop ];
490
- }
491
- }
492
-
493
- // Merge in any options provided by the schema property.
494
- if ( isset( $params['arg_options'] ) ) {
495
-
496
- // Only use required / default from arg_options on CREATABLE endpoints.
497
- if ( WP_REST_Server::CREATABLE !== $method ) {
498
- $params['arg_options'] = array_diff_key( $params['arg_options'], array(
499
- 'required' => '',
500
- 'default' => '',
501
- ) );
502
- }
503
-
504
- $endpoint_args[ $field_id ] = array_merge( $endpoint_args[ $field_id ], $params['arg_options'] );
505
- }
506
- }// End foreach().
507
-
508
- return $endpoint_args;
509
- }
510
-
511
- /**
512
- * Retrieves post data given a post ID or post object.
513
- *
514
- * This is a subset of the functionality of the `get_post()` function, with
515
- * the additional functionality of having `the_post` action done on the
516
- * resultant post object. This is done so that plugins may manipulate the
517
- * post that is used in the REST API.
518
- *
519
- * @see get_post()
520
- * @global WP_Query $wp_query
521
- *
522
- * @param int|WP_Post $post Post ID or post object. Defaults to global $post.
523
- * @return WP_Post|null A `WP_Post` object when successful.
524
- */
525
- public function get_post( $post ) {
526
- $post_obj = get_post( $post );
527
-
528
- /**
529
- * Filter the post.
530
- *
531
- * Allows plugins to filter the post object as returned by `\WP_REST_Controller::get_post()`.
532
- *
533
- * @param WP_Post|null $post_obj The post object as returned by `get_post()`.
534
- * @param int|WP_Post $post The original value used to obtain the post object.
535
- */
536
- $post = apply_filters( 'rest_the_post', $post_obj, $post );
537
-
538
- return $post;
539
- }
540
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Base.php DELETED
@@ -1,153 +0,0 @@
1
- <?php
2
- /**
3
- * CMB base field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- abstract class CMB2_Type_Base {
14
-
15
- /**
16
- * The CMB2_Types object
17
- *
18
- * @var CMB2_Types
19
- */
20
- public $types;
21
-
22
- /**
23
- * Arguments for use in the render method
24
- *
25
- * @var array
26
- */
27
- public $args;
28
-
29
- /**
30
- * Rendered output (if 'rendered' argument is set to false)
31
- *
32
- * @var string
33
- */
34
- protected $rendered = '';
35
-
36
- /**
37
- * Constructor
38
- *
39
- * @since 2.2.2
40
- * @param CMB2_Types $types
41
- * @param array $args
42
- */
43
- public function __construct( CMB2_Types $types, $args = array() ) {
44
- $this->types = $types;
45
- $args['rendered'] = isset( $args['rendered'] ) ? (bool) $args['rendered'] : true;
46
- $this->args = $args;
47
- }
48
-
49
- /**
50
- * Handles rendering this field type.
51
- *
52
- * @since 2.2.2
53
- * @return string Rendered field type.
54
- */
55
- abstract public function render();
56
-
57
- /**
58
- * Stores the rendered field output.
59
- *
60
- * @since 2.2.2
61
- * @param string|CMB2_Type_Base $rendered Rendered output.
62
- * @return string|CMB2_Type_Base Rendered output or this object.
63
- */
64
- public function rendered( $rendered ) {
65
- if ( $this->args['rendered'] ) {
66
- return is_a( $rendered, __CLASS__ ) ? $rendered->rendered : $rendered;
67
- }
68
-
69
- $this->rendered = is_a( $rendered, __CLASS__ ) ? $rendered->rendered : $rendered;
70
-
71
- return $this;
72
- }
73
-
74
- /**
75
- * Returns the stored rendered field output.
76
- *
77
- * @since 2.2.2
78
- * @return string Stored rendered output (if 'rendered' argument is set to false).
79
- */
80
- public function get_rendered() {
81
- return $this->rendered;
82
- }
83
-
84
- /**
85
- * Handles parsing and filtering attributes while preserving any passed in via field config.
86
- *
87
- * @since 1.1.0
88
- * @param string $element Element for filter
89
- * @param array $type_defaults Type default arguments
90
- * @param array $type_args Type override arguments
91
- * @return array Parsed and filtered arguments
92
- */
93
- public function parse_args( $element, $type_defaults, $type_args = array() ) {
94
- $type_args = empty( $type_args ) ? $this->args : $type_args;
95
-
96
- $field_overrides = $this->field->args( 'attributes' );
97
-
98
- $args = ! empty( $field_overrides )
99
- ? wp_parse_args( $field_overrides, $type_args )
100
- : $type_args;
101
-
102
- /**
103
- * Filter attributes for a field type.
104
- * The dynamic portion of the hook name, $element, refers to the field type.
105
- *
106
- * @since 1.1.0
107
- * @param array $args The array of attribute arguments.
108
- * @param array $type_defaults The array of default values.
109
- * @param array $field The `CMB2_Field` object.
110
- * @param object $field_type_object This `CMB2_Types` object.
111
- */
112
- $args = apply_filters( "cmb2_{$element}_attributes", $args, $type_defaults, $this->field, $this->types );
113
-
114
- return wp_parse_args( $args, $type_defaults );
115
- }
116
-
117
- /**
118
- * Fall back to CMB2_Types methods
119
- *
120
- * @param string $field
121
- * @throws Exception Throws an exception if the field is invalid.
122
- * @return mixed
123
- */
124
- public function __call( $name, $arguments ) {
125
- switch ( $name ) {
126
- case '_id':
127
- case '_name':
128
- case '_desc':
129
- case '_text':
130
- case 'concat_attrs':
131
- return call_user_func_array( array( $this->types, $name ), $arguments );
132
- default:
133
- throw new Exception( sprintf( esc_html__( 'Invalid %1$s method: %2$s', 'cmb2' ), __CLASS__, $name ) );
134
- }
135
- }
136
-
137
- /**
138
- * Magic getter for our object.
139
- *
140
- * @param string $field
141
- * @throws Exception Throws an exception if the field is invalid.
142
- * @return mixed
143
- */
144
- public function __get( $field ) {
145
- switch ( $field ) {
146
- case 'field':
147
- return $this->types->field;
148
- default:
149
- throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'cmb2' ), __CLASS__, $field ) );
150
- }
151
- }
152
-
153
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Checkbox.php DELETED
@@ -1,65 +0,0 @@
1
- <?php
2
- /**
3
- * CMB checkbox field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Checkbox extends CMB2_Type_Text {
14
-
15
- /**
16
- * If checkbox is checked
17
- *
18
- * @var mixed
19
- */
20
- public $is_checked = null;
21
-
22
- /**
23
- * Constructor
24
- *
25
- * @since 2.2.2
26
- *
27
- * @param CMB2_Types $types
28
- * @param array $args
29
- */
30
- public function __construct( CMB2_Types $types, $args = array(), $is_checked = null ) {
31
- parent::__construct( $types, $args );
32
- $this->is_checked = $is_checked;
33
- }
34
-
35
- public function render() {
36
- $defaults = array(
37
- 'type' => 'checkbox',
38
- 'class' => 'cmb2-option cmb2-list',
39
- 'value' => 'on',
40
- 'desc' => '',
41
- );
42
-
43
- $meta_value = $this->field->escaped_value();
44
-
45
- $is_checked = null === $this->is_checked
46
- ? ! empty( $meta_value )
47
- : $this->is_checked;
48
-
49
- if ( $is_checked ) {
50
- $defaults['checked'] = 'checked';
51
- }
52
-
53
- $args = $this->parse_args( 'checkbox', $defaults );
54
-
55
- return $this->rendered(
56
- sprintf(
57
- '%s <label for="%s">%s</label>',
58
- parent::render( $args ),
59
- $this->_id(),
60
- $this->_desc()
61
- )
62
- );
63
- }
64
-
65
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Colorpicker.php DELETED
@@ -1,58 +0,0 @@
1
- <?php
2
- /**
3
- * CMB colorpicker field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Colorpicker extends CMB2_Type_Text {
14
-
15
- /**
16
- * The optional value for the colorpicker field
17
- *
18
- * @var string
19
- */
20
- public $value = '';
21
-
22
- /**
23
- * Constructor
24
- *
25
- * @since 2.2.2
26
- *
27
- * @param CMB2_Types $types
28
- * @param array $args
29
- */
30
- public function __construct( CMB2_Types $types, $args = array(), $value = '' ) {
31
- parent::__construct( $types, $args );
32
- $this->value = $value ? $value : $this->value;
33
- }
34
-
35
- public function render() {
36
- $meta_value = $this->value ? $this->value : $this->field->escaped_value();
37
-
38
- $hex_color = '(([a-fA-F0-9]){3}){1,2}$';
39
- if ( preg_match( '/^' . $hex_color . '/i', $meta_value ) ) {
40
- // Value is just 123abc, so prepend #
41
- $meta_value = '#' . $meta_value;
42
- } elseif ( ! preg_match( '/^#' . $hex_color . '/i', $meta_value ) ) {
43
- // Value doesn't match #123abc, so sanitize to just #
44
- $meta_value = '#';
45
- }
46
-
47
- wp_enqueue_style( 'wp-color-picker' );
48
-
49
- $args = wp_parse_args( $this->args, array(
50
- 'class' => 'cmb2-colorpicker cmb2-text-small',
51
- 'value' => $meta_value,
52
- 'js_dependencies' => 'wp-color-picker',
53
- ) );
54
-
55
- return parent::render( $args );
56
- }
57
-
58
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_File.php DELETED
@@ -1,168 +0,0 @@
1
- <?php
2
- /**
3
- * CMB file field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_File extends CMB2_Type_File_Base {
14
-
15
- /**
16
- * Handles outputting an 'file' field
17
- *
18
- * @param array $args Override arguments
19
- * @return string Form input element
20
- */
21
- public function render( $args = array() ) {
22
- $args = empty( $args ) ? $this->args : $args;
23
- $field = $this->field;
24
- $options = (array) $field->options();
25
-
26
- $a = $this->args = $this->parse_args( 'file', array(
27
- 'class' => 'cmb2-upload-file regular-text',
28
- 'id' => $this->_id(),
29
- 'name' => $this->_name(),
30
- 'value' => $field->escaped_value(),
31
- 'id_value' => null,
32
- 'desc' => $this->_desc( true ),
33
- 'size' => 45,
34
- 'js_dependencies' => 'media-editor',
35
- 'preview_size' => $field->args( 'preview_size' ),
36
- 'query_args' => $field->args( 'query_args' ),
37
-
38
- // if options array and 'url' => false, then hide the url field
39
- 'type' => array_key_exists( 'url', $options ) && false === $options['url']
40
- ? 'hidden'
41
- : 'text',
42
- ), $args );
43
-
44
- // get an array of image size meta data, fallback to 'large'
45
- $this->args['img_size_data'] = $img_size_data = parent::get_image_size_data(
46
- $a['preview_size'],
47
- 'large'
48
- );
49
-
50
- $output = '';
51
-
52
- $output .= parent::render( array(
53
- 'type' => $a['type'],
54
- 'class' => $a['class'],
55
- 'value' => $a['value'],
56
- 'id' => $a['id'],
57
- 'name' => $a['name'],
58
- 'size' => $a['size'],
59
- 'desc' => '',
60
- 'data-previewsize' => sprintf( '[%d,%d]', $img_size_data['width'], $img_size_data['height'] ),
61
- 'data-sizename' => $img_size_data['name'],
62
- 'data-queryargs' => ! empty( $a['query_args'] ) ? json_encode( $a['query_args'] ) : '',
63
- 'js_dependencies' => $a['js_dependencies'],
64
- ) );
65
-
66
- // Now remove the data-iterator attribute if it exists.
67
- // (Possible if being used within a custom field)
68
- // This is not elegant, but compensates for CMB2_Types::_id
69
- // automagically & inelegantly adding the data-iterator attribute.
70
- // Single responsibility principle? pffft
71
- $parts = explode( '"', $this->args['id'] );
72
- $this->args['id'] = $parts[0];
73
-
74
- $output .= sprintf(
75
- '<input class="cmb2-upload-button button-secondary" type="button" value="%1$s" />',
76
- esc_attr( $this->_text( 'add_upload_file_text', esc_html__( 'Add or Upload File', 'cmb2' ) ) )
77
- );
78
-
79
- $output .= $a['desc'];
80
- $output .= $this->get_id_field_output();
81
-
82
- $output .= '<div id="' . $field->id() . '-status" class="cmb2-media-status">';
83
- if ( ! empty( $a['value'] ) ) {
84
- $output .= $this->get_file_preview_output();
85
- }
86
- $output .= '</div>';
87
-
88
- return $this->rendered( $output );
89
- }
90
-
91
- public function get_file_preview_output() {
92
- if ( ! $this->is_valid_img_ext( $this->args['value'] ) ) {
93
-
94
- return $this->file_status_output( array(
95
- 'value' => $this->args['value'],
96
- 'tag' => 'div',
97
- 'cached_id' => $this->args['id'],
98
- ) );
99
- }
100
-
101
- if ( $this->args['id_value'] ) {
102
- $image = wp_get_attachment_image( $this->args['id_value'], $this->args['preview_size'], null, array(
103
- 'class' => 'cmb-file-field-image',
104
- ) );
105
- } else {
106
- $image = '<img style="max-width: ' . absint( $this->args['img_size_data']['width'] ) . 'px; width: 100%;" src="' . $this->args['value'] . '" class="cmb-file-field-image" alt="" />';
107
- }
108
-
109
- return $this->img_status_output( array(
110
- 'image' => $image,
111
- 'tag' => 'div',
112
- 'cached_id' => $this->args['id'],
113
- ) );
114
- }
115
-
116
- public function get_id_field_output() {
117
- $field = $this->field;
118
-
119
- /*
120
- * A little bit of magic (tsk tsk) replacing the $this->types->field object,
121
- * So that the render function is using the proper field object.
122
- */
123
- $this->types->field = $this->get_id_field();
124
-
125
- $output = parent::render( array(
126
- 'type' => 'hidden',
127
- 'class' => 'cmb2-upload-file-id',
128
- 'value' => $this->types->field->value,
129
- 'desc' => '',
130
- ) );
131
-
132
- // We need to put the original field object back
133
- // or other fields in a custom field will be broken.
134
- $this->types->field = $field;
135
-
136
- return $output;
137
- }
138
-
139
- public function get_id_field() {
140
-
141
- // reset field args for attachment id
142
- $args = array(
143
- // if we're looking at a file in a group, we need to get the non-prefixed id
144
- 'id' => ( $this->field->group ? $this->field->args( '_id' ) : $this->args['id'] ) . '_id',
145
- );
146
-
147
- // and get new field object
148
- // (need to set it to the types field property)
149
- $id_field = $this->field->get_field_clone( $args );
150
-
151
- $id_value = absint( null !== $this->args['id_value'] ? $this->args['id_value'] : $id_field->escaped_value() );
152
-
153
- // we don't want to output "0" as a value.
154
- if ( ! $id_value ) {
155
- $id_value = '';
156
- }
157
-
158
- // if there is no id saved yet, try to get it from the url
159
- if ( $this->args['value'] && ! $id_value ) {
160
- $id_value = cmb2_utils::image_id_from_url( esc_url_raw( $this->args['value'] ) );
161
- }
162
-
163
- $id_field->value = $id_value;
164
-
165
- return $id_field;
166
- }
167
-
168
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_File_Base.php DELETED
@@ -1,209 +0,0 @@
1
- <?php
2
- /**
3
- * CMB File base field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_File_Base extends CMB2_Type_Text {
14
-
15
- /**
16
- * Determines if a file has a valid image extension
17
- *
18
- * @since 1.0.0
19
- * @param string $file File url
20
- * @return bool Whether file has a valid image extension
21
- */
22
- public function is_valid_img_ext( $file, $blah = false ) {
23
- $file_ext = CMB2_Utils::get_file_ext( $file );
24
-
25
- $valid_types = array( 'jpg', 'jpeg', 'png', 'gif', 'ico', 'icon' );
26
-
27
- /**
28
- * Which image types are considered valid image file extensions.
29
- *
30
- * @since 2.0.9
31
- *
32
- * @param array $valid_types The valid image file extensions.
33
- */
34
- $is_valid_types = apply_filters( 'cmb2_valid_img_types', $valid_types );
35
- $is_valid = $file_ext && in_array( $file_ext, (array) $is_valid_types );
36
-
37
- /**
38
- * Filter for determining if a field value has a valid image file-type extension.
39
- *
40
- * The dynamic portion of the hook name, $this->field->id(), refers to the field id attribute.
41
- *
42
- * @since 2.0.9
43
- *
44
- * @param bool $is_valid Whether field value has a valid image file-type extension.
45
- * @param string $file File url.
46
- * @param string $file_ext File extension.
47
- */
48
- return (bool) apply_filters( "cmb2_{$this->field->id()}_is_valid_img_ext", $is_valid, $file, $file_ext );
49
- }
50
-
51
- /**
52
- * file/file_list image wrap
53
- *
54
- * @since 2.0.2
55
- * @param array $args Array of arguments for output
56
- * @return string Image wrap output
57
- */
58
- public function img_status_output( $args ) {
59
- return sprintf( '<%1$s class="img-status cmb2-media-item">%2$s<p class="cmb2-remove-wrapper"><a href="#" class="cmb2-remove-file-button"%3$s>%4$s</a></p>%5$s</%1$s>',
60
- $args['tag'],
61
- $args['image'],
62
- isset( $args['cached_id'] ) ? ' rel="' . $args['cached_id'] . '"' : '',
63
- esc_html( $this->_text( 'remove_image_text', esc_html__( 'Remove Image', 'cmb2' ) ) ),
64
- isset( $args['id_input'] ) ? $args['id_input'] : ''
65
- );
66
- }
67
-
68
- /**
69
- * file/file_list file wrap
70
- *
71
- * @since 2.0.2
72
- * @param array $args Array of arguments for output
73
- * @return string File wrap output
74
- */
75
- public function file_status_output( $args ) {
76
- return sprintf( '<%1$s class="file-status cmb2-media-item"><span>%2$s <strong>%3$s</strong></span>&nbsp;&nbsp; (<a href="%4$s" target="_blank" rel="external">%5$s</a> / <a href="#" class="cmb2-remove-file-button"%6$s>%7$s</a>)%8$s</%1$s>',
77
- $args['tag'],
78
- esc_html( $this->_text( 'file_text', esc_html__( 'File:', 'cmb2' ) ) ),
79
- CMB2_Utils::get_file_name_from_path( $args['value'] ),
80
- $args['value'],
81
- esc_html( $this->_text( 'file_download_text', esc_html__( 'Download', 'cmb2' ) ) ),
82
- isset( $args['cached_id'] ) ? ' rel="' . $args['cached_id'] . '"' : '',
83
- esc_html( $this->_text( 'remove_text', esc_html__( 'Remove', 'cmb2' ) ) ),
84
- isset( $args['id_input'] ) ? $args['id_input'] : ''
85
- );
86
- }
87
-
88
- /**
89
- * Outputs the file/file_list underscore Javascript templates in the footer.
90
- *
91
- * @since 2.2.4
92
- * @return void
93
- */
94
- public static function output_js_underscore_templates() {
95
- ?>
96
- <script type="text/html" id="tmpl-cmb2-single-image">
97
- <div class="img-status cmb2-media-item">
98
- <img width="{{ data.sizeWidth }}" height="{{ data.sizeHeight }}" src="{{ data.sizeUrl }}" class="cmb-file-field-image" alt="{{ data.filename }}" title="{{ data.filename }}" />
99
- <p><a href="#" class="cmb2-remove-file-button" rel="{{ data.mediaField }}">{{ data.stringRemoveImage }}</a></p>
100
- </div>
101
- </script>
102
- <script type="text/html" id="tmpl-cmb2-single-file">
103
- <div class="file-status cmb2-media-item">
104
- <span>{{ data.stringFile }} <strong>{{ data.filename }}</strong></span>&nbsp;&nbsp; (<a href="{{ data.url }}" target="_blank" rel="external">{{ data.stringDownload }}</a> / <a href="#" class="cmb2-remove-file-button" rel="{{ data.mediaField }}">{{ data.stringRemoveFile }}</a>)
105
- </div>
106
- </script>
107
- <script type="text/html" id="tmpl-cmb2-list-image">
108
- <li class="img-status cmb2-media-item">
109
- <img width="{{ data.sizeWidth }}" height="{{ data.sizeHeight }}" src="{{ data.sizeUrl }}" class="cmb-file_list-field-image" alt="{{ data.filename }}">
110
- <p><a href="#" class="cmb2-remove-file-button" rel="{{ data.mediaField }}[{{ data.id }}]">{{ data.stringRemoveImage }}</a></p>
111
- <input type="hidden" id="filelist-{{ data.id }}" data-id="{{ data.id }}" name="{{ data.mediaFieldName }}[{{ data.id }}]" value="{{ data.url }}">
112
- </li>
113
- </script>
114
- <script type="text/html" id="tmpl-cmb2-list-file">
115
- <li class="file-status cmb2-media-item">
116
- <span>{{ data.stringFile }} <strong>{{ data.filename }}</strong></span>&nbsp;&nbsp; (<a href="{{ data.url }}" target="_blank" rel="external">{{ data.stringDownload }}</a> / <a href="#" class="cmb2-remove-file-button" rel="{{ data.mediaField }}[{{ data.id }}]">{{ data.stringRemoveFile }}</a>)
117
- <input type="hidden" id="filelist-{{ data.id }}" data-id="{{ data.id }}" name="{{ data.mediaFieldName }}[{{ data.id }}]" value="{{ data.url }}">
118
- </li>
119
- </script>
120
- <?php
121
- }
122
-
123
- /**
124
- * Utility method to return an array of meta data for a registered image size
125
- *
126
- * Uses CMB2_Utils::get_named_size() to get the closest available named size
127
- * from an array of width and height values and CMB2_Utils::get_available_image_sizes()
128
- * to get the meta data associated with a named size.
129
- *
130
- * @since 2.2.4
131
- * @param array|string $img_size Image size. Accepts an array of width and height (in that order)
132
- * @param string $fallback Size to use if the supplied named size doesn't exist
133
- * @return array Array containing the image size meta data
134
- * $size = (
135
- * 'width' => (int) image size width
136
- * 'height' => (int) image size height
137
- * 'name' => (string) e.g. 'thumbnail'
138
- * )
139
- */
140
- static function get_image_size_data( $img_size = '', $fallback = 'thumbnail' ) {
141
- $data = array();
142
-
143
- if ( is_array( $img_size ) ) {
144
- $data['width'] = intval( $img_size[0] );
145
- $data['height'] = intval( $img_size[1] );
146
- $data['name'] = '';
147
-
148
- // Try and get the closest named size from our array of dimensions
149
- if ( $named_size = CMB2_Utils::get_named_size( $img_size ) ) {
150
- $data['name'] = $named_size;
151
- }
152
- } else {
153
-
154
- $image_sizes = CMB2_Utils::get_available_image_sizes();
155
-
156
- // The 'thumb' alias, which works elsewhere, doesn't work in the wp.media uploader
157
- if ( 'thumb' == $img_size ) {
158
- $img_size = 'thumbnail';
159
- }
160
-
161
- // Named size doesn't exist, use $fallback
162
- if ( ! array_key_exists( $img_size, $image_sizes ) ) {
163
- $img_size = $fallback;
164
- }
165
-
166
- // Get image dimensions from named sizes
167
- $data['width'] = intval( $image_sizes[ $img_size ]['width'] );
168
- $data['height'] = intval( $image_sizes[ $img_size ]['height'] );
169
- $data['name'] = $img_size;
170
- }
171
-
172
- return $data;
173
- }
174
-
175
- /**
176
- * Filters attachment data prepared for JavaScript.
177
- *
178
- * Adds the url, width, height, and orientation for custom sizes to the JavaScript
179
- * object returned by the wp.media uploader. Hooked to 'wp_prepare_attachment_for_js'.
180
- *
181
- * @since 2.2.4
182
- * @param array $response Array of prepared attachment data
183
- * @param int|object $attachment Attachment ID or object
184
- * @param array $meta Array of attachment meta data ( from wp_get_attachment_metadata() )
185
- * @return array filtered $response array
186
- */
187
- public static function prepare_image_sizes_for_js( $response, $attachment, $meta ) {
188
- foreach ( CMB2_Utils::get_available_image_sizes() as $size => $info ) {
189
-
190
- // registered image size exists for this attachment
191
- if ( isset( $meta['sizes'][ $size ] ) ) {
192
-
193
- $attachment_url = wp_get_attachment_url( $attachment->ID );
194
- $base_url = str_replace( wp_basename( $attachment_url ), '', $attachment_url );
195
- $size_meta = $meta['sizes'][ $size ];
196
-
197
- $response['sizes'][ $size ] = array(
198
- 'url' => $base_url . $size_meta['file'],
199
- 'height' => $size_meta['height'],
200
- 'width' => $size_meta['width'],
201
- 'orientation' => $size_meta['height'] > $size_meta['width'] ? 'portrait' : 'landscape',
202
- );
203
- }
204
- }
205
-
206
- return $response;
207
- }
208
-
209
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_File_List.php DELETED
@@ -1,86 +0,0 @@
1
- <?php
2
- /**
3
- * CMB file_list field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_File_List extends CMB2_Type_File_Base {
14
-
15
- public function render() {
16
- $field = $this->field;
17
- $meta_value = $field->escaped_value();
18
- $name = $this->_name();
19
- $img_size = $field->args( 'preview_size' );
20
- $query_args = $field->args( 'query_args' );
21
- $output = '';
22
-
23
- // get an array of image size meta data, fallback to 'thumbnail'
24
- $img_size_data = parent::get_image_size_data( $img_size, 'thumbnail' );
25
-
26
- $output .= parent::render( array(
27
- 'type' => 'hidden',
28
- 'class' => 'cmb2-upload-file cmb2-upload-list',
29
- 'size' => 45,
30
- 'desc' => '',
31
- 'value' => '',
32
- 'data-previewsize' => sprintf( '[%d,%d]', $img_size_data['width'], $img_size_data['height'] ),
33
- 'data-sizename' => $img_size_data['name'],
34
- 'data-queryargs' => ! empty( $query_args ) ? json_encode( $query_args ) : '',
35
- 'js_dependencies' => 'media-editor',
36
- ) );
37
-
38
- $output .= parent::render( array(
39
- 'type' => 'button',
40
- 'class' => 'cmb2-upload-button button-secondary cmb2-upload-list',
41
- 'value' => esc_attr( $this->_text( 'add_upload_files_text', esc_html__( 'Add or Upload Files', 'cmb2' ) ) ),
42
- 'name' => '',
43
- 'id' => '',
44
- ) );
45
-
46
- $output .= '<ul id="' . $this->_id( '-status' ) . '" class="cmb2-media-status cmb-attach-list">';
47
-
48
- if ( $meta_value && is_array( $meta_value ) ) {
49
-
50
- foreach ( $meta_value as $id => $fullurl ) {
51
- $id_input = parent::render( array(
52
- 'type' => 'hidden',
53
- 'value' => $fullurl,
54
- 'name' => $name . '[' . $id . ']',
55
- 'id' => 'filelist-' . $id,
56
- 'data-id' => $id,
57
- 'desc' => '',
58
- 'class' => false,
59
- ) );
60
-
61
- if ( $this->is_valid_img_ext( $fullurl ) ) {
62
-
63
- $output .= $this->img_status_output( array(
64
- 'image' => wp_get_attachment_image( $id, $img_size ),
65
- 'tag' => 'li',
66
- 'id_input' => $id_input,
67
- ) );
68
-
69
- } else {
70
-
71
- $output .= $this->file_status_output( array(
72
- 'value' => $fullurl,
73
- 'tag' => 'li',
74
- 'id_input' => $id_input,
75
- ) );
76
-
77
- }
78
- }
79
- }
80
-
81
- $output .= '</ul>';
82
-
83
- return $this->rendered( $output );
84
- }
85
-
86
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Multi_Base.php DELETED
@@ -1,110 +0,0 @@
1
- <?php
2
- /**
3
- * CMB Multi base field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- abstract class CMB2_Type_Multi_Base extends CMB2_Type_Base {
14
-
15
- /**
16
- * Generates html for an option element
17
- *
18
- * @since 1.1.0
19
- * @param array $args Arguments array containing value, label, and checked boolean
20
- * @return string Generated option element html
21
- */
22
- public function select_option( $args = array() ) {
23
- return sprintf( "\t" . '<option value="%s" %s>%s</option>', $args['value'], selected( isset( $args['checked'] ) && $args['checked'], true, false ), $args['label'] ) . "\n";
24
- }
25
-
26
- /**
27
- * Generates html for list item with input
28
- *
29
- * @since 1.1.0
30
- * @param array $args Override arguments
31
- * @param int $i Iterator value
32
- * @return string Gnerated list item html
33
- */
34
- public function list_input( $args = array(), $i ) {
35
- $a = $this->parse_args( 'list_input', array(
36
- 'type' => 'radio',
37
- 'class' => 'cmb2-option',
38
- 'name' => $this->_name(),
39
- 'id' => $this->_id( $i ),
40
- 'value' => $this->field->escaped_value(),
41
- 'label' => '',
42
- ), $args );
43
-
44
- return sprintf( "\t" . '<li><input%s/> <label for="%s">%s</label></li>' . "\n", $this->concat_attrs( $a, array( 'label' ) ), $a['id'], $a['label'] );
45
- }
46
-
47
- /**
48
- * Generates html for list item with checkbox input
49
- *
50
- * @since 1.1.0
51
- * @param array $args Override arguments
52
- * @param int $i Iterator value
53
- * @return string Gnerated list item html
54
- */
55
- public function list_input_checkbox( $args, $i ) {
56
- $saved_value = $this->field->escaped_value();
57
- if ( is_array( $saved_value ) && in_array( $args['value'], $saved_value ) ) {
58
- $args['checked'] = 'checked';
59
- }
60
- $args['type'] = 'checkbox';
61
- return $this->list_input( $args, $i );
62
- }
63
-
64
- /**
65
- * Generates html for concatenated items
66
- *
67
- * @since 1.1.0
68
- * @param array $args Optional arguments
69
- * @return string Concatenated html items
70
- */
71
- public function concat_items( $args = array() ) {
72
- $field = $this->field;
73
-
74
- $method = isset( $args['method'] ) ? $args['method'] : 'select_option';
75
- unset( $args['method'] );
76
-
77
- $value = null !== $field->escaped_value()
78
- ? $field->escaped_value()
79
- : $field->get_default();
80
-
81
- $value = CMB2_Utils::normalize_if_numeric( $value );
82
-
83
- $concatenated_items = '';
84
- $i = 1;
85
-
86
- $options = array();
87
- if ( $option_none = $field->args( 'show_option_none' ) ) {
88
- $options[''] = $option_none;
89
- }
90
- $options = $options + (array) $field->options();
91
- foreach ( $options as $opt_value => $opt_label ) {
92
-
93
- // Clone args & modify for just this item
94
- $a = $args;
95
-
96
- $a['value'] = $opt_value;
97
- $a['label'] = $opt_label;
98
-
99
- // Check if this option is the value of the input
100
- if ( $value === CMB2_Utils::normalize_if_numeric( $opt_value ) ) {
101
- $a['checked'] = 'checked';
102
- }
103
-
104
- $concatenated_items .= $this->$method( $a, $i++ );
105
- }
106
-
107
- return $concatenated_items;
108
- }
109
-
110
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Multicheck.php DELETED
@@ -1,39 +0,0 @@
1
- <?php
2
- /**
3
- * CMB multicheck field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Multicheck extends CMB2_Type_Radio {
14
-
15
- /**
16
- * The type of radio field
17
- *
18
- * @var string
19
- */
20
- public $type = 'checkbox';
21
-
22
- public function render() {
23
- $classes = false === $this->field->args( 'select_all_button' )
24
- ? 'cmb2-checkbox-list no-select-all cmb2-list'
25
- : 'cmb2-checkbox-list cmb2-list';
26
-
27
- $args = $this->parse_args( $this->type, array(
28
- 'class' => $classes,
29
- 'options' => $this->concat_items( array(
30
- 'name' => $this->_name() . '[]',
31
- 'method' => 'list_input_checkbox',
32
- ) ),
33
- 'desc' => $this->_desc( true ),
34
- ) );
35
-
36
- return $this->rendered( $this->ul( $args ) );
37
- }
38
-
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Oembed.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
- /**
3
- * CMB oembed field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Oembed extends CMB2_Type_Text {
14
-
15
- public function render() {
16
- $field = $this->field;
17
-
18
- $meta_value = trim( $field->escaped_value() );
19
-
20
- $oembed = ! empty( $meta_value )
21
- ? cmb2_ajax()->get_oembed( array(
22
- 'url' => $field->escaped_value(),
23
- 'object_id' => $field->object_id,
24
- 'object_type' => $field->object_type,
25
- 'oembed_args' => array(
26
- 'width' => '640',
27
- ),
28
- 'field_id' => $this->_id(),
29
- ) )
30
- : '';
31
-
32
- return parent::render( array(
33
- 'class' => 'cmb2-oembed regular-text',
34
- 'data-objectid' => $field->object_id,
35
- 'data-objecttype' => $field->object_type,
36
- ) )
37
- . '<p class="cmb-spinner spinner"></p>'
38
- . '<div id="' . $this->_id( '-status' ) . '" class="cmb2-media-status ui-helper-clearfix embed_wrap">' . $oembed . '</div>';
39
- }
40
-
41
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Picker_Base.php DELETED
@@ -1,56 +0,0 @@
1
- <?php
2
- /**
3
- * CMB Picker base field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- abstract class CMB2_Type_Picker_Base extends CMB2_Type_Text {
14
-
15
- /**
16
- * Parse the picker attributes.
17
- *
18
- * @since 2.2.0
19
- * @param string $arg 'date' or 'time'
20
- * @param array $args Optional arguments to modify (else use $this->field->args['attributes'])
21
- * @return array Array of field attributes
22
- */
23
- public function parse_picker_options( $arg = 'date', $args = array() ) {
24
- $att = 'data-' . $arg . 'picker';
25
- $update = empty( $args );
26
- $atts = array();
27
- $format = $this->field->args( $arg . '_format' );
28
-
29
- if ( $js_format = CMB2_Utils::php_to_js_dateformat( $format ) ) {
30
-
31
- if ( $update ) {
32
- $atts = $this->field->args( 'attributes' );
33
- } else {
34
- $atts = isset( $args['attributes'] )
35
- ? $args['attributes']
36
- : $atts;
37
- }
38
-
39
- // Don't override user-provided datepicker values
40
- $data = isset( $atts[ $att ] )
41
- ? json_decode( $atts[ $att ], true )
42
- : array();
43
-
44
- $data[ $arg . 'Format' ] = $js_format;
45
- $atts[ $att ] = function_exists( 'wp_json_encode' )
46
- ? wp_json_encode( $data )
47
- : json_encode( $data );
48
- }
49
-
50
- if ( $update ) {
51
- $this->field->args['attributes'] = $atts;
52
- }
53
-
54
- return array_merge( $args, $atts );
55
- }
56
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Radio.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
- /**
3
- * CMB radio field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Radio extends CMB2_Type_Multi_Base {
14
-
15
- /**
16
- * The type of radio field
17
- *
18
- * @var string
19
- */
20
- public $type = 'radio';
21
-
22
- /**
23
- * Constructor
24
- *
25
- * @since 2.2.2
26
- *
27
- * @param CMB2_Types $types
28
- * @param array $args
29
- */
30
- public function __construct( CMB2_Types $types, $args = array(), $type = '' ) {
31
- parent::__construct( $types, $args );
32
- $this->type = $type ? $type : $this->type;
33
- }
34
-
35
- public function render() {
36
- $args = $this->parse_args( $this->type, array(
37
- 'class' => 'cmb2-radio-list cmb2-list',
38
- 'options' => $this->concat_items( array(
39
- 'label' => 'test',
40
- 'method' => 'list_input',
41
- ) ),
42
- 'desc' => $this->_desc( true ),
43
- ) );
44
-
45
- return $this->rendered( $this->ul( $args ) );
46
- }
47
-
48
- protected function ul( $a ) {
49
- return sprintf( '<ul class="%s">%s</ul>%s', $a['class'], $a['options'], $a['desc'] );
50
- }
51
-
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Select.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- /**
3
- * CMB select field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Select extends CMB2_Type_Multi_Base {
14
-
15
- public function render() {
16
- $a = $this->parse_args( 'select', array(
17
- 'class' => 'cmb2_select',
18
- 'name' => $this->_name(),
19
- 'id' => $this->_id(),
20
- 'desc' => $this->_desc( true ),
21
- 'options' => $this->concat_items(),
22
- ) );
23
-
24
- $attrs = $this->concat_attrs( $a, array( 'desc', 'options' ) );
25
-
26
- return $this->rendered(
27
- sprintf( '<select%s>%s</select>%s', $attrs, $a['options'], $a['desc'] )
28
- );
29
- }
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Select_Timezone.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
- /**
3
- * CMB select_timezone field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Select_Timezone extends CMB2_Type_Select {
14
-
15
- public function render() {
16
-
17
- $this->field->args['default'] = $this->field->get_default()
18
- ? $this->field->get_default()
19
- : CMB2_Utils::timezone_string();
20
-
21
- $this->args = wp_parse_args( $this->args, array(
22
- 'class' => 'cmb2_select cmb2-select-timezone',
23
- 'options' => wp_timezone_choice( $this->field->escaped_value() ),
24
- 'desc' => $this->_desc(),
25
- ) );
26
-
27
- return parent::render();
28
- }
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Taxonomy_Base.php DELETED
@@ -1,157 +0,0 @@
1
- <?php
2
- /**
3
- * CMB Taxonomy base field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- abstract class CMB2_Type_Taxonomy_Base extends CMB2_Type_Multi_Base {
14
-
15
- /**
16
- * Checks if we can get a post object, and if so, uses `get_the_terms` which utilizes caching.
17
- *
18
- * @since 1.0.2
19
- * @return mixed Array of terms on success
20
- */
21
- public function get_object_terms() {
22
- if ( 'options-page' === $this->field->object_type ) {
23
- return $this->options_terms();
24
- }
25
-
26
- if ( 'post' !== $this->field->object_type ) {
27
- return $this->non_post_object_terms();
28
- }
29
-
30
- // WP caches internally so it's better to use
31
- return get_the_terms( $this->field->object_id, $this->field->args( 'taxonomy' ) );
32
- }
33
-
34
- /**
35
- * Gets the term objects for the terms stored via options boxes.
36
- *
37
- * @since 2.2.4
38
- * @return mixed Array of terms on success
39
- */
40
- public function options_terms() {
41
- if ( empty( $this->field->value ) ) {
42
- return array();
43
- }
44
-
45
- $terms = (array) $this->field->value;
46
-
47
- foreach ( $terms as $index => $term ) {
48
- $terms[ $index ] = get_term_by( 'slug', $term, $this->field->args( 'taxonomy' ) );
49
- }
50
-
51
- return $terms;
52
- }
53
-
54
- /**
55
- * For non-post objects, wraps the call to wp_get_object_terms with transient caching.
56
- *
57
- * @since 2.2.4
58
- * @return mixed Array of terms on success
59
- */
60
- public function non_post_object_terms() {
61
- $object_id = $this->field->object_id;
62
- $taxonomy = $this->field->args( 'taxonomy' );
63
-
64
- $cache_key = "cmb-cache-{$taxonomy}-{$object_id}";
65
-
66
- // Check cache
67
- $cached = get_transient( $cache_key );
68
-
69
- if ( ! $cached ) {
70
- $cached = wp_get_object_terms( $object_id, $taxonomy );
71
- // Do our own (minimal) caching. Long enough for a page-load.
72
- set_transient( $cache_key, $cached, 60 );
73
- }
74
-
75
- return $cached;
76
- }
77
-
78
- /**
79
- * Wrapper for `get_terms` to account for changes in WP 4.6 where taxonomy is expected
80
- * as part of the arguments.
81
- *
82
- * @since 2.2.2
83
- * @return mixed Array of terms on success
84
- */
85
- public function get_terms() {
86
- return CMB2_Utils::wp_at_least( '4.5.0' )
87
- ? get_terms( wp_parse_args( $this->field->prop( 'query_args', array() ), array(
88
- 'taxonomy' => $this->field->args( 'taxonomy' ),
89
- 'hide_empty' => false,
90
- ) ) )
91
- : get_terms( $this->field->args( 'taxonomy' ), 'hide_empty=0' );
92
- }
93
-
94
- protected function no_terms_result( $error, $tag = 'li' ) {
95
- if ( is_wp_error( $error ) ) {
96
- $message = $error->get_error_message();
97
- $data = 'data-error="' . esc_attr( $error->get_error_code() ) . '"';
98
- } else {
99
- $message = $this->_text( 'no_terms_text', esc_html__( 'No terms', 'cmb2' ) );
100
- $data = '';
101
- }
102
-
103
- $this->field->args['select_all_button'] = false;
104
-
105
- return sprintf( '<%3$s><label %1$s>%2$s</label></%3$s>', $data, esc_html( $message ), $tag );
106
- }
107
-
108
- public function get_object_term_or_default() {
109
- $saved_terms = $this->get_object_terms();
110
-
111
- return is_wp_error( $saved_terms ) || empty( $saved_terms )
112
- ? $this->field->get_default()
113
- : array_shift( $saved_terms )->slug;
114
- }
115
-
116
- /**
117
- * Takes a list of all tax terms and outputs.
118
- *
119
- * @since 2.2.5
120
- *
121
- * @param array $all_terms Array of all terms.
122
- * @param array|string $saved Array of terms set to the object, or single term slug.
123
- *
124
- * @return string List of terms.
125
- */
126
- protected function loop_terms( $all_terms, $saved_terms ) {
127
- return '';
128
- }
129
-
130
- /**
131
- * Build children hierarchy.
132
- *
133
- * @param object $parent_term The parent term object.
134
- * @param array|string $saved Array of terms set to the object, or single term slug.
135
- *
136
- * @return string List of terms.
137
- */
138
- protected function build_children( $parent_term, $saved ) {
139
- if ( empty( $parent_term->term_id ) ) {
140
- return '';
141
- }
142
-
143
- $this->parent = $parent_term->term_id;
144
-
145
- $terms = $this->get_terms();
146
- $options = '';
147
-
148
- if ( ! empty( $terms ) && is_array( $terms ) ) {
149
- $options = '<li class="cmb2-indented-hierarchy"><ul>';
150
- $options .= $this->loop_terms( $terms, $saved );
151
- $options .= '</ul></li>';
152
- }
153
-
154
- return $options;
155
- }
156
-
157
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php DELETED
@@ -1,77 +0,0 @@
1
- <?php
2
- /**
3
- * CMB taxonomy_multicheck field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Taxonomy_Multicheck extends CMB2_Type_Taxonomy_Base {
14
- protected $counter = 0;
15
-
16
- public function render() {
17
- return $this->rendered(
18
- $this->types->radio( array(
19
- 'class' => $this->get_wrapper_classes(),
20
- 'options' => $this->get_term_options(),
21
- ), 'taxonomy_multicheck' )
22
- );
23
- }
24
-
25
- protected function get_term_options() {
26
- $all_terms = $this->get_terms();
27
-
28
- if ( ! $all_terms || is_wp_error( $all_terms ) ) {
29
- return $this->no_terms_result( $all_terms );
30
- }
31
-
32
- return $this->loop_terms( $all_terms, $this->get_object_term_or_default() );
33
- }
34
-
35
- protected function loop_terms( $all_terms, $saved_terms ) {
36
- $options = '';
37
- foreach ( $all_terms as $term ) {
38
- $options .= $this->list_term_input( $term, $saved_terms );
39
- }
40
-
41
- return $options;
42
- }
43
-
44
- protected function list_term_input( $term, $saved_terms ) {
45
- $args = array(
46
- 'value' => $term->slug,
47
- 'label' => $term->name,
48
- 'type' => 'checkbox',
49
- 'name' => $this->_name() . '[]',
50
- );
51
-
52
- if ( is_array( $saved_terms ) && in_array( $term->slug, $saved_terms ) ) {
53
- $args['checked'] = 'checked';
54
- }
55
-
56
- return $this->list_input( $args, ++$this->counter );
57
- }
58
-
59
- public function get_object_term_or_default() {
60
- $saved_terms = $this->get_object_terms();
61
-
62
- return is_wp_error( $saved_terms ) || empty( $saved_terms )
63
- ? $this->field->get_default()
64
- : wp_list_pluck( $saved_terms, 'slug' );
65
- }
66
-
67
- protected function get_wrapper_classes() {
68
- $classes = 'cmb2-checkbox-list cmb2-list';
69
- if ( false === $this->field->args( 'select_all_button' ) ) {
70
- $classes .= 'no-select-all';
71
- }
72
-
73
- return $classes;
74
-
75
- }
76
-
77
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck_Hierarchical.php DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- /**
3
- * CMB taxonomy_multicheck field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Taxonomy_Multicheck_Hierarchical extends CMB2_Type_Taxonomy_Multicheck {
14
- protected $parent = 0;
15
-
16
- public function render() {
17
- return $this->rendered(
18
- $this->types->radio( array(
19
- 'class' => $this->get_wrapper_classes(),
20
- 'options' => $this->get_term_options(),
21
- ), 'taxonomy_multicheck_hierarchical' )
22
- );
23
- }
24
-
25
- protected function list_term_input( $term, $saved_terms ) {
26
- $options = parent::list_term_input( $term, $saved_terms );
27
- $children = $this->build_children( $term, $saved_terms );
28
-
29
- if ( ! empty( $children ) ) {
30
- $options .= $children;
31
- }
32
-
33
- return $options;
34
- }
35
-
36
- public function get_terms() {
37
- return CMB2_Utils::wp_at_least( '4.5.0' )
38
- ? get_terms( wp_parse_args( $this->field->prop( 'query_args', array() ), array(
39
- 'taxonomy' => $this->field->args( 'taxonomy' ),
40
- 'hide_empty' => false,
41
- 'parent' => $this->parent,
42
- ) ) )
43
- : get_terms( $this->field->args( 'taxonomy' ), 'hide_empty=0&parent=0' );
44
- }
45
-
46
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php DELETED
@@ -1,92 +0,0 @@
1
- <?php
2
- /**
3
- * CMB taxonomy_radio field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Taxonomy_Radio extends CMB2_Type_Taxonomy_Base {
14
- protected $counter = 0;
15
-
16
- public function render() {
17
- return $this->rendered(
18
- $this->types->radio( array(
19
- 'options' => $this->get_term_options(),
20
- ), 'taxonomy_radio' )
21
- );
22
- }
23
-
24
- protected function get_term_options() {
25
- $all_terms = $this->get_terms();
26
-
27
- if ( ! $all_terms || is_wp_error( $all_terms ) ) {
28
- return $this->no_terms_result( $all_terms );
29
- }
30
-
31
- $saved_term = $this->get_object_term_or_default();
32
- $option_none = $this->field->args( 'show_option_none' );
33
- $options = '';
34
-
35
- if ( ! empty( $option_none ) ) {
36
-
37
- $field_id = $this->_id();
38
-
39
- /**
40
- * Default (option-none) taxonomy-radio value.
41
- *
42
- * @since 1.3.0
43
- *
44
- * @param string $option_none_value Default (option-none) taxonomy-radio value.
45
- */
46
- $option_none_value = apply_filters( 'cmb2_taxonomy_radio_default_value', '' );
47
-
48
- /**
49
- * Default (option-none) taxonomy-radio value.
50
- *
51
- * The dynamic portion of the hook name, $field_id, refers to the field id attribute.
52
- *
53
- * @since 1.3.0
54
- *
55
- * @param string $option_none_value Default (option-none) taxonomy-radio value.
56
- */
57
- $option_none_value = apply_filters( "cmb2_taxonomy_radio_{$field_id}_default_value", $option_none_value );
58
-
59
- $options .= $this->list_term_input( (object) array(
60
- 'slug' => $option_none_value,
61
- 'name' => $option_none,
62
- ), $saved_term );
63
- }
64
-
65
- $options .= $this->loop_terms( $all_terms, $saved_term );
66
-
67
- return $options;
68
- }
69
-
70
- protected function loop_terms( $all_terms, $saved_term ) {
71
- $options = '';
72
- foreach ( $all_terms as $term ) {
73
- $options .= $this->list_term_input( $term, $saved_term );
74
- }
75
-
76
- return $options;
77
- }
78
-
79
- protected function list_term_input( $term, $saved_term ) {
80
- $args = array(
81
- 'value' => $term->slug,
82
- 'label' => $term->name,
83
- );
84
-
85
- if ( $saved_term == $term->slug ) {
86
- $args['checked'] = 'checked';
87
- }
88
-
89
- return $this->list_input( $args, ++$this->counter );
90
- }
91
-
92
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Taxonomy_Radio_Hierarchical.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
- /**
3
- * CMB taxonomy_multicheck field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Taxonomy_Radio_Hierarchical extends CMB2_Type_Taxonomy_Radio {
14
- protected $parent = 0;
15
-
16
- public function render() {
17
- return $this->rendered(
18
- $this->types->radio( array(
19
- 'options' => $this->get_term_options(),
20
- ), 'taxonomy_radio_hierarchical' )
21
- );
22
- }
23
-
24
- protected function list_term_input( $term, $saved_term ) {
25
- $options = parent::list_term_input( $term, $saved_term );
26
- $children = $this->build_children( $term, $saved_term );
27
-
28
- if ( ! empty( $children ) ) {
29
- $options .= $children;
30
- }
31
-
32
- return $options;
33
- }
34
-
35
- public function get_terms() {
36
- return CMB2_Utils::wp_at_least( '4.5.0' )
37
- ? get_terms( wp_parse_args( $this->field->prop( 'query_args', array() ), array(
38
- 'taxonomy' => $this->field->args( 'taxonomy' ),
39
- 'hide_empty' => false,
40
- 'parent' => $this->parent,
41
- ) ) )
42
- : get_terms( $this->field->args( 'taxonomy' ), 'hide_empty=0&parent=0' );
43
- }
44
-
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php DELETED
@@ -1,79 +0,0 @@
1
- <?php
2
- /**
3
- * CMB taxonomy_select field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Taxonomy_Select extends CMB2_Type_Taxonomy_Base {
14
-
15
- public function render() {
16
- $all_terms = $this->get_terms();
17
-
18
- if ( ! $all_terms || is_wp_error( $all_terms ) ) {
19
- return $this->no_terms_result( $all_terms, 'strong' );
20
- }
21
-
22
- $saved_term = $this->get_object_term_or_default();
23
- $option_none = $this->field->args( 'show_option_none' );
24
- $options = '';
25
-
26
- if ( ! empty( $option_none ) ) {
27
-
28
- $field_id = $this->_id();
29
-
30
- /**
31
- * Default (option-none) taxonomy-select value.
32
- *
33
- * @since 1.3.0
34
- *
35
- * @param string $option_none_value Default (option-none) taxonomy-select value.
36
- */
37
- $option_none_value = apply_filters( 'cmb2_taxonomy_select_default_value', '' );
38
-
39
- /**
40
- * Default (option-none) taxonomy-select value.
41
- *
42
- * The dynamic portion of the hook name, $field_id, refers to the field id attribute.
43
- *
44
- * @since 1.3.0
45
- *
46
- * @param string $option_none_value Default (option-none) taxonomy-select value.
47
- */
48
- $option_none_value = apply_filters( "cmb2_taxonomy_select_{$field_id}_default_value", $option_none_value );
49
-
50
- $options .= $this->select_option( array(
51
- 'label' => $option_none,
52
- 'value' => $option_none_value,
53
- 'checked' => $saved_term == $option_none_value,
54
- ) );
55
- }
56
-
57
- $options .= $this->loop_terms( $all_terms, $saved_term );
58
-
59
- return $this->rendered(
60
- $this->types->select( array(
61
- 'options' => $options,
62
- ) )
63
- );
64
- }
65
-
66
- protected function loop_terms( $all_terms, $saved_term ) {
67
- $options = '';
68
-
69
- foreach ( $all_terms as $term ) {
70
- $options .= $this->select_option( array(
71
- 'label' => $term->name,
72
- 'value' => $term->slug,
73
- 'checked' => $saved_term === $term->slug,
74
- ) );
75
- }
76
-
77
- return $options;
78
- }
79
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Text.php DELETED
@@ -1,62 +0,0 @@
1
- <?php
2
- /**
3
- * CMB text field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Text extends CMB2_Type_Base {
14
-
15
- /**
16
- * The type of field
17
- *
18
- * @var string
19
- */
20
- public $type = 'input';
21
-
22
- /**
23
- * Constructor
24
- *
25
- * @since 2.2.2
26
- *
27
- * @param CMB2_Types $types
28
- * @param array $args
29
- */
30
- public function __construct( CMB2_Types $types, $args = array(), $type = '' ) {
31
- parent::__construct( $types, $args );
32
- $this->type = $type ? $type : $this->type;
33
- }
34
-
35
- /**
36
- * Handles outputting an 'input' element
37
- *
38
- * @since 1.1.0
39
- * @param array $args Override arguments
40
- * @return string Form input element
41
- */
42
- public function render( $args = array() ) {
43
- $args = empty( $args ) ? $this->args : $args;
44
- $a = $this->parse_args( $this->type, array(
45
- 'type' => 'text',
46
- 'class' => 'regular-text',
47
- 'name' => $this->_name(),
48
- 'id' => $this->_id(),
49
- 'value' => $this->field->escaped_value(),
50
- 'desc' => $this->_desc( true ),
51
- 'js_dependencies' => array(),
52
- ), $args );
53
-
54
- if ( ! empty( $a['js_dependencies'] ) ) {
55
- $this->field->add_js_dependencies( $a['js_dependencies'] );
56
- }
57
-
58
- return $this->rendered(
59
- sprintf( '<input%s/>%s', $this->concat_attrs( $a, array( 'desc', 'js_dependencies' ) ), $a['desc'] )
60
- );
61
- }
62
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Text_Date.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- /**
3
- * CMB text_date field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Text_Date extends CMB2_Type_Picker_Base {
14
-
15
- public function render() {
16
- $args = $this->parse_args( 'text_date', array(
17
- 'class' => 'cmb2-text-small cmb2-datepicker',
18
- 'value' => $this->field->get_timestamp_format(),
19
- 'desc' => $this->_desc(),
20
- 'js_dependencies' => array( 'jquery-ui-core', 'jquery-ui-datepicker' ),
21
- ) );
22
-
23
- if ( false === strpos( $args['class'], 'timepicker' ) ) {
24
- $this->parse_picker_options( 'date' );
25
- }
26
-
27
- return parent::render( $args );
28
- }
29
-
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp.php DELETED
@@ -1,73 +0,0 @@
1
- <?php
2
- /**
3
- * CMB text_datetime_timestamp field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Text_Datetime_Timestamp extends CMB2_Type_Picker_Base {
14
-
15
- public function render() {
16
- $field = $this->field;
17
-
18
- $args = wp_parse_args( $this->args, array(
19
- 'value' => $field->escaped_value(),
20
- 'desc' => $this->_desc(),
21
- 'datepicker' => array(),
22
- 'timepicker' => array(),
23
- ) );
24
-
25
- if ( empty( $args['value'] ) ) {
26
- $args['value'] = $field->escaped_value();
27
- // This will be used if there is a select_timezone set for this field
28
- $tz_offset = $field->field_timezone_offset();
29
- if ( ! empty( $tz_offset ) ) {
30
- $args['value'] -= $tz_offset;
31
- }
32
- }
33
-
34
- $has_good_value = ! empty( $args['value'] ) && ! is_array( $args['value'] );
35
-
36
- $date_input = parent::render( $this->date_args( $args, $has_good_value ) );
37
- $time_input = parent::render( $this->time_args( $args, $has_good_value ) );
38
-
39
- return $this->rendered( $date_input . "\n" . $time_input );
40
- }
41
-
42
- public function date_args( $args, $has_good_value ) {
43
- $date_args = wp_parse_args( $args['datepicker'], array(
44
- 'class' => 'cmb2-text-small cmb2-datepicker',
45
- 'name' => $this->_name( '[date]' ),
46
- 'id' => $this->_id( '_date' ),
47
- 'value' => $has_good_value ? $this->field->get_timestamp_format( 'date_format', $args['value'] ) : '',
48
- 'desc' => '',
49
- ) );
50
-
51
- $date_args['rendered'] = true;
52
-
53
- // Let's get the date-format, and set it up as a data attr for the field.
54
- return $this->parse_picker_options( 'date', $date_args );
55
- }
56
-
57
- public function time_args( $args, $has_good_value ) {
58
- $time_args = wp_parse_args( $args['timepicker'], array(
59
- 'class' => 'cmb2-timepicker text-time',
60
- 'name' => $this->_name( '[time]' ),
61
- 'id' => $this->_id( '_time' ),
62
- 'value' => $has_good_value ? $this->field->get_timestamp_format( 'time_format', $args['value'] ) : '',
63
- 'desc' => $args['desc'],
64
- 'js_dependencies' => array( 'jquery-ui-core', 'jquery-ui-datepicker', 'jquery-ui-datetimepicker' ),
65
- ) );
66
-
67
- $time_args['rendered'] = true;
68
-
69
- // Let's get the time-format, and set it up as a data attr for the field.
70
- return $this->parse_picker_options( 'time', $time_args );
71
- }
72
-
73
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php DELETED
@@ -1,61 +0,0 @@
1
- <?php
2
- /**
3
- * CMB text_datetime_timestamp_timezone field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Text_Datetime_Timestamp_Timezone extends CMB2_Type_Base {
14
-
15
- public function render() {
16
- $field = $this->field;
17
-
18
- $args = wp_parse_args( $this->args, array(
19
- 'value' => $field->escaped_value(),
20
- 'desc' => $this->_desc( true ),
21
- 'text_datetime_timestamp' => array(),
22
- 'select_timezone' => array(),
23
- ) );
24
-
25
- $args['value'] = $field->escaped_value();
26
- if ( is_array( $args['value'] ) ) {
27
- $args['value'] = '';
28
- }
29
-
30
- $datetime = maybe_unserialize( $args['value'] );
31
- $value = $tzstring = '';
32
-
33
- if ( $datetime && $datetime instanceof DateTime ) {
34
- $tz = $datetime->getTimezone();
35
- $tzstring = $tz->getName();
36
- $value = $datetime->getTimestamp();
37
- }
38
-
39
- $timestamp_args = wp_parse_args( $args['text_datetime_timestamp'], array(
40
- 'desc' => '',
41
- 'value' => $value,
42
- 'rendered' => true,
43
- ) );
44
- $datetime_timestamp = $this->types->text_datetime_timestamp( $timestamp_args );
45
-
46
- $timezone_select_args = wp_parse_args( $args['select_timezone'], array(
47
- 'class' => 'cmb2_select cmb2-select-timezone',
48
- 'name' => $this->_name( '[timezone]' ),
49
- 'id' => $this->_id( '_timezone' ),
50
- 'options' => wp_timezone_choice( $tzstring ),
51
- 'desc' => $args['desc'],
52
- 'rendered' => true,
53
- ) );
54
- $select = $this->types->select( $timezone_select_args );
55
-
56
- return $this->rendered(
57
- $datetime_timestamp . "\n" . $select
58
- );
59
- }
60
-
61
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Text_Time.php DELETED
@@ -1,25 +0,0 @@
1
- <?php
2
- /**
3
- * CMB text_time field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Text_Time extends CMB2_Type_Text_Date {
14
-
15
- public function render() {
16
- $this->args = $this->parse_picker_options( 'time', wp_parse_args( $this->args, array(
17
- 'class' => 'cmb2-timepicker text-time',
18
- 'value' => $this->field->get_timestamp_format( 'time_format' ),
19
- 'js_dependencies' => array( 'jquery-ui-core', 'jquery-ui-datepicker', 'jquery-ui-datetimepicker' ),
20
- ) ) );
21
-
22
- return parent::render();
23
- }
24
-
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Textarea.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
- /**
3
- * CMB textarea field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Textarea extends CMB2_Type_Base {
14
-
15
- /**
16
- * Handles outputting an 'textarea' element
17
- *
18
- * @since 1.1.0
19
- * @param array $args Override arguments
20
- * @return string Form textarea element
21
- */
22
- public function render( $args = array() ) {
23
- $args = empty( $args ) ? $this->args : $args;
24
- $a = $this->parse_args( 'textarea', array(
25
- 'class' => 'cmb2_textarea',
26
- 'name' => $this->_name(),
27
- 'id' => $this->_id(),
28
- 'cols' => 60,
29
- 'rows' => 10,
30
- 'value' => $this->field->escaped_value( 'esc_textarea' ),
31
- 'desc' => $this->_desc( true ),
32
- ), $args );
33
-
34
- return $this->rendered(
35
- sprintf( '<textarea%s>%s</textarea>%s', $this->concat_attrs( $a, array( 'desc', 'value' ) ), $a['value'], $a['desc'] )
36
- );
37
- }
38
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Textarea_Code.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- /**
3
- * CMB textarea_code field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Textarea_Code extends CMB2_Type_Textarea {
14
-
15
- /**
16
- * Handles outputting an 'textarea' element
17
- *
18
- * @since 1.1.0
19
- * @param array $args Override arguments
20
- * @return string Form textarea element
21
- */
22
- public function render() {
23
- return $this->rendered(
24
- sprintf( '<pre>%s', parent::render( array(
25
- 'class' => 'cmb2-textarea-code',
26
- 'desc' => '</pre>' . $this->_desc( true ),
27
- ) ) )
28
- );
29
- }
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Title.php DELETED
@@ -1,47 +0,0 @@
1
- <?php
2
- /**
3
- * CMB title field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- */
13
- class CMB2_Type_Title extends CMB2_Type_Base {
14
-
15
- /**
16
- * Handles outputting an 'title' element
17
- *
18
- * @return string Heading element
19
- */
20
- public function render() {
21
- $name = $this->field->args( 'name' );
22
- $tag = 'span';
23
-
24
- if ( ! empty( $name ) ) {
25
- $tag = $this->field->object_type == 'post' ? 'h5' : 'h3';
26
- }
27
-
28
- $a = $this->parse_args( 'title', array(
29
- 'tag' => $tag,
30
- 'class' => empty( $name ) ? 'cmb2-metabox-title-anchor' : 'cmb2-metabox-title',
31
- 'name' => $name,
32
- 'desc' => $this->_desc( true ),
33
- 'id' => str_replace( '_', '-', sanitize_html_class( $this->field->id() ) ),
34
- ) );
35
-
36
- return $this->rendered(
37
- sprintf(
38
- '<%1$s %2$s>%3$s</%1$s>%4$s',
39
- $a['tag'],
40
- $this->concat_attrs( $a, array( 'tag', 'name', 'desc' ) ),
41
- $a['name'],
42
- $a['desc']
43
- )
44
- );
45
- }
46
-
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/includes/types/CMB2_Type_Wysiwyg.php DELETED
@@ -1,92 +0,0 @@
1
- <?php
2
- /**
3
- * CMB wysiwyg field type
4
- *
5
- * @since 2.2.2
6
- *
7
- * @category WordPress_Plugin
8
- * @package CMB2
9
- * @author CMB2 team
10
- * @license GPL-2.0+
11
- * @link https://cmb2.io
12
- *
13
- * @method string _id()
14
- * @method string _desc()
15
- */
16
- class CMB2_Type_Wysiwyg extends CMB2_Type_Textarea {
17
-
18
- /**
19
- * Handles outputting a 'wysiwyg' element
20
- * @since 1.1.0
21
- * @return string Form wysiwyg element
22
- */
23
- public function render() {
24
- $field = $this->field;
25
- $a = $this->parse_args( 'wysiwyg', array(
26
- 'id' => $this->_id(),
27
- 'value' => $field->escaped_value( 'stripslashes' ),
28
- 'desc' => $this->_desc( true ),
29
- 'options' => $field->options(),
30
- ) );
31
-
32
- if ( ! $field->group ) {
33
- return $this->rendered( $this->get_wp_editor( $a ) . $a['desc'] );
34
- }
35
-
36
- // wysiwyg fields in a group need some special handling.
37
-
38
- $field->add_js_dependencies( 'wp-util' );
39
- $field->add_js_dependencies( 'cmb2-wysiwyg' );
40
-
41
- // Hook in our template-output to the footer.
42
- add_action( is_admin() ? 'admin_footer' : 'wp_footer', array( $this, 'add_wysiwyg_template_for_group' ) );
43
-
44
- return $this->rendered(
45
- sprintf( '<div class="cmb2-wysiwyg-wrap">%s', parent::render( array(
46
- 'class' => 'cmb2_textarea cmb2-wysiwyg-placeholder',
47
- 'data-groupid' => $field->group->id(),
48
- 'data-iterator' => $field->group->index,
49
- 'data-fieldid' => $field->id( true ),
50
- 'desc' => '</div>' . $this->_desc( true ),
51
- ) ) )
52
- );
53
- }
54
-
55
- protected function get_wp_editor( $args ) {
56
- ob_start();
57
- wp_editor( $args['value'], $args['id'], $args['options'] );
58
- return ob_get_clean();
59
- }
60
-
61
- public function add_wysiwyg_template_for_group() {
62
- $group_id = $this->field->group->id();
63
- $field_id = $this->field->id( true );
64
- $options = $this->field->options();
65
- $options['textarea_name'] = 'cmb2_n_' . $group_id . $field_id;
66
-
67
- // Initate the editor with special id/value/name so we can retrieve the options in JS.
68
- $editor = $this->get_wp_editor( array(
69
- 'value' => 'cmb2_v_' . $group_id . $field_id,
70
- 'id' => 'cmb2_i_' . $group_id . $field_id,
71
- 'options' => $options,
72
- ) );
73
-
74
- // Then replace the special id/value/name with underscore placeholders.
75
- $editor = str_replace( array(
76
- 'cmb2_n_' . $group_id . $field_id,
77
- 'cmb2_v_' . $group_id . $field_id,
78
- 'cmb2_i_' . $group_id . $field_id,
79
- ), array(
80
- '{{ data.name }}',
81
- '{{{ data.value }}}',
82
- '{{ data.id }}',
83
- ), $editor );
84
-
85
- // And put the editor instance in a JS template wrapper.
86
- echo '<script type="text/template" id="tmpl-cmb2-wysiwyg-' . $group_id . '-' . $field_id . '">';
87
- // Need to wrap the template in a wrapper div w/ specific data attributes which will be used when adding/removing rows.
88
- echo '<div class="cmb2-wysiwyg-inner-wrap" data-iterator="{{ data.iterator }}" data-groupid="' . $group_id . '" data-id="' . $field_id . '">' . $editor . '</div>';
89
- echo '</script>';
90
- }
91
-
92
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/index.php DELETED
@@ -1 +0,0 @@
1
- <?php // Silence is golden.
 
trunk/vendor/webdevstudios/cmb2/init.php DELETED
@@ -1,194 +0,0 @@
1
- <?php
2
- /**
3
- * The initation loader for CMB2, and the main plugin file.
4
- *
5
- * @category WordPress_Plugin
6
- * @package CMB2
7
- * @author CMB2 team
8
- * @license GPL-2.0+
9
- * @link https://cmb2.io
10
- *
11
- * Plugin Name: CMB2
12
- * Plugin URI: https://github.com/CMB2/CMB2
13
- * Description: CMB2 will create metaboxes and forms with custom fields that will blow your mind.
14
- * Author: CMB2 team
15
- * Author URI: https://cmb2.io
16
- * Contributors: Justin Sternberg (@jtsternberg / dsgnwrks.pro)
17
- * WebDevStudios (@webdevstudios / webdevstudios.com)
18
- * Zao (zao.is)
19
- * Human Made (@humanmadeltd / hmn.md)
20
- * Jared Atchison (@jaredatch / jaredatchison.com)
21
- * Bill Erickson (@billerickson / billerickson.net)
22
- * Andrew Norcross (@norcross / andrewnorcross.com)
23
- *
24
- * Version: 2.2.5.3
25
- *
26
- * Text Domain: cmb2
27
- * Domain Path: languages
28
- *
29
- *
30
- * Released under the GPL license
31
- * http://www.opensource.org/licenses/gpl-license.php
32
- *
33
- * This is an add-on for WordPress
34
- * https://wordpress.org/
35
- *
36
- * **********************************************************************
37
- * This program is free software; you can redistribute it and/or modify
38
- * it under the terms of the GNU General Public License as published by
39
- * the Free Software Foundation; either version 2 of the License, or
40
- * (at your option) any later version.
41
- *
42
- * This program is distributed in the hope that it will be useful,
43
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
44
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45
- * GNU General Public License for more details.
46
- * **********************************************************************
47
- */
48
-
49
- /**
50
- * *********************************************************************
51
- * You should not edit the code below
52
- * (or any code in the included files)
53
- * or things might explode!
54
- * ***********************************************************************
55
- */
56
-
57
- if ( ! class_exists( 'CMB2_Bootstrap_2253', false ) ) {
58
-
59
- /**
60
- * Handles checking for and loading the newest version of CMB2
61
- *
62
- * @since 2.0.0
63
- *
64
- * @category WordPress_Plugin
65
- * @package CMB2
66
- * @author CMB2 team
67
- * @license GPL-2.0+
68
- * @link https://cmb2.io
69
- */
70
- class CMB2_Bootstrap_2253 {
71
-
72
- /**
73
- * Current version number
74
- *
75
- * @var string
76
- * @since 1.0.0
77
- */
78
- const VERSION = '2.2.5.3';
79
-
80
- /**
81
- * Current version hook priority.
82
- * Will decrement with each release
83
- *
84
- * @var int
85
- * @since 2.0.0
86
- */
87
- const PRIORITY = 9973;
88
-
89
- /**
90
- * Single instance of the CMB2_Bootstrap_2253 object
91
- *
92
- * @var CMB2_Bootstrap_2253
93
- */
94
- public static $single_instance = null;
95
-
96
- /**
97
- * Creates/returns the single instance CMB2_Bootstrap_2253 object
98
- *
99
- * @since 2.0.0
100
- * @return CMB2_Bootstrap_2253 Single instance object
101
- */
102
- public static function initiate() {
103
- if ( null === self::$single_instance ) {
104
- self::$single_instance = new self();
105
- }
106
- return self::$single_instance;
107
- }
108
-
109
- /**
110
- * Starts the version checking process.
111
- * Creates CMB2_LOADED definition for early detection by other scripts
112
- *
113
- * Hooks CMB2 inclusion to the init hook on a high priority which decrements
114
- * (increasing the priority) with each version release.
115
- *
116
- * @since 2.0.0
117
- */
118
- private function __construct() {
119
- /**
120
- * A constant you can use to check if CMB2 is loaded
121
- * for your plugins/themes with CMB2 dependency
122
- */
123
- if ( ! defined( 'CMB2_LOADED' ) ) {
124
- define( 'CMB2_LOADED', self::PRIORITY );
125
- }
126
-
127
- add_action( 'init', array( $this, 'include_cmb' ), self::PRIORITY );
128
- }
129
-
130
- /**
131
- * A final check if CMB2 exists before kicking off our CMB2 loading.
132
- * CMB2_VERSION and CMB2_DIR constants are set at this point.
133
- *
134
- * @since 2.0.0
135
- */
136
- public function include_cmb() {
137
- if ( class_exists( 'CMB2', false ) ) {
138
- return;
139
- }
140
-
141
- if ( ! defined( 'CMB2_VERSION' ) ) {
142
- define( 'CMB2_VERSION', self::VERSION );
143
- }
144
-
145
- if ( ! defined( 'CMB2_DIR' ) ) {
146
- define( 'CMB2_DIR', trailingslashit( dirname( __FILE__ ) ) );
147
- }
148
-
149
- $this->l10ni18n();
150
-
151
- // Include helper functions.
152
- require_once CMB2_DIR . 'includes/CMB2_Base.php';
153
- require_once CMB2_DIR . 'includes/CMB2.php';
154
- require_once CMB2_DIR . 'includes/helper-functions.php';
155
-
156
- // Now kick off the class autoloader.
157
- spl_autoload_register( 'cmb2_autoload_classes' );
158
-
159
- // Kick the whole thing off.
160
- require_once( cmb2_dir( 'bootstrap.php' ) );
161
- cmb2_bootstrap();
162
- }
163
-
164
- /**
165
- * Registers CMB2 text domain path
166
- *
167
- * @since 2.0.0
168
- */
169
- public function l10ni18n() {
170
-
171
- $loaded = load_plugin_textdomain( 'cmb2', false, '/languages/' );
172
-
173
- if ( ! $loaded ) {
174
- $loaded = load_muplugin_textdomain( 'cmb2', '/languages/' );
175
- }
176
-
177
- if ( ! $loaded ) {
178
- $loaded = load_theme_textdomain( 'cmb2', get_stylesheet_directory() . '/languages/' );
179
- }
180
-
181
- if ( ! $loaded ) {
182
- $locale = apply_filters( 'plugin_locale', get_locale(), 'cmb2' );
183
- $mofile = dirname( __FILE__ ) . '/languages/cmb2-' . $locale . '.mo';
184
- load_textdomain( 'cmb2', $mofile );
185
- }
186
-
187
- }
188
-
189
- }
190
-
191
- // Make it so...
192
- CMB2_Bootstrap_2253::initiate();
193
-
194
- }// End if().
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/js/cmb2-wysiwyg.js DELETED
@@ -1,331 +0,0 @@
1
- /**
2
- * Used for WYSIWYG logic
3
- */
4
- window.CMB2 = window.CMB2 || {};
5
- window.CMB2.wysiwyg = window.CMB2.wysiwyg || {};
6
-
7
- ( function(window, document, $, wysiwyg, undefined ) {
8
- 'use strict';
9
-
10
- // Private variables
11
- var toBeDestroyed = [];
12
- var toBeInitialized = [];
13
- var all = wysiwyg.all = {};
14
-
15
- // Private functions
16
-
17
- /**
18
- * Initializes any editors that weren't initialized because they didn't exist yet.
19
- *
20
- * @since 2.2.3
21
- *
22
- * @return {void}
23
- */
24
- function delayedInit() {
25
-
26
- // Don't initialize until they've all been destroyed.
27
- if ( 0 === toBeDestroyed.length ) {
28
- toBeInitialized.forEach( function ( toInit ) {
29
- toBeInitialized.splice( toBeInitialized.indexOf( toInit ), 1 );
30
- wysiwyg.init.apply( wysiwyg, toInit );
31
- } );
32
- } else {
33
- window.setTimeout( delayedInit, 100 );
34
- }
35
- }
36
-
37
- /**
38
- * Destroys any editors that weren't destroyed because they didn't exist yet.
39
- *
40
- * @since 2.2.3
41
- *
42
- * @return {void}
43
- */
44
- function delayedDestroy() {
45
- toBeDestroyed.forEach( function( id ) {
46
- toBeDestroyed.splice( toBeDestroyed.indexOf( id ), 1 );
47
- wysiwyg.destroy( id );
48
- } );
49
- }
50
-
51
- /**
52
- * Gets the option data for a group (and initializes that data if it doesn't exist).
53
- *
54
- * @since 2.2.3
55
- *
56
- * @param {object} data The group/field data.
57
- *
58
- * @return {object} Options data object for a group.
59
- */
60
- function getGroupData( data ) {
61
- var groupid = data.groupid;
62
- var fieldid = data.fieldid;
63
-
64
- if ( ! all[ groupid ] || ! all[ groupid ][ fieldid ] ) {
65
- all[ groupid ] = all[ groupid ] || {};
66
- all[ groupid ][ fieldid ] = {
67
- template : wp.template( 'cmb2-wysiwyg-' + groupid + '-' + fieldid ),
68
- defaults : {
69
-
70
- // Get the data from the template-wysiwyg initiation.
71
- mce : $.extend( {}, tinyMCEPreInit.mceInit[ 'cmb2_i_' + groupid + fieldid ] ),
72
- qt : $.extend( {}, tinyMCEPreInit.qtInit[ 'cmb2_i_' + groupid + fieldid ] )
73
- }
74
- };
75
- // This is the template-wysiwyg data, and we do not want that to be initiated.
76
- delete tinyMCEPreInit.mceInit[ 'cmb2_i_' + groupid + fieldid ];
77
- delete tinyMCEPreInit.qtInit[ 'cmb2_i_' + groupid + fieldid ];
78
- }
79
-
80
- return all[ groupid ][ fieldid ];
81
- }
82
-
83
- /**
84
- * Initiates the tinyMCEPreInit options for a wysiwyg editor instance.
85
- *
86
- * @since 2.2.3
87
- *
88
- * @param {object} options Options data object for the wysiwyg editor instance.
89
- *
90
- * @return {void}
91
- */
92
- function initOptions( options ) {
93
- var nameRegex = new RegExp( 'cmb2_n_' + options.groupid + options.fieldid, 'g' );
94
- var idRegex = new RegExp( 'cmb2_i_' + options.groupid + options.fieldid, 'g' );
95
- var prop, newSettings, newQTS;
96
-
97
- // If no settings for this field. Clone from placeholder.
98
- if ( 'undefined' === typeof( tinyMCEPreInit.mceInit[ options.id ] ) ) {
99
- newSettings = $.extend( {}, options.defaults.mce );
100
- for ( prop in newSettings ) {
101
- if ( 'string' === typeof( newSettings[ prop ] ) ) {
102
- newSettings[ prop ] = newSettings[ prop ]
103
- .replace( idRegex, options.id )
104
- .replace( nameRegex, options.name );
105
- }
106
- }
107
- tinyMCEPreInit.mceInit[ options.id ] = newSettings;
108
- }
109
-
110
- // If no Quicktag settings for this field. Clone from placeholder.
111
- if ( 'undefined' === typeof( tinyMCEPreInit.qtInit[ options.id ] ) ) {
112
- newQTS = $.extend( {}, options.defaults.qt );
113
- for ( prop in newQTS ) {
114
- if ( 'string' === typeof( newQTS[ prop ] ) ) {
115
- newQTS[ prop ] = newQTS[ prop ]
116
- .replace( idRegex, options.id )
117
- .replace( nameRegex, options.name );
118
- }
119
- }
120
- tinyMCEPreInit.qtInit[ options.id ] = newQTS;
121
- }
122
- }
123
-
124
- /**
125
- * Initializes all group wysiwyg editors. Hooked to cmb_init.
126
- *
127
- * @since 2.2.3
128
- *
129
- * @return {void}
130
- */
131
- wysiwyg.initAll = function() {
132
- var $this,data,initiated;
133
-
134
- $( '.cmb2-wysiwyg-placeholder' ).each( function() {
135
- $this = $( this );
136
- data = $this.data();
137
-
138
- if ( data.groupid ) {
139
-
140
- data.id = $this.attr( 'id' );
141
- data.name = $this.attr( 'name' );
142
- data.value = $this.val();
143
-
144
- wysiwyg.init( $this, data, false );
145
- initiated = true;
146
- }
147
- } );
148
-
149
- if ( true === initiated ) {
150
- if ( 'undefined' !== typeof window.QTags ) {
151
- window.QTags._buttonsInit();
152
- }
153
-
154
- // Hook in our event callbacks.
155
- $( document )
156
- .on( 'cmb2_add_row', wysiwyg.addRow )
157
- .on( 'cmb2_remove_group_row_start', wysiwyg.destroyRowEditors )
158
- .on( 'cmb2_shift_rows_start', wysiwyg.shiftStart )
159
- .on( 'cmb2_shift_rows_complete', wysiwyg.shiftComplete );
160
- }
161
- };
162
-
163
- /**
164
- * Initiates wysiwyg editors in a new group row. Hooked to cmb2_add_row.
165
- *
166
- * @since 2.2.3
167
- *
168
- * @param {object} evt A jQuery-normalized event object.
169
- * @param {object} $row A jQuery dom element object for the group row.
170
- *
171
- * @return {void}
172
- */
173
- wysiwyg.addRow = function( evt, $row ) {
174
- wysiwyg.initRow( $row );
175
- };
176
-
177
- /**
178
- * Destroys wysiwyg editors in a group row when that row is removed. Hooked to cmb2_remove_group_row_start.
179
- *
180
- * @since 2.2.3
181
- *
182
- * @param {object} evt A jQuery-normalized event object.
183
- * @param {object} $btn A jQuery dom element object for the remove-row button.
184
- *
185
- * @return {void}
186
- */
187
- wysiwyg.destroyRowEditors = function( evt, $btn ) {
188
- wysiwyg.destroy( $btn.parents( '.cmb-repeatable-grouping' ).find( '.wp-editor-area' ).attr( 'id' ) );
189
- };
190
-
191
- /**
192
- * When a row-shift starts, we need to destroy the wysiwyg editors for the group-rows being shuffled.
193
- *
194
- * @since 2.2.3
195
- *
196
- * @param {object} evt A jQuery-normalized event object.
197
- * @param {object} $btn A jQuery dom element object for the remove-row button.
198
- * @param {object} $from A jQuery dom element object for the row being shifted from.
199
- * @param {object} $to A jQuery dom element object for the row being shifted to.
200
- *
201
- * @return {void}
202
- */
203
- wysiwyg.shiftStart = function( evt, $btn, $from, $to ) {
204
- $from.add( $to ).find( '.wp-editor-wrap textarea' ).each( function() {
205
- wysiwyg.destroy( $( this ).attr( 'id' ) );
206
- } );
207
- };
208
-
209
- /**
210
- * When a row-shift completes, we need to re-init the wysiwyg editors for the group-rows being shuffled.
211
- *
212
- * @since 2.2.3
213
- *
214
- * @param {object} evt A jQuery-normalized event object.
215
- * @param {object} $btn A jQuery dom element object for the remove-row button.
216
- * @param {object} $from A jQuery dom element object for the row being shifted from.
217
- * @param {object} $to A jQuery dom element object for the row being shifted to.
218
- *
219
- * @return {void}
220
- */
221
- wysiwyg.shiftComplete = function( evt, $btn, $from, $to ) {
222
- $from.add( $to ).each( function() {
223
- wysiwyg.initRow( $( this ) );
224
- } );
225
- };
226
-
227
- /**
228
- * Initializes editors for a new CMB row.
229
- *
230
- * @since 2.2.3
231
- *
232
- * @param {object} $row A jQuery dom element object for the group row.
233
- *
234
- * @return {void}
235
- */
236
- wysiwyg.initRow = function( $row ) {
237
- var $toReplace, data;
238
-
239
- $row.find( '.cmb2-wysiwyg-inner-wrap' ).each( function() {
240
- $toReplace = $( this );
241
- data = $toReplace.data();
242
-
243
- data.iterator = $row.data( 'iterator' );
244
- data.fieldid = data.id;
245
- data.id = data.groupid + '_' + data.iterator + '_' + data.fieldid;
246
- data.name = data.groupid + '[' + data.iterator + '][' + data.fieldid + ']';
247
- data.value = $toReplace.find( '.wp-editor-area' ).length ? $toReplace.find( '.wp-editor-area' ).val() : '';
248
-
249
- // The destroys might not have happened yet. Don't init until they have.
250
- if ( 0 === toBeDestroyed.length ) {
251
-
252
- wysiwyg.init( $toReplace, data );
253
-
254
- } else {
255
- toBeInitialized.push( [$toReplace, data] );
256
- window.setTimeout( delayedInit, 100 );
257
- }
258
- } );
259
-
260
- };
261
-
262
- /**
263
- * Initiates a wysiwyg editor instance and replaces the passed dom element w/ the editor html.
264
- *
265
- * @since 2.2.3
266
- *
267
- * @param {object} $toReplace A jQuery dom element which will be replaced with the wysiwyg editor.
268
- * @param {object} data Data used to initate the editor.
269
- * @param {bool} buttonsInit Whether to run QTags._buttonsInit()
270
- *
271
- * @return {void}
272
- */
273
- wysiwyg.init = function( $toReplace, data, buttonsInit ) {
274
- if ( ! data.groupid ) {
275
- return false;
276
- }
277
-
278
- $.extend( data, getGroupData( data ) );
279
-
280
- initOptions( data );
281
-
282
- $toReplace.replaceWith( data.template( data ) );
283
-
284
- window.tinyMCE.init( tinyMCEPreInit.mceInit[ data.id ] );
285
- if ( 'function' === typeof window.quicktags ) {
286
- window.quicktags( tinyMCEPreInit.qtInit[ data.id ] );
287
- }
288
-
289
- $( document.getElementById( data.id ) ).parents( '.wp-editor-wrap' ).removeClass( 'html-active' ).addClass( 'tmce-active' );
290
-
291
- if ( false !== buttonsInit && 'undefined' !== typeof window.QTags ) {
292
- window.QTags._buttonsInit();
293
- }
294
-
295
- };
296
-
297
- /**
298
- * Destroys a wysiwyg editor instance.
299
- *
300
- * @since 2.2.3
301
- *
302
- * @param {string} id Editor id.
303
- *
304
- * @return {void}
305
- */
306
- wysiwyg.destroy = function( id ) {
307
-
308
- // The editor might not be initialized yet. But we need to destroy it once it is.
309
- var editor = tinyMCE.get( id );
310
-
311
- if ( editor !== null && typeof( editor ) !== 'undefined' ) {
312
- editor.destroy();
313
-
314
- if ( 'undefined' === typeof( tinyMCEPreInit.mceInit[ id ] ) ) {
315
- delete tinyMCEPreInit.mceInit[ id ];
316
- }
317
-
318
- if ( 'undefined' === typeof( tinyMCEPreInit.qtInit[ id ] ) ) {
319
- delete tinyMCEPreInit.qtInit[ id ];
320
- }
321
-
322
- } else if ( -1 === toBeDestroyed.indexOf( id ) ) {
323
- toBeDestroyed.push( id );
324
- window.setTimeout( delayedDestroy, 100 );
325
- }
326
- };
327
-
328
- // Hook in our event callbacks.
329
- $( document ).on( 'cmb_init', wysiwyg.initAll );
330
-
331
- } )( window, document, jQuery, window.CMB2.wysiwyg );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/js/cmb2.js DELETED
@@ -1,1024 +0,0 @@
1
- /**
2
- * Controls the behaviours of custom metabox fields.
3
- *
4
- * @author CMB2 team
5
- * @see https://github.com/CMB2/CMB2
6
- */
7
-
8
- /**
9
- * Custom jQuery for Custom Metaboxes and Fields
10
- */
11
- window.CMB2 = window.CMB2 || {};
12
- (function(window, document, $, cmb, undefined){
13
- 'use strict';
14
-
15
- // localization strings
16
- var l10n = window.cmb2_l10;
17
- var setTimeout = window.setTimeout;
18
- var $document;
19
- var $id = function( selector ) {
20
- return $( document.getElementById( selector ) );
21
- };
22
- var defaults = {
23
- idNumber : false,
24
- repeatEls : 'input:not([type="button"],[id^=filelist]),select,textarea,.cmb2-media-status',
25
- noEmpty : 'input:not([type="button"]):not([type="radio"]):not([type="checkbox"]),textarea',
26
- repeatUpdate : 'input:not([type="button"]),select,textarea,label',
27
- styleBreakPoint : 450,
28
- mediaHandlers : {},
29
- defaults : {
30
- time_picker : l10n.defaults.time_picker,
31
- date_picker : l10n.defaults.date_picker,
32
- color_picker : l10n.defaults.color_picker || {},
33
- },
34
- media : {
35
- frames : {},
36
- },
37
- };
38
-
39
- cmb.metabox = function() {
40
- if ( cmb.$metabox ) {
41
- return cmb.$metabox;
42
- }
43
- cmb.$metabox = $('.cmb2-wrap > .cmb2-metabox');
44
- return cmb.$metabox;
45
- };
46
-
47
- cmb.init = function() {
48
- $document = $( document );
49
-
50
- // Setup the CMB2 object defaults.
51
- $.extend( cmb, defaults );
52
-
53
- cmb.trigger( 'cmb_pre_init' );
54
-
55
- var $metabox = cmb.metabox();
56
- var $repeatGroup = $metabox.find('.cmb-repeatable-group');
57
-
58
- /**
59
- * Initialize time/date/color pickers
60
- */
61
- cmb.initPickers( $metabox.find('input[type="text"].cmb2-timepicker'), $metabox.find('input[type="text"].cmb2-datepicker'), $metabox.find('input[type="text"].cmb2-colorpicker') );
62
-
63
- // Insert toggle button into DOM wherever there is multicheck. credit: Genesis Framework
64
- $( '<p><span class="button-secondary cmb-multicheck-toggle">' + l10n.strings.check_toggle + '</span></p>' ).insertBefore( '.cmb2-checkbox-list:not(.no-select-all)' );
65
-
66
- // Make File List drag/drop sortable:
67
- cmb.makeListSortable();
68
-
69
- $metabox
70
- .on( 'change', '.cmb2_upload_file', function() {
71
- cmb.media.field = $( this ).attr( 'id' );
72
- $id( cmb.media.field + '_id' ).val('');
73
- })
74
- // Media/file management
75
- .on( 'click', '.cmb-multicheck-toggle', cmb.toggleCheckBoxes )
76
- .on( 'click', '.cmb2-upload-button', cmb.handleMedia )
77
- .on( 'click', '.cmb-attach-list li, .cmb2-media-status .img-status img, .cmb2-media-status .file-status > span', cmb.handleFileClick )
78
- .on( 'click', '.cmb2-remove-file-button', cmb.handleRemoveMedia )
79
- // Repeatable content
80
- .on( 'click', '.cmb-add-group-row', cmb.addGroupRow )
81
- .on( 'click', '.cmb-add-row-button', cmb.addAjaxRow )
82
- .on( 'click', '.cmb-remove-group-row', cmb.removeGroupRow )
83
- .on( 'click', '.cmb-remove-row-button', cmb.removeAjaxRow )
84
- // Ajax oEmbed display
85
- .on( 'keyup paste focusout', '.cmb2-oembed', cmb.maybeOembed )
86
- // Reset titles when removing a row
87
- .on( 'cmb2_remove_row', '.cmb-repeatable-group', cmb.resetTitlesAndIterator )
88
- .on( 'click', '.cmbhandle, .cmbhandle + .cmbhandle-title', cmb.toggleHandle );
89
-
90
- if ( $repeatGroup.length ) {
91
- $repeatGroup
92
- .on( 'cmb2_add_row', cmb.emptyValue )
93
- .filter('.sortable').each( function() {
94
- // Add sorting arrows
95
- $( this ).find( '.cmb-remove-group-row-button' ).before( '<a class="button-secondary cmb-shift-rows move-up alignleft" href="#"><span class="'+ l10n.up_arrow_class +'"></span></a> <a class="button-secondary cmb-shift-rows move-down alignleft" href="#"><span class="'+ l10n.down_arrow_class +'"></span></a>' );
96
- })
97
- .on( 'click', '.cmb-shift-rows', cmb.shiftRows );
98
- }
99
-
100
- // on pageload
101
- setTimeout( cmb.resizeoEmbeds, 500);
102
- // and on window resize
103
- $( window ).on( 'resize', cmb.resizeoEmbeds );
104
-
105
- cmb.trigger( 'cmb_init' );
106
- };
107
-
108
- cmb.resetTitlesAndIterator = function( evt ) {
109
- if ( ! evt.group ) {
110
- return;
111
- }
112
-
113
- // Loop repeatable group tables
114
- $( '.cmb-repeatable-group.repeatable' ).each( function() {
115
- var $table = $( this );
116
- var groupTitle = $table.find( '.cmb-add-group-row' ).data( 'grouptitle' );
117
-
118
- // Loop repeatable group table rows
119
- $table.find( '.cmb-repeatable-grouping' ).each( function( rowindex ) {
120
- var $row = $( this );
121
- var $rowTitle = $row.find( 'h3.cmb-group-title' );
122
- // Reset rows iterator
123
- $row.data( 'iterator', rowindex );
124
- // Reset rows title
125
- if ( $rowTitle.length ) {
126
- $rowTitle.text( groupTitle.replace( '{#}', ( rowindex + 1 ) ) );
127
- }
128
- });
129
- });
130
- };
131
-
132
- cmb.toggleHandle = function( evt ) {
133
- evt.preventDefault();
134
- cmb.trigger( 'postbox-toggled', $( this ).parent('.postbox').toggleClass('closed') );
135
- };
136
-
137
- cmb.toggleCheckBoxes = function( evt ) {
138
- evt.preventDefault();
139
- var $this = $( this );
140
- var $multicheck = $this.closest( '.cmb-td' ).find( 'input[type=checkbox]:not([disabled])' );
141
-
142
- // If the button has already been clicked once...
143
- if ( $this.data( 'checked' ) ) {
144
- // clear the checkboxes and remove the flag
145
- $multicheck.prop( 'checked', false );
146
- $this.data( 'checked', false );
147
- }
148
- // Otherwise mark the checkboxes and add a flag
149
- else {
150
- $multicheck.prop( 'checked', true );
151
- $this.data( 'checked', true );
152
- }
153
- };
154
-
155
- cmb.handleMedia = function( evt ) {
156
- evt.preventDefault();
157
-
158
- var $el = $( this );
159
- cmb.attach_id = ! $el.hasClass( 'cmb2-upload-list' ) ? $el.closest( '.cmb-td' ).find( '.cmb2-upload-file-id' ).val() : false;
160
- // Clean up default 0 value
161
- cmb.attach_id = '0' !== cmb.attach_id ? cmb.attach_id : false;
162
-
163
- cmb._handleMedia( $el.prev('input.cmb2-upload-file').attr('id'), $el.hasClass( 'cmb2-upload-list' ) );
164
- };
165
-
166
- cmb.handleFileClick = function( evt ) {
167
- evt.preventDefault();
168
-
169
- var $el = $( this );
170
- var $td = $el.closest( '.cmb-td' );
171
- var isList = $td.find( '.cmb2-upload-button' ).hasClass( 'cmb2-upload-list' );
172
- cmb.attach_id = isList ? $el.find( 'input[type="hidden"]' ).data( 'id' ) : $td.find( '.cmb2-upload-file-id' ).val();
173
-
174
- if ( cmb.attach_id ) {
175
- cmb._handleMedia( $td.find( 'input.cmb2-upload-file' ).attr( 'id' ), isList, cmb.attach_id );
176
- }
177
- };
178
-
179
- cmb._handleMedia = function( id, isList ) {
180
- if ( ! wp ) {
181
- return;
182
- }
183
-
184
- var media, handlers;
185
-
186
- handlers = cmb.mediaHandlers;
187
- media = cmb.media;
188
- media.field = id;
189
- media.$field = $id( media.field );
190
- media.fieldData = media.$field.data();
191
- media.previewSize = media.fieldData.previewsize;
192
- media.sizeName = media.fieldData.sizename;
193
- media.fieldName = media.$field.attr('name');
194
- media.isList = isList;
195
-
196
- // If this field's media frame already exists, reopen it.
197
- if ( id in media.frames ) {
198
- return media.frames[ id ].open();
199
- }
200
-
201
- // Create the media frame.
202
- media.frames[ id ] = wp.media( {
203
- title: cmb.metabox().find('label[for="' + id + '"]').text(),
204
- library : media.fieldData.queryargs || {},
205
- button: {
206
- text: l10n.strings[ isList ? 'upload_files' : 'upload_file' ]
207
- },
208
- multiple: isList ? 'add' : false
209
- } );
210
-
211
- // Enable the additional media filters: https://github.com/CMB2/CMB2/issues/873
212
- media.frames[ id ].states.first().set( 'filterable', 'all' );
213
-
214
- cmb.trigger( 'cmb_media_modal_init', media );
215
-
216
- handlers.list = function( selection, returnIt ) {
217
-
218
- // Setup our fileGroup array
219
- var fileGroup = [];
220
- var attachmentHtml;
221
-
222
- if ( ! handlers.list.templates ) {
223
- handlers.list.templates = {
224
- image : wp.template( 'cmb2-list-image' ),
225
- file : wp.template( 'cmb2-list-file' ),
226
- };
227
- }
228
-
229
- // Loop through each attachment
230
- selection.each( function( attachment ) {
231
-
232
- // Image preview or standard generic output if it's not an image.
233
- attachmentHtml = handlers.getAttachmentHtml( attachment, 'list' );
234
-
235
- // Add our file to our fileGroup array
236
- fileGroup.push( attachmentHtml );
237
- });
238
-
239
- if ( ! returnIt ) {
240
- // Append each item from our fileGroup array to .cmb2-media-status
241
- media.$field.siblings( '.cmb2-media-status' ).append( fileGroup );
242
- } else {
243
- return fileGroup;
244
- }
245
-
246
- };
247
-
248
- handlers.single = function( selection ) {
249
- if ( ! handlers.single.templates ) {
250
- handlers.single.templates = {
251
- image : wp.template( 'cmb2-single-image' ),
252
- file : wp.template( 'cmb2-single-file' ),
253
- };
254
- }
255
-
256
- // Only get one file from the uploader
257
- var attachment = selection.first();
258
-
259
- media.$field.val( attachment.get( 'url' ) );
260
- $id( media.field +'_id' ).val( attachment.get( 'id' ) );
261
-
262
- // Image preview or standard generic output if it's not an image.
263
- var attachmentHtml = handlers.getAttachmentHtml( attachment, 'single' );
264
-
265
- // add/display our output
266
- media.$field.siblings( '.cmb2-media-status' ).slideDown().html( attachmentHtml );
267
- };
268
-
269
- handlers.getAttachmentHtml = function( attachment, templatesId ) {
270
- var isImage = 'image' === attachment.get( 'type' );
271
- var data = handlers.prepareData( attachment, isImage );
272
-
273
- // Image preview or standard generic output if it's not an image.
274
- return handlers[ templatesId ].templates[ isImage ? 'image' : 'file' ]( data );
275
- };
276
-
277
- handlers.prepareData = function( data, image ) {
278
- if ( image ) {
279
- // Set the correct image size data
280
- handlers.getImageData.call( data, 50 );
281
- }
282
-
283
- data = data.toJSON();
284
- data.mediaField = media.field;
285
- data.mediaFieldName = media.fieldName;
286
- data.stringRemoveImage = l10n.strings.remove_image;
287
- data.stringFile = l10n.strings.file;
288
- data.stringDownload = l10n.strings.download;
289
- data.stringRemoveFile = l10n.strings.remove_file;
290
-
291
- return data;
292
- };
293
-
294
- handlers.getImageData = function( fallbackSize ) {
295
-
296
- // Preview size dimensions
297
- var previewW = media.previewSize[0] || fallbackSize;
298
- var previewH = media.previewSize[1] || fallbackSize;
299
-
300
- // Image dimensions and url
301
- var url = this.get( 'url' );
302
- var width = this.get( 'width' );
303
- var height = this.get( 'height' );
304
- var sizes = this.get( 'sizes' );
305
-
306
- // Get the correct dimensions and url if a named size is set and exists
307
- // fallback to the 'large' size
308
- if ( sizes ) {
309
- if ( sizes[ media.sizeName ] ) {
310
- url = sizes[ media.sizeName ].url;
311
- width = sizes[ media.sizeName ].width;
312
- height = sizes[ media.sizeName ].height;
313
- } else if ( sizes.large ) {
314
- url = sizes.large.url;
315
- width = sizes.large.width;
316
- height = sizes.large.height;
317
- }
318
- }
319
-
320
- // Fit the image in to the preview size, keeping the correct aspect ratio
321
- if ( width > previewW ) {
322
- height = Math.floor( previewW * height / width );
323
- width = previewW;
324
- }
325
-
326
- if ( height > previewH ) {
327
- width = Math.floor( previewH * width / height );
328
- height = previewH;
329
- }
330
-
331
- if ( ! width ) {
332
- width = previewW;
333
- }
334
-
335
- if ( ! height ) {
336
- height = 'svg' === this.get( 'filename' ).split( '.' ).pop() ? '100%' : previewH;
337
- }
338
-
339
- this.set( 'sizeUrl', url );
340
- this.set( 'sizeWidth', width );
341
- this.set( 'sizeHeight', height );
342
-
343
- return this;
344
- };
345
-
346
- handlers.selectFile = function() {
347
- var selection = media.frames[ id ].state().get( 'selection' );
348
- var type = isList ? 'list' : 'single';
349
-
350
- if ( cmb.attach_id && isList ) {
351
- $( '[data-id="'+ cmb.attach_id +'"]' ).parents( 'li' ).replaceWith( handlers.list( selection, true ) );
352
- } else {
353
- handlers[type]( selection );
354
- }
355
-
356
- cmb.trigger( 'cmb_media_modal_select', selection, media );
357
- };
358
-
359
- handlers.openModal = function() {
360
- var selection = media.frames[ id ].state().get( 'selection' );
361
- var attach;
362
-
363
- if ( ! cmb.attach_id ) {
364
- selection.reset();
365
- } else {
366
- attach = wp.media.attachment( cmb.attach_id );
367
- attach.fetch();
368
- selection.set( attach ? [ attach ] : [] );
369
- }
370
-
371
- cmb.trigger( 'cmb_media_modal_open', selection, media );
372
- };
373
-
374
- // When a file is selected, run a callback.
375
- media.frames[ id ]
376
- .on( 'select', handlers.selectFile )
377
- .on( 'open', handlers.openModal );
378
-
379
- // Finally, open the modal
380
- media.frames[ id ].open();
381
- };
382
-
383
- cmb.handleRemoveMedia = function( evt ) {
384
- evt.preventDefault();
385
- var $this = $( this );
386
- if ( $this.is( '.cmb-attach-list .cmb2-remove-file-button' ) ) {
387
- $this.parents( '.cmb2-media-item' ).remove();
388
- return false;
389
- }
390
-
391
- cmb.media.field = $this.attr('rel');
392
-
393
- cmb.metabox().find( document.getElementById( cmb.media.field ) ).val('');
394
- cmb.metabox().find( document.getElementById( cmb.media.field + '_id' ) ).val('');
395
- $this.parents('.cmb2-media-status').html('');
396
-
397
- return false;
398
- };
399
-
400
- cmb.cleanRow = function( $row, prevNum, group ) {
401
- var $elements = $row.find( cmb.repeatUpdate );
402
- if ( group ) {
403
-
404
- var $other = $row.find( '[id]' ).not( cmb.repeatUpdate );
405
-
406
- // Remove extra ajaxed rows
407
- $row.find('.cmb-repeat-table .cmb-repeat-row:not(:first-child)').remove();
408
-
409
- // Update all elements w/ an ID
410
- if ( $other.length ) {
411
- $other.each( function() {
412
- var $_this = $( this );
413
- var oldID = $_this.attr( 'id' );
414
- var newID = oldID.replace( '_'+ prevNum, '_'+ cmb.idNumber );
415
- var $buttons = $row.find('[data-selector="'+ oldID +'"]');
416
- $_this.attr( 'id', newID );
417
-
418
- // Replace data-selector vars
419
- if ( $buttons.length ) {
420
- $buttons.attr( 'data-selector', newID ).data( 'selector', newID );
421
- }
422
- });
423
- }
424
- }
425
-
426
- $elements.filter( ':checked' ).removeAttr( 'checked' );
427
- $elements.find( ':checked' ).removeAttr( 'checked' );
428
- $elements.filter( ':selected' ).removeAttr( 'selected' );
429
- $elements.find( ':selected' ).removeAttr( 'selected', false );
430
-
431
- if ( $row.find('h3.cmb-group-title').length ) {
432
- $row.find( 'h3.cmb-group-title' ).text( $row.data( 'title' ).replace( '{#}', ( cmb.idNumber + 1 ) ) );
433
- }
434
-
435
- $elements.each( function() {
436
- cmb.elReplacements( $( this ), prevNum );
437
- } );
438
-
439
- return cmb;
440
- };
441
-
442
- cmb.elReplacements = function( $newInput, prevNum ) {
443
- var oldFor = $newInput.attr( 'for' );
444
- var oldVal = $newInput.val();
445
- var type = $newInput.prop( 'type' );
446
- var checkable = 'radio' === type || 'checkbox' === type ? oldVal : false;
447
- // var $next = $newInput.next();
448
- var attrs = {};
449
- var newID, oldID;
450
- if ( oldFor ) {
451
- attrs = { 'for' : oldFor.replace( '_'+ prevNum, '_'+ cmb.idNumber ) };
452
- } else {
453
- var oldName = $newInput.attr( 'name' );
454
- // Replace 'name' attribute key
455
- var newName = oldName ? oldName.replace( '['+ prevNum +']', '['+ cmb.idNumber +']' ) : '';
456
- oldID = $newInput.attr( 'id' );
457
- newID = oldID ? oldID.replace( '_'+ prevNum, '_'+ cmb.idNumber ) : '';
458
- attrs = {
459
- id: newID,
460
- name: newName,
461
- 'data-iterator': cmb.idNumber,
462
- };
463
-
464
- }
465
-
466
- // Clear out textarea values
467
- if ( 'TEXTAREA' === $newInput.prop('tagName') ) {
468
- $newInput.html( '' );
469
- }
470
-
471
- if ( checkable ) {
472
- $newInput.removeAttr( 'checked' );
473
- }
474
-
475
- $newInput
476
- .removeClass( 'hasDatepicker' )
477
- .attr( attrs ).val( checkable ? checkable : '' );
478
-
479
- return $newInput;
480
- };
481
-
482
- cmb.newRowHousekeeping = function( $row ) {
483
-
484
- var $colorPicker = $row.find( '.wp-picker-container' );
485
- var $list = $row.find( '.cmb2-media-status' );
486
-
487
- if ( $colorPicker.length ) {
488
- // Need to clean-up colorpicker before appending
489
- $colorPicker.each( function() {
490
- var $td = $( this ).parent();
491
- $td.html( $td.find( 'input[type="text"].cmb2-colorpicker' ).attr('style', '') );
492
- });
493
- }
494
-
495
- // Need to clean-up colorpicker before appending
496
- if ( $list.length ) {
497
- $list.empty();
498
- }
499
-
500
- return cmb;
501
- };
502
-
503
- cmb.afterRowInsert = function( $row ) {
504
- // Init pickers from new row
505
- cmb.initPickers( $row.find('input[type="text"].cmb2-timepicker'), $row.find('input[type="text"].cmb2-datepicker'), $row.find('input[type="text"].cmb2-colorpicker') );
506
- };
507
-
508
- cmb.updateNameAttr = function () {
509
-
510
- var $this = $( this );
511
- var name = $this.attr( 'name' ); // get current name
512
-
513
- // If name is defined
514
- if ( typeof name !== 'undefined' ) {
515
- var prevNum = parseInt( $this.parents( '.cmb-repeatable-grouping' ).data( 'iterator' ), 10 );
516
- var newNum = prevNum - 1; // Subtract 1 to get new iterator number
517
-
518
- // Update field name attributes so data is not orphaned when a row is removed and post is saved
519
- var $newName = name.replace( '[' + prevNum + ']', '[' + newNum + ']' );
520
-
521
- // New name with replaced iterator
522
- $this.attr( 'name', $newName );
523
- }
524
-
525
- };
526
-
527
- cmb.emptyValue = function( evt, row ) {
528
- $( cmb.noEmpty, row ).val( '' );
529
- };
530
-
531
- cmb.addGroupRow = function( evt ) {
532
- evt.preventDefault();
533
-
534
- var $this = $( this );
535
-
536
- // before anything significant happens
537
- cmb.triggerElement( $this, 'cmb2_add_group_row_start', $this );
538
-
539
- var $table = $id( $this.data('selector') );
540
- var $oldRow = $table.find('.cmb-repeatable-grouping').last();
541
- var prevNum = parseInt( $oldRow.data('iterator'), 10 );
542
- cmb.idNumber = parseInt( prevNum, 10 ) + 1;
543
- var $row = $oldRow.clone();
544
-
545
- // Make sure the next number doesn't exist.
546
- while ( $table.find( '.cmb-repeatable-grouping[data-iterator="'+ cmb.idNumber +'"]' ).length > 0 ) {
547
- cmb.idNumber++;
548
- }
549
-
550
- cmb.newRowHousekeeping( $row.data( 'title', $this.data( 'grouptitle' ) ) ).cleanRow( $row, prevNum, true );
551
- $row.find( '.cmb-add-row-button' ).prop( 'disabled', false );
552
-
553
- var $newRow = $( '<div class="postbox cmb-row cmb-repeatable-grouping" data-iterator="'+ cmb.idNumber +'">'+ $row.html() +'</div>' );
554
- $oldRow.after( $newRow );
555
-
556
- cmb.afterRowInsert( $newRow );
557
-
558
- cmb.triggerElement( $table, { type: 'cmb2_add_row', group: true }, $newRow );
559
-
560
- };
561
-
562
- cmb.addAjaxRow = function( evt ) {
563
- evt.preventDefault();
564
-
565
- var $this = $( this );
566
- var $table = $id( $this.data('selector') );
567
- var $emptyrow = $table.find('.empty-row');
568
- var prevNum = parseInt( $emptyrow.find('[data-iterator]').data('iterator'), 10 );
569
- cmb.idNumber = parseInt( prevNum, 10 ) + 1;
570
- var $row = $emptyrow.clone();
571
-
572
- cmb.newRowHousekeeping( $row ).cleanRow( $row, prevNum );
573
-
574
- $emptyrow.removeClass('empty-row hidden').addClass('cmb-repeat-row');
575
- $emptyrow.after( $row );
576
-
577
- cmb.afterRowInsert( $row );
578
-
579
- cmb.triggerElement( $table, { type: 'cmb2_add_row', group: false }, $row );
580
-
581
- };
582
-
583
- cmb.removeGroupRow = function( evt ) {
584
- evt.preventDefault();
585
-
586
- var $this = $( this );
587
- var $table = $id( $this.data('selector') );
588
- var $parent = $this.parents('.cmb-repeatable-grouping');
589
- var number = $table.find('.cmb-repeatable-grouping').length;
590
-
591
- if ( number < 2 ) {
592
- return cmb.resetRow( $parent.parents('.cmb-repeatable-group').find( '.cmb-add-group-row' ), $this );
593
- }
594
-
595
- cmb.triggerElement( $table, 'cmb2_remove_group_row_start', $this );
596
-
597
- // when a group is removed loop through all next groups and update fields names
598
- $parent.nextAll( '.cmb-repeatable-grouping' ).find( cmb.repeatEls ).each( cmb.updateNameAttr );
599
-
600
- $parent.remove();
601
-
602
- cmb.triggerElement( $table, { type: 'cmb2_remove_row', group: true } );
603
-
604
- };
605
-
606
- cmb.removeAjaxRow = function( evt ) {
607
- evt.preventDefault();
608
-
609
- var $this = $( this );
610
-
611
- // Check if disabled
612
- if ( $this.hasClass( 'button-disabled' ) ) {
613
- return;
614
- }
615
-
616
- var $parent = $this.parents('.cmb-row');
617
- var $table = $this.parents('.cmb-repeat-table');
618
- var number = $table.find('.cmb-row').length;
619
-
620
- if ( number <= 2 ) {
621
- return cmb.resetRow( $parent.find( '.cmb-add-row-button' ), $this );
622
- }
623
-
624
- if ( $parent.hasClass('empty-row') ) {
625
- $parent.prev().addClass( 'empty-row' ).removeClass('cmb-repeat-row');
626
- }
627
-
628
- $this.parents('.cmb-repeat-table .cmb-row').remove();
629
-
630
-
631
- cmb.triggerElement( $table, { type: 'cmb2_remove_row', group: false } );
632
- };
633
-
634
- cmb.resetRow = function( $addNewBtn, $removeBtn ) {
635
- // Click the "add new" button followed by the "remove this" button
636
- // in order to reset the repeat row to empty values.
637
- $addNewBtn.trigger( 'click' );
638
- $removeBtn.trigger( 'click' );
639
- };
640
-
641
- cmb.shiftRows = function( evt ) {
642
-
643
- evt.preventDefault();
644
-
645
- var $this = $( this );
646
- var $from = $this.parents( '.cmb-repeatable-grouping' );
647
- var $goto = $this.hasClass( 'move-up' ) ? $from.prev( '.cmb-repeatable-grouping' ) : $from.next( '.cmb-repeatable-grouping' );
648
-
649
- // Before shift occurs.
650
- cmb.triggerElement( $this, 'cmb2_shift_rows_enter', $this, $from, $goto );
651
-
652
- if ( ! $goto.length ) {
653
- return;
654
- }
655
-
656
- // About to shift
657
- cmb.triggerElement( $this, 'cmb2_shift_rows_start', $this, $from, $goto );
658
-
659
- var inputVals = [];
660
- // Loop this item's fields
661
- $from.find( cmb.repeatEls ).each( function() {
662
- var $element = $( this );
663
- var elType = $element.attr( 'type' );
664
- var val;
665
-
666
- if ( $element.hasClass('cmb2-media-status') ) {
667
- // special case for image previews
668
- val = $element.html();
669
- } else if ( 'checkbox' === elType || 'radio' === elType ) {
670
- val = $element.is(':checked');
671
- } else if ( 'select' === $element.prop('tagName') ) {
672
- val = $element.is(':selected');
673
- } else {
674
- val = $element.val();
675
- }
676
-
677
- // Get all the current values per element
678
- inputVals.push( { val: val, $: $element } );
679
- });
680
- // And swap them all
681
- $goto.find( cmb.repeatEls ).each( function( index ) {
682
- var $element = $( this );
683
- var elType = $element.attr( 'type' );
684
- var val;
685
-
686
- if ( $element.hasClass('cmb2-media-status') ) {
687
- var toRowId = $element.closest('.cmb-repeatable-grouping').attr('data-iterator');
688
- var fromRowId = inputVals[ index ].$.closest('.cmb-repeatable-grouping').attr('data-iterator');
689
-
690
- // special case for image previews
691
- val = $element.html();
692
- $element.html( inputVals[ index ].val );
693
- inputVals[ index ].$.html( val );
694
-
695
- inputVals[ index ].$.find( 'input' ).each(function() {
696
- var name = $( this ).attr( 'name' );
697
- name = name.replace( '['+toRowId+']', '['+fromRowId+']' );
698
- $( this ).attr( 'name', name );
699
- });
700
- $element.find('input').each(function() {
701
- var name = $( this ).attr('name');
702
- name = name.replace('['+fromRowId+']', '['+toRowId+']');
703
- $( this ).attr('name', name);
704
- });
705
-
706
- }
707
- // handle checkbox swapping
708
- else if ( 'checkbox' === elType ) {
709
- inputVals[ index ].$.prop( 'checked', $element.is(':checked') );
710
- $element.prop( 'checked', inputVals[ index ].val );
711
- }
712
- // handle radio swapping
713
- else if ( 'radio' === elType ) {
714
- if ( $element.is( ':checked' ) ) {
715
- inputVals[ index ].$.attr( 'data-checked', 'true' );
716
- }
717
- if ( inputVals[ index ].$.is( ':checked' ) ) {
718
- $element.attr( 'data-checked', 'true' );
719
- }
720
- }
721
- // handle select swapping
722
- else if ( 'select' === $element.prop('tagName') ) {
723
- inputVals[ index ].$.prop( 'selected', $element.is(':selected') );
724
- $element.prop( 'selected', inputVals[ index ].val );
725
- }
726
- // handle normal input swapping
727
- else {
728
- inputVals[ index ].$.val( $element.val() );
729
- $element.val( inputVals[ index ].val );
730
- }
731
- });
732
-
733
- $from.find( 'input[data-checked=true]' ).prop( 'checked', true ).removeAttr( 'data-checked' );
734
- $goto.find( 'input[data-checked=true]' ).prop( 'checked', true ).removeAttr( 'data-checked' );
735
-
736
- // trigger color picker change event
737
- $from.find( 'input[type="text"].cmb2-colorpicker' ).trigger( 'change' );
738
- $goto.find( 'input[type="text"].cmb2-colorpicker' ).trigger( 'change' );
739
-
740
- // shift done
741
- cmb.triggerElement( $this, 'cmb2_shift_rows_complete', $this, $from, $goto );
742
- };
743
-
744
- cmb.initPickers = function( $timePickers, $datePickers, $colorPickers ) {
745
- // Initialize jQuery UI timepickers
746
- cmb.initDateTimePickers( $timePickers, 'timepicker', 'time_picker' );
747
- // Initialize jQuery UI datepickers
748
- cmb.initDateTimePickers( $datePickers, 'datepicker', 'date_picker' );
749
- // Initialize color picker
750
- cmb.initColorPickers( $colorPickers );
751
- };
752
-
753
- cmb.initDateTimePickers = function( $selector, method, defaultKey ) {
754
- if ( $selector.length ) {
755
- $selector[ method ]( 'destroy' ).each( function() {
756
- var $this = $( this );
757
- var fieldOpts = $this.data( method ) || {};
758
- var options = $.extend( {}, cmb.defaults[ defaultKey ], fieldOpts );
759
- $this[ method ]( cmb.datePickerSetupOpts( fieldOpts, options, method ) );
760
- } );
761
- }
762
- };
763
-
764
- cmb.datePickerSetupOpts = function( fieldOpts, options, method ) {
765
- var existing = $.extend( {}, options );
766
-
767
- options.beforeShow = function( input, inst ) {
768
- if ( 'timepicker' === method ) {
769
- cmb.addTimePickerClasses( inst.dpDiv );
770
- }
771
-
772
- // Wrap datepicker w/ class to narrow the scope of jQuery UI CSS and prevent conflicts
773
- $id( 'ui-datepicker-div' ).addClass( 'cmb2-element' );
774
-
775
- // Let's be sure to call beforeShow if it was added
776
- if ( 'function' === typeof existing.beforeShow ) {
777
- existing.beforeShow( input, inst );
778
- }
779
- };
780
-
781
- if ( 'timepicker' === method ) {
782
- options.onChangeMonthYear = function( year, month, inst, picker ) {
783
- cmb.addTimePickerClasses( inst.dpDiv );
784
-
785
- // Let's be sure to call onChangeMonthYear if it was added
786
- if ( 'function' === typeof existing.onChangeMonthYear ) {
787
- existing.onChangeMonthYear( year, month, inst, picker );
788
- }
789
- };
790
- }
791
-
792
- options.onClose = function( dateText, inst ) {
793
- // Remove the class when we're done with it (and hide to remove FOUC).
794
- $id( 'ui-datepicker-div' ).removeClass( 'cmb2-element' ).hide();
795
-
796
- // Let's be sure to call onClose if it was added
797
- if ( 'function' === typeof existing.onClose ) {
798
- existing.onClose( dateText, inst );
799
- }
800
- };
801
-
802
- return options;
803
- };
804
-
805
- // Adds classes to timepicker buttons.
806
- cmb.addTimePickerClasses = function( $picker ) {
807
- var func = cmb.addTimePickerClasses;
808
- func.count = func.count || 0;
809
-
810
- // Wait a bit to let the timepicker render, since these are pre-render events.
811
- setTimeout( function() {
812
- if ( $picker.find( '.ui-priority-secondary' ).length ) {
813
- $picker.find( '.ui-priority-secondary' ).addClass( 'button-secondary' );
814
- $picker.find( '.ui-priority-primary' ).addClass( 'button-primary' );
815
- func.count = 0;
816
- } else if ( func.count < 5 ) {
817
- func.count++;
818
- func( $picker );
819
- }
820
- }, 10 );
821
- };
822
-
823
- cmb.initColorPickers = function( $selector ) {
824
- if ( ! $selector.length ) {
825
- return;
826
- }
827
- if ( typeof jQuery.wp === 'object' && typeof jQuery.wp.wpColorPicker === 'function' ) {
828
-
829
- $selector.each( function() {
830
- var $this = $( this );
831
- var fieldOpts = $this.data( 'colorpicker' ) || {};
832
- $this.wpColorPicker( $.extend( {}, cmb.defaults.color_picker, fieldOpts ) );
833
- } );
834
-
835
- } else {
836
- $selector.each( function( i ) {
837
- $( this ).after( '<div id="picker-' + i + '" style="z-index: 1000; background: #EEE; border: 1px solid #CCC; position: absolute; display: block;"></div>' );
838
- $id( 'picker-' + i ).hide().farbtastic( $( this ) );
839
- } )
840
- .focus( function() {
841
- $( this ).next().show();
842
- } )
843
- .blur( function() {
844
- $( this ).next().hide();
845
- } );
846
- }
847
- };
848
-
849
- cmb.makeListSortable = function() {
850
- var $filelist = cmb.metabox().find( '.cmb2-media-status.cmb-attach-list' );
851
- if ( $filelist.length ) {
852
- $filelist.sortable({ cursor: 'move' }).disableSelection();
853
- }
854
- };
855
-
856
- cmb.maybeOembed = function( evt ) {
857
- var $this = $( this );
858
-
859
- var m = {
860
- focusout : function() {
861
- setTimeout( function() {
862
- // if it's been 2 seconds, hide our spinner
863
- cmb.spinner( '.cmb2-metabox', true );
864
- }, 2000);
865
- },
866
- keyup : function() {
867
- var betw = function( min, max ) {
868
- return ( evt.which <= max && evt.which >= min );
869
- };
870
- // Only Ajax on normal keystrokes
871
- if ( betw( 48, 90 ) || betw( 96, 111 ) || betw( 8, 9 ) || evt.which === 187 || evt.which === 190 ) {
872
- // fire our ajax function
873
- cmb.doAjax( $this, evt );
874
- }
875
- },
876
- paste : function() {
877
- // paste event is fired before the value is filled, so wait a bit
878
- setTimeout( function() { cmb.doAjax( $this ); }, 100);
879
- }
880
- };
881
-
882
- m[ evt.type ]();
883
- };
884
-
885
- /**
886
- * Resize oEmbed videos to fit in their respective metaboxes
887
- */
888
- cmb.resizeoEmbeds = function() {
889
- cmb.metabox().each( function() {
890
- var $this = $( this );
891
- var $tableWrap = $this.parents('.inside');
892
- var isSide = $this.parents('.inner-sidebar').length || $this.parents( '#side-sortables' ).length;
893
- var isSmall = isSide;
894
- var isSmallest = false;
895
- if ( ! $tableWrap.length ) {
896
- return true; // continue
897
- }
898
-
899
- // Calculate new width
900
- var tableW = $tableWrap.width();
901
-
902
- if ( cmb.styleBreakPoint > tableW ) {
903
- isSmall = true;
904
- isSmallest = ( cmb.styleBreakPoint - 62 ) > tableW;
905
- }
906
-
907
- tableW = isSmall ? tableW : Math.round(($tableWrap.width() * 0.82)*0.97);
908
- var newWidth = tableW - 30;
909
- if ( isSmall && ! isSide && ! isSmallest ) {
910
- newWidth = newWidth - 75;
911
- }
912
- if ( newWidth > 639 ) {
913
- return true; // continue
914
- }
915
-
916
- var $embeds = $this.find('.cmb-type-oembed .embed-status');
917
- var $children = $embeds.children().not('.cmb2-remove-wrapper');
918
- if ( ! $children.length ) {
919
- return true; // continue
920
- }
921
-
922
- $children.each( function() {
923
- var $this = $( this );
924
- var iwidth = $this.width();
925
- var iheight = $this.height();
926
- var _newWidth = newWidth;
927
- if ( $this.parents( '.cmb-repeat-row' ).length && ! isSmall ) {
928
- // Make room for our repeatable "remove" button column
929
- _newWidth = newWidth - 91;
930
- _newWidth = 785 > tableW ? _newWidth - 15 : _newWidth;
931
- }
932
- // Calc new height
933
- var newHeight = Math.round((_newWidth * iheight)/iwidth);
934
- $this.width(_newWidth).height(newHeight);
935
- });
936
-
937
- });
938
- };
939
-
940
- /**
941
- * Safely log things if query var is set
942
- * @since 1.0.0
943
- */
944
- cmb.log = function() {
945
- if ( l10n.script_debug && console && typeof console.log === 'function' ) {
946
- console.log.apply(console, arguments);
947
- }
948
- };
949
-
950
- cmb.spinner = function( $context, hide ) {
951
- var m = hide ? 'removeClass' : 'addClass';
952
- $('.cmb-spinner', $context )[ m ]( 'is-active' );
953
- };
954
-
955
- // function for running our ajax
956
- cmb.doAjax = function( $obj ) {
957
- // get typed value
958
- var oembed_url = $obj.val();
959
- // only proceed if the field contains more than 6 characters
960
- if ( oembed_url.length < 6 ) {
961
- return;
962
- }
963
-
964
- // get field id
965
- var field_id = $obj.attr('id');
966
- var $context = $obj.closest( '.cmb-td' );
967
- var $embed_container = $context.find( '.embed-status' );
968
- var $embed_wrap = $context.find( '.embed_wrap' );
969
- var $child_el = $embed_container.find( ':first-child' );
970
- var oembed_width = $embed_container.length && $child_el.length ? $child_el.width() : $obj.width();
971
-
972
- cmb.log( 'oembed_url', oembed_url, field_id );
973
-
974
- // show our spinner
975
- cmb.spinner( $context );
976
- // clear out previous results
977
- $embed_wrap.html('');
978
- // and run our ajax function
979
- setTimeout( function() {
980
- // if they haven't typed in 500 ms
981
- if ( $( '.cmb2-oembed:focus' ).val() !== oembed_url ) {
982
- return;
983
- }
984
- $.ajax({
985
- type : 'post',
986
- dataType : 'json',
987
- url : l10n.ajaxurl,
988
- data : {
989
- 'action' : 'cmb2_oembed_handler',
990
- 'oembed_url' : oembed_url,
991
- 'oembed_width' : oembed_width > 300 ? oembed_width : 300,
992
- 'field_id' : field_id,
993
- 'object_id' : $obj.data( 'objectid' ),
994
- 'object_type' : $obj.data( 'objecttype' ),
995
- 'cmb2_ajax_nonce' : l10n.ajax_nonce
996
- },
997
- success: function(response) {
998
- cmb.log( response );
999
- // hide our spinner
1000
- cmb.spinner( $context, true );
1001
- // and populate our results from ajax response
1002
- $embed_wrap.html( response.data );
1003
- }
1004
- });
1005
-
1006
- }, 500);
1007
-
1008
- };
1009
-
1010
- cmb.trigger = function( evtName ) {
1011
- var args = Array.prototype.slice.call( arguments, 1 );
1012
- args.push( cmb );
1013
- $document.trigger( evtName, args );
1014
- };
1015
-
1016
- cmb.triggerElement = function( $el, evtName ) {
1017
- var args = Array.prototype.slice.call( arguments, 2 );
1018
- args.push( cmb );
1019
- $el.trigger( evtName, args );
1020
- };
1021
-
1022
- $( cmb.init );
1023
-
1024
- })(window, document, jQuery, window.CMB2);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/webdevstudios/cmb2/js/cmb2.min.js DELETED
@@ -1 +0,0 @@
1
- window.CMB2=window.CMB2||{},function(window,document,$,cmb,undefined){"use strict";var $document,l10n=window.cmb2_l10,setTimeout=window.setTimeout,$id=function(selector){return $(document.getElementById(selector))},defaults={idNumber:!1,repeatEls:'input:not([type="button"],[id^=filelist]),select,textarea,.cmb2-media-status',noEmpty:'input:not([type="button"]):not([type="radio"]):not([type="checkbox"]),textarea',repeatUpdate:'input:not([type="button"]),select,textarea,label',styleBreakPoint:450,mediaHandlers:{},defaults:{time_picker:l10n.defaults.time_picker,date_picker:l10n.defaults.date_picker,color_picker:l10n.defaults.color_picker||{}},media:{frames:{}}};cmb.metabox=function(){return cmb.$metabox?cmb.$metabox:(cmb.$metabox=$(".cmb2-wrap > .cmb2-metabox"),cmb.$metabox)},cmb.init=function(){$document=$(document),$.extend(cmb,defaults),cmb.trigger("cmb_pre_init");var $metabox=cmb.metabox(),$repeatGroup=$metabox.find(".cmb-repeatable-group");cmb.initPickers($metabox.find('input[type="text"].cmb2-timepicker'),$metabox.find('input[type="text"].cmb2-datepicker'),$metabox.find('input[type="text"].cmb2-colorpicker')),$('<p><span class="button-secondary cmb-multicheck-toggle">'+l10n.strings.check_toggle+"</span></p>").insertBefore(".cmb2-checkbox-list:not(.no-select-all)"),cmb.makeListSortable(),$metabox.on("change",".cmb2_upload_file",function(){cmb.media.field=$(this).attr("id"),$id(cmb.media.field+"_id").val("")}).on("click",".cmb-multicheck-toggle",cmb.toggleCheckBoxes).on("click",".cmb2-upload-button",cmb.handleMedia).on("click",".cmb-attach-list li, .cmb2-media-status .img-status img, .cmb2-media-status .file-status > span",cmb.handleFileClick).on("click",".cmb2-remove-file-button",cmb.handleRemoveMedia).on("click",".cmb-add-group-row",cmb.addGroupRow).on("click",".cmb-add-row-button",cmb.addAjaxRow).on("click",".cmb-remove-group-row",cmb.removeGroupRow).on("click",".cmb-remove-row-button",cmb.removeAjaxRow).on("keyup paste focusout",".cmb2-oembed",cmb.maybeOembed).on("cmb2_remove_row",".cmb-repeatable-group",cmb.resetTitlesAndIterator).on("click",".cmbhandle, .cmbhandle + .cmbhandle-title",cmb.toggleHandle),$repeatGroup.length&&$repeatGroup.on("cmb2_add_row",cmb.emptyValue).filter(".sortable").each(function(){$(this).find(".cmb-remove-group-row-button").before('<a class="button-secondary cmb-shift-rows move-up alignleft" href="#"><span class="'+l10n.up_arrow_class+'"></span></a> <a class="button-secondary cmb-shift-rows move-down alignleft" href="#"><span class="'+l10n.down_arrow_class+'"></span></a>')}).on("click",".cmb-shift-rows",cmb.shiftRows),setTimeout(cmb.resizeoEmbeds,500),$(window).on("resize",cmb.resizeoEmbeds),cmb.trigger("cmb_init")},cmb.resetTitlesAndIterator=function(evt){evt.group&&$(".cmb-repeatable-group.repeatable").each(function(){var $table=$(this),groupTitle=$table.find(".cmb-add-group-row").data("grouptitle");$table.find(".cmb-repeatable-grouping").each(function(rowindex){var $row=$(this),$rowTitle=$row.find("h3.cmb-group-title");$row.data("iterator",rowindex),$rowTitle.length&&$rowTitle.text(groupTitle.replace("{#}",rowindex+1))})})},cmb.toggleHandle=function(evt){evt.preventDefault(),cmb.trigger("postbox-toggled",$(this).parent(".postbox").toggleClass("closed"))},cmb.toggleCheckBoxes=function(evt){evt.preventDefault();var $this=$(this),$multicheck=$this.closest(".cmb-td").find("input[type=checkbox]:not([disabled])");$this.data("checked")?($multicheck.prop("checked",!1),$this.data("checked",!1)):($multicheck.prop("checked",!0),$this.data("checked",!0))},cmb.handleMedia=function(evt){evt.preventDefault();var $el=$(this);cmb.attach_id=$el.hasClass("cmb2-upload-list")?!1:$el.closest(".cmb-td").find(".cmb2-upload-file-id").val(),cmb.attach_id="0"!==cmb.attach_id?cmb.attach_id:!1,cmb._handleMedia($el.prev("input.cmb2-upload-file").attr("id"),$el.hasClass("cmb2-upload-list"))},cmb.handleFileClick=function(evt){evt.preventDefault();var $el=$(this),$td=$el.closest(".cmb-td"),isList=$td.find(".cmb2-upload-button").hasClass("cmb2-upload-list");cmb.attach_id=isList?$el.find('input[type="hidden"]').data("id"):$td.find(".cmb2-upload-file-id").val(),cmb.attach_id&&cmb._handleMedia($td.find("input.cmb2-upload-file").attr("id"),isList,cmb.attach_id)},cmb._handleMedia=function(id,isList){if(wp){var media,handlers;if(handlers=cmb.mediaHandlers,media=cmb.media,media.field=id,media.$field=$id(media.field),media.fieldData=media.$field.data(),media.previewSize=media.fieldData.previewsize,media.sizeName=media.fieldData.sizename,media.fieldName=media.$field.attr("name"),media.isList=isList,id in media.frames)return media.frames[id].open();media.frames[id]=wp.media({title:cmb.metabox().find('label[for="'+id+'"]').text(),library:media.fieldData.queryargs||{},button:{text:l10n.strings[isList?"upload_files":"upload_file"]},multiple:isList?"add":!1}),media.frames[id].states.first().set("filterable","all"),cmb.trigger("cmb_media_modal_init",media),handlers.list=function(selection,returnIt){var attachmentHtml,fileGroup=[];return handlers.list.templates||(handlers.list.templates={image:wp.template("cmb2-list-image"),file:wp.template("cmb2-list-file")}),selection.each(function(attachment){attachmentHtml=handlers.getAttachmentHtml(attachment,"list"),fileGroup.push(attachmentHtml)}),returnIt?fileGroup:void media.$field.siblings(".cmb2-media-status").append(fileGroup)},handlers.single=function(selection){handlers.single.templates||(handlers.single.templates={image:wp.template("cmb2-single-image"),file:wp.template("cmb2-single-file")});var attachment=selection.first();media.$field.val(attachment.get("url")),$id(media.field+"_id").val(attachment.get("id"));var attachmentHtml=handlers.getAttachmentHtml(attachment,"single");media.$field.siblings(".cmb2-media-status").slideDown().html(attachmentHtml)},handlers.getAttachmentHtml=function(attachment,templatesId){var isImage="image"===attachment.get("type"),data=handlers.prepareData(attachment,isImage);return handlers[templatesId].templates[isImage?"image":"file"](data)},handlers.prepareData=function(data,image){return image&&handlers.getImageData.call(data,50),data=data.toJSON(),data.mediaField=media.field,data.mediaFieldName=media.fieldName,data.stringRemoveImage=l10n.strings.remove_image,data.stringFile=l10n.strings.file,data.stringDownload=l10n.strings.download,data.stringRemoveFile=l10n.strings.remove_file,data},handlers.getImageData=function(fallbackSize){var previewW=media.previewSize[0]||fallbackSize,previewH=media.previewSize[1]||fallbackSize,url=this.get("url"),width=this.get("width"),height=this.get("height"),sizes=this.get("sizes");return sizes&&(sizes[media.sizeName]?(url=sizes[media.sizeName].url,width=sizes[media.sizeName].width,height=sizes[media.sizeName].height):sizes.large&&(url=sizes.large.url,width=sizes.large.width,height=sizes.large.height)),width>previewW&&(height=Math.floor(previewW*height/width),width=previewW),height>previewH&&(width=Math.floor(previewH*width/height),height=previewH),width||(width=previewW),height||(height="svg"===this.get("filename").split(".").pop()?"100%":previewH),this.set("sizeUrl",url),this.set("sizeWidth",width),this.set("sizeHeight",height),this},handlers.selectFile=function(){var selection=media.frames[id].state().get("selection"),type=isList?"list":"single";cmb.attach_id&&isList?$('[data-id="'+cmb.attach_id+'"]').parents("li").replaceWith(handlers.list(selection,!0)):handlers[type](selection),cmb.trigger("cmb_media_modal_select",selection,media)},handlers.openModal=function(){var attach,selection=media.frames[id].state().get("selection");cmb.attach_id?(attach=wp.media.attachment(cmb.attach_id),attach.fetch(),selection.set(attach?[attach]:[])):selection.reset(),cmb.trigger("cmb_media_modal_open",selection,media)},media.frames[id].on("select",handlers.selectFile).on("open",handlers.openModal),media.frames[id].open()}},cmb.handleRemoveMedia=function(evt){evt.preventDefault();var $this=$(this);return $this.is(".cmb-attach-list .cmb2-remove-file-button")?($this.parents(".cmb2-media-item").remove(),!1):(cmb.media.field=$this.attr("rel"),cmb.metabox().find(document.getElementById(cmb.media.field)).val(""),cmb.metabox().find(document.getElementById(cmb.media.field+"_id")).val(""),$this.parents(".cmb2-media-status").html(""),!1)},cmb.cleanRow=function($row,prevNum,group){var $elements=$row.find(cmb.repeatUpdate);if(group){var $other=$row.find("[id]").not(cmb.repeatUpdate);$row.find(".cmb-repeat-table .cmb-repeat-row:not(:first-child)").remove(),$other.length&&$other.each(function(){var $_this=$(this),oldID=$_this.attr("id"),newID=oldID.replace("_"+prevNum,"_"+cmb.idNumber),$buttons=$row.find('[data-selector="'+oldID+'"]');$_this.attr("id",newID),$buttons.length&&$buttons.attr("data-selector",newID).data("selector",newID)})}return $elements.filter(":checked").removeAttr("checked"),$elements.find(":checked").removeAttr("checked"),$elements.filter(":selected").removeAttr("selected"),$elements.find(":selected").removeAttr("selected",!1),$row.find("h3.cmb-group-title").length&&$row.find("h3.cmb-group-title").text($row.data("title").replace("{#}",cmb.idNumber+1)),$elements.each(function(){cmb.elReplacements($(this),prevNum)}),cmb},cmb.elReplacements=function($newInput,prevNum){var newID,oldID,oldFor=$newInput.attr("for"),oldVal=$newInput.val(),type=$newInput.prop("type"),checkable="radio"===type||"checkbox"===type?oldVal:!1,attrs={};if(oldFor)attrs={"for":oldFor.replace("_"+prevNum,"_"+cmb.idNumber)};else{var oldName=$newInput.attr("name"),newName=oldName?oldName.replace("["+prevNum+"]","["+cmb.idNumber+"]"):"";oldID=$newInput.attr("id"),newID=oldID?oldID.replace("_"+prevNum,"_"+cmb.idNumber):"",attrs={id:newID,name:newName,"data-iterator":cmb.idNumber}}return"TEXTAREA"===$newInput.prop("tagName")&&$newInput.html(""),checkable&&$newInput.removeAttr("checked"),$newInput.removeClass("hasDatepicker").attr(attrs).val(checkable?checkable:""),$newInput},cmb.newRowHousekeeping=function($row){var $colorPicker=$row.find(".wp-picker-container"),$list=$row.find(".cmb2-media-status");return $colorPicker.length&&$colorPicker.each(function(){var $td=$(this).parent();$td.html($td.find('input[type="text"].cmb2-colorpicker').attr("style",""))}),$list.length&&$list.empty(),cmb},cmb.afterRowInsert=function($row){cmb.initPickers($row.find('input[type="text"].cmb2-timepicker'),$row.find('input[type="text"].cmb2-datepicker'),$row.find('input[type="text"].cmb2-colorpicker'))},cmb.updateNameAttr=function(){var $this=$(this),name=$this.attr("name");if("undefined"!=typeof name){var prevNum=parseInt($this.parents(".cmb-repeatable-grouping").data("iterator"),10),newNum=prevNum-1,$newName=name.replace("["+prevNum+"]","["+newNum+"]");$this.attr("name",$newName)}},cmb.emptyValue=function(evt,row){$(cmb.noEmpty,row).val("")},cmb.addGroupRow=function(evt){evt.preventDefault();var $this=$(this);cmb.triggerElement($this,"cmb2_add_group_row_start",$this);var $table=$id($this.data("selector")),$oldRow=$table.find(".cmb-repeatable-grouping").last(),prevNum=parseInt($oldRow.data("iterator"),10);cmb.idNumber=parseInt(prevNum,10)+1;for(var $row=$oldRow.clone();$table.find('.cmb-repeatable-grouping[data-iterator="'+cmb.idNumber+'"]').length>0;)cmb.idNumber++;cmb.newRowHousekeeping($row.data("title",$this.data("grouptitle"))).cleanRow($row,prevNum,!0),$row.find(".cmb-add-row-button").prop("disabled",!1);var $newRow=$('<div class="postbox cmb-row cmb-repeatable-grouping" data-iterator="'+cmb.idNumber+'">'+$row.html()+"</div>");$oldRow.after($newRow),cmb.afterRowInsert($newRow),cmb.triggerElement($table,{type:"cmb2_add_row",group:!0},$newRow)},cmb.addAjaxRow=function(evt){evt.preventDefault();var $this=$(this),$table=$id($this.data("selector")),$emptyrow=$table.find(".empty-row"),prevNum=parseInt($emptyrow.find("[data-iterator]").data("iterator"),10);cmb.idNumber=parseInt(prevNum,10)+1;var $row=$emptyrow.clone();cmb.newRowHousekeeping($row).cleanRow($row,prevNum),$emptyrow.removeClass("empty-row hidden").addClass("cmb-repeat-row"),$emptyrow.after($row),cmb.afterRowInsert($row),cmb.triggerElement($table,{type:"cmb2_add_row",group:!1},$row)},cmb.removeGroupRow=function(evt){evt.preventDefault();var $this=$(this),$table=$id($this.data("selector")),$parent=$this.parents(".cmb-repeatable-grouping"),number=$table.find(".cmb-repeatable-grouping").length;return 2>number?cmb.resetRow($parent.parents(".cmb-repeatable-group").find(".cmb-add-group-row"),$this):(cmb.triggerElement($table,"cmb2_remove_group_row_start",$this),$parent.nextAll(".cmb-repeatable-grouping").find(cmb.repeatEls).each(cmb.updateNameAttr),$parent.remove(),void cmb.triggerElement($table,{type:"cmb2_remove_row",group:!0}))},cmb.removeAjaxRow=function(evt){evt.preventDefault();var $this=$(this);if(!$this.hasClass("button-disabled")){var $parent=$this.parents(".cmb-row"),$table=$this.parents(".cmb-repeat-table"),number=$table.find(".cmb-row").length;if(2>=number)return cmb.resetRow($parent.find(".cmb-add-row-button"),$this);$parent.hasClass("empty-row")&&$parent.prev().addClass("empty-row").removeClass("cmb-repeat-row"),$this.parents(".cmb-repeat-table .cmb-row").remove(),cmb.triggerElement($table,{type:"cmb2_remove_row",group:!1})}},cmb.resetRow=function($addNewBtn,$removeBtn){$addNewBtn.trigger("click"),$removeBtn.trigger("click")},cmb.shiftRows=function(evt){evt.preventDefault();var $this=$(this),$from=$this.parents(".cmb-repeatable-grouping"),$goto=$this.hasClass("move-up")?$from.prev(".cmb-repeatable-grouping"):$from.next(".cmb-repeatable-grouping");if(cmb.triggerElement($this,"cmb2_shift_rows_enter",$this,$from,$goto),$goto.length){cmb.triggerElement($this,"cmb2_shift_rows_start",$this,$from,$goto);var inputVals=[];$from.find(cmb.repeatEls).each(function(){var val,$element=$(this),elType=$element.attr("type");val=$element.hasClass("cmb2-media-status")?$element.html():"checkbox"===elType||"radio"===elType?$element.is(":checked"):"select"===$element.prop("tagName")?$element.is(":selected"):$element.val(),inputVals.push({val:val,$:$element})}),$goto.find(cmb.repeatEls).each(function(index){var val,$element=$(this),elType=$element.attr("type");if($element.hasClass("cmb2-media-status")){var toRowId=$element.closest(".cmb-repeatable-grouping").attr("data-iterator"),fromRowId=inputVals[index].$.closest(".cmb-repeatable-grouping").attr("data-iterator");val=$element.html(),$element.html(inputVals[index].val),inputVals[index].$.html(val),inputVals[index].$.find("input").each(function(){var name=$(this).attr("name");name=name.replace("["+toRowId+"]","["+fromRowId+"]"),$(this).attr("name",name)}),$element.find("input").each(function(){var name=$(this).attr("name");name=name.replace("["+fromRowId+"]","["+toRowId+"]"),$(this).attr("name",name)})}else"checkbox"===elType?(inputVals[index].$.prop("checked",$element.is(":checked")),$element.prop("checked",inputVals[index].val)):"radio"===elType?($element.is(":checked")&&inputVals[index].$.attr("data-checked","true"),inputVals[index].$.is(":checked")&&$element.attr("data-checked","true")):"select"===$element.prop("tagName")?(inputVals[index].$.prop("selected",$element.is(":selected")),$element.prop("selected",inputVals[index].val)):(inputVals[index].$.val($element.val()),$element.val(inputVals[index].val))}),$from.find("input[data-checked=true]").prop("checked",!0).removeAttr("data-checked"),$goto.find("input[data-checked=true]").prop("checked",!0).removeAttr("data-checked"),$from.find('input[type="text"].cmb2-colorpicker').trigger("change"),$goto.find('input[type="text"].cmb2-colorpicker').trigger("change"),cmb.triggerElement($this,"cmb2_shift_rows_complete",$this,$from,$goto)}},cmb.initPickers=function($timePickers,$datePickers,$colorPickers){cmb.initDateTimePickers($timePickers,"timepicker","time_picker"),cmb.initDateTimePickers($datePickers,"datepicker","date_picker"),cmb.initColorPickers($colorPickers)},cmb.initDateTimePickers=function($selector,method,defaultKey){$selector.length&&$selector[method]("destroy").each(function(){var $this=$(this),fieldOpts=$this.data(method)||{},options=$.extend({},cmb.defaults[defaultKey],fieldOpts);$this[method](cmb.datePickerSetupOpts(fieldOpts,options,method))})},cmb.datePickerSetupOpts=function(fieldOpts,options,method){var existing=$.extend({},options);return options.beforeShow=function(input,inst){"timepicker"===method&&cmb.addTimePickerClasses(inst.dpDiv),$id("ui-datepicker-div").addClass("cmb2-element"),"function"==typeof existing.beforeShow&&existing.beforeShow(input,inst)},"timepicker"===method&&(options.onChangeMonthYear=function(year,month,inst,picker){cmb.addTimePickerClasses(inst.dpDiv),"function"==typeof existing.onChangeMonthYear&&existing.onChangeMonthYear(year,month,inst,picker)}),options.onClose=function(dateText,inst){$id("ui-datepicker-div").removeClass("cmb2-element").hide(),"function"==typeof existing.onClose&&existing.onClose(dateText,inst)},options},cmb.addTimePickerClasses=function($picker){var func=cmb.addTimePickerClasses;func.count=func.count||0,setTimeout(function(){$picker.find(".ui-priority-secondary").length?($picker.find(".ui-priority-secondary").addClass("button-secondary"),$picker.find(".ui-priority-primary").addClass("button-primary"),func.count=0):func.count<5&&(func.count++,func($picker))},10)},cmb.initColorPickers=function($selector){$selector.length&&("object"==typeof jQuery.wp&&"function"==typeof jQuery.wp.wpColorPicker?$selector.each(function(){var $this=$(this),fieldOpts=$this.data("colorpicker")||{};$this.wpColorPicker($.extend({},cmb.defaults.color_picker,fieldOpts))}):$selector.each(function(i){$(this).after('<div id="picker-'+i+'" style="z-index: 1000; background: #EEE; border: 1px solid #CCC; position: absolute; display: block;"></div>'),$id("picker-"+i).hide().farbtastic($(this))}).focus(function(){$(this).next().show()}).blur(function(){$(this).next().hide()}))},cmb.makeListSortable=function(){var $filelist=cmb.metabox().find(".cmb2-media-status.cmb-attach-list");$filelist.length&&$filelist.sortable({cursor:"move"}).disableSelection()},cmb.maybeOembed=function(evt){var $this=$(this),m={focusout:function(){setTimeout(function(){cmb.spinner(".cmb2-metabox",!0)},2e3)},keyup:function(){var betw=function(min,max){return evt.which<=max&&evt.which>=min};(betw(48,90)||betw(96,111)||betw(8,9)||187===evt.which||190===evt.which)&&cmb.doAjax($this,evt)},paste:function(){setTimeout(function(){cmb.doAjax($this)},100)}};m[evt.type]()},cmb.resizeoEmbeds=function(){cmb.metabox().each(function(){var $this=$(this),$tableWrap=$this.parents(".inside"),isSide=$this.parents(".inner-sidebar").length||$this.parents("#side-sortables").length,isSmall=isSide,isSmallest=!1;if(!$tableWrap.length)return!0;var tableW=$tableWrap.width();cmb.styleBreakPoint>tableW&&(isSmall=!0,isSmallest=cmb.styleBreakPoint-62>tableW),tableW=isSmall?tableW:Math.round(.82*$tableWrap.width()*.97);var newWidth=tableW-30;if(!isSmall||isSide||isSmallest||(newWidth-=75),newWidth>639)return!0;var $embeds=$this.find(".cmb-type-oembed .embed-status"),$children=$embeds.children().not(".cmb2-remove-wrapper");return $children.length?void $children.each(function(){var $this=$(this),iwidth=$this.width(),iheight=$this.height(),_newWidth=newWidth;$this.parents(".cmb-repeat-row").length&&!isSmall&&(_newWidth=newWidth-91,_newWidth=785>tableW?_newWidth-15:_newWidth);var newHeight=Math.round(_newWidth*iheight/iwidth);$this.width(_newWidth).height(newHeight)}):!0})},cmb.log=function(){l10n.script_debug&&console&&"function"==typeof console.log&&console.log.apply(console,arguments)},cmb.spinner=function($context,hide){var m=hide?"removeClass":"addClass";$(".cmb-spinner",$context)[m]("is-active")},cmb.doAjax=function($obj){var oembed_url=$obj.val();if(!(oembed_url.length<6)){var field_id=$obj.attr("id"),$context=$obj.closest(".cmb-td"),$embed_container=$context.find(".embed-status"),$embed_wrap=$context.find(".embed_wrap"),$child_el=$embed_container.find(":first-child"),oembed_width=$embed_container.length&&$child_el.length?$child_el.width():$obj.width();cmb.log("oembed_url",oembed_url,field_id),cmb.spinner($context),$embed_wrap.html(""),setTimeout(function(){$(".cmb2-oembed:focus").val()===oembed_url&&$.ajax({type:"post",dataType:"json",url:l10n.ajaxurl,data:{action:"cmb2_oembed_handler",oembed_url:oembed_url,oembed_width:oembed_width>300?oembed_width:300,field_id:field_id,object_id:$obj.data("objectid"),object_type:$obj.data("objecttype"),cmb2_ajax_nonce:l10n.ajax_nonce},success:function(response){cmb.log(response),cmb.spinner($context,!0),$embed_wrap.html(response.data)}})},500)}},cmb.trigger=function(evtName){var args=Array.prototype.slice.call(arguments,1);args.push(cmb),$document.trigger(evtName,args)},cmb.triggerElement=function($el,evtName){var args=Array.prototype.slice.call(arguments,2);args.push(cmb),$el.trigger(evtName,args)},$(cmb.init)}(window,document,jQuery,window.CMB2),window.CMB2=window.CMB2||{},window.CMB2.wysiwyg=window.CMB2.wysiwyg||{},function(window,document,$,wysiwyg,undefined){"use strict";function delayedInit(){0===toBeDestroyed.length?toBeInitialized.forEach(function(toInit){toBeInitialized.splice(toBeInitialized.indexOf(toInit),1),wysiwyg.init.apply(wysiwyg,toInit)}):window.setTimeout(delayedInit,100)}function delayedDestroy(){toBeDestroyed.forEach(function(id){toBeDestroyed.splice(toBeDestroyed.indexOf(id),1),wysiwyg.destroy(id)})}function getGroupData(data){var groupid=data.groupid,fieldid=data.fieldid;return all[groupid]&&all[groupid][fieldid]||(all[groupid]=all[groupid]||{},all[groupid][fieldid]={template:wp.template("cmb2-wysiwyg-"+groupid+"-"+fieldid),defaults:{mce:$.extend({},tinyMCEPreInit.mceInit["cmb2_i_"+groupid+fieldid]),qt:$.extend({},tinyMCEPreInit.qtInit["cmb2_i_"+groupid+fieldid])}},delete tinyMCEPreInit.mceInit["cmb2_i_"+groupid+fieldid],delete tinyMCEPreInit.qtInit["cmb2_i_"+groupid+fieldid]),all[groupid][fieldid]}function initOptions(options){var prop,newSettings,newQTS,nameRegex=new RegExp("cmb2_n_"+options.groupid+options.fieldid,"g"),idRegex=new RegExp("cmb2_i_"+options.groupid+options.fieldid,"g");if("undefined"==typeof tinyMCEPreInit.mceInit[options.id]){newSettings=$.extend({},options.defaults.mce);for(prop in newSettings)"string"==typeof newSettings[prop]&&(newSettings[prop]=newSettings[prop].replace(idRegex,options.id).replace(nameRegex,options.name));tinyMCEPreInit.mceInit[options.id]=newSettings}if("undefined"==typeof tinyMCEPreInit.qtInit[options.id]){newQTS=$.extend({},options.defaults.qt);for(prop in newQTS)"string"==typeof newQTS[prop]&&(newQTS[prop]=newQTS[prop].replace(idRegex,options.id).replace(nameRegex,options.name));tinyMCEPreInit.qtInit[options.id]=newQTS}}var toBeDestroyed=[],toBeInitialized=[],all=wysiwyg.all={};wysiwyg.initAll=function(){var $this,data,initiated;$(".cmb2-wysiwyg-placeholder").each(function(){$this=$(this),data=$this.data(),data.groupid&&(data.id=$this.attr("id"),data.name=$this.attr("name"),data.value=$this.val(),wysiwyg.init($this,data,!1),initiated=!0)}),!0===initiated&&("undefined"!=typeof window.QTags&&window.QTags._buttonsInit(),$(document).on("cmb2_add_row",wysiwyg.addRow).on("cmb2_remove_group_row_start",wysiwyg.destroyRowEditors).on("cmb2_shift_rows_start",wysiwyg.shiftStart).on("cmb2_shift_rows_complete",wysiwyg.shiftComplete))},wysiwyg.addRow=function(evt,$row){wysiwyg.initRow($row)},wysiwyg.destroyRowEditors=function(evt,$btn){wysiwyg.destroy($btn.parents(".cmb-repeatable-grouping").find(".wp-editor-area").attr("id"))},wysiwyg.shiftStart=function(evt,$btn,$from,$to){$from.add($to).find(".wp-editor-wrap textarea").each(function(){wysiwyg.destroy($(this).attr("id"))})},wysiwyg.shiftComplete=function(evt,$btn,$from,$to){$from.add($to).each(function(){wysiwyg.initRow($(this))})},wysiwyg.initRow=function($row){var $toReplace,data;$row.find(".cmb2-wysiwyg-inner-wrap").each(function(){$toReplace=$(this),data=$toReplace.data(),data.iterator=$row.data("iterator"),data.fieldid=data.id,data.id=data.groupid+"_"+data.iterator+"_"+data.fieldid,data.name=data.groupid+"["+data.iterator+"]["+data.fieldid+"]",data.value=$toReplace.find(".wp-editor-area").length?$toReplace.find(".wp-editor-area").val():"",0===toBeDestroyed.length?wysiwyg.init($toReplace,data):(toBeInitialized.push([$toReplace,data]),window.setTimeout(delayedInit,100))})},wysiwyg.init=function($toReplace,data,buttonsInit){return data.groupid?($.extend(data,getGroupData(data)),initOptions(data),$toReplace.replaceWith(data.template(data)),window.tinyMCE.init(tinyMCEPreInit.mceInit[data.id]),"function"==typeof window.quicktags&&window.quicktags(tinyMCEPreInit.qtInit[data.id]),$(document.getElementById(data.id)).parents(".wp-editor-wrap").removeClass("html-active").addClass("tmce-active"),void(!1!==buttonsInit&&"undefined"!=typeof window.QTags&&window.QTags._buttonsInit())):!1},wysiwyg.destroy=function(id){var editor=tinyMCE.get(id);null!==editor&&"undefined"!=typeof editor?(editor.destroy(),"undefined"==typeof tinyMCEPreInit.mceInit[id]&&delete tinyMCEPreInit.mceInit[id],"undefined"==typeof tinyMCEPreInit.qtInit[id]&&delete tinyMCEPreInit.qtInit[id]):-1===toBeDestroyed.indexOf(id)&&(toBeDestroyed.push(id),window.setTimeout(delayedDestroy,100))},$(document).on("cmb_init",wysiwyg.initAll)}(window,document,jQuery,window.CMB2.wysiwyg);
 
trunk/vendor/webdevstudios/cmb2/js/index.php DELETED
@@ -1,2 +0,0 @@
1
- <?php
2
- // Silence is golden
 
 
trunk/vendor/webdevstudios/cmb2/js/jquery-ui-timepicker-addon.min.js DELETED
@@ -1,5 +0,0 @@
1
- /*! jQuery Timepicker Addon - v1.5.0 - 2014-09-01
2
- * http://trentrichardson.com/examples/timepicker
3
- * Copyright (c) 2014 Trent Richardson; Licensed MIT */
4
- (function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"1.5.0"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,timeOnlyShowDate:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,maxTime:null,minTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,altRedirectFocus:!0,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",defaultValue:null,parse:"strict"},$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,maxTime:null,minTime:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_newInst:function($input,opts){var tp_inst=new Timepicker,inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue)try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}overrides={beforeShow:function(e,t){return $.isFunction(tp_inst._defaults.evnts.beforeShow)?tp_inst._defaults.evnts.beforeShow.call($input[0],e,t,tp_inst):void 0},onChangeMonthYear:function(e,t,i){tp_inst._updateDateTime(i),$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],e,t,i,tp_inst)},onClose:function(e,t){tp_inst.timeDefined===!0&&""!==$input.val()&&tp_inst._updateDateTime(t),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],e,t,tp_inst)}};for(i in overrides)overrides.hasOwnProperty(i)&&(fns[i]=opts[i]||null);tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(e){return e.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(e){return e.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"===tp_inst._defaults.controlType&&$.ui.slider===void 0&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType;var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];null!==tp_inst._defaults.timezoneList&&(timezoneList=tp_inst._defaults.timezoneList);var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&"object"!=typeof timezoneList[0])for(;tzl>tzi;tzi++)tzv=timezoneList[tzi],timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)};return tp_inst._defaults.timezoneList=timezoneList,tp_inst.timezone=null!==tp_inst._defaults.timezone?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):-1*(new Date).getTimezoneOffset(),tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.microsec=tp_inst._defaults.microsec<tp_inst._defaults.microsecMin?tp_inst._defaults.microsecMin:tp_inst._defaults.microsec>tp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec,tp_inst.ampm="",tp_inst.$input=$input,tp_inst._defaults.altField&&(tp_inst.$altInput=$(tp_inst._defaults.altField),tp_inst._defaults.altRedirectFocus===!0&&tp_inst.$altInput.css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),(0===tp_inst._defaults.minDate||0===tp_inst._defaults.minDateTime)&&(tp_inst._defaults.minDate=new Date),(0===tp_inst._defaults.maxDate||0===tp_inst._defaults.maxDateTime)&&(tp_inst._defaults.maxDate=new Date),void 0!==tp_inst._defaults.minDate&&tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),void 0!==tp_inst._defaults.minDateTime&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),void 0!==tp_inst._defaults.maxDate&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),void 0!==tp_inst._defaults.maxDateTime&&tp_inst._defaults.maxDateTime instanceof Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(e){var t=this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val();this.timeDefined=this._parseTime(t),this._limitMinMaxDateTime(e,!1),this._injectTimePicker()},_parseTime:function(e,t){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),t||!this._defaults.timeOnly){var i=$.datepicker._get(this.inst,"dateFormat");try{var s=parseDateTimeInternal(i,this._defaults.timeFormat,e,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!s.timeObj)return!1;$.extend(this,s.timeObj)}catch(a){return $.timepicker.log("Error parsing the date/time string: "+a+"\ndate/time string = "+e+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+i),!1}return!0}var n=$.datepicker.parseTime(this._defaults.timeFormat,e,this._defaults);return n?($.extend(this,n),!0):!1},_injectTimePicker:function(){var e=this.inst.dpDiv,t=this.inst.settings,i=this,s="",a="",n=null,r={},l={},o=null,c=0,u=0;if(0===e.find("div.ui-timepicker-div").length&&t.showTimepicker){var m=' style="display:none;"',d='<div class="ui-timepicker-div'+(t.isRTL?" ui-timepicker-rtl":"")+'"><dl>'+'<dt class="ui_tpicker_time_label"'+(t.showTime?"":m)+">"+t.timeText+"</dt>"+'<dd class="ui_tpicker_time"'+(t.showTime?"":m)+"></dd>";for(c=0,u=this.units.length;u>c;c++){if(s=this.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],r[s]=parseInt(t[s+"Max"]-(t[s+"Max"]-t[s+"Min"])%t["step"+a],10),l[s]=0,d+='<dt class="ui_tpicker_'+s+'_label"'+(n?"":m)+">"+t[s+"Text"]+"</dt>"+'<dd class="ui_tpicker_'+s+'"><div class="ui_tpicker_'+s+'_slider"'+(n?"":m)+"></div>",n&&t[s+"Grid"]>0){if(d+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>',"hour"===s)for(var h=t[s+"Min"];r[s]>=h;h+=parseInt(t[s+"Grid"],10)){l[s]++;var p=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:h},t);d+='<td data-for="'+s+'">'+p+"</td>"}else for(var _=t[s+"Min"];r[s]>=_;_+=parseInt(t[s+"Grid"],10))l[s]++,d+='<td data-for="'+s+'">'+(10>_?"0":"")+_+"</td>";d+="</tr></table></div>"}d+="</dd>"}var f=null!==t.showTimezone?t.showTimezone:this.support.timezone;d+='<dt class="ui_tpicker_timezone_label"'+(f?"":m)+">"+t.timezoneText+"</dt>",d+='<dd class="ui_tpicker_timezone" '+(f?"":m)+"></dd>",d+="</dl></div>";var g=$(d);for(t.timeOnly===!0&&(g.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+t.timeOnlyTitle+"</div>"+"</div>"),e.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),c=0,u=i.units.length;u>c;c++)s=i.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],i[s+"_slider"]=i.control.create(i,g.find(".ui_tpicker_"+s+"_slider"),s,i[s],t[s+"Min"],r[s],t["step"+a]),n&&t[s+"Grid"]>0&&(o=100*l[s]*t[s+"Grid"]/(r[s]-t[s+"Min"]),g.find(".ui_tpicker_"+s+" table").css({width:o+"%",marginLeft:t.isRTL?"0":o/(-2*l[s])+"%",marginRight:t.isRTL?o/(-2*l[s])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(){var e=$(this),t=e.html(),a=parseInt(t.replace(/[^0-9]/g),10),n=t.replace(/[^apm]/gi),r=e.data("for");"hour"===r&&(-1!==n.indexOf("p")&&12>a?a+=12:-1!==n.indexOf("a")&&12===a&&(a=0)),i.control.value(i,i[r+"_slider"],s,a),i._onTimeChange(),i._onSelectHandler()}).css({cursor:"pointer",width:100/l[s]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=g.find(".ui_tpicker_timezone").append("<select></select>").find("select"),$.fn.append.apply(this.timezone_select,$.map(t.timezoneList,function(e){return $("<option />").val("object"==typeof e?e.value:e).text("object"==typeof e?e.label:e)})),this.timezone!==void 0&&null!==this.timezone&&""!==this.timezone){var M=-1*new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12).getTimezoneOffset();M===this.timezone?selectLocalTimezone(i):this.timezone_select.val(this.timezone)}else this.hour!==void 0&&null!==this.hour&&""!==this.hour?this.timezone_select.val(t.timezone):selectLocalTimezone(i);this.timezone_select.change(function(){i._onTimeChange(),i._onSelectHandler()});var v=e.find(".ui-datepicker-buttonpane");if(v.length?v.before(g):e.append(g),this.$timeObj=g.find(".ui_tpicker_time"),null!==this.inst){var k=this.timeDefined;this._onTimeChange(),this.timeDefined=k}if(this._defaults.addSliderAccess){var T=this._defaults.sliderAccessArgs,D=this._defaults.isRTL;T.isRTL=D,setTimeout(function(){if(0===g.find(".ui-slider-access").length){g.find(".ui-slider:visible").sliderAccess(T);var e=g.find(".ui-slider-access:eq(0)").outerWidth(!0);e&&g.find("table:visible").each(function(){var t=$(this),i=t.outerWidth(),s=(""+t.css(D?"marginRight":"marginLeft")).replace("%",""),a=i-e,n=s*a/i+"%",r={width:a,marginRight:0,marginLeft:0};r[D?"marginRight":"marginLeft"]=n,t.css(r)})}},10)}i._limitMinMaxDateTime(this.inst,!0)}},_limitMinMaxDateTime:function(e,t){var i=this._defaults,s=new Date(e.selectedYear,e.selectedMonth,e.selectedDay);if(this._defaults.showTimepicker){if(null!==$.datepicker._get(e,"minDateTime")&&void 0!==$.datepicker._get(e,"minDateTime")&&s){var a=$.datepicker._get(e,"minDateTime"),n=new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0,0);(null===this.hourMinOriginal||null===this.minuteMinOriginal||null===this.secondMinOriginal||null===this.millisecMinOriginal||null===this.microsecMinOriginal)&&(this.hourMinOriginal=i.hourMin,this.minuteMinOriginal=i.minuteMin,this.secondMinOriginal=i.secondMin,this.millisecMinOriginal=i.millisecMin,this.microsecMinOriginal=i.microsecMin),e.settings.timeOnly||n.getTime()===s.getTime()?(this._defaults.hourMin=a.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=a.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=a.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=a.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=a.getMicroseconds()):(this.microsec<this._defaults.microsecMin&&(this.microsec=this._defaults.microsecMin),this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)}if(null!==$.datepicker._get(e,"maxDateTime")&&void 0!==$.datepicker._get(e,"maxDateTime")&&s){var r=$.datepicker._get(e,"maxDateTime"),l=new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0,0);(null===this.hourMaxOriginal||null===this.minuteMaxOriginal||null===this.secondMaxOriginal||null===this.millisecMaxOriginal)&&(this.hourMaxOriginal=i.hourMax,this.minuteMaxOriginal=i.minuteMax,this.secondMaxOriginal=i.secondMax,this.millisecMaxOriginal=i.millisecMax,this.microsecMaxOriginal=i.microsecMax),e.settings.timeOnly||l.getTime()===s.getTime()?(this._defaults.hourMax=r.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=r.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=r.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=r.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=this._defaults.millisecMax,this._defaults.microsecMax=r.getMicroseconds()):(this.microsec>this._defaults.microsecMax&&(this.microsec=this._defaults.microsecMax),this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)}if(null!==e.settings.minTime){var o=new Date("01/01/1970 "+e.settings.minTime);this.hour<o.getHours()?(this.hour=this._defaults.hourMin=o.getHours(),this.minute=this._defaults.minuteMin=o.getMinutes()):this.hour===o.getHours()&&this.minute<o.getMinutes()?this.minute=this._defaults.minuteMin=o.getMinutes():this._defaults.hourMin<o.getHours()?(this._defaults.hourMin=o.getHours(),this._defaults.minuteMin=o.getMinutes()):this._defaults.minuteMin=this._defaults.hourMin===o.getHours()===this.hour&&this._defaults.minuteMin<o.getMinutes()?o.getMinutes():0}if(null!==e.settings.maxTime){var c=new Date("01/01/1970 "+e.settings.maxTime);this.hour>c.getHours()?(this.hour=this._defaults.hourMax=c.getHours(),this.minute=this._defaults.minuteMax=c.getMinutes()):this.hour===c.getHours()&&this.minute>c.getMinutes()?this.minute=this._defaults.minuteMax=c.getMinutes():this._defaults.hourMax>c.getHours()?(this._defaults.hourMax=c.getHours(),this._defaults.minuteMax=c.getMinutes()):this._defaults.minuteMax=this._defaults.hourMax===c.getHours()===this.hour&&this._defaults.minuteMax>c.getMinutes()?c.getMinutes():59}if(void 0!==t&&t===!0){var u=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),m=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),d=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),h=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10),p=parseInt(this._defaults.microsecMax-(this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec,10);this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:u,step:this._defaults.stepHour}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour)),this.minute_slider&&(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:m,step:this._defaults.stepMinute}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute)),this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:d,step:this._defaults.stepSecond}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond)),this.millisec_slider&&(this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:h,step:this._defaults.stepMillisec}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec)),this.microsec_slider&&(this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:p,step:this._defaults.stepMicrosec}),this.control.value(this,this.microsec_slider,"microsec",this.microsec-this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){if(this._defaults.showTimepicker){var e=this.hour_slider?this.control.value(this,this.hour_slider,"hour"):!1,t=this.minute_slider?this.control.value(this,this.minute_slider,"minute"):!1,i=this.second_slider?this.control.value(this,this.second_slider,"second"):!1,s=this.millisec_slider?this.control.value(this,this.millisec_slider,"millisec"):!1,a=this.microsec_slider?this.control.value(this,this.microsec_slider,"microsec"):!1,n=this.timezone_select?this.timezone_select.val():!1,r=this._defaults,l=r.pickerTimeFormat||r.timeFormat,o=r.pickerTimeSuffix||r.timeSuffix;"object"==typeof e&&(e=!1),"object"==typeof t&&(t=!1),"object"==typeof i&&(i=!1),"object"==typeof s&&(s=!1),"object"==typeof a&&(a=!1),"object"==typeof n&&(n=!1),e!==!1&&(e=parseInt(e,10)),t!==!1&&(t=parseInt(t,10)),i!==!1&&(i=parseInt(i,10)),s!==!1&&(s=parseInt(s,10)),a!==!1&&(a=parseInt(a,10)),n!==!1&&(n=""+n);var c=r[12>e?"amNames":"pmNames"][0],u=e!==parseInt(this.hour,10)||t!==parseInt(this.minute,10)||i!==parseInt(this.second,10)||s!==parseInt(this.millisec,10)||a!==parseInt(this.microsec,10)||this.ampm.length>0&&12>e!=(-1!==$.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&n!==""+this.timezone;u&&(e!==!1&&(this.hour=e),t!==!1&&(this.minute=t),i!==!1&&(this.second=i),s!==!1&&(this.millisec=s),a!==!1&&(this.microsec=a),n!==!1&&(this.timezone=n),this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=c),this.formattedTime=$.datepicker.formatTime(r.timeFormat,this,r),this.$timeObj&&(l===r.timeFormat?this.$timeObj.text(this.formattedTime+o):this.$timeObj.text($.datepicker.formatTime(l,this,r)+o)),this.timeDefined=!0,u&&this._updateDateTime()}},_onSelectHandler:function(){var e=this._defaults.onSelect||this.inst.settings.onSelect,t=this.$input?this.$input[0]:null;e&&t&&e.apply(t,[this.formattedDateTime,this])},_updateDateTime:function(e){e=this.inst||e;var t=e.currentYear>0?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(e.selectedYear,e.selectedMonth,e.selectedDay),i=$.datepicker._daylightSavingAdjust(t),s=$.datepicker._get(e,"dateFormat"),a=$.datepicker._getFormatConfig(e),n=null!==i&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(s,null===i?new Date:i,a);var r=this.formattedDate;if(""===e.lastVal&&(e.currentYear=e.selectedYear,e.currentMonth=e.selectedMonth,e.currentDay=e.selectedDay),this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!1?r=this.formattedTime:(this._defaults.timeOnly!==!0&&(this._defaults.alwaysSetTime||n)||this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!0)&&(r+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=r,this._defaults.showTimepicker)if(this.$altInput&&this._defaults.timeOnly===!1&&this._defaults.altFieldTimeOnly===!0)this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate);else if(this.$altInput){this.$input.val(r);var l="",o=null!==this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,c=null!==this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;this._defaults.timeOnly||(l=this._defaults.altFormat?$.datepicker.formatDate(this._defaults.altFormat,null===i?new Date:i,a):this.formattedDate,l&&(l+=o)),l+=null!==this._defaults.altTimeFormat?$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+c:this.formattedTime+c,this.$altInput.val(l)}else this.$input.val(r);else this.$input.val(this.formattedDate);this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var e=$.datepicker._getInst(this.$input.get(0)),t=$.datepicker._get(e,"timepicker");if(t&&t._defaults.timeOnly&&e.input.val()!==e.lastVal)try{$.datepicker._updateDatepicker(e)}catch(i){$.timepicker.log(i)}}},_controls:{slider:{create:function(e,t,i,s,a,n,r){var l=e._defaults.isRTL;return t.prop("slide",null).slider({orientation:"horizontal",value:l?-1*s:s,min:l?-1*n:a,max:l?-1*a:n,step:r,slide:function(t,s){e.control.value(e,$(this),i,l?-1*s.value:s.value),e._onTimeChange()},stop:function(){e._onSelectHandler()}})},options:function(e,t,i,s,a){if(e._defaults.isRTL){if("string"==typeof s)return"min"===s||"max"===s?void 0!==a?t.slider(s,-1*a):Math.abs(t.slider(s)):t.slider(s);var n=s.min,r=s.max;return s.min=s.max=null,void 0!==n&&(s.max=-1*n),void 0!==r&&(s.min=-1*r),t.slider(s)}return"string"==typeof s&&void 0!==a?t.slider(s,a):t.slider(s)},value:function(e,t,i,s){return e._defaults.isRTL?void 0!==s?t.slider("value",-1*s):Math.abs(t.slider("value")):void 0!==s?t.slider("value",s):t.slider("value")}},select:{create:function(e,t,i,s,a,n,r){for(var l='<select class="ui-timepicker-select ui-state-default ui-corner-all" data-unit="'+i+'" data-min="'+a+'" data-max="'+n+'" data-step="'+r+'">',o=e._defaults.pickerTimeFormat||e._defaults.timeFormat,c=a;n>=c;c+=r)l+='<option value="'+c+'"'+(c===s?" selected":"")+">",l+="hour"===i?$.datepicker.formatTime($.trim(o.replace(/[^ht ]/gi,"")),{hour:c},e._defaults):"millisec"===i||"microsec"===i||c>=10?c:"0"+(""+c),l+="</option>";return l+="</select>",t.children("select").remove(),$(l).appendTo(t).change(function(){e._onTimeChange(),e._onSelectHandler()}),t},options:function(e,t,i,s,a){var n={},r=t.children("select");if("string"==typeof s){if(void 0===a)return r.data(s);n[s]=a}else n=s;return e.control.create(e,t,r.data("unit"),r.val(),n.min||r.data("min"),n.max||r.data("max"),n.step||r.data("step"))},value:function(e,t,i,s){var a=t.children("select");return void 0!==s?a.val(s):a.val()}}}}),$.fn.extend({timepicker:function(e){e=e||{};var t=Array.prototype.slice.call(arguments);return"object"==typeof e&&(t[0]=$.extend(e,{timeOnly:!0})),$(this).each(function(){$.fn.datetimepicker.apply($(this),t)})},datetimepicker:function(e){e=e||{};var t=arguments;return"string"==typeof e?"getDate"===e||"option"===e&&2===t.length&&"string"==typeof t[1]?$.fn.datepicker.apply($(this[0]),t):this.each(function(){var e=$(this);e.datepicker.apply(e,t)}):this.each(function(){var t=$(this);t.datepicker($.timepicker._newInst(t,e)._defaults)})}}),$.datepicker.parseDateTime=function(e,t,i,s,a){var n=parseDateTimeInternal(e,t,i,s,a);if(n.timeObj){var r=n.timeObj;n.date.setHours(r.hour,r.minute,r.second,r.millisec),n.date.setMicroseconds(r.microsec)}return n.date},$.datepicker.parseTime=function(e,t,i){var s=extendRemove(extendRemove({},$.timepicker._defaults),i||{});-1!==e.replace(/\'.*?\'/g,"").indexOf("Z");var a=function(e,t,i){var s,a=function(e,t){var i=[];return e&&$.merge(i,e),t&&$.merge(i,t),i=$.map(i,function(e){return e.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")}),"("+i.join("|")+")?"},n=function(e){var t=e.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),i={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(t)for(var s=0;t.length>s;s++)-1===i[(""+t[s]).charAt(0)]&&(i[(""+t[s]).charAt(0)]=s+1);return i},r="^"+(""+e).replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){var t=e.length;switch(e.charAt(0).toLowerCase()){case"h":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"m":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"s":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"l":return"(\\d?\\d?\\d)";case"c":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return a(i.amNames,i.pmNames);default:return"("+e.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(e){return"\\"+e})+")?"}}).replace(/\s/g,"\\s?")+i.timeSuffix+"$",l=n(e),o="";s=t.match(RegExp(r,"i"));var c={hour:0,minute:0,second:0,millisec:0,microsec:0};return s?(-1!==l.t&&(void 0===s[l.t]||0===s[l.t].length?(o="",c.ampm=""):(o=-1!==$.inArray(s[l.t].toUpperCase(),i.amNames)?"AM":"PM",c.ampm=i["AM"===o?"amNames":"pmNames"][0])),-1!==l.h&&(c.hour="AM"===o&&"12"===s[l.h]?0:"PM"===o&&"12"!==s[l.h]?parseInt(s[l.h],10)+12:Number(s[l.h])),-1!==l.m&&(c.minute=Number(s[l.m])),-1!==l.s&&(c.second=Number(s[l.s])),-1!==l.l&&(c.millisec=Number(s[l.l])),-1!==l.c&&(c.microsec=Number(s[l.c])),-1!==l.z&&void 0!==s[l.z]&&(c.timezone=$.timepicker.timezoneOffsetNumber(s[l.z])),c):!1},n=function(e,t,i){try{var s=new Date("2012-01-01 "+t);if(isNaN(s.getTime())&&(s=new Date("2012-01-01T"+t),isNaN(s.getTime())&&(s=new Date("01/01/2012 "+t),isNaN(s.getTime()))))throw"Unable to parse time with native Date: "+t;return{hour:s.getHours(),minute:s.getMinutes(),second:s.getSeconds(),millisec:s.getMilliseconds(),microsec:s.getMicroseconds(),timezone:-1*s.getTimezoneOffset()}}catch(n){try{return a(e,t,i)}catch(r){$.timepicker.log("Unable to parse \ntimeString: "+t+"\ntimeFormat: "+e)}}return!1};return"function"==typeof s.parse?s.parse(e,t,s):"loose"===s.parse?n(e,t,s):a(e,t,s)},$.datepicker.formatTime=function(e,t,i){i=i||{},i=$.extend({},$.timepicker._defaults,i),t=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},t);var s=e,a=i.amNames[0],n=parseInt(t.hour,10);return n>11&&(a=i.pmNames[0]),s=s.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){switch(e){case"HH":return("0"+n).slice(-2);case"H":return n;case"hh":return("0"+convert24to12(n)).slice(-2);case"h":return convert24to12(n);case"mm":return("0"+t.minute).slice(-2);case"m":return t.minute;case"ss":return("0"+t.second).slice(-2);case"s":return t.second;case"l":return("00"+t.millisec).slice(-3);case"c":return("00"+t.microsec).slice(-3);case"z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!1);case"Z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!0);case"T":return a.charAt(0).toUpperCase();case"TT":return a.toUpperCase();case"t":return a.charAt(0).toLowerCase();case"tt":return a.toLowerCase();default:return e.replace(/'/g,"")}})},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(e,t){var i,s=this._getInst($(e)[0]),a=this._get(s,"timepicker");a&&s.settings.showTimepicker?(a._limitMinMaxDateTime(s,!0),i=s.inline,s.inline=s.stay_open=!0,this._base_selectDate(e,t),s.inline=i,s.stay_open=!1,this._notifyChange(s),this._updateDatepicker(s)):this._base_selectDate(e,t)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(e){var t=e.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!==e&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==t||"boolean"==typeof e.stay_open&&e.stay_open!==!1)){this._base_updateDatepicker(e);var i=this._get(e,"timepicker");i&&i._addTimePicker(e)}},$.datepicker._base_doKeyPress=$.datepicker._doKeyPress,$.datepicker._doKeyPress=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&$.datepicker._get(t,"constrainInput")){var s=i.support.ampm,a=null!==i._defaults.showTimezone?i._defaults.showTimezone:i.support.timezone,n=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),r=(""+i._defaults.timeFormat).replace(/[hms]/g,"").replace(/TT/g,s?"APM":"").replace(/Tt/g,s?"AaPpMm":"").replace(/tT/g,s?"AaPpMm":"").replace(/T/g,s?"AP":"").replace(/tt/g,s?"apm":"").replace(/t/g,s?"ap":"")+" "+i._defaults.separator+i._defaults.timeSuffix+(a?i._defaults.timezoneList.join(""):"")+i._defaults.amNames.join("")+i._defaults.pmNames.join("")+n,l=String.fromCharCode(void 0===e.charCode?e.keyCode:e.charCode);return e.ctrlKey||" ">l||!n||r.indexOf(l)>-1}return $.datepicker._base_doKeyPress(e)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(e){var t=this._get(e,"timepicker");if(t){var i=t._defaults.altField;if(i){var s=(t._defaults.altFormat||t._defaults.dateFormat,this._getDate(e)),a=$.datepicker._getFormatConfig(e),n="",r=t._defaults.altSeparator?t._defaults.altSeparator:t._defaults.separator,l=t._defaults.altTimeSuffix?t._defaults.altTimeSuffix:t._defaults.timeSuffix,o=null!==t._defaults.altTimeFormat?t._defaults.altTimeFormat:t._defaults.timeFormat;n+=$.datepicker.formatTime(o,t,t._defaults)+l,t._defaults.timeOnly||t._defaults.altFieldTimeOnly||null===s||(n=t._defaults.altFormat?$.datepicker.formatDate(t._defaults.altFormat,s,a)+r+n:t.formattedDate+r+n),$(i).val(e.input.val()?n:"")}}else $.datepicker._base_updateAlternate(e)},$.datepicker._base_doKeyUp=$.datepicker._doKeyUp,$.datepicker._doKeyUp=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&i._defaults.timeOnly&&t.input.val()!==t.lastVal)try{$.datepicker._updateDatepicker(t)}catch(s){$.timepicker.log(s)}return $.datepicker._base_doKeyUp(e)},$.datepicker._base_gotoToday=$.datepicker._gotoToday,$.datepicker._gotoToday=function(e){var t=this._getInst($(e)[0]);t.dpDiv,this._base_gotoToday(e);var i=this._get(t,"timepicker");selectLocalTimezone(i);var s=new Date;this._setTime(t,s),this._setDate(t,s)},$.datepicker._disableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!1,i._defaults.showTimepicker=!1,i._updateDateTime(t))}},$.datepicker._enableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!0,i._defaults.showTimepicker=!0,i._addTimePicker(t),i._updateDateTime(t))}},$.datepicker._setTime=function(e,t){var i=this._get(e,"timepicker");if(i){var s=i._defaults;
5
- i.hour=t?t.getHours():s.hour,i.minute=t?t.getMinutes():s.minute,i.second=t?t.getSeconds():s.second,i.millisec=t?t.getMilliseconds():s.millisec,i.microsec=t?t.getMicroseconds():s.microsec,i._limitMinMaxDateTime(e,!0),i._onTimeChange(),i._updateDateTime(e)}},$.datepicker._setTimeDatepicker=function(e,t,i){var s=this._getInst(e);if(s){var a=this._get(s,"timepicker");if(a){this._setDateFromField(s);var n;t&&("string"==typeof t?(a._parseTime(t,i),n=new Date,n.setHours(a.hour,a.minute,a.second,a.millisec),n.setMicroseconds(a.microsec)):(n=new Date(t.getTime()),n.setMicroseconds(t.getMicroseconds())),"Invalid Date"==""+n&&(n=void 0),this._setTime(s,n))}}},$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker,$.datepicker._setDateDatepicker=function(e,t){var i=this._getInst(e),s=t;if(i){"string"==typeof t&&(s=new Date(t),s.getTime()||(this._base_setDateDatepicker.apply(this,arguments),s=$(e).datepicker("getDate")));var a,n=this._get(i,"timepicker");s instanceof Date?(a=new Date(s.getTime()),a.setMicroseconds(s.getMicroseconds())):a=s,n&&a&&(n.support.timezone||null!==n._defaults.timezone||(n.timezone=-1*a.getTimezoneOffset()),s=$.timepicker.timezoneAdjust(s,n.timezone),a=$.timepicker.timezoneAdjust(a,n.timezone)),this._updateDatepicker(i),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(e,a,!0)}},$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker,$.datepicker._getDateDatepicker=function(e,t){var i=this._getInst(e);if(i){var s=this._get(i,"timepicker");if(s){void 0===i.lastVal&&this._setDateFromField(i,t);var a=this._getDate(i);return a&&s._parseTime($(e).val(),s.timeOnly)&&(a.setHours(s.hour,s.minute,s.second,s.millisec),a.setMicroseconds(s.microsec),null!=s.timezone&&(s.support.timezone||null!==s._defaults.timezone||(s.timezone=-1*a.getTimezoneOffset()),a=$.timepicker.timezoneAdjust(a,s.timezone))),a}return this._base_getDateDatepicker(e,t)}},$.datepicker._base_parseDate=$.datepicker.parseDate,$.datepicker.parseDate=function(e,t,i){var s;try{s=this._base_parseDate(e,t,i)}catch(a){if(!(a.indexOf(":")>=0))throw a;s=this._base_parseDate(e,t.substring(0,t.length-(a.length-a.indexOf(":")-2)),i),$.timepicker.log("Error parsing the date string: "+a+"\ndate string = "+t+"\ndate format = "+e)}return s},$.datepicker._base_formatDate=$.datepicker._formatDate,$.datepicker._formatDate=function(e){var t=this._get(e,"timepicker");return t?(t._updateDateTime(e),t.$input.val()):this._base_formatDate(e)},$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker,$.datepicker._optionDatepicker=function(e,t,i){var s,a=this._getInst(e);if(!a)return null;var n=this._get(a,"timepicker");if(n){var r,l,o,c,u=null,m=null,d=null,h=n._defaults.evnts,p={};if("string"==typeof t){if("minDate"===t||"minDateTime"===t)u=i;else if("maxDate"===t||"maxDateTime"===t)m=i;else if("onSelect"===t)d=i;else if(h.hasOwnProperty(t)){if(i===void 0)return h[t];p[t]=i,s={}}}else if("object"==typeof t){t.minDate?u=t.minDate:t.minDateTime?u=t.minDateTime:t.maxDate?m=t.maxDate:t.maxDateTime&&(m=t.maxDateTime);for(r in h)h.hasOwnProperty(r)&&t[r]&&(p[r]=t[r])}for(r in p)p.hasOwnProperty(r)&&(h[r]=p[r],s||(s=$.extend({},t)),delete s[r]);if(s&&isEmptyObject(s))return;if(u?(u=0===u?new Date:new Date(u),n._defaults.minDate=u,n._defaults.minDateTime=u):m?(m=0===m?new Date:new Date(m),n._defaults.maxDate=m,n._defaults.maxDateTime=m):d&&(n._defaults.onSelect=d),u||m)return c=$(e),o=c.datetimepicker("getDate"),l=this._base_optionDatepicker.call($.datepicker,e,s||t,i),c.datetimepicker("setDate",o),l}return void 0===i?this._base_optionDatepicker.call($.datepicker,e,t):this._base_optionDatepicker.call($.datepicker,e,s||t,i)};var isEmptyObject=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0},extendRemove=function(e,t){$.extend(e,t);for(var i in t)(null===t[i]||void 0===t[i])&&(e[i]=t[i]);return e},detectSupport=function(e){var t=e.replace(/'.*?'/g,"").toLowerCase(),i=function(e,t){return-1!==e.indexOf(t)?!0:!1};return{hour:i(t,"h"),minute:i(t,"m"),second:i(t,"s"),millisec:i(t,"l"),microsec:i(t,"c"),timezone:i(t,"z"),ampm:i(t,"t")&&i(e,"h"),iso8601:i(e,"Z")}},convert24to12=function(e){return e%=12,0===e&&(e=12),e+""},computeEffectiveSetting=function(e,t){return e&&e[t]?e[t]:$.timepicker._defaults[t]},splitDateTime=function(e,t){var i=computeEffectiveSetting(t,"separator"),s=computeEffectiveSetting(t,"timeFormat"),a=s.split(i),n=a.length,r=e.split(i),l=r.length;return l>1?{dateString:r.splice(0,l-n).join(i),timeString:r.splice(0,n).join(i)}:{dateString:e,timeString:""}},parseDateTimeInternal=function(e,t,i,s,a){var n,r,l;if(r=splitDateTime(i,a),n=$.datepicker._base_parseDate(e,r.dateString,s),""===r.timeString)return{date:n};if(l=$.datepicker.parseTime(t,r.timeString,a),!l)throw"Wrong time format";return{date:n,timeObj:l}},selectLocalTimezone=function(e,t){if(e&&e.timezone_select){var i=t||new Date;e.timezone_select.val(-i.getTimezoneOffset())}};$.timepicker=new Timepicker,$.timepicker.timezoneOffsetString=function(e,t){if(isNaN(e)||e>840||-720>e)return e;var i=e,s=i%60,a=(i-s)/60,n=t?":":"",r=(i>=0?"+":"-")+("0"+Math.abs(a)).slice(-2)+n+("0"+Math.abs(s)).slice(-2);return"+00:00"===r?"Z":r},$.timepicker.timezoneOffsetNumber=function(e){var t=(""+e).replace(":","");return"Z"===t.toUpperCase()?0:/^(\-|\+)\d{4}$/.test(t)?("-"===t.substr(0,1)?-1:1)*(60*