PATH:
home
/
lab2454c
/
adenbic.com
/
wp-content
/
plugins
/
TemplatemelaMetaBox
/
inc
/
fields
<?php // Prevent loading this file directly defined( 'ABSPATH' ) || exit; require_once RWMB_FIELDS_DIR . 'taxonomy.php'; if ( ! class_exists( 'RWMB_Taxonomy_Advanced_Field' ) ) { class RWMB_Taxonomy_Advanced_Field extends RWMB_Taxonomy_Field { /** * Get meta values to save * Save terms in custom field, no more by setting post terms * Save in form of comma-separated IDs * * @param mixed $new * @param mixed $old * @param int $post_id * @param array $field * * @return string */ static function value( $new, $old, $post_id, $field ) { return implode( ',', array_unique( $new ) ); } /** * Save meta value * * @param mixed $new * @param mixed $old * @param int $post_id * @param array $field * * @return string */ static function save( $new, $old, $post_id, $field ) { if ( $new ) update_post_meta( $post_id, $field['id'], $new ); else delete_post_meta( $post_id, $field['id'] ); } /** * Standard meta retrieval * * @param int $post_id * @param bool $saved * @param array $field * * @return array */ static function meta( $post_id, $saved, $field ) { $meta = get_post_meta( $post_id, $field['id'], true ); $meta = array_map( 'intval', array_filter( explode( ',', $meta . ',' ) ) ); return $meta; } } }
[-] image-select.php
[edit]
[-] select-advanced.php
[edit]
[-] image-advanced.php
[edit]
[-] checkbox-list.php
[edit]
[-] slider.php
[edit]
[-] hidden.php
[edit]
[-] range.php
[edit]
[+]
..
[-] email.php
[edit]
[-] file-input.php
[edit]
[-] button.php
[edit]
[-] password.php
[edit]
[-] taxonomy-advanced.php
[edit]
[-] post.php
[edit]
[-] number.php
[edit]
[-] datetime.php
[edit]
[-] checkbox.php
[edit]
[-] thickbox-image.php
[edit]
[-] color.php
[edit]
[-] select.php
[edit]
[-] plupload-image.php
[edit]
[-] url.php
[edit]
[-] file.php
[edit]
[-] file-advanced.php
[edit]
[-] textarea.php
[edit]
[-] taxonomy.php
[edit]
[-] oembed.php
[edit]
[-] radio.php
[edit]
[-] time.php
[edit]
[-] fieldset-text.php
[edit]
[-] divider.php
[edit]
[-] date.php
[edit]
[-] map.php
[edit]
[-] text-list.php
[edit]
[-] wysiwyg.php
[edit]
[-] text.php
[edit]
[-] heading.php
[edit]
[-] image.php
[edit]