芝麻web文件管理V1.00
编辑当前文件:/home/r5772835/public_html/dina.ycreate.jp/wp-content/plugins/snow-monkey-forms/App/Model/Meta.php
$value ) { if ( ! in_array( $key, $properties, true ) ) { continue; } if ( is_array( static::$$key ) && is_array( $value ) ) { static::$$key = $value; } elseif ( ! is_array( static::$$key ) && ! is_array( $value ) ) { static::$$key = $value; } } } /** * Initialize. * * @param array $data Posted meta data. */ public static function init( $data ) { if ( is_null( static::$singleton ) ) { static::$singleton = new Meta( $data ); } return static::$singleton; } /** * Return static meta key. * * @return string */ public static function get_key() { return static::KEY; } /** * Display hidden field for multiple data. * * @param string $name The meta name. * @param array $values The meta values. */ protected static function _the_meta_multiple( $name, array $values ) { foreach ( $values as $key => $value ) { Helper::the_control( 'hidden', array( 'attributes' => array( 'name' => static::get_key() . '[' . $name . '][' . $key . ']', 'value' => $value, ), ) ); } } /** * Display hidden field. * * @param string $name The meta name. * @param string $value The meta value. */ protected static function _the_meta( $name, $value ) { Helper::the_control( 'hidden', array( 'attributes' => array( 'name' => static::get_key() . '[' . $name . ']', 'value' => $value, ), ) ); } /** * Display action button. * * @param string $action You will be given one of these. * input|confirm|complete|invalid|systemerror. * @param string $label The button label. */ public static function the_meta_button( $action, $label ) { Helper::the_control( 'button', array( 'attributes' => array( 'data-action' => $action, ), 'label' => $label . '
', ) ); } /** * Return set saved files data. * * @return array */ public static function get_saved_files() { return static::$saved_files; } /** * Set saved files data. * * @param array $saved_files Saved files data. */ public static function set_saved_files( $saved_files ) { static::$saved_files = is_array( $saved_files ) ? array_unique( $saved_files ) : array(); } /** * Display hidden fields for saved files. */ public static function the_saved_files() { static::_the_meta_multiple( 'saved_files', static::get_saved_files() ); } /** * Return set form ID. * * @return int */ public static function get_formid() { return static::$formid; } /** * Display hidden field for form ID. * * @param int $form_id The form ID. */ public static function the_formid( $form_id ) { static::_the_meta( 'formid', $form_id ); } /** * Return set token. * * @return string */ public static function get_token() { return static::$token; } /** * Display hidden field for token. */ public static function the_token() { static::_the_meta( 'token', Csrf::token() ); } /** * Return set method. * * @return string */ public static function get_method() { return static::$method; } /** * Set method. * * @param string $value You will be given one of these. * input|confirm|complete|invalid|systemerror. */ public static function set_method( $value ) { static::$method = $value; } /** * Display hidden field for method. * * @param string $value You will be given one of these. * input|confirm|complete|invalid|systemerror. */ public static function the_method( $value ) { static::_the_meta( 'method', $value ); } }