do_settings_fields example

_e( 'Large size' );
    ?> </span></legend> <label for="large_size_w"><?php _e( 'Max Width' ); ?></label> <input name="large_size_w" type="number" step="1" min="0" id="large_size_w" value="<?php form_option( 'large_size_w' ); ?>" class="small-text" /> <br /> <label for="large_size_h"><?php _e( 'Max Height' ); ?></label> <input name="large_size_h" type="number" step="1" min="0" id="large_size_h" value="<?php form_option( 'large_size_h' ); ?>" class="small-text" /> </fieldset></td> </tr> <?php do_settings_fields( 'media', 'default' ); ?> </table> <?php /** * @global array $wp_settings */
if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) :
    ?> <h2 class="title"><?php _e( 'Embeds' ); ?></h2> <table class="form-table" role="presentation"> <?php do_settings_fields( 'media', 'embeds' ); ?>
<?php     /* translators: Hidden accessibility text. */
    _e( 'Disallowed Comment Keys' );
    ?> </span></legend> <p><label for="disallowed_keys"><?php _e( 'When a comment contains any of these words in its content, author name, URL, email, IP address, or browser&#8217;s user agent string, it will be put in the Trash. One word or IP address per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.' ); ?></label></p> <p> <textarea name="disallowed_keys" rows="10" cols="50" id="disallowed_keys" class="large-text code"><?php echo esc_textarea( get_option( 'disallowed_keys' ) ); ?></textarea> </p> </fieldset></td> </tr> <?php do_settings_fields( 'discussion', 'default' ); ?> </table> <h2 class="title"><?php _e( 'Avatars' ); ?></h2> <p><?php _e( 'An avatar is an image that can be associated with a user across multiple websites. In this area, you can choose to display avatars of users who interact with the site.' ); ?></p> <?php // The above would be a good place to link to the documentation on the Gravatar functions, for putting it in themes. Anything like that?
$show_avatars       = get_option( 'show_avatars' );
$show_avatars_class = '';
<?php _e( 'Tag base' ); ?></label> </th> <td> <?php echo $blog_prefix; ?> <input name="tag_base" id="tag_base" type="text" value="<?php echo esc_attr( $tag_base ); ?>" class="regular-text code" /> </td> </tr> <?php do_settings_fields( 'permalink', 'optional' ); ?> </table> <?php do_settings_sections( 'permalink' ); ?> <?php submit_button(); ?> </form> <?php if ( ! is_multisite() ) : ?> <?php     if ( $iis7_permalinks ) :
        if ( isset( $_POST['submit'] ) && $permalink_structure && ! $using_index_permalinks && ! $writable ) :
            
'selected'     => get_option( 'default_link_category' ),
            'hierarchical' => true,
            'taxonomy'     => 'link_category',
        )
    );
    ?> </td> </tr> <?php endif; ?> <?php do_settings_fields( 'writing', 'default' );
do_settings_fields( 'writing', 'remote_publishing' ); // A deprecated section. ?> </table> <?php /** This filter is documented in wp-admin/options.php */
if ( apply_filters( 'enable_post_by_email_configuration', true ) ) {
    ?> <h2 class="title"><?php _e( 'Post via email' ); ?></h2> <p> <?php

global $wp_locale;

for ( $day_index = 0; $day_index <= 6; $day_index++ ) :
    $selected = ( get_option( 'start_of_week' ) == $day_index ) ? 'selected="selected"' : '';
    echo "\n\t<option value='" . esc_attr( $day_index ) . "' $selected>" . $wp_locale->get_weekday( $day_index ) . '</option>';
endfor;
?> </select></td> </tr> <?php do_settings_fields( 'general', 'default' ); ?> </table> <?php do_settings_sections( 'general' ); ?> <?php submit_button(); ?> </form> </div> <?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?>
echo "<h2>{$section['title']}</h2>\n";
        }

        if ( $section['callback'] ) {
            call_user_func( $section['callback']$section );
        }

        if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section['id'] ] ) ) {
            continue;
        }
        echo '<table class="form-table" role="presentation">';
        do_settings_fields( $page$section['id'] );
        echo '</table>';

        if ( '' !== $section['after_section'] ) {
            echo wp_kses_post( $section['after_section'] );
        }
    }
}

/** * Prints out the settings fields for a particular settings section. * * Part of the Settings API. Use this in a settings page to output * a specific section. Should normally be called by do_settings_sections() * rather than directly. * * @global array $wp_settings_fields Storage array of settings fields and their pages/sections. * * @since 2.7.0 * * @param string $page Slug title of the admin page whose settings fields you want to show. * @param string $section Slug title of the settings section whose fields you want to show. */

    do_action( 'blog_privacy_selector' );
    ?> <?php else : ?> <label for="blog_public"><input name="blog_public" type="checkbox" id="blog_public" value="0" <?php checked( '0', get_option( 'blog_public' ) ); ?> /> <?php _e( 'Discourage search engines from indexing this site' ); ?></label> <p class="description"><?php _e( 'It is up to search engines to honor this request.' ); ?></p> <?php endif; ?> </fieldset></td> </tr> <?php do_settings_fields( 'reading', 'default' ); ?> </table> <?php do_settings_sections( 'reading' ); ?> <?php submit_button(); ?> </form> </div> <?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?>
Home | Imprint | This part of the site doesn't use cookies.