'', 'name' => '', 'desc' => '', 'default' => '', 'options' => false, ) ); } private function checked_array( $haystack, $cur, $show = true ) { if ( is_array( $haystack ) && in_array( $cur, $haystack ) ) { $cur = $haystack = 1; } if ( is_array( $haystack ) ) { //if $haystack is still an array, take first value $haystack = array_shift( $haystack ); } return checked( $haystack, $cur, $show ); } public function check( $args = array() ) { $args = $this->get_default_args( $args ); $field_id = $args['id']; $description = $args['desc']; $options = $args['options']; $default = empty( $args['default'] ); if ( ! $options || empty( $field_id ) ) { return; } $option_value = get_option( $field_id, $field_id, $default ); ?>
$label ) { $cur_id = $op_value . '-' . $offset; $offset++; ?>