文件操作 - StyleParser.php
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/smart-slider-3/Nextend/Framework/Style/StyleParser.php
编辑文件内容
<?php namespace Nextend\Framework\Style; use Nextend\Framework\Misc\Base64; use Nextend\Framework\Model\Section; class StyleParser { /** * @param $data * * @return string */ public static function parse($data) { if (empty($data)) { return ''; } else if (is_numeric($data)) { /** * Linked style */ $style = Section::getById($data, 'style'); if (!$style) { /** * Linked style not exists anymore */ return ''; } if (is_string($style['value'])) { /** * Old format when value stored as Base64 */ $decoded = $style['value']; if ($decoded[0] != '{') { $decoded = Base64::decode($decoded); } return $decoded; } /** * Value stored as array */ $value = json_encode($style['value']); if ($value == false) { return ''; } return $value; } else if ($data[0] != '{') { return Base64::decode($data); } return $data; } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件