コード例 #1
0
ファイル: gallery_tags.php プロジェクト: rafrombrc/bm.gallery
function bm_gallery_settings_page()
{
    ?>
	<div class="wrap">
		<h2>BM Gallery</h2>
		<form method="post" action="options.php">
			<?php 
    $user = get_option('bm_gallery_user');
    $key = get_option('bm_gallery_key');
    ?>

			<table class="form-table">
				<tr valign="top">
					<th scope="row">Gallery Username</th>
					<td><input type="text" name="bm_gallery_user" value="<?php 
    echo $user;
    ?>
" /></td>
				</tr>
				<tr valign="top">
					<th scope="row">Gallery User Key</th>
					<td><input type="text" name="bm_gallery_key" value="<?php 
    echo $key;
    ?>
" /></td>
				</tr>
			</table>

			<p class="submit">
				<input type="submit" class="button-primary" value="<?php 
    _e('Save Changes');
    ?>
" />
			</p>
			<?php 
    settings_fields('bm-gallery-opts');
    do_settings('bm-gallery-opts');
    ?>
		</form>
	</div>
<?php 
}
コード例 #2
0
<div class="wrap">
<?php 
screen_icon();
?>
<h2>Your Plugin Page Title</h2>
<form method="post" action="options.php">
    <?php 
settings_fields('baw-settings-group');
?>
    <?php 
do_settings('baw-settings-group');
?>
    <table class="form-table">
        <tr valign="top">
        <th scope="row">New Option Name</th>
        <td><input type="text" name="new_option_name" value="<?php 
echo get_option('new_option_name');
?>
" /></td>
        </tr>
         
        <tr valign="top">
        <th scope="row">Some Other Option</th>
        <td><input type="text" name="some_other_option" value="<?php 
echo get_option('some_other_option');
?>
" /></td>
        </tr>
        
        <tr valign="top">
        <th scope="row">Options, Etc.</th>