コード例 #1
0
ファイル: settings.php プロジェクト: joeyblake/bbpress
/**
 * The main settings page
 *
 * @uses settings_fields() To output the hidden fields for the form
 * @uses do_settings_sections() To output the settings sections
 */
function bbp_converter_settings()
{
    ?>

	<div class="wrap">
		<h1><?php 
    esc_html_e('Forum Tools', 'bbpress');
    ?>
</h1>
		<h2 class="nav-tab-wrapper"><?php 
    bbp_tools_admin_tabs(esc_html__('Import Forums', 'bbpress'));
    ?>
</h2>

		<form action="#" method="post" id="bbp-converter-settings">

			<?php 
    settings_fields('bbpress_converter');
    ?>

			<?php 
    do_settings_sections('bbpress_converter');
    ?>

			<p class="submit">
				<input type="button" name="submit" class="button-primary" id="bbp-converter-start" value="<?php 
    esc_attr_e('Start', 'bbpress');
    ?>
" onclick="bbconverter_start();" />
				<input type="button" name="submit" class="button-primary" id="bbp-converter-stop" value="<?php 
    esc_attr_e('Stop', 'bbpress');
    ?>
" onclick="bbconverter_stop();" />
				<img id="bbp-converter-progress" src="">
			</p>

			<div class="bbp-converter-updated" id="bbp-converter-message"></div>
		</form>
	</div>

<?php 
}
コード例 #2
0
ファイル: tools.php プロジェクト: joeyblake/bbpress
/**
 * Admin reset page
 *
 * @since 2.0.0 bbPress (r2613)
 *
 * @uses check_admin_referer() To verify the nonce and the referer
 * @uses do_action() Calls 'admin_notices' to display the notices
 * @uses wp_nonce_field() To add a hidden nonce field
 */
function bbp_admin_reset()
{
    ?>

	<div class="wrap">
		<h1><?php 
    esc_html_e('Forum Tools', 'bbpress');
    ?>
</h1>
		<h2 class="nav-tab-wrapper"><?php 
    bbp_tools_admin_tabs(__('Reset Forums', 'bbpress'));
    ?>
</h2>
		<p><?php 
    esc_html_e('Revert your forums back to a brand new installation. This process cannot be undone.', 'bbpress');
    ?>
</p>
		<p><strong><?php 
    esc_html_e('Backup your database before proceeding.', 'bbpress');
    ?>
</strong></p>

		<form class="settings" method="post" action="">
			<table class="form-table">
				<tbody>
					<tr valign="top">
						<th scope="row"><?php 
    esc_html_e('The following data will be removed:', 'bbpress');
    ?>
</th>
						<td>
							<?php 
    esc_html_e('All Forums', 'bbpress');
    ?>
<br />
							<?php 
    esc_html_e('All Topics', 'bbpress');
    ?>
<br />
							<?php 
    esc_html_e('All Replies', 'bbpress');
    ?>
<br />
							<?php 
    esc_html_e('All Topic Tags', 'bbpress');
    ?>
<br />
							<?php 
    esc_html_e('Related Meta Data', 'bbpress');
    ?>
<br />
							<?php 
    esc_html_e('Forum Settings', 'bbpress');
    ?>
<br />
							<?php 
    esc_html_e('Forum Activity', 'bbpress');
    ?>
<br />
							<?php 
    esc_html_e('Forum User Roles', 'bbpress');
    ?>
<br />
							<?php 
    esc_html_e('Forum Moderators', 'bbpress');
    ?>
<br />
							<?php 
    esc_html_e('Importer Helper Data', 'bbpress');
    ?>
<br />
						</td>
					</tr>
					<tr valign="top">
						<th scope="row"><?php 
    esc_html_e('Delete imported users?', 'bbpress');
    ?>
</th>
						<td>
							<fieldset>
								<legend class="screen-reader-text"><span><?php 
    esc_html_e("Say it ain't so!", 'bbpress');
    ?>
</span></legend>
								<label><input type="checkbox" class="checkbox" name="bbpress-delete-imported-users" id="bbpress-delete-imported-users" value="1" /> <?php 
    esc_html_e('This option will delete all previously imported users, and cannot be undone.', 'bbpress');
    ?>
</label>
								<p class="description"><?php 
    esc_html_e('Note: Resetting without this checked will delete the meta-data necessary to delete these users.', 'bbpress');
    ?>
</p>
							</fieldset>
						</td>
					</tr>
					<tr valign="top">
						<th scope="row"><?php 
    esc_html_e('Do you really want to do this?', 'bbpress');
    ?>
</th>
						<td>
							<fieldset>
								<legend class="screen-reader-text"><span><?php 
    esc_html_e("Say it ain't so!", 'bbpress');
    ?>
</span></legend>
								<label><input type="checkbox" class="checkbox" name="bbpress-are-you-sure" id="bbpress-are-you-sure" value="1" /> <?php 
    esc_html_e('This process cannot be undone.', 'bbpress');
    ?>
</label>
							</fieldset>
						</td>
					</tr>
				</tbody>
			</table>

			<fieldset class="submit">
				<input class="button-primary" type="submit" name="submit" value="<?php 
    esc_attr_e('Reset bbPress', 'bbpress');
    ?>
" />
				<?php 
    wp_nonce_field('bbpress-reset');
    ?>
			</fieldset>
		</form>
	</div>

<?php 
}
コード例 #3
0
ファイル: bbp-tools.php プロジェクト: hscale/webento
/**
 * Admin reset page
 *
 * @since bbPress (r2613)
 *
 * @uses check_admin_referer() To verify the nonce and the referer
 * @uses do_action() Calls 'admin_notices' to display the notices
 * @uses screen_icon() To display the screen icon
 * @uses wp_nonce_field() To add a hidden nonce field
 */
function bbp_admin_reset()
{
    ?>

	<div class="wrap">

		<?php 
    screen_icon('tools');
    ?>

		<h2 class="nav-tab-wrapper"><?php 
    bbp_tools_admin_tabs(__('Reset Forums', 'bbpress'));
    ?>
</h2>
		<p><?php 
    _e('This will revert your forums back to a brand new installation. This process cannot be undone. <strong>Backup your database before proceeding</strong>.', 'bbpress');
    ?>
</p>

		<form class="settings" method="post" action="">
			<table class="form-table">
				<tbody>
					<tr valign="top">
						<th scope="row"><?php 
    _e('The following data will be removed:', 'bbpress');
    ?>
</th>
						<td>
							<?php 
    _e('All Forums', 'bbpress');
    ?>
<br />
							<?php 
    _e('All Topics', 'bbpress');
    ?>
<br />
							<?php 
    _e('All Replies', 'bbpress');
    ?>
<br />
							<?php 
    _e('All Topic Tags', 'bbpress');
    ?>
<br />
							<?php 
    _e('Related Meta Data', 'bbpress');
    ?>
<br />
							<?php 
    _e('Forum Settings', 'bbpress');
    ?>
<br />
							<?php 
    _e('Forum Activity', 'bbpress');
    ?>
<br />
							<?php 
    _e('Forum User Roles', 'bbpress');
    ?>
<br />
							<?php 
    _e('Importer Helper Data', 'bbpress');
    ?>
<br />
						</td>
					</tr>
					<tr valign="top">
						<th scope="row"><?php 
    _e('Are you sure you want to do this?', 'bbpress');
    ?>
</th>
						<td>
							<fieldset>
								<legend class="screen-reader-text"><span><?php 
    _e("Say it ain't so!", 'bbpress');
    ?>
</span></legend>
								<label><input type="checkbox" class="checkbox" name="bbpress-are-you-sure" id="bbpress-are-you-sure" value="1" /> <?php 
    _e('This process cannot be undone.', 'bbpress');
    ?>
</label>
							</fieldset>
						</td>
					</tr>
				</tbody>
			</table>

			<fieldset class="submit">
				<input class="button-primary" type="submit" name="submit" value="<?php 
    _e('Reset bbPress', 'bbpress');
    ?>
" />
				<?php 
    wp_nonce_field('bbpress-reset');
    ?>
			</fieldset>
		</form>
	</div>

<?php 
}