checked example

 elseif ( false !== array_search( $nav_menu_selected_id$auto_add['auto_add'], true ) ) {
                                        $auto_add = true;
                                    } else {
                                        $auto_add = false;
                                    }
                                }
                                ?> <fieldset class="menu-settings-group auto-add-pages"> <legend class="menu-settings-group-name howto"><?php _e( 'Auto add pages' ); ?></legend> <div class="menu-settings-input checkbox-input"> <input type="checkbox"<?php checked( $auto_add ); ?> name="auto-add-pages" id="auto-add-pages" value="1" /> <label for="auto-add-pages"><?php printf( __( 'Automatically add new top-level pages to this menu' )esc_url( admin_url( 'edit.php?post_type=page' ) ) ); ?></label> </div> </fieldset> <?php if ( current_theme_supports( 'menus' ) ) : ?> <fieldset class="menu-settings-group menu-theme-locations"> <legend class="menu-settings-group-name howto"><?php _e( 'Display location' ); ?></legend> <?php                                         foreach ( $locations as $location => $description ) :
                                            $checked = false;

                                            
$describedby_attr = ( ! empty( $this->description ) ) ? ' aria-describedby="' . esc_attr( $description_id ) . '" ' : '';
        switch ( $this->type ) {
            case 'checkbox':
                ?> <span class="customize-inside-control-row"> <input id="<?php echo esc_attr( $input_id ); ?>" <?php echo $describedby_attr; ?> type="checkbox" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); ?> <?php checked( $this->value() ); ?> /> <label for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_html( $this->label ); ?></label> <?php if ( ! empty( $this->description ) ) : ?> <span id="<?php echo esc_attr( $description_id ); ?>" class="description customize-control-description"><?php echo $this->description; ?></span> <?php endif; ?> </span> <?php                 break;
            case 'radio':
                if ( empty( $this->choices ) ) {
                    return;
                }

                $reg = get_site_option( 'registration' );
                ?> <td> <fieldset> <legend class="screen-reader-text"> <?php                         /* translators: Hidden accessibility text. */
                        _e( 'New registrations settings' );
                        ?> </legend> <label><input name="registration" type="radio" id="registration1" value="none"<?php checked( $reg, 'none' ); ?> /> <?php _e( 'Registration is disabled' ); ?></label><br /> <label><input name="registration" type="radio" id="registration2" value="user"<?php checked( $reg, 'user' ); ?> /> <?php _e( 'User accounts may be registered' ); ?></label><br /> <label><input name="registration" type="radio" id="registration3" value="blog"<?php checked( $reg, 'blog' ); ?> /> <?php _e( 'Logged in users may register new sites' ); ?></label><br /> <label><input name="registration" type="radio" id="registration4" value="all"<?php checked( $reg, 'all' ); ?> /> <?php _e( 'Both sites and user accounts can be registered' ); ?></label> <?php                     if ( is_subdomain_install() ) {
                        echo '<p class="description">';
                        printf(
                            /* translators: 1: NOBLOGREDIRECT, 2: wp-config.php */
                            __( 'If registration is disabled, please set %1$s in %2$s to a URL you will redirect visitors to if they visit a non-existent site.' ),
                            '<code>NOBLOGREDIRECT</code>',
                            '<code>wp-config.php</code>'
                        );
</select> <label for="<?php echo $this->get_field_id( 'orderby' ); ?>"><?php _e( 'Sort by:' ); ?></label> <select name="<?php echo $this->get_field_name( 'orderby' ); ?>" id="<?php echo $this->get_field_id( 'orderby' ); ?>" class="widefat"> <option value="name"<?php selected( $instance['orderby'], 'name' ); ?>><?php _e( 'Link title' ); ?></option> <option value="rating"<?php selected( $instance['orderby'], 'rating' ); ?>><?php _e( 'Link rating' ); ?></option> <option value="id"<?php selected( $instance['orderby'], 'id' ); ?>><?php _e( 'Link ID' ); ?></option> <option value="rand"<?php selected( $instance['orderby'], 'rand' ); ?>><?php _ex( 'Random', 'Links widget' ); ?></option> </select> </p> <p> <input class="checkbox" type="checkbox"<?php checked( $instance['images'], true ); ?> id="<?php echo $this->get_field_id( 'images' ); ?>" name="<?php echo $this->get_field_name( 'images' ); ?>" /> <label for="<?php echo $this->get_field_id( 'images' ); ?>"><?php _e( 'Show Link Image' ); ?></label> <br /> <input class="checkbox" type="checkbox"<?php checked( $instance['name'], true ); ?> id="<?php echo $this->get_field_id( 'name' ); ?>" name="<?php echo $this->get_field_name( 'name' ); ?>" /> <label for="<?php echo $this->get_field_id( 'name' ); ?>"><?php _e( 'Show Link Name' ); ?></label> <br /> <input class="checkbox" type="checkbox"<?php checked( $instance['description'], true ); ?> id="<?php echo $this->get_field_id( 'description' ); ?>" name="<?php echo $this->get_field_name( 'description' ); ?>" /> <label for="<?php echo $this->get_field_id( 'description' ); ?>"><?php _e( 'Show Link Description' ); ?></label> <br /> <input class="checkbox" type="checkbox"


    if ( 'image' === $default_view ) {
        $view        = 'image-only';
        $table_class = '';
    } else {
        $view        = 'not-image';
        $table_class = $view;
    }

    return ' <p class="media-types"><label><input type="radio" name="media_type" value="image" id="image-only"' . checked( 'image-only', $view, false ) . ' /> ' . __( 'Image' ) . '</label> &nbsp; &nbsp; <label><input type="radio" name="media_type" value="generic" id="not-image"' . checked( 'not-image', $view, false ) . ' /> ' . __( 'Audio, Video, or Other File' ) . '</label></p> <p class="media-types media-types-required-info">' .
        wp_required_field_message() .
    '</p> <table class="describe ' . $table_class . '"><tbody> <tr> <th scope="row" class="label" style="width:130px;"> <label for="src"><span class="alignleft">' . __( 'URL' ) . '</span> ' . wp_required_field_indicator() . '</label> <span class="alignright" id="status_img"></span> </th> <td class="field"><input id="src" name="src" value="" type="text" required onblur="addExtImage.getImageData()" /></td> </tr> <tr> <th scope="row" class="label"> <label for="title"><span class="alignleft">'
 else {
        echo '<p>' . __( 'There are no options for this widget.' ) . "</p>\n";
    }
    ?> </div> <p class="describe"><?php _e( 'Select both the sidebar for this widget and the position of the widget in that sidebar.' ); ?></p> <div class="widget-position"> <table class="widefat"><thead><tr><th><?php _e( 'Sidebar' ); ?></th><th><?php _e( 'Position' ); ?></th></tr></thead><tbody> <?php     foreach ( $wp_registered_sidebars as $sbname => $sbvalue ) {
        echo "\t\t<tr><td><label><input type='radio' name='sidebar' value='" . esc_attr( $sbname ) . "'" . checked( $sbname$sidebar, false ) . " /> $sbvalue[name]</label></td><td>";
        if ( 'wp_inactive_widgets' === $sbname || str_starts_with( $sbname, 'orphaned_widgets' ) ) {
            echo '&nbsp;';
        } else {
            if ( ! isset( $sidebars_widgets[ $sbname ] ) || ! is_array( $sidebars_widgets[ $sbname ] ) ) {
                $j                           = 1;
                $sidebars_widgets[ $sbname ] = array();
            } else {
                $j = count( $sidebars_widgets[ $sbname ] );
                if ( isset( $_GET['addnew'] ) || ! in_array( $widget_id$sidebars_widgets[ $sbname ], true ) ) {
                    $j++;
                }
            }
<?php             /* translators: Hidden accessibility text. */
            _e( 'Image Position' );
            ?> </span></legend> <div class="background-position-control"> <?php foreach ( $background_position_options as $group ) : ?> <div class="button-group"> <?php foreach ( $group as $value => $input ) : ?> <label> <input class="ui-helper-hidden-accessible" name="background-position" type="radio" value="<?php echo esc_attr( $value ); ?>"<?php checked( $value$background_position ); ?>> <span class="button display-options position"><span class="<?php echo esc_attr( $input['icon'] ); ?>" aria-hidden="true"></span></span> <span class="screen-reader-text"><?php echo $input['label']; ?></span> </label> <?php endforeach; ?> </div> <?php endforeach; ?> </div> </fieldset></td> </tr> <tr> <th scope="row"><label for="background-size">

function use_ssl_preference( $user ) {
    ?> <tr class="user-use-ssl-wrap"> <th scope="row"><?php _e( 'Use https' ); ?></th> <td><label for="use_ssl"><input name="use_ssl" type="checkbox" id="use_ssl" value="1" <?php checked( '1', $user->use_ssl ); ?> /> <?php _e( 'Always use https when visiting the admin' ); ?></label></td> </tr> <?php }

/** * @since MU (3.0.0) * * @param string $text * @return string */
function admin_created_user_email( $text ) {
    
<?php if ( ! is_multisite() ) { ?> <tr> <th scope="row"><?php _e( 'Membership' ); ?></th> <td> <fieldset><legend class="screen-reader-text"><span> <?php     /* translators: Hidden accessibility text. */
    _e( 'Membership' );
    ?> </span></legend><label for="users_can_register"> <input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked( '1', get_option( 'users_can_register' ) ); ?> /> <?php _e( 'Anyone can register' ); ?></label> </fieldset></td> </tr> <tr> <th scope="row"><label for="default_role"><?php _e( 'New User Default Role' ); ?></label></th> <td> <select name="default_role" id="default_role"><?php wp_dropdown_roles( get_option( 'default_role' ) ); ?></select> </td> </tr>
<?php if ( get_site_option( 'initial_db_version' ) < 32453 ) : ?> <tr> <th scope="row"><?php _e( 'Formatting' ); ?></th> <td><fieldset><legend class="screen-reader-text"><span> <?php     /* translators: Hidden accessibility text. */
    _e( 'Formatting' );
    ?> </span></legend> <label for="use_smilies"> <input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked( '1', get_option( 'use_smilies' ) ); ?> /> <?php _e( 'Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display' ); ?></label><br /> <label for="use_balanceTags"><input name="use_balanceTags" type="checkbox" id="use_balanceTags" value="1" <?php checked( '1', get_option( 'use_balanceTags' ) ); ?> /> <?php _e( 'WordPress should correct invalidly nested XHTML automatically' ); ?></label> </fieldset></td> </tr> <?php endif; ?> <tr> <th scope="row"><label for="default_category"><?php _e( 'Default Post Category' ); ?></label></th> <td> <?php wp_dropdown_categories(
    array(
        
        $instance     = wp_parse_args( (array) $instance, array( 'title' => '' ) );
        $count        = isset( $instance['count'] ) ? (bool) $instance['count'] : false;
        $hierarchical = isset( $instance['hierarchical'] ) ? (bool) $instance['hierarchical'] : false;
        $dropdown     = isset( $instance['dropdown'] ) ? (bool) $instance['dropdown'] : false;
        ?> <p> <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" /> </p> <p> <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id( 'dropdown' ); ?>" name="<?php echo $this->get_field_name( 'dropdown' ); ?>"<?php checked( $dropdown ); ?> /> <label for="<?php echo $this->get_field_id( 'dropdown' ); ?>"><?php _e( 'Display as dropdown' ); ?></label> <br /> <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id( 'count' ); ?>" name="<?php echo $this->get_field_name( 'count' ); ?>"<?php checked( $count ); ?> /> <label for="<?php echo $this->get_field_id( 'count' ); ?>"><?php _e( 'Show post counts' ); ?></label> <br /> <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id( 'hierarchical' ); ?>" name="<?php echo $this->get_field_name( 'hierarchical' ); ?>"<?php checked( $hierarchical ); ?> /> <label for="<?php echo $this->get_field_id( 'hierarchical' ); ?>"><?php _e( 'Show hierarchy' ); ?></label> </p> <?php
<?php echo get_current_user_id(); ?>" /> </p> <h2><?php _e( 'Personal Options' ); ?></h2> <table class="form-table" role="presentation"> <?php if ( ! ( IS_PROFILE_PAGE && ! $user_can_edit ) ) : ?> <tr class="user-rich-editing-wrap"> <th scope="row"><?php _e( 'Visual Editor' ); ?></th> <td> <label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="false" <?php checked( 'false', $profile_user->rich_editing ); ?> /> <?php _e( 'Disable the visual editor when writing' ); ?> </label> </td> </tr> <?php endif; ?> <?php                     $show_syntax_highlighting_preference = (
                    // For Custom HTML widget and Additional CSS in Customizer.                     user_can( $profile_user, 'edit_theme_options' )
                    ||
                    

    public function show_header_selector( $type = 'default' ) {
        if ( 'default' === $type ) {
            $headers = $this->default_headers;
        } else {
            $headers = get_uploaded_header_images();
            $type    = 'uploaded';
        }

        if ( 1 < count( $headers ) ) {
            echo '<div class="random-header">';
            echo '<label><input name="default-header" type="radio" value="random-' . $type . '-image"' . checked( is_random_header_image( $type ), true, false ) . ' />';
            _e( '<strong>Random:</strong> Show a different image on each page.' );
            echo '</label>';
            echo '</div>';
        }

        echo '<div class="available-headers">';

        foreach ( $headers as $header_key => $header ) {
            $header_thumbnail = $header['thumbnail_url'];
            $header_url       = $header['url'];
            $header_alt_text  = empty( $header['alt_text'] ) ? '' : $header['alt_text'];

            
<table class="form-table" role="presentation"> <tr> <th scope="row"><?php _e( 'Your homepage displays' ); ?></th> <td id="front-static-pages"><fieldset> <legend class="screen-reader-text"><span> <?php         /* translators: Hidden accessibility text. */
        _e( 'Your homepage displays' );
        ?> </span></legend> <p><label> <input name="show_on_front" type="radio" value="posts" class="tog" <?php checked( 'posts', get_option( 'show_on_front' ) ); ?> /> <?php _e( 'Your latest posts' ); ?> </label> </p> <p><label> <input name="show_on_front" type="radio" value="page" class="tog" <?php checked( 'page', get_option( 'show_on_front' ) ); ?> /> <?php         printf(
            /* translators: %s: URL to Pages screen. */
            __( 'A <a href="%s">static page</a> (select below)' ),
            'edit.php?post_type=page'
        );
        
<table class="form-table" role="presentation"> <tr> <th scope="row"><?php _e( 'Default post settings' ); ?></th> <td><fieldset><legend class="screen-reader-text"><span> <?php     /* translators: Hidden accessibility text. */
    _e( 'Default post settings' );
    ?> </span></legend> <label for="default_pingback_flag"> <input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked( '1', get_option( 'default_pingback_flag' ) ); ?> /> <?php _e( 'Attempt to notify any blogs linked to from the post' ); ?></label> <br /> <label for="default_ping_status"> <input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked( 'open', get_option( 'default_ping_status' ) ); ?> /> <?php _e( 'Allow link notifications from other blogs (pingbacks and trackbacks) on new posts' ); ?></label> <br /> <label for="default_comment_status"> <input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked( 'open', get_option( 'default_comment_status' ) ); ?> /> <?php _e( 'Allow people to submit comments on new posts' ); ?></label> <br /> <p class="description"><?php _e( 'Individual posts may override these settings. Changes here will only be applied to new posts.' ); ?></p> </fieldset></td> </tr> <tr> <th scope="row">
Home | Imprint | This part of the site doesn't use cookies.