PixTypes - Version 1.4.9

Version Description

Download this release

Release Info

Developer vlad.olaru
Plugin Icon wp plugin PixTypes
Version 1.4.9
Comparing to
See all releases

Code changes from version 1.4.8 to 1.4.9

features/metaboxes/cmb-field-select2-v2/.gitignore DELETED
@@ -1,16 +0,0 @@
1
- # OS or IDE folders/files to ignore
2
- *~
3
- ._*
4
- *.lock
5
- *.DS_Store
6
- *.swp
7
- *.out
8
- .cache
9
- .project
10
- .settings
11
- nbproject
12
- thumb.db
13
- Thumbs.db
14
-
15
-
16
- # Project specific files to ignore
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
features/metaboxes/cmb-field-select2-v2/css/select2.css CHANGED
@@ -15,16 +15,15 @@
15
  .select2-drop-active,
16
  .select2-container-active .select2-choice,
17
  .select2-dropdown-open.select2-drop-above .select2-choice {
18
- border-color: #999;
19
  }
20
  .select2-selection--multiple {
21
- width: 97%;
22
  }
23
 
24
  #postbox-container-2 .select2-container {
25
  width: auto;
26
- max-width: 46%;
27
- flex-basis: 46%;
28
  }
29
 
30
  .select2-selection--multiple .select2-choices .select2-search-field input {
@@ -60,3 +59,59 @@
60
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
61
  border-radius: 0;
62
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  .select2-drop-active,
16
  .select2-container-active .select2-choice,
17
  .select2-dropdown-open.select2-drop-above .select2-choice {
18
+ border-color: #DDDDDD;
19
  }
20
  .select2-selection--multiple {
21
+ width: 100%;
22
  }
23
 
24
  #postbox-container-2 .select2-container {
25
  width: auto;
26
+ max-width: 50%;
 
27
  }
28
 
29
  .select2-selection--multiple .select2-choices .select2-search-field input {
59
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
60
  border-radius: 0;
61
  }
62
+
63
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered {
64
+ display: block;
65
+ padding: 0 5px 0 0;
66
+ }
67
+
68
+ .select2-container--default .select2-selection--multiple .select2-selection__choice {
69
+ padding: 5px;
70
+ margin-left: 5px;
71
+ margin-right: 0;
72
+
73
+ background: #F7F7F7;
74
+ border-color: #DDD;
75
+ }
76
+
77
+ .select2-search--inline {
78
+ margin-bottom: 0;
79
+ }
80
+
81
+ .select2-results__option,
82
+ .select2-container--default .select2-search--inline .select2-search__field {
83
+ margin: 0;
84
+ padding: 10px 14px 10px 16px;
85
+ }
86
+
87
+ .select2-container--default .select2-results__option[aria-selected=true] {
88
+ color: inherit;
89
+ background: #F7F7F7;
90
+ }
91
+
92
+ .select2-container--default .select2-results__option--highlighted[aria-selected] {
93
+ color: #FFFFFF;
94
+ background: #5897FB;
95
+ }
96
+
97
+ .select2-container--open .select2-dropdown,
98
+ .select2-container--default .select2-selection--multiple,
99
+ .select2-container--default.select2-container--focus .select2-selection--multiple {
100
+ border-color: #DDD;
101
+ }
102
+
103
+ .select2 ::-webkit-input-placeholder {
104
+ font: inherit;
105
+ }
106
+
107
+ .select2 ::-moz-placeholder {
108
+ font: inherit;
109
+ }
110
+
111
+ .select2 :-ms-input-placeholder {
112
+ font: inherit;
113
+ }
114
+
115
+ .select2 :-moz-placeholder {
116
+ font: inherit;
117
+ }
features/metaboxes/metaboxes.php CHANGED
@@ -34,15 +34,30 @@ function load_metaboxes_fromdb( $meta_boxes ) {
34
 
35
  $theme_metaboxes = $options['themes'][ $current_theme ]['metaboxes'];
36
  if ( ! empty( $theme_metaboxes ) && is_array( $theme_metaboxes ) ) {
37
- foreach ( $theme_metaboxes as $metabox ) {
38
- $meta_boxes[] = $metabox;
39
- }
40
  }
41
 
42
  return $meta_boxes;
43
  }
44
  add_filter( 'cmb_meta_boxes', 'load_metaboxes_fromdb', 1 );
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  /*
47
  * Initialize the metabox class.
48
  */
34
 
35
  $theme_metaboxes = $options['themes'][ $current_theme ]['metaboxes'];
36
  if ( ! empty( $theme_metaboxes ) && is_array( $theme_metaboxes ) ) {
37
+ $meta_boxes = array_merge( $meta_boxes, $theme_metaboxes );
 
 
38
  }
39
 
40
  return $meta_boxes;
41
  }
42
  add_filter( 'cmb_meta_boxes', 'load_metaboxes_fromdb', 1 );
43
 
44
+ /**
45
+ * This is just a wrapper that provides an agnostic filter name, rather than relying on CMB's hook.
46
+ *
47
+ * @param array $meta_boxes
48
+ *
49
+ * @return array
50
+ */
51
+ function gather_metaboxes_dynamically( $meta_boxes ) {
52
+ // make sure we are in good working order
53
+ if ( empty( $meta_boxes ) ) {
54
+ $meta_boxes = array();
55
+ }
56
+
57
+ return apply_filters( 'pixelgrade_filter_metaboxes', $meta_boxes );
58
+ }
59
+ add_filter( 'cmb_meta_boxes', 'gather_metaboxes_dynamically', 10 );
60
+
61
  /*
62
  * Initialize the metabox class.
63
  */
pixtypes.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: PixTypes
4
  * Plugin URI: https://wordpress.org/plugins/pixtypes/
5
  * Description: Custom post types and meta-boxes needed by your themes.
6
- * Version: 1.4.8
7
  * Author URI: https://pixelgrade.com
8
  * Author Email: hello@pixelgrade.com
9
  * License: GPL2+
@@ -56,4 +56,4 @@ register_activation_hook( __FILE__, array( 'PixTypesPlugin', 'activate' ) );
56
  //register_deactivation_hook( __FILE__, array( 'PixTypesPlugin', 'deactivate' ) );
57
 
58
  global $pixtypes_plugin;
59
- $pixtypes_plugin = PixTypesPlugin::get_instance( '1.4.8' );
3
  * Plugin Name: PixTypes
4
  * Plugin URI: https://wordpress.org/plugins/pixtypes/
5
  * Description: Custom post types and meta-boxes needed by your themes.
6
+ * Version: 1.4.9
7
  * Author URI: https://pixelgrade.com
8
  * Author Email: hello@pixelgrade.com
9
  * License: GPL2+
56
  //register_deactivation_hook( __FILE__, array( 'PixTypesPlugin', 'deactivate' ) );
57
 
58
  global $pixtypes_plugin;
59
+ $pixtypes_plugin = PixTypesPlugin::get_instance( '1.4.9' );