remove file_get_contents for wp.org compliance
This commit is contained in:
parent
3302351ac7
commit
eb1c776b8b
|
@ -28,9 +28,13 @@ class TainacanThemeCollectionColor {
|
||||||
}
|
}
|
||||||
|
|
||||||
function form() {
|
function form() {
|
||||||
|
|
||||||
|
if (!function_exists('tainacan_get_api_postdata')) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="field tainacan-collection--change-color-picker">
|
<div class="field tainacan-collection--change-color-picker">
|
||||||
<label class="label"><?php _e('Collection Background Color', 'tainacan-interface'); ?></label>
|
<label class="label"><?php _e('Collection Background Color', 'tainacan-interface'); ?></label>
|
||||||
|
@ -128,8 +132,11 @@ class TainacanThemeCollectionColor {
|
||||||
}
|
}
|
||||||
|
|
||||||
function save_meta($object) {
|
function save_meta($object) {
|
||||||
global $HTTP_RAW_POST_DATA;
|
if (!function_exists('tainacan_get_api_postdata')) {
|
||||||
$post = json_decode($HTTP_RAW_POST_DATA);
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$post = tainacan_get_api_postdata();
|
||||||
|
|
||||||
if ($object->can_edit()) {
|
if ($object->can_edit()) {
|
||||||
if (isset($post->{$this->background_color})) {
|
if (isset($post->{$this->background_color})) {
|
||||||
|
|
Loading…
Reference in New Issue