'regular-text', 'description' => '', 'name' => '', 'option_type' => 'meta', 'single' => true, 'title' => '', 'type' => 'text', 'validation' => '', ] ); if ( empty( $attributes['name'] ) || empty( $attributes['title'] ) ) { return; } if ( $attributes['option_type'] === 'meta' ) { $current_value = (string) \get_post_meta( $post_id, $attributes['name'], $attributes['single'] ); } else { $current_value = (string) \get_option( $attributes['name'] ); } switch ( $attributes['type'] ) { case 'checkbox': case 'radio': self::get_choice( $attributes, $current_value ); break; default: self::get_text( $attributes, $current_value ); break; } } /** * Get a choice field (checkbox or radio button). * * @param array $attributes Field attributes * @param mixed $current_value Current value */ public static function get_choice( array $attributes, $current_value ) { if ( empty( $attributes['value'] ) ) { $attributes['value'] = 'yes'; } \ob_start(); ?>

[ 'href' => true, 'rel' => true, 'target' => true, ], ] ); } ?>

'', 'description' => '', 'name' => '', 'single' => true, 'title' => '', ] ); if ( empty( $attributes['name'] ) || empty( $attributes['title'] ) ) { return; } $attributes['value'] = (string) \get_post_meta( $post_id, $attributes['name'], $attributes['single'] ); $image = \wp_get_attachment_image( (int) $attributes['value'] ); ?>

[ 'href' => true, 'rel' => true, 'target' => true, ], ] ); } ?>