form_option example

<div class="wrap"> <h1><?php echo esc_html( $title ); ?></h1> <form method="post" action="options.php" novalidate="novalidate"> <?php settings_fields( 'general' ); ?> <table class="form-table" role="presentation"> <tr> <th scope="row"><label for="blogname"><?php _e( 'Site Title' ); ?></label></th> <td><input name="blogname" type="text" id="blogname" value="<?php form_option( 'blogname' ); ?>" class="regular-text" /></td> </tr> <?php if ( ! is_multisite() ) {
    /* translators: Site tagline. */
    $sample_tagline = __( 'Just another WordPress site' );
} else {
    /* translators: %s: Network title. */
    $sample_tagline = sprintf( __( 'Just another %s site' )get_network()->site_name );
}
$tagline_description = sprintf(
    
<div id="front-page-warning" class="notice notice-warning inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div> <?php endif; ?> <?php if ( get_option( 'wp_page_for_privacy_policy' ) === get_option( 'page_for_posts' ) || get_option( 'wp_page_for_privacy_policy' ) === get_option( 'page_on_front' ) ) : ?> <div id="privacy-policy-page-warning" class="notice notice-warning inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same as your Privacy Policy page!' ); ?></p></div> <?php endif; ?> </fieldset></td> </tr> <?php endif; ?> <tr> <th scope="row"><label for="posts_per_page"><?php _e( 'Blog pages show at most' ); ?></label></th> <td> <input name="posts_per_page" type="number" step="1" min="1" id="posts_per_page" value="<?php form_option( 'posts_per_page' ); ?>" class="small-text" /> <?php _e( 'posts' ); ?> </td> </tr> <tr> <th scope="row"><label for="posts_per_rss"><?php _e( 'Syndication feeds show the most recent' ); ?></label></th> <td><input name="posts_per_rss" type="number" step="1" min="1" id="posts_per_rss" value="<?php form_option( 'posts_per_rss' ); ?>" class="small-text" /> <?php _e( 'items' ); ?></td> </tr> <tr> <th scope="row"><?php _e( 'For each post in a feed, include' ); ?> </th> <td><fieldset> <legend class="screen-reader-text"><span> <?php
__( 'To post to WordPress by email, you must set up a secret email account with POP3 access. Any mail received at this address will be posted, so it&#8217;s a good idea to keep this address very secret. Here are three random strings you could use: %1$s, %2$s, %3$s.' ),
        sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ),
        sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ),
        sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) )
    );
    ?> </p> <table class="form-table" role="presentation"> <tr> <th scope="row"><label for="mailserver_url"><?php _e( 'Mail Server' ); ?></label></th> <td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option( 'mailserver_url' ); ?>" class="regular-text code" /> <label for="mailserver_port"><?php _e( 'Port' ); ?></label> <input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option( 'mailserver_port' ); ?>" class="small-text" /> </td> </tr> <tr> <th scope="row"><label for="mailserver_login"><?php _e( 'Login Name' ); ?></label></th> <td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option( 'mailserver_login' ); ?>" class="regular-text ltr" /></td> </tr> <tr class="mailserver-pass-wrap"> <th scope="row"> <label for="mailserver_pass">
<?php _e( 'Thumbnail size' ); ?></th> <td><fieldset><legend class="screen-reader-text"><span> <?php     /* translators: Hidden accessibility text. */
    _e( 'Thumbnail size' );
    ?> </span></legend> <label for="thumbnail_size_w"><?php _e( 'Width' ); ?></label> <input name="thumbnail_size_w" type="number" step="1" min="0" id="thumbnail_size_w" value="<?php form_option( 'thumbnail_size_w' ); ?>" class="small-text" /> <br /> <label for="thumbnail_size_h"><?php _e( 'Height' ); ?></label> <input name="thumbnail_size_h" type="number" step="1" min="0" id="thumbnail_size_h" value="<?php form_option( 'thumbnail_size_h' ); ?>" class="small-text" /> </fieldset> <input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked( '1', get_option( 'thumbnail_crop' ) ); ?>/> <label for="thumbnail_crop"><?php _e( 'Crop thumbnail to exact dimensions (normally thumbnails are proportional)' ); ?></label> </td> </tr> <tr> <th scope="row"><?php _e( 'Medium size' ); ?></th> <td><fieldset><legend class="screen-reader-text"><span>
Home | Imprint | This part of the site doesn't use cookies.