ID, $field['id'], true ); $thepostid = empty( $thepostid ) ? $post->ID : $thepostid; $field['class'] = isset( $field['class'] ) ? $field['class'] : 'urfl-checkbox'; $field['style'] = isset( $field['style'] ) ? $field['style'] : ''; $field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : ''; $field['value'] = isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true ); $field['name'] = isset( $field['name'] ) ? $field['name'] : $field['id']; $field['desc'] = isset( $field['desc'] ) ? $field['desc'] : ''; echo '
'; echo '
'; echo '
'; echo ''; echo wp_kses_post( ur_help_tip( $field['desc'] ) ); echo '
'; echo '
'; if ( isset( $field['disabled'] ) && $field['disabled'] ) { $non_checked = ''; $checked = ''; } else { $non_checked = ''; $checked = ''; } $metabox__allowedtags = array( 'input' => array( 'type' => array(), 'id' => array(), 'name' => array(), 'class' => array(), 'checked' => array(), 'style' => array(), 'disabled' => array(), ), ); if ( 'on' === $get_meta_data ) { echo wp_kses( $checked, $metabox__allowedtags ); } else { echo wp_kses( $non_checked, $metabox__allowedtags ); } echo '
'; echo '
'; echo '
'; } /** * Renders the Select field in metabox. * * @param array $field Metabox Field. */ public function ur_metabox_select( $field ) { global $thepostid, $post; $thepostid = empty( $thepostid ) ? $post->ID : $thepostid; $field['class'] = isset( $field['class'] ) ? $field['class'] : 'select'; $field['style'] = isset( $field['style'] ) ? $field['style'] : ''; $field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : ''; $field['value'] = isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true ); $field['name'] = isset( $field['name'] ) ? $field['name'] : $field['id']; $field['desc'] = isset( $field['desc'] ) ? $field['desc'] : ''; $get_meta_data = get_post_meta( $post->ID, $field['id'], true ); echo '
'; echo '
'; echo '
'; echo ''; echo wp_kses_post( ur_help_tip( $field['desc'] ) ); echo '
'; echo '
'; echo ''; foreach ( $field['options'] as $key => $value ) { ?> '; echo '
'; echo '
'; echo '
'; } /** * Renders the Input field in metabox. * * @param array $field Metabox Field. */ public function ur_metabox_input( $field ) { global $thepostid, $post; $get_meta_data = get_post_meta( $post->ID, $field['id'], true ); $thepostid = empty( $thepostid ) ? $post->ID : $thepostid; $field['class'] = isset( $field['class'] ) ? $field['class'] : 'urfl-input'; $field['style'] = isset( $field['style'] ) ? $field['style'] : ''; $field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : ''; $field['value'] = ( isset( $get_meta_data ) && '' !== $get_meta_data ) ? $get_meta_data : $field['value']; $field['name'] = isset( $field['name'] ) ? $field['name'] : $field['id']; $field['desc'] = isset( $field['desc'] ) ? $field['desc'] : ''; echo '
'; echo '
'; echo '
'; echo ''; echo wp_kses_post( ur_help_tip( $field['desc'] ) ); echo '
'; echo '
'; echo ''; echo '
'; echo '
'; echo '
'; } /** * Renders the Toggle field in metabox. * * @param array $field Metabox Field. */ public function ur_metabox_toggle( $field ) { global $thepostid, $post; $get_meta_data = get_post_meta( $post->ID, $field['id'], true ); $thepostid = empty( $thepostid ) ? $post->ID : $thepostid; $field['class'] = isset( $field['class'] ) ? $field['class'] : 'urfl-toggle'; $field['style'] = isset( $field['style'] ) ? $field['style'] : ''; $field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : ''; $field['value'] = isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true ); $field['name'] = isset( $field['name'] ) ? $field['name'] : $field['id']; $field['desc'] = isset( $field['desc'] ) ? $field['desc'] : ''; echo '
'; echo '
'; echo '
'; echo ''; echo wp_kses_post( ur_help_tip( $field['desc'] ) ); echo '
'; echo '
'; echo '
'; echo ''; $non_checked = ''; $checked = ''; $metabox__allowedtags = array( 'input' => array( 'type' => array(), 'id' => array(), 'name' => array(), 'class' => array(), 'checked' => array(), 'style' => array(), ), ); if ( 'on' === $get_meta_data ) { echo wp_kses( $checked, $metabox__allowedtags ); } else { echo wp_kses( $non_checked, $metabox__allowedtags ); } echo ''; echo ''; echo '
'; echo '
'; echo '
'; echo '
'; } }