Version Description
- Small improvements to the metabox system.
- Fixed Color Picker style.
Download this release
Release Info
Developer | euthelup |
Plugin | PixTypes |
Version | 1.4.7 |
Comparing to | |
See all releases |
Code changes from version 1.4.6 to 1.4.7
- class-pixtypes.php +4 -2
- features/metaboxes/css/style.css +9 -13
- features/metaboxes/metaboxes.php +26 -11
- features/metaboxes/scss/style.scss +44 -43
- pixtypes.php +1 -1
- readme.txt +7 -4
class-pixtypes.php
CHANGED
@@ -24,7 +24,7 @@ class PixTypesPlugin {
|
|
24 |
*
|
25 |
* @const string
|
26 |
*/
|
27 |
-
protected $version = '1.4.
|
28 |
/**
|
29 |
* Unique identifier for your plugin.
|
30 |
*
|
@@ -101,7 +101,9 @@ class PixTypesPlugin {
|
|
101 |
|
102 |
add_action( 'plugins_loaded', array( $this, 'register_metaboxes' ), 14 );
|
103 |
add_action( 'init', array( $this, 'register_entities' ), 99999 );
|
104 |
-
|
|
|
|
|
105 |
|
106 |
/**
|
107 |
* Ajax Callbacks
|
24 |
*
|
25 |
* @const string
|
26 |
*/
|
27 |
+
protected $version = '1.4.7';
|
28 |
/**
|
29 |
* Unique identifier for your plugin.
|
30 |
*
|
101 |
|
102 |
add_action( 'plugins_loaded', array( $this, 'register_metaboxes' ), 14 );
|
103 |
add_action( 'init', array( $this, 'register_entities' ), 99999 );
|
104 |
+
|
105 |
+
// We need this later that the default 10 so we can have things happening between the init-10 and the PixTypes config
|
106 |
+
add_action( 'init', array( $this, 'theme_version_check' ), 15 );
|
107 |
|
108 |
/**
|
109 |
* Ajax Callbacks
|
features/metaboxes/css/style.css
CHANGED
@@ -3398,7 +3398,7 @@ body .mce-toolbar.mce-last .mce-container.mce-first .mce-menubtn.mce-first .mce-
|
|
3398 |
#pixgallery {
|
3399 |
width: 100%; }
|
3400 |
|
3401 |
-
.wp-color-result {
|
3402 |
position: absolute;
|
3403 |
top: 0;
|
3404 |
right: 0;
|
@@ -3410,34 +3410,30 @@ body .mce-toolbar.mce-last .mce-container.mce-first .mce-menubtn.mce-first .mce-
|
|
3410 |
box-shadow: none;
|
3411 |
display: flex;
|
3412 |
align-items: center; }
|
3413 |
-
.wp-color-result:after {
|
3414 |
content: none; }
|
3415 |
-
|
3416 |
-
.wp-picker-container {
|
3417 |
position: absolute;
|
3418 |
right: 0;
|
3419 |
top: 50%;
|
3420 |
margin-top: -9px;
|
3421 |
z-index: 10; }
|
3422 |
-
.wp-picker-container .iris-border {
|
3423 |
border-radius: 4px; }
|
3424 |
-
|
3425 |
-
.wp-picker-active {
|
3426 |
width: 255px;
|
3427 |
display: flex;
|
3428 |
flex-wrap: wrap; }
|
3429 |
-
.wp-picker-active .wp-color-result:after {
|
3430 |
content: none; }
|
3431 |
-
|
3432 |
-
.wp-picker-open + .wp-picker-input-wrap {
|
3433 |
display: flex;
|
3434 |
align-items: stretch; }
|
3435 |
-
.wp-picker-open + .wp-picker-input-wrap .button {
|
3436 |
height: auto;
|
3437 |
padding-left: 10px;
|
3438 |
padding-right: 10px; }
|
3439 |
-
|
3440 |
-
.wp-picker-container input[type=text].wp-color-picker {
|
3441 |
width: 85px;
|
3442 |
text-align: left; }
|
3443 |
|
3398 |
#pixgallery {
|
3399 |
width: 100%; }
|
3400 |
|
3401 |
+
.cmb-type-colorpicker .wp-color-result {
|
3402 |
position: absolute;
|
3403 |
top: 0;
|
3404 |
right: 0;
|
3410 |
box-shadow: none;
|
3411 |
display: flex;
|
3412 |
align-items: center; }
|
3413 |
+
.cmb-type-colorpicker .wp-color-result:after {
|
3414 |
content: none; }
|
3415 |
+
.cmb-type-colorpicker .wp-picker-container {
|
|
|
3416 |
position: absolute;
|
3417 |
right: 0;
|
3418 |
top: 50%;
|
3419 |
margin-top: -9px;
|
3420 |
z-index: 10; }
|
3421 |
+
.cmb-type-colorpicker .wp-picker-container .iris-border {
|
3422 |
border-radius: 4px; }
|
3423 |
+
.cmb-type-colorpicker .wp-picker-active {
|
|
|
3424 |
width: 255px;
|
3425 |
display: flex;
|
3426 |
flex-wrap: wrap; }
|
3427 |
+
.cmb-type-colorpicker .wp-picker-active .wp-color-result:after {
|
3428 |
content: none; }
|
3429 |
+
.cmb-type-colorpicker .wp-picker-open + .wp-picker-input-wrap {
|
|
|
3430 |
display: flex;
|
3431 |
align-items: stretch; }
|
3432 |
+
.cmb-type-colorpicker .wp-picker-open + .wp-picker-input-wrap .button {
|
3433 |
height: auto;
|
3434 |
padding-left: 10px;
|
3435 |
padding-right: 10px; }
|
3436 |
+
.cmb-type-colorpicker .wp-picker-container input[type=text].wp-color-picker {
|
|
|
3437 |
width: 85px;
|
3438 |
text-align: left; }
|
3439 |
|
features/metaboxes/metaboxes.php
CHANGED
@@ -9,26 +9,40 @@
|
|
9 |
*/
|
10 |
|
11 |
|
12 |
-
function load_metaboxes_fromdb(
|
|
|
|
|
|
|
|
|
|
|
13 |
$options = get_option('pixtypes_settings');
|
14 |
|
15 |
-
if (
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
}
|
25 |
|
26 |
return $meta_boxes;
|
27 |
}
|
28 |
-
|
29 |
add_filter( 'cmb_meta_boxes', 'load_metaboxes_fromdb', 1 );
|
30 |
|
31 |
-
add_action( 'init', 'cmb_initialize_cmb_meta_boxes', 9999 );
|
32 |
/*
|
33 |
* Initialize the metabox class.
|
34 |
*/
|
@@ -41,3 +55,4 @@ function cmb_initialize_cmb_meta_boxes() {
|
|
41 |
}
|
42 |
|
43 |
}
|
|
9 |
*/
|
10 |
|
11 |
|
12 |
+
function load_metaboxes_fromdb( $meta_boxes ) {
|
13 |
+
// make sure we are in good working order
|
14 |
+
if ( empty( $meta_boxes ) ) {
|
15 |
+
$meta_boxes = array();
|
16 |
+
}
|
17 |
+
|
18 |
$options = get_option('pixtypes_settings');
|
19 |
|
20 |
+
if ( empty( $options['themes'] ) ) {
|
21 |
+
return $meta_boxes;
|
22 |
+
}
|
23 |
+
|
24 |
+
// We only want to display the metaboxes of the current theme
|
25 |
+
if ( class_exists('wpgrade') ) {
|
26 |
+
$current_theme = wpgrade::shortname();
|
27 |
+
} else {
|
28 |
+
$current_theme = 'pixtypes';
|
29 |
+
}
|
30 |
+
|
31 |
+
if ( empty( $options['themes'][ $current_theme ]['metaboxes'] ) ) {
|
32 |
+
return $meta_boxes;
|
33 |
+
}
|
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 |
*/
|
55 |
}
|
56 |
|
57 |
}
|
58 |
+
add_action( 'init', 'cmb_initialize_cmb_meta_boxes', 9999 );
|
features/metaboxes/scss/style.scss
CHANGED
@@ -2395,62 +2395,63 @@ body .mce-toolbar.mce-last .mce-container.mce-first .mce-menubtn.mce-first {
|
|
2395 |
#pixgallery {
|
2396 |
width: 100%;
|
2397 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2398 |
|
2399 |
-
|
2400 |
-
|
2401 |
-
top: 0;
|
2402 |
-
right: 0;
|
2403 |
-
width: 38px;
|
2404 |
-
min-height: 33px;
|
2405 |
-
border: 1px solid #DDD;
|
2406 |
-
margin: 0;
|
2407 |
-
padding: 0;
|
2408 |
-
box-shadow: none;
|
2409 |
-
|
2410 |
-
display: flex;
|
2411 |
-
align-items: center;
|
2412 |
|
2413 |
-
|
2414 |
-
|
|
|
2415 |
}
|
2416 |
-
}
|
2417 |
|
2418 |
-
.wp-picker-container {
|
2419 |
-
|
2420 |
-
|
2421 |
-
|
2422 |
-
|
2423 |
-
|
2424 |
|
2425 |
-
|
2426 |
-
|
|
|
2427 |
}
|
2428 |
-
}
|
2429 |
|
2430 |
-
.wp-picker-active {
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
|
2435 |
-
|
2436 |
-
|
|
|
2437 |
}
|
2438 |
-
}
|
2439 |
|
2440 |
-
.wp-picker-open + .wp-picker-input-wrap {
|
2441 |
-
|
2442 |
-
|
2443 |
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
|
|
2448 |
}
|
2449 |
-
}
|
2450 |
|
2451 |
-
.wp-picker-container input[type=text].wp-color-picker {
|
2452 |
-
|
2453 |
-
|
|
|
2454 |
}
|
2455 |
|
2456 |
.media-modal-close {
|
2395 |
#pixgallery {
|
2396 |
width: 100%;
|
2397 |
}
|
2398 |
+
.cmb-type-colorpicker {
|
2399 |
+
.wp-color-result {
|
2400 |
+
position: absolute;
|
2401 |
+
top: 0;
|
2402 |
+
right: 0;
|
2403 |
+
width: 38px;
|
2404 |
+
min-height: 33px;
|
2405 |
+
border: 1px solid #DDD;
|
2406 |
+
margin: 0;
|
2407 |
+
padding: 0;
|
2408 |
+
box-shadow: none;
|
2409 |
|
2410 |
+
display: flex;
|
2411 |
+
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2412 |
|
2413 |
+
&:after {
|
2414 |
+
content: none;
|
2415 |
+
}
|
2416 |
}
|
|
|
2417 |
|
2418 |
+
.wp-picker-container {
|
2419 |
+
position: absolute;
|
2420 |
+
right: 0;
|
2421 |
+
top: 50%;
|
2422 |
+
margin-top: -9px;
|
2423 |
+
z-index: 10;
|
2424 |
|
2425 |
+
.iris-border {
|
2426 |
+
border-radius: 4px;
|
2427 |
+
}
|
2428 |
}
|
|
|
2429 |
|
2430 |
+
.wp-picker-active {
|
2431 |
+
width: 255px;
|
2432 |
+
display: flex;
|
2433 |
+
flex-wrap: wrap;
|
2434 |
|
2435 |
+
.wp-color-result:after {
|
2436 |
+
content: none;
|
2437 |
+
}
|
2438 |
}
|
|
|
2439 |
|
2440 |
+
.wp-picker-open + .wp-picker-input-wrap {
|
2441 |
+
display: flex;
|
2442 |
+
align-items: stretch;
|
2443 |
|
2444 |
+
.button {
|
2445 |
+
height: auto;
|
2446 |
+
padding-left: 10px;
|
2447 |
+
padding-right: 10px;
|
2448 |
+
}
|
2449 |
}
|
|
|
2450 |
|
2451 |
+
.wp-picker-container input[type=text].wp-color-picker {
|
2452 |
+
width: 85px;
|
2453 |
+
text-align: left;
|
2454 |
+
}
|
2455 |
}
|
2456 |
|
2457 |
.media-modal-close {
|
pixtypes.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
Plugin Name: PixTypes
|
11 |
Plugin URI: https://pixelgrade.com
|
12 |
Description: Custom post types and meta-boxes needed by your theme
|
13 |
-
Version: 1.4.
|
14 |
Author: Pixelgrade
|
15 |
Author URI: https://pixelgrade.com
|
16 |
Author Email: contact@pixelgrade.com
|
10 |
Plugin Name: PixTypes
|
11 |
Plugin URI: https://pixelgrade.com
|
12 |
Description: Custom post types and meta-boxes needed by your theme
|
13 |
+
Version: 1.4.7
|
14 |
Author: Pixelgrade
|
15 |
Author URI: https://pixelgrade.com
|
16 |
Author Email: contact@pixelgrade.com
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== PixTypes ===
|
2 |
Contributors: pixelgrade, euthelup, babbardel, vlad.olaru, cristianfrumusanu, razvanonofrei
|
3 |
Tags: custom, post-types, metadata, builder, gallery
|
4 |
-
Requires at least: 4.
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 1.4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -15,7 +15,6 @@ With [PixTypes](https://github.com/pixelgrade/pixtypes) you can allow your theme
|
|
15 |
|
16 |
Note: This plugin is addressed to developers, it doesn't do nothing if it isn't [properly configured](https://github.com/pixelgrade/pixtypes#pixytpes_config).
|
17 |
|
18 |
-
|
19 |
== Installation ==
|
20 |
|
21 |
1. First you will need to configure your theme to [define PixTypes settings](https://github.com/pixelgrade/pixtypes#pixytpes_config)
|
@@ -24,6 +23,10 @@ Note: This plugin is addressed to developers, it doesn't do nothing if it isn't
|
|
24 |
|
25 |
== Changelog ==
|
26 |
|
|
|
|
|
|
|
|
|
27 |
= 1.4.6 =
|
28 |
* Fixed HTTPS WP admin issue with regards to assets.
|
29 |
|
1 |
=== PixTypes ===
|
2 |
Contributors: pixelgrade, euthelup, babbardel, vlad.olaru, cristianfrumusanu, razvanonofrei
|
3 |
Tags: custom, post-types, metadata, builder, gallery
|
4 |
+
Requires at least: 4.6.0
|
5 |
+
Tested up to: 4.8.1
|
6 |
+
Stable tag: 1.4.7
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
15 |
|
16 |
Note: This plugin is addressed to developers, it doesn't do nothing if it isn't [properly configured](https://github.com/pixelgrade/pixtypes#pixytpes_config).
|
17 |
|
|
|
18 |
== Installation ==
|
19 |
|
20 |
1. First you will need to configure your theme to [define PixTypes settings](https://github.com/pixelgrade/pixtypes#pixytpes_config)
|
23 |
|
24 |
== Changelog ==
|
25 |
|
26 |
+
= 1.4.7 =
|
27 |
+
* Small improvements to the metabox system.
|
28 |
+
* Fixed Color Picker style.
|
29 |
+
|
30 |
= 1.4.6 =
|
31 |
* Fixed HTTPS WP admin issue with regards to assets.
|
32 |
|