protected function constantTest()
 {
     $post_id_1 = 0;
     $time = microtime(true);
     for ($i = 0; $i < $this->runNumber; $i++) {
         form_option("");
     }
     $time = microtime(true) - $time;
     $this->enterResult($time);
 }
function nskw_app_id_field()
{
    ?>
	<input name="nskw_ogp_app_id" id="nskw_ogp_app_id" type="text" value="<?php 
    form_option('nskw_ogp_app_id');
    ?>
" /><br />
	<?php 
    _e('Input your facebook App ID. Your App ID can be found <a href="https://www.facebook.com/help/community/question/?id=372967692803654">here.</a>', 'ogp-generator');
}
<td>
<label for="thumbnail_size_w"><?php _e('Width'); ?></label>
<input name="thumbnail_size_w" type="text" id="thumbnail_size_w" value="<?php form_option('thumbnail_size_w'); ?>" size="6" />
<label for="thumbnail_size_h"><?php _e('Height'); ?></label>
<input name="thumbnail_size_h" type="text" id="thumbnail_size_h" value="<?php form_option('thumbnail_size_h'); ?>" size="6" /><br />
<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 valign="top">
<th scope="row"><?php _e('Medium size') ?></th>
<td>
<label for="medium_size_w"><?php _e('Max Width'); ?></label>
<input name="medium_size_w" type="text" id="medium_size_w" value="<?php form_option('medium_size_w'); ?>" size="6" />
<label for="medium_size_h"><?php _e('Max Height'); ?></label>
<input name="medium_size_h" type="text" id="medium_size_h" value="<?php form_option('medium_size_h'); ?>" size="6" />
</td>
</tr>
</table>



<table class="form-table">

<tr>
<th scope="row" class="th-full">
<label for="use_linksupdate">
<input name="use_linksupdate" type="checkbox" id="use_linksupdate" value="1" <?php checked('1', get_option('use_linksupdate')); ?> />
<?php _e('Track Links&#8217; Update Times') ?>
</label>
</th>
<p><?php 
_e('Note: If you use the <code>&lt;!--more--&gt;</code> feature, it will cut off posts in RSS feeds.');
?>
</p>
</td>
</tr> 
</table> 
</fieldset> 
<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 
<tr valign="top"> 
<th width="33%" scope="row"><?php 
_e('Encoding for pages and feeds:');
?>
</th> 
<td><input name="blog_charset" type="text" id="blog_charset" value="<?php 
form_option('blog_charset');
?>
" size="20" class="code" /><br />
<?php 
_e('The character encoding you write your blog in (UTF-8 is <a href="http://developer.apple.com/documentation/macos8/TextIntlSvcs/TextEncodingConversionManager/TEC1.5/TEC.b0.html">recommended</a>)');
?>
</td> 
</tr>
</table> 
<p>
<label><input type="checkbox" name="gzipcompression" value="1" <?php 
checked('1', get_option('gzipcompression'));
?>
 /> 
<?php 
_e('WordPress should compress articles (gzip) if browsers ask for them');
Пример #5
0
?>
</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" />
<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
 */
<select name="default_role" id="default_role"><?php 
    wp_dropdown_roles(get_option('default_role'));
    ?>
</select>
</td>
</tr>
<?php 
} else {
    ?>
<tr>
<th scope="row"><label for="new_admin_email"><?php 
    _e('E-mail Address');
    ?>
 </label></th>
<td><input name="new_admin_email" type="text" id="new_admin_email" value="<?php 
    form_option('admin_email');
    ?>
" class="regular-text ltr" />
<p class="description"><?php 
    _e('This address is used for admin purposes. If you change this we will send you an e-mail at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>');
    ?>
</p>
<?php 
    $new_admin_email = get_option('new_admin_email');
    if ($new_admin_email && $new_admin_email != get_option('admin_email')) {
        ?>
<div class="updated inline">
<p><?php 
        printf(__('There is a pending change of the admin e-mail to <code>%1$s</code>. <a href="%2$s">Cancel</a>'), esc_html($new_admin_email), esc_url(admin_url('options.php?dismiss=new_admin_email')));
        ?>
</p>
		</tr>
		<tr valign="top">
			<th scope="row"><?php _e('Default post by mail category:') ?></th>
			<td><select name="default_email_category" id="default_email_category">
<?php
//Alreay have $categories from default_category
foreach ($categories as $category) :
if ($category->cat_ID == get_settings('default_email_category')) $selected = " selected='selected'";
else $selected = '';
echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
endforeach;
?>
			</select></td>
		</tr>
	</table>
</fieldset>

<fieldset class="options">
	<legend><?php _e('Update Services') ?></legend>
          <p><?php _e('When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see <a href="http://codex.wordpress.org/Update_Services">Update Services</a> on the Codex. Separate multiple service URIs with line breaks.') ?></p>
	
	<textarea name="ping_sites" id="ping_sites" style="width: 98%;" rows="3" cols="50"><?php form_option('ping_sites'); ?></textarea>
</fieldset>

<p class="submit"> 
	<input type="submit" name="Submit" value="<?php _e('Update Options') ?> &raquo;" /> 
</p>
</form> 
</div> 

<?php include('./admin-footer.php') ?>
Пример #8
0
?>
</textarea>
</p>
</fieldset>
<fieldset class="options">
<legend><?php 
_e('Comment Blacklist');
?>
</legend>
<p><?php 
_e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be marked as spam. One word or IP per line. It will match inside words, so "press" will match "WordPress".');
?>
</p>
<p>
<textarea name="blacklist_keys" cols="60" rows="4" id="blacklist_keys" style="width: 98%; font-size: 12px;" class="code"><?php 
form_option('blacklist_keys');
?>
</textarea>
</p>
</fieldset>
<p class="submit">
<input type="hidden" name="action" value="update" />
<input type="hidden" name="page_options" value="default_pingback_flag,default_ping_status,default_comment_status,comments_notify,moderation_notify,comment_moderation,require_name_email,comment_whitelist,comment_max_links,moderation_keys,blacklist_keys" />
<input type="submit" name="Submit" value="<?php 
_e('Update Options &raquo;');
?>
" />
</p>
</form>
</div>
Пример #9
0
<table class="form-table">
<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>
<th scope="row"><label for="mailserver_pass"><?php _e('Password') ?></label></th>
<td>
<input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php form_option('mailserver_pass'); ?>" class="regular-text ltr" />
</td>
</tr>
<tr>
<th scope="row"><label for="default_email_category"><?php _e('Default Mail Category') ?></label></th>
<td>
<?php
wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_email_category', 'orderby' => 'name', 'selected' => get_option('default_email_category'), 'hierarchical' => true));
?>
</td>
</tr>
<?php do_settings_fields('writing', 'post_via_email'); ?>
</table>
<?php } ?>

<?php
Пример #10
0
</th>
<td>
<label for="embed_size_w"><?php 
_e('Width');
?>
</label>
<input name="embed_size_w" type="number" step="1" min="0" id="embed_size_w" value="<?php 
form_option('embed_size_w');
?>
" class="small-text" />
<label for="embed_size_h"><?php 
_e('Height');
?>
</label>
<input name="embed_size_h" type="number" step="1" min="0" id="embed_size_h" value="<?php 
form_option('embed_size_h');
?>
" class="small-text" />
<?php 
if (!empty($content_width)) {
    echo '<p class="description">' . __('If the width value is left blank, embeds will default to the max width of your theme.') . '</p>';
}
?>
</td>
</tr>

<?php 
do_settings_fields('media', 'embeds');
?>
</table>
Пример #11
0
?>
</h2>

<form method="post" action="options.php">
<?php 
settings_fields('writing');
?>

<table class="form-table">
<tr valign="top">
<th scope="row"><label for="default_post_edit_rows"> <?php 
_e('Size of the post box');
?>
</label></th>
<td><input name="default_post_edit_rows" type="text" id="default_post_edit_rows" value="<?php 
form_option('default_post_edit_rows');
?>
" class="small-text" />
<?php 
_e('lines');
?>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php 
_e('Formatting');
?>
</th>
<td><fieldset><legend class="screen-reader-text"><span><?php 
_e('Formatting');
?>
Пример #12
0
<th scope="row"><?php _e('Medium size') ?></th>
<td><fieldset><legend class="screen-reader-text"><span><?php _e('Medium size'); ?></span></legend>
<label for="medium_size_w"><?php _e('Max Width'); ?></label>
<input name="medium_size_w" type="number" step="1" min="0" id="medium_size_w" value="<?php form_option('medium_size_w'); ?>" class="small-text" />
<label for="medium_size_h"><?php _e('Max Height'); ?></label>
<input name="medium_size_h" type="number" step="1" min="0" id="medium_size_h" value="<?php form_option('medium_size_h'); ?>" class="small-text" />
</fieldset></td>
</tr>

<tr>
<th scope="row"><?php _e('Large size') ?></th>
<td><fieldset><legend class="screen-reader-text"><span><?php _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" />
<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'] ) ) : ?>
<h3 class="title"><?php _e('Embeds') ?></h3>
<table class="form-table">
<?php do_settings_fields( 'media', 'embeds' ); ?>
</table>
Пример #13
0
<th scope="row"><?php _e('Membership') ?></th>
<td> <fieldset><legend class="screen-reader-text"><span><?php _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 } else { ?>
<tr>
<th scope="row"><label for="new_admin_email"><?php _e('E-mail Address') ?> </label></th>
<td><input name="new_admin_email" type="email" id="new_admin_email" value="<?php form_option( 'admin_email' ); ?>" class="regular-text ltr" />
<p class="description"><?php _e('This address is used for admin purposes. If you change this we will send you an e-mail at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>') ?></p>
<?php
$new_admin_email = get_option( 'new_admin_email' );
if ( $new_admin_email && $new_admin_email != get_option('admin_email') ) : ?>
<div class="updated inline">
<p><?php printf( __('There is a pending change of the admin e-mail to <code>%1$s</code>. <a href="%2$s">Cancel</a>'), esc_html( $new_admin_email ), esc_url( admin_url( 'options.php?dismiss=new_admin_email' ) ) ); ?></p>
</div>
<?php endif; ?>
</td>
</tr>
<?php } ?>
<tr>
<?php
$current_offset = get_option('gmt_offset');
$tzstring = get_option('timezone_string');
Пример #14
0
    function field_renderer($args)
    {
        $field_name = $args['field_name'];
        $field_title = @$args['title'] ?: $field_name;
        $field_type = @$args['type'] ?: 'text';
        $field_class = @$args['class'] ?: 'regular-text ltr';
        $field_description = @$args['description'] ?: '';
        if ($field_type == 'textarea') {
            ?>
            <textarea class="<?php 
            echo $field_class;
            ?>
"
                   type="<?php 
            echo $field_type;
            ?>
"
                   id="<?php 
            echo $field_name;
            ?>
"
                   name="<?php 
            echo $field_name;
            ?>
"
                   rows="8"
                   aria-describedby="<?php 
            echo $field_name;
            ?>
-description"
                <?php 
            echo @$args['readonly'] ? 'readonly' : '';
            ?>
            ><?php 
            form_option($field_name);
            ?>
</textarea>
        <?php 
        } elseif ($field_type == 'text') {
            ?>
            <input class="<?php 
            echo $field_class;
            ?>
"
                   type="<?php 
            echo $field_type;
            ?>
"
                   id="<?php 
            echo $field_name;
            ?>
"
                   value="<?php 
            form_option($field_name);
            ?>
"
                   name="<?php 
            echo $field_name;
            ?>
"
                   aria-describedby="<?php 
            echo $field_name;
            ?>
-description"
                <?php 
            echo @$args['readonly'] ? 'readonly' : '';
            ?>
            />
        <?php 
        }
        ?>
        <p class="description"
           id="<?php 
        echo $field_name;
        ?>
-description"><?php 
        echo $field_description;
        ?>
</p>
        <?php 
    }
Пример #15
0
/**
 * Production setting field
 *
 * @since Alfred 0.1
 *
 * @uses form_option() To output the option value
 */
function alfred_admin_setting_callback_() {
?>
			<input name="alfred_" type="text" id="alfred_title" value="<?php form_option( 'alfred_' ); ?>" class="regular-text" />
			<label for="alfred_"><?php _e( '', 'alfred' ); ?></label>
<?php
}
</tr>
</table>
</fieldset>

<fieldset class="options">
<legend><?php 
_e('Update Services');
?>
</legend>
<p><?php 
_e('When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see <a href="http://codex.wordpress.org/Update_Services">Update Services</a> on the Codex. Separate multiple service URIs with line breaks.');
?>
</p>

<textarea name="ping_sites" id="ping_sites" style="width: 98%;" rows="3" cols="50"><?php 
form_option('ping_sites');
?>
</textarea>
</fieldset>

<p class="submit">
<input type="hidden" name="action" value="update" /> 
<input type="hidden" name="page_options" value="default_post_edit_rows,use_smilies,rich_editing,ping_sites,mailserver_url,mailserver_port,mailserver_login,mailserver_pass,default_category,default_email_category,use_balanceTags" /> 
<input type="submit" name="Submit" value="<?php 
_e('Update Options');
?>
 &raquo;" /> 
</p>
</form> 
</div> 
Пример #17
0
								<input id="k2-entry-meta-1" name="k2[entrymeta1]" type="text" value="<?php 
form_option('unwakeable_entrymeta1');
?>
" />
							</td>
						</tr>
						<tr>
							<th scope="row">
								<label for="k2-entry-meta-2"><?php 
_e('Bottom Meta:', 'unwakeable');
?>
</label>
							</th>
							<td>
								<input id="k2-entry-meta-2" name="k2[entrymeta2]" type="text" value="<?php 
form_option('unwakeable_entrymeta2');
?>
" />
							</td>
						</tr>
					</tbody>
				</table>


				<div id="meta-preview" class="postbox">
					<h3 class="hndle"><span><?php 
_e('Preview', 'unwakeable');
?>
</span></h3>
					<?php 
query_posts('showposts=1&what_to_show=posts&order=desc');
    function wpua_options_page()
    {
        global $show_avatars, $upload_size_limit_with_units, $wpua_allow_upload, $wpua_disable_gravatar, $wpua_edit_avatar, $wpua_resize_crop, $wpua_resize_h, $wpua_resize_upload, $wpua_resize_w, $wpua_tinymce, $wpua_upload_size_limit, $wpua_upload_size_limit_with_units;
        // Give subscribers edit_posts capability
        if (isset($_GET['settings-updated']) && $_GET['settings-updated'] == 'true' && (empty($wpua_allow_upload) || empty($wpua_edit_avatar))) {
            wpua_subscriber_remove_cap();
        }
        $hide_size = (bool) $wpua_allow_upload != 1 ? ' style="display:none;"' : "";
        $hide_resize = (bool) $wpua_resize_upload != 1 ? ' style="display:none;"' : "";
        ?>
    <div class="wrap">
      <?php 
        screen_icon();
        ?>
      <h2><?php 
        _e('WP User Avatar', 'wp-user-avatar');
        ?>
</h2>
      <form method="post" action="options.php">
        <?php 
        settings_fields('wpua-settings-group');
        ?>
        <?php 
        do_settings_fields('wpua-settings-group', "");
        ?>
        <table class="form-table">
          <tr valign="top">
            <th scope="row"><?php 
        _e('Settings');
        ?>
</th>
            <td>
              <fieldset>
                <legend class="screen-reader-text"><span><?php 
        _e('Settings');
        ?>
</span></legend>
                <label for="wp_user_avatar_tinymce">
                  <input name="wp_user_avatar_tinymce" type="checkbox" id="wp_user_avatar_tinymce" value="1" <?php 
        checked($wpua_tinymce, 1);
        ?>
 />
                  <?php 
        _e('Add avatar button to Visual Editor', 'wp-user-avatar');
        ?>
                </label>
              </fieldset>
              <fieldset>
                <label for="wp_user_avatar_allow_upload">
                  <input name="wp_user_avatar_allow_upload" type="checkbox" id="wp_user_avatar_allow_upload" value="1" <?php 
        checked($wpua_allow_upload, 1);
        ?>
 />
                  <?php 
        _e('Allow Contributors & Subscribers to upload avatars', 'wp-user-avatar');
        ?>
                </label>
              </fieldset>
              <fieldset>
                <label for="wp_user_avatar_disable_gravatar">
                  <input name="wp_user_avatar_disable_gravatar" type="checkbox" id="wp_user_avatar_disable_gravatar" value="1" <?php 
        checked($wpua_disable_gravatar, 1);
        ?>
 />
                  <?php 
        _e('Disable Gravatar and use only local avatars', 'wp-user-avatar');
        ?>
                </label>
              </fieldset>
            </td>
          </tr>
        </table>
        <div id="wpua-contributors-subscribers"<?php 
        echo $hide_size;
        ?>
>
          <table class="form-table">
            <tr valign="top">
              <th scope="row">
                <label for="wp_user_avatar_upload_size_limit">
                  <?php 
        _e('Upload Size Limit', 'wp-user-avatar');
        ?>
 <?php 
        _e('(only for Contributors & Subscribers)', 'wp-user-avatar');
        ?>
                </label>
              </th>
              <td>
                <fieldset>
                  <legend class="screen-reader-text"><span><?php 
        _e('Upload Size Limit', 'wp-user-avatar');
        ?>
 <?php 
        _e('(only for Contributors & Subscribers)', 'wp-user-avatar');
        ?>
</span></legend>
                  <input name="wp_user_avatar_upload_size_limit" type="text" id="wp_user_avatar_upload_size_limit" value="<?php 
        echo $wpua_upload_size_limit;
        ?>
" class="regular-text" />
                  <span id="wpua-readable-size"><?php 
        echo $wpua_upload_size_limit_with_units;
        ?>
</span>
                  <span id="wpua-readable-size-error"><?php 
        printf(__('%s exceeds the maximum upload size for this site.'), "");
        ?>
</span>
                  <div id="wpua-slider"></div>
                  <span class="description"><?php 
        printf(__('Maximum upload file size: %d%s.'), esc_html(wp_max_upload_size()), esc_html(' bytes (' . $upload_size_limit_with_units . ')'));
        ?>
</span>
                </fieldset>
                <fieldset>
                  <label for="wp_user_avatar_edit_avatar">
                    <input name="wp_user_avatar_edit_avatar" type="checkbox" id="wp_user_avatar_edit_avatar" value="1" <?php 
        checked($wpua_edit_avatar, 1);
        ?>
 />
                    <?php 
        _e('Allow users to edit avatars', 'wp-user-avatar');
        ?>
                  </label>
                </fieldset>
                <fieldset>
                  <label for="wp_user_avatar_resize_upload">
                    <input name="wp_user_avatar_resize_upload" type="checkbox" id="wp_user_avatar_resize_upload" value="1" <?php 
        checked($wpua_resize_upload, 1);
        ?>
 />
                    <?php 
        _e('Resize avatars on upload', 'wp-user-avatar');
        ?>
                  </label>
                </fieldset>
                <fieldset id="wpua-resize-sizes"<?php 
        echo $hide_resize;
        ?>
                  <br />
                  <br />
                  <label for="wp_user_avatar_resize_w"><?php 
        _e('Width');
        ?>
</label>
                  <input name="wp_user_avatar_resize_w" type="number" step="1" min="0" id="wp_user_avatar_resize_w" value="<?php 
        form_option('wp_user_avatar_resize_w');
        ?>
" class="small-text" />
                  <label for="wp_user_avatar_resize_h"><?php 
        _e('Height');
        ?>
</label>
                  <input name="wp_user_avatar_resize_h" type="number" step="1" min="0" id="wp_user_avatar_resize_h" value="<?php 
        form_option('wp_user_avatar_resize_h');
        ?>
" class="small-text" />
                  <br />
                  <input name="wp_user_avatar_resize_crop" type="checkbox" id="wp_user_avatar_resize_crop" value="1" <?php 
        checked('1', $wpua_resize_crop);
        ?>
 />
                  <label for="wp_user_avatar_resize_crop"><?php 
        _e('Crop avatars to exact dimensions', 'wp-user-avatar');
        ?>
</label>
                </fieldset>
              </td>
            </tr>
          </table>
        </div>
        <h3 class="title"><?php 
        _e('Avatars');
        ?>
</h3>
        <p><?php 
        _e('An avatar is an image that follows you from weblog to weblog appearing beside your name when you comment on avatar enabled sites. Here you can enable the display of avatars for people who comment on your site.');
        ?>
</p>
        <table class="form-table">
          <tr valign="top">
          <th scope="row"><?php 
        _e('Avatar Display');
        ?>
</th>
          <td>
            <fieldset>
              <legend class="screen-reader-text"><span><?php 
        _e('Avatar Display');
        ?>
</span></legend>
              <label for="show_avatars">
              <input type="checkbox" id="show_avatars" name="show_avatars" value="1" <?php 
        checked($show_avatars, 1);
        ?>
 />
              <?php 
        _e('Show Avatars');
        ?>
              </label>
            </fieldset>
            </td>
          </tr>
          <tr valign="top">
            <th scope="row"><?php 
        _e('Maximum Rating');
        ?>
</th>
            <td>
              <fieldset>
                <legend class="screen-reader-text"><span><?php 
        _e('Maximum Rating');
        ?>
</span></legend>
                <?php 
        $ratings = array('G' => __('G &#8212; Suitable for all audiences'), 'PG' => __('PG &#8212; Possibly offensive, usually for audiences 13 and above'), 'R' => __('R &#8212; Intended for adult audiences above 17'), 'X' => __('X &#8212; Even more mature than above'));
        foreach ($ratings as $key => $rating) {
            $selected = get_option('avatar_rating') == $key ? 'checked="checked"' : "";
            echo "\n\t<label><input type='radio' name='avatar_rating' value='" . esc_attr($key) . "' {$selected}/> {$rating}</label><br />";
        }
        ?>
              </fieldset>
            </td>
          </tr>
          <tr valign="top">
            <th scope="row"><?php 
        _e('Default Avatar');
        ?>
</th>
            <td class="defaultavatarpicker">
              <fieldset>
                <legend class="screen-reader-text"><span><?php 
        _e('Default Avatar');
        ?>
</span></legend>
                <?php 
        _e('For users without a custom avatar of their own, you can either display a generic logo or a generated one based on their e-mail address.');
        ?>
<br />
                <?php 
        echo wpua_add_default_avatar();
        ?>
              </fieldset>
            </td>
          </tr>
        </table>
        <?php 
        submit_button();
        ?>
      </form>
    </div>
    <?php 
    }
" /><br />
<?php 
_e('Output:');
?>
 <strong><?php 
echo mysql2date(get_settings('date_format'), current_time('mysql'));
?>
</strong></td>
		</tr>
	<tr>
		<th scope="row"><?php 
_e('Default time format:');
?>
</th>
		<td><input name="time_format" type="text" id="time_format" size="30" value="<?php 
form_option('time_format');
?>
" /><br />
<?php 
_e('Output:');
?>
 <strong><?php 
echo gmdate(get_settings('time_format'), current_time('timestamp'));
?>
</strong></td>
		</tr>
	<tr>
		<th scope="row"><?php 
_e('Weeks in the calendar should start on:');
?>
</th>
Пример #20
0
?>
</legend>
<label for="medium_size_w"><?php 
_e('Max Width');
?>
</label>
<input name="medium_size_w" type="text" id="medium_size_w" value="<?php 
form_option('medium_size_w');
?>
" size="6" />
<label for="medium_size_h"><?php 
_e('Max Height');
?>
</label>
<input name="medium_size_h" type="text" id="medium_size_h" value="<?php 
form_option('medium_size_h');
?>
" size="6" />
</fieldset></td>
</tr>
</table>



<table class="form-table">

<tr>
<th scope="row" class="th-full">
<label for="use_linksupdate">
<input name="use_linksupdate" type="checkbox" id="use_linksupdate" value="1" <?php 
checked('1', get_option('use_linksupdate'));
Пример #21
0
function showModulesDropDown($module = "")
{
    $table = getModules();
    div_open();
    form_start_post();
    form_select("module");
    if ($table) {
        while ($row = nextResultInTable($table)) {
            if ($module == $row['module']) {
                form_option($row['module'], $row['module'], "true");
            } else {
                form_option($row['module'], $row['module']);
            }
        }
    } else {
        // no modules with settings available
        form_option("-", "");
    }
    form_select_end();
    // this module
    form_hidden("m_c", "showSettingsGUI");
    // button
    form_submit("submit", getString("settings_show_settings", "Vis innstillinger"));
    form_end();
    div_close();
}
Пример #22
0
function pf_options()
{
    ?>

<?php 
    pf_default_options();
    ?>

<div class="wrap">

<h2><?php 
    _e('Profiler Options');
    ?>
</h2>

<?php 
    pf_setup();
    ?>

<?php 
    //===========================================
    ?>

<form method="post" action="options.php">

<h3><?php 
    _e('Global options');
    ?>
</h3>

<table class="form-table">
<tr>
<th scope="row" class="th-full">
<label for="pf_show_emails">
<input name="pf_show_emails" type="checkbox" id="pf_show_emails" value="yes" <?php 
    checked('yes', get_option('pf_show_emails'));
    ?>
 />
<?php 
    _e('Show email addresses');
    ?>
</label>
</th>
</tr>
</table>

<table class="form-table">
<tr>
<th scope="row" class="th-full">
<label for="pf_roles_enabled">
<input name="pf_roles_enabled" type="checkbox" id="pf_roles_enabled" value="yes" <?php 
    checked('yes', get_option('pf_roles_enabled'));
    ?>
 />
<?php 
    _e('Show roles');
    ?>
</label>
</th>
</tr>
</table>

<table class="form-table">
<tr valign="top">
<th scope="row"><?php 
    _e('Show profiles for these roles');
    ?>
</th>
<td>
<label for="pf_show_roles_admin"><input name="pf_show_roles_admin" type="checkbox" id="pf_show_roles_admin" value="yes" <?php 
    checked('yes', get_option('pf_show_roles_admin'));
    ?>
 />
 Administrator
<br />
</label>
<label for="pf_show_roles_subscriber"><input name="pf_show_roles_subscriber" type="checkbox" id="pf_show_roles_subscriber" value="yes" <?php 
    checked('yes', get_option('pf_show_roles_subscriber'));
    ?>
 />
 Subscriber
<br />
</label>
<label for="pf_show_roles_author"><input name="pf_show_roles_author" type="checkbox" id="pf_show_roles_author" value="yes" <?php 
    checked('yes', get_option('pf_show_roles_author'));
    ?>
 />
 Author
<br />
</label>
<label for="pf_show_roles_editor"><input name="pf_show_roles_editor" type="checkbox" id="pf_show_roles_editor" value="yes" <?php 
    checked('yes', get_option('pf_show_roles_editor'));
    ?>
 />
 Editor
<br />
</label>
<label for="pf_show_roles_contributor"><input name="pf_show_roles_contributor" type="checkbox" id="pf_show_roles_contributor" value="yes" <?php 
    checked('yes', get_option('pf_show_roles_contributor'));
    ?>
 />
 Contributor
<br />
</label>
<label for="pf_show_roles_none"><input name="pf_show_roles_none" type="checkbox" id="pf_show_roles_none" value="yes" <?php 
    checked('yes', get_option('pf_show_roles_none'));
    ?>
 />
 No role
<br />
</label>
</tr>
</table>


<h3><?php 
    _e('Directory Options');
    ?>
</h3>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php 
    _e('Users per page');
    ?>
</th>
<td><input name="pf_users_per_page" type="text" id="pf_users_per_page" value="<?php 
    form_option('pf_users_per_page');
    ?>
" size="2" />
</tr>
</table>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php 
    _e('Sorting');
    ?>
</th>
<td>
<?php 
    $validorders = array("Name" => "display_name", "Email" => "user_email", "Website" => "user_url", "Join Date" => "user_registered");
    $validorderbys = array("Descending" => "DESC", "Ascending" => "ASC");
    echo "<label for='pf_sort_directory'>Sort by: <select name='pf_sort_directory_by' id='pf_sort_directory_by'>";
    foreach ($validorders as $key => $value) {
        if ($value == get_option('pf_sort_directory_by')) {
            echo "<option value=\"" . $value . "\" selected=\"yes\">" . $key . "</option>";
        } else {
            echo "<option value=\"" . $value . "\">" . $key . "</option>";
        }
    }
    ?>
</select>
</label>
<?php 
    echo "<label for='pf_sort_directory_order'><select name='pf_sort_directory_order' id='pf_sort_directory_order'>";
    foreach ($validorderbys as $key => $value) {
        if ($value == get_option('pf_sort_directory_order')) {
            echo "<option value=\"" . $value . "\" selected=\"yes\">" . $key . "</option>";
        } else {
            echo "<option value=\"" . $value . "\">" . $key . "</option>";
        }
    }
    ?>
</select>
</label>
</td>
</tr>
</table>

<h3><?php 
    _e('Profile Options');
    ?>
</h3>
<table class="form-table">
<tr valign="top">
<th scope="row" class="th-full">
<label for="pf_show_gravatars">
<input name="pf_show_gravatars" type="checkbox" id="pf_show_gravatars" value="yes" <?php 
    checked('yes', get_option('pf_show_gravatars'));
    ?>
 />
<?php 
    _e('Show <a href="http://gravatar.com/">Gravatars</a>');
    ?>
</label>
</th>
</tr>
</table>

<table class="form-table">
<tr valign="top">
<th scope="row" class="th-full">
<label for="pf_show_userphotos">
<input name="pf_show_userphotos" type="checkbox" id="pf_show_userphotos" value="yes" <?php 
    checked('yes', get_option('pf_show_userphotos'));
    ?>
 />
<?php 
    _e('Show <a href="http://wordpress.org/extend/plugins/user-photo/">User Photos</a>');
    ?>
</label>
<p><input id="pf_show_userphotos_full" type="radio" name="pf_show_userphotos_type" value="1" <?php 
    checked('1', get_option('pf_show_userphotos_type'));
    ?>
 />
<label for="pf_show_userphotos_full"><?php 
    _e('Full-Size');
    ?>
</label></p>
<p><input id="pf_show_userphotos_thumb" type="radio" name="pf_show_userphotos_type" value="0" <?php 
    checked('0', get_option('pf_show_userphotos_type'));
    ?>
 />
<label for="pf_show_userphotos_thumb"><?php 
    _e('Thumbnail');
    ?>
</label></p>
</th>
</tr>
</table>

<table class="form-table">
<th scope="row"><?php 
    _e('Gravatar size (pixels)');
    ?>
</th>
<td><input name="pf_gravatar_size" type="text" id="pf_gravatar_size" value="<?php 
    form_option('pf_gravatar_size');
    ?>
" size="2" />
</tr>
<th scope="row"><?php 
    _e('Recent posts per profile');
    ?>
</th>
<td><input name="pf_recent_posts_per_profile" type="text" id="pf_recent_posts_per_profile" value="<?php 
    form_option('pf_recent_posts_per_profile');
    ?>
" size="2" />
</tr>
<th scope="row"><?php 
    _e('Recent comments per profile');
    ?>
</th>
<td><input name="pf_recent_comments_per_profile" type="text" id="pf_recent_comments_per_profile" value="<?php 
    form_option('pf_recent_comments_per_profile');
    ?>
" size="2" />
</table>

<p><a href="http://www.visualguides.org/profiler/">Questions or Comments?</a></p>

<?php 
    wp_nonce_field('update-options');
    ?>
<p class="submit">
<input type="hidden" name="action" value="update" />
<input type="hidden" name="page_options" value="pf_users_per_page, pf_sort_directory_by, pf_sort_directory_order, pf_recent_posts_per_profile, pf_recent_comments_per_profile, pf_show_gravatars, pf_show_userphotos, pf_show_userphotos_type, pf_show_emails, pf_gravatar_size, pf_show_roles_admin, pf_show_roles_subscriber, pf_show_roles_author, pf_show_roles_editor, pf_show_roles_contributor, pf_show_roles_none, pf_roles_enabled" />
<input type="submit" name="Submit" value="<?php 
    _e('Save Changes');
    ?>
" />
</p>
</form>
</div>

<?php 
}
			<td><?php 
form_option('home');
?>
</td>
		</tr>
		<tr>
			<td data-export-label="Site URL"><?php 
_e('Site URL', 'woocommerce');
?>
:</td>
			<td class="help"><?php 
echo wc_help_tip(__('The root URL of your site.', 'woocommerce'));
?>
</td>
			<td><?php 
form_option('siteurl');
?>
</td>
		</tr>
		<tr>
			<td data-export-label="WC Version"><?php 
_e('WC Version', 'woocommerce');
?>
:</td>
			<td class="help"><?php 
echo wc_help_tip(__('The version of WooCommerce installed on your site.', 'woocommerce'));
?>
</td>
			<td><?php 
echo esc_html(WC()->version);
?>
Пример #24
0
function powerpressadmin_edit_feed_settings($FeedSettings, $General, $FeedAttribs = array())
{
    $SupportUploads = powerpressadmin_support_uploads();
    if (!isset($FeedSettings['posts_per_rss'])) {
        $FeedSettings['posts_per_rss'] = '';
    }
    if (!isset($FeedSettings['rss2_image'])) {
        $FeedSettings['rss2_image'] = '';
    }
    if (!isset($FeedSettings['copyright'])) {
        $FeedSettings['copyright'] = '';
    }
    if (!isset($FeedSettings['title'])) {
        $FeedSettings['title'] = '';
    }
    if (!isset($FeedSettings['rss_language'])) {
        $FeedSettings['rss_language'] = '';
    }
    $feed_link = '';
    switch ($FeedAttribs['type']) {
        case 'category':
            $feed_link = get_category_feed_link($FeedAttribs['category_id']);
            break;
        case 'ttid':
            $feed_link = get_term_feed_link($FeedAttribs['term_taxonomy_id'], $FeedAttribs['taxonomy_type'], 'rss2');
            break;
        case 'post_type':
            $feed_link = get_post_type_archive_feed_link($FeedAttribs['post_type'], $FeedAttribs['feed_slug']);
            break;
        case 'channel':
            $feed_link = get_feed_link($FeedAttribs['feed_slug']);
            break;
        default:
            $feed_link = get_feed_link('podcast');
            break;
    }
    $cat_ID = $FeedAttribs['category_id'];
    if ($FeedAttribs['type'] == 'channel' && !empty($FeedAttribs['type'])) {
        ?>
<h3><?php 
        echo __('Feed Information', 'powerpress');
        ?>
</h3>
<table class="form-table">
<tr valign="top">
<th scope="row">
<?php 
        echo __('Feed URL', 'powerpress');
        ?>
</th>
<td>
<p style="margin-top: 0;" class="description"><a href="<?php 
        echo $feed_link;
        ?>
" target="_blank"><?php 
        echo $feed_link;
        ?>
</a> | <a href="http://www.feedvalidator.org/check.cgi?url=<?php 
        echo urlencode(str_replace('&amp;', '&', $feed_link));
        ?>
" target="_blank"><?php 
        echo __('validate', 'powerpress');
        ?>
</a></p>
<?php 
        if (!empty($FeedSettings['premium'])) {
            echo __('WARNING: This feed is password protected, it cannot be accessed by public services such as feedvalidator.org or the iTunes podcast directory.', 'powerpress');
        }
        ?>
</td>
</tr>
</table>
<?php 
    }
    ?>
<h3><?php 
    echo __('Feed Settings', 'powerpress');
    ?>
</h3>
<?php 
    if ($FeedAttribs['type'] == 'general') {
        ?>
<p class="description"><?php 
        echo __('Feed settings below only apply to the podcast only feed:', 'powerpress');
        ?>
 <?php 
        echo get_feed_link('podcast');
        ?>
</p>
<?php 
    }
    ?>
<table class="form-table">


<tr valign="top">
<th scope="row">
<?php 
    echo __('Feed Title (Show Title)', 'powerpress');
    ?>
</th>
<td>
<input type="text" name="Feed[title]" style="width: 60%;"  value="<?php 
    echo esc_attr($FeedSettings['title']);
    ?>
" maxlength="250" />
<?php 
    if ($cat_ID) {
        ?>
(<?php 
        echo __('leave blank to use default category title', 'powerpress');
        ?>
)
<?php 
    } else {
        ?>
(<?php 
        echo __('leave blank to use blog title', 'powerpress');
        ?>
)
<?php 
    }
    if ($FeedAttribs['type'] == 'ttid') {
    } else {
        if ($cat_ID) {
            $category = get_category_to_edit($cat_ID);
            $CategoryName = htmlspecialchars($category->name);
            ?>
<p class="description"><?php 
            echo __('Default Category title:', 'powerpress') . ' ' . get_bloginfo_rss('name') . ' &#187; ' . $CategoryName;
            ?>
</p>
<?php 
        } else {
            ?>
<p class="description"><?php 
            echo __('Blog title:', 'powerpress') . ' ' . get_bloginfo_rss('name');
            ?>
</p>
<?php 
        }
    }
    if (!empty($General['seo_itunes'])) {
        ?>
			<p>
				<em><?php 
        echo __('SEO Suggestion: The show title is very important.', 'powerpress');
        ?>
</em>
			</p>
<?php 
    }
    ?>
</td>
</tr>

<?php 
    if (!empty($General['advanced_mode_2'])) {
        ?>
<!-- start advanced features -->
<tr valign="top">
<th scope="row">
<?php 
        echo __('Feed Description', 'powerpress');
        ?>
</th>
<td>
<input type="text" name="Feed[description]" style="width: 60%;"  value="<?php 
        echo esc_attr(!empty($FeedSettings['description']) ? $FeedSettings['description'] : '');
        ?>
" maxlength="1000" /> 
<?php 
        if ($cat_ID) {
            ?>
(<?php 
            echo __('leave blank to use category description', 'powerpress');
            ?>
)
<?php 
        } else {
            ?>
(<?php 
            echo __('leave blank to use blog description', 'powerpress');
            ?>
)
<?php 
        }
        ?>
</td>
</tr>

<?php 
        if ($FeedAttribs['type'] != 'general') {
            ?>
<tr valign="top">
<th scope="row">
<?php 
            echo __('Feed Landing Page URL', 'powerpress');
            ?>
 <br />
</th>
<td>
<input type="text" name="Feed[url]" style="width: 60%;"  value="<?php 
            echo esc_attr(!empty($FeedSettings['url']) ? $FeedSettings['url'] : '');
            ?>
" maxlength="250" />
<?php 
            if ($cat_ID) {
                ?>
(<?php 
                echo __('leave blank to use category page', 'powerpress');
                ?>
)
<?php 
            } else {
                ?>
(<?php 
                echo __('leave blank to use home page', 'powerpress');
                ?>
)
<?php 
            }
            if ($cat_ID) {
                ?>
<p class="description"><?php 
                echo __('Category page URL', 'powerpress');
                ?>
: <?php 
                echo get_category_link($cat_ID);
                ?>
</p>
<?php 
            } else {
                ?>
<p class="description">e.g. <?php 
                echo get_bloginfo('url');
                ?>
/custom-page/</p>
<?php 
            }
            ?>
</td>
</tr>

<tr valign="top">
<th scope="row">
<?php 
            echo __('FeedBurner Feed URL', 'powerpress');
            ?>
<br />
<span style="font-size: 85%; margin-left: 5px;"><?php 
            echo __('Recommendation: leave blank', 'powerpress');
            ?>
</span>
</th>
<td>
<input type="text" name="Feed[feed_redirect_url]" style="width: 60%;"  value="<?php 
            echo esc_attr(!empty($FeedSettings['feed_redirect_url']) ? $FeedSettings['feed_redirect_url'] : '');
            ?>
" maxlength="100" />  (<?php 
            echo __('leave blank to use built-in feed', 'powerpress');
            ?>
)

<p style="margin-top: 0px; margin-bottomd: 0;" class="description"><?php 
            echo powerpressadmin_notice(__('NOTE: FeedBurner is not required for podcasting.', 'powerpress'));
            ?>
 <br /> 
<?php 
            echo powerpressadmin_notice(__('No support is available from blubrry if you are using Feedburner or other feed hosted services.', 'powerpress'));
            ?>
<br /> 
<a href="http://create.blubrry.com/manual/syndicating-your-podcast-rss-feeds/feedburner-for-podcasting/" target="_blank"><?php 
            echo __('Learn more about FeedBurner and Podcasitng', 'powerpress');
            ?>
</a>
</p>
<p><?php 
            echo __('Use this option to redirect this feed to a hosted feed service such as FeedBurner.', 'powerpress');
            ?>
</p>

<p><?php 
            echo __('We recommend that you disable FeedBurner SmartCast when using FeedBurner with PowerPress.', 'powerpress');
            ?>
</p>
<?php 
            $link = $feed_link;
            if (strstr($link, '?')) {
                $link .= "&redirect=no";
            } else {
                $link .= "?redirect=no";
            }
            ?>
<p class="description"><?php 
            echo __('Bypass Redirect URL', 'powerpress');
            ?>
: <a href="<?php 
            echo $link;
            ?>
" target="_blank"><?php 
            echo $link;
            ?>
</a></p>
</td>
</tr>

<?php 
        }
        // End not general settings
        ?>

<tr valign="top">
<th scope="row">
<?php 
        echo __('Show the most recent', 'powerpress');
        ?>
</th>
<td>
<input type="text" name="Feed[posts_per_rss]" style="width: 50px;"  value="<?php 
        echo !empty($FeedSettings['posts_per_rss']) ? $FeedSettings['posts_per_rss'] : '';
        ?>
" maxlength="5" /> <?php 
        echo __('episodes / posts per feed (leave blank to use blog default', 'powerpress');
        ?>
: <?php 
        form_option('posts_per_rss');
        ?>
)
<?php 
        if (empty($FeedAttribs['type'])) {
            ?>
<p style="margin-top: 5px; margin-bottomd: 0;" class="description"><?php 
            echo __('Note: Setting above applies only to podcast channel feeds', 'powerpress');
            ?>
</p>
<?php 
        }
        ?>
<p style="margin-top: 5px; margin-bottomd: 0;" class="description"><?php 
        echo __('WARNING: Setting this value larger than 10 may cause feed timeout errors and delay podcast directory listings from updating.', 'powerpress');
        ?>
</p>
</td>
</tr>

<?php 
        if (in_array($FeedAttribs['type'], array('channel', 'general'))) {
            ?>
<tr valign="top">
<th scope="row">
<?php 
            echo __('Feed Episode Maximizer', 'powerpress');
            ?>
  <?php 
            echo powerpressadmin_new();
            ?>
</th>
<td>
<input type="checkbox" name="Feed[maximize_feed]" value="1" <?php 
            if (!empty($FeedSettings['maximize_feed'])) {
                echo 'checked';
            }
            ?>
 />
		<?php 
            echo __('The latest 10 episodes in feed will remain as normal. The remaining 11+ older episodes in feed will have only the bare essential tags in order to maximize the number of episodes in the feed.', 'powerpress');
            ?>
<p style="margin-top: 0px; margin-bottomd: 0;" class="description"><?php 
            echo __('NOTE: This feature may allow you to enter a larger value for the "Show the most recent" setting above. You must make sure that your feed does not exceed 512KB (1/2 MB) in size.', 'powerpress');
            ?>
</p>
</td>
</tr>
<?php 
        }
        ?>

<tr valign="top">
<th scope="row">

<?php 
        echo __('Feed Language', 'powerpress');
        ?>
</th>
<td>
<select name="Feed[rss_language]" class="bpp_input_med">
<?php 
        $Languages = powerpress_languages();
        echo '<option value="">' . __('Blog Default Language', 'powerpress') . '</option>';
        while (list($value, $desc) = each($Languages)) {
            echo "\t<option value=\"{$value}\"" . ($FeedSettings['rss_language'] == $value ? ' selected' : '') . ">" . esc_attr($desc) . "</option>\n";
        }
        ?>
</select>
<?php 
        $rss_language = get_bloginfo_rss('language');
        $rss_language = strtolower($rss_language);
        if (isset($Languages[$rss_language])) {
            ?>
 <?php 
            echo __('Blog Default', 'powerpress');
            ?>
: <?php 
            echo $Languages[$rss_language];
            ?>
 <?php 
        } else {
            echo __('Blog Default', 'powerpress');
            ?>
: <?php 
            echo $rss_language;
            ?>
 <?php 
        }
        ?>
</td>
</tr>

<tr valign="top">
<th scope="row">
<?php 
        echo __('Copyright', 'powerpress');
        ?>
</th>
<td>
<input type="text" name="Feed[copyright]" style="width: 60%;" value="<?php 
        echo esc_attr($FeedSettings['copyright']);
        ?>
" maxlength="250" />
</td>
</tr>
<tr valign="top">
<th scope="row">
<?php 
        echo __('Caching Debug Comments', 'powerpress');
        ?>
</th>
<td>
<label><input type="checkbox" name="General[allow_feed_comments]" value="1" <?php 
        if (!empty($General['allow_feed_comments'])) {
            echo 'checked';
        }
        ?>
 />
	<?php 
        echo __('Allow WP Super Cache or W3 Total Cache to add HTML Comments to the bottom of your feeds', 'powerpress');
        ?>
</label>
	(<?php 
        echo __('Recommended unchecked', 'powerpress');
        ?>
)
<p><?php 
        echo __('iTunes is known to have issues with feeds that have HTML comments at the bottom.', 'powerpress');
        ?>
</p>
<p style="margin-bottomd: 0;" class="description"><?php 
        echo __('NOTE: This setting should only be enabled for debugging purposes.', 'powerpress');
        ?>
</p>
</td>
</tr>

<!-- end advanced features -->
<?php 
    }
    ?>
</table>

<!-- Location and frequency information -->
<?php 
    if (!isset($FeedSettings['location'])) {
        $FeedSettings['location'] = '';
    }
    if (!isset($FeedSettings['frequency'])) {
        $FeedSettings['frequency'] = '';
    }
    if (!empty($General['advanced_mode_2'])) {
        ?>
<!-- start advanced features -->
<h3><?php 
        echo __('Basic Show Information', 'powerpress');
        ?>
</h3>
<div id="rawvoice_basic_options">
<table class="form-table">
<tr valign="top">
<th scope="row"><?php 
        echo __('Location', 'powerpress');
        ?>
</th> 
<td>
	<input type="text" style="width: 300px;" name="Feed[location]" value="<?php 
        echo esc_attr($FeedSettings['location']);
        ?>
" maxlength="50" /> (<?php 
        echo __('optional', 'powerpress');
        ?>
)
	<p><?php 
        echo __('e.g. Cleveland, Ohio', 'powerpress');
        ?>
</p>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php 
        echo __('Episode Frequency', 'powerpress');
        ?>
</th> 
<td>
	<input type="text" style="width: 300px;" name="Feed[frequency]" value="<?php 
        echo esc_attr($FeedSettings['frequency']);
        ?>
" maxlength="50" /> (<?php 
        echo __('optional', 'powerpress');
        ?>
)
	<p><?php 
        echo __('e.g. Weekly', 'powerpress');
        ?>
</p>
</td>
</tr>
</table>
</div>
<!-- end advanced features -->
<?php 
    }
}
    /**
     * Adds "Site Title" option to Ai1ec general settings.
     */
    function ai1ec_general_settings_before()
    {
        ?>
		<div class="blogname-container clearfix">
		  <label class="textinput" for="blogname"><?php 
        _e('Site Title');
        ?>
:</label>
		  <div class="pull-left"><input name="blogname" type="text" id="blogname" value="<?php 
        form_option('blogname');
        ?>
" class="regular-text" /></div>
		</div>
		<?php 
    }
Пример #26
0
function st_smtp_options_page()
{
    global $cimy_swift_domain, $cimy_swift_plugin_fullpath;
    if (isset($_GET['error']) || !current_user_can('manage_options')) {
        return;
    }
    // Get the site domain and get rid of www.
    $sitename = strtolower($_SERVER['SERVER_NAME']);
    if (substr($sitename, 0, 4) == 'www.') {
        $sitename = substr($sitename, 4);
    }
    $from_email_def_wp = 'wordpress@' . $sitename;
    // Make sure we have the freshest copy of the options
    $st_smtp_config = st_smtp_check_config();
    $st_smtp_config['server'] = esc_attr($st_smtp_config['server']);
    $st_smtp_config['username'] = esc_attr($st_smtp_config['username']);
    $st_smtp_config['password'] = esc_attr($st_smtp_config['password']);
    $st_smtp_config['sender_name'] = esc_attr($st_smtp_config['sender_name']);
    $st_smtp_config['sender_mail'] = esc_attr($st_smtp_config['sender_mail']);
    $suggested_ports = array("25", "465", "587");
    ?>
	<div class="wrap">
	<?php 
    if (function_exists("screen_icon")) {
        screen_icon();
    }
    ?>
		<h2>Cimy Swift SMTP</h2>
		<p><?php 
    _e("Add here your SMTP server details", $cimy_swift_domain);
    ?>
<br /><?php 
    printf(__("<strong>Note:</strong> Gmail users need to use the server 'smtp.gmail.com' with TLS enabled and port %s", $cimy_swift_domain), "587");
    ?>
</p>
		<form method="post" action="<?php 
    echo admin_url("options-general.php?page=swift_smtp&amp;updated=true");
    ?>
">
		<?php 
    wp_nonce_field('cimy_swift_smtp', 'cimy_swift_smtp_adminnonce', false);
    ?>
		<input type="hidden" name="st_smtp_submit_options" value="true" />
		<table width="600">
		<tr>
			<td width="50%">
				<label for="css_sender_name"><?php 
    _e("Sender name:", $cimy_swift_domain);
    ?>
</label>
			</td>
			<td width="50%">
				<input id="css_sender_name" name="css_sender_name" type="text" size="25" value="<?php 
    echo $st_smtp_config['sender_name'];
    ?>
" />
			</td>
		</tr>
		<tr>
			<td>
				<label for="css_sender_mail"><?php 
    _e("Sender e-mail:", $cimy_swift_domain);
    ?>
</label>
			</td>
			<td>
				<input id="css_sender_mail" name="css_sender_mail" type="text" size="25" value="<?php 
    echo $st_smtp_config['sender_mail'];
    ?>
" />
			</td>
		</tr>
		<tr>
			<td>
				<label for="css_sender_overwrite"><?php 
    _e("Never overwrite the sender:", $cimy_swift_domain);
    ?>
</label>
			</td>
			<td>
				<input id="css_sender_overwrite" name="css_sender_overwrite" type="radio" value="overwrite_never" <?php 
    checked('overwrite_never', $st_smtp_config['overwrite_sender'], true);
    ?>
 />
			</td>
		</tr>
		<tr>
			<td>
				<label for="css_sender_overwrite"><?php 
    _e("Always overwrite the sender:", $cimy_swift_domain);
    ?>
</label>
			</td>
			<td>
				<input id="css_sender_overwrite" name="css_sender_overwrite" type="radio" value="overwrite_always" <?php 
    checked('overwrite_always', $st_smtp_config['overwrite_sender'], true);
    ?>
 />
			</td>
		</tr>
		<tr>
			<td>
				<label for="css_sender_overwrite"><?php 
    printf(__("Overwrite the sender only for the WordPress default [%s]:", $cimy_swift_domain), $from_email_def_wp);
    ?>
</label>
			</td>
			<td valign="top">
				<input id="css_sender_overwrite" name="css_sender_overwrite" type="radio" value="overwrite_wp_default" <?php 
    checked('overwrite_wp_default', $st_smtp_config['overwrite_sender'], true);
    ?>
 />
			</td>
		</tr>
		<tr>
			<td>
				<label for="css_server"><?php 
    _e("SMTP server address:", $cimy_swift_domain);
    ?>
</label>
			</td>
			<td>
				<input id="css_server" name="css_server" type="text" size="25" value="<?php 
    echo $st_smtp_config['server'];
    ?>
" />
			</td>
		</tr>
		<tr>
			<td>
				<label for="css_port"><?php 
    _e("Port:", $cimy_swift_domain);
    ?>
</label>
			</td>
			<td>
				<select id="css_port" name="css_port">
					<option value="25" <?php 
    selected($st_smtp_config['port'], "25", true);
    ?>
><?php 
    printf(__("%s (Default SMTP Port)", $cimy_swift_domain), 25);
    ?>
</option>
					<option value="465" <?php 
    selected($st_smtp_config['port'], "465", true);
    ?>
><?php 
    printf(__("%s (Use for SSL/GMAIL)", $cimy_swift_domain), 465);
    ?>
</option>
					<option value="587" <?php 
    selected($st_smtp_config['port'], "587", true);
    ?>
><?php 
    printf(__("%s (Use for TLS/STARTTLS/GMAIL)", $cimy_swift_domain), 587);
    ?>
</option>
					<option value="custom" <?php 
    selected(in_array($st_smtp_config['port'], $suggested_ports), false, true);
    ?>
><?php 
    _e("Custom Port: (Use Box)", $cimy_swift_domain);
    ?>
</option>
				</select>&nbsp;<input name="css_customport" type="text" size="4" value="<?php 
    if (!in_array($st_smtp_config['port'], $suggested_ports)) {
        echo $st_smtp_config['port'];
    }
    ?>
" />
			</td>
		</tr>
		<tr>
			<td>
				<label for="css_username"><?php 
    _e("Username:"******"css_username" name="css_username" type="text" size="25" value="<?php 
    echo $st_smtp_config['username'];
    ?>
" />
			</td>
		</tr>
		<tr>
			<td>
				<label for="css_password"><?php 
    _e("Password:"******"css_password" name="css_password" type="password" size="25" value="<?php 
    echo $st_smtp_config['password'];
    ?>
" />
			</td>
		</tr>
		<tr>
			<td>
				<label for="css_ssl"><?php 
    _e("Use SSL or TLS?:", $cimy_swift_domain);
    ?>
</label>
			</td>
			<td>
				<select id="css_ssl" name="css_ssl">
					<option value="" <?php 
    selected($st_smtp_config['ssl'], "", true);
    ?>
><?php 
    _e("No", $cimy_swift_domain);
    ?>
</option>
					<option value="ssl" <?php 
    selected($st_smtp_config['ssl'], "ssl", true);
    ?>
><?php 
    _e("SSL", $cimy_swift_domain);
    ?>
</option>
					<option value="tls" <?php 
    selected($st_smtp_config['ssl'], "tls", true);
    ?>
><?php 
    _e("TLS (Use for Gmail)", $cimy_swift_domain);
    ?>
</option>
				</select>
				<?php 
    $available_transports = stream_get_transports();
    if (!empty($st_smtp_config['ssl']) && !in_array($st_smtp_config['ssl'], $available_transports)) {
        echo "<br /><strong>";
        printf(__("The selected protocol '%s' is not available on your PHP configuration, check how to enable it from %s", $cimy_swift_domain), $st_smtp_config['ssl'], "http://www.php.net/openssl");
        echo "</strong>";
    }
    ?>
			</td>
		</tr>
		</table>
			
			<p class="submit" style="text-align:left">
			<input class="button-primary" type="submit" name="Submit" value="<?php 
    _e("Save Changes");
    ?>
" />
			</p>
		</form>
		<br />
		<h2><?php 
    _e("Test Connection", $cimy_swift_domain);
    ?>
</h2>
		<p><?php 
    _e("Once you've saved your settings, click the link below to test your connection.", $cimy_swift_domain);
    ?>
</p>
		<form method="post" action="">
			<input type="hidden" name="test" value="1" />
			<label><?php 
    _e("Send Test Email to this Address:", $cimy_swift_domain);
    ?>
 <input type="text" name="testemail" size="25" /> <input class="button" type="submit" value="<?php 
    _e("Send Test", $cimy_swift_domain);
    ?>
" /></label><br />
		</form>

		<?php 
    if (isset($_POST['test'])) {
        ?>
<br /><br /><h2><?php 
        _e("Test result", $cimy_swift_domain);
        ?>
</h2><?php 
        $email = $_POST['testemail'];
        if (empty($email)) {
            $email = form_option('admin_email');
        }
        $text = __("This is a test mail sent using the Cimy Swift SMTP Plugin. If you've received this email it means your connection has been set up properly! Cool!", $cimy_swift_domain);
        if (wp_mail($email, 'Cimy Swift SMTP Test', $text, '', array($cimy_swift_plugin_fullpath . 'test_attachment.txt'), true)) {
            echo "<p><strong>" . __("TEST EMAIL SENT - Connection Verified.", $cimy_swift_domain) . "<br />" . __("If you don't receive the e-mail check also the spam folder.", $cimy_swift_domain) . "</strong></p>";
        }
    }
    ?>
	</div>
	<?php 
}
<th scope="row"><?php _e('<abbr title="Coordinated Universal Time">UTC</abbr> time is:') ?> </th> 
<td><code><?php echo gmdate(__('Y-m-d g:i:s a')); ?></code></td> 
</tr>
<tr>
<th scope="row"><?php _e('Times in the weblog should differ by:') ?> </th>
<td><input name="gmt_offset" type="text" id="gmt_offset" size="2" value="<?php form_option('gmt_offset'); ?>" /> 
<?php _e('hours') ?> (<?php _e('Your timezone offset, for example <code>-6</code> for Central Time.'); ?>)</td>
</tr>
<tr>
<th scope="row"><?php _e('Default date format:') ?></th>
<td><input name="date_format" type="text" id="date_format" size="30" value="<?php form_option('date_format'); ?>" /><br />
<?php _e('Output:') ?> <strong><?php echo mysql2date(get_option('date_format'), current_time('mysql')); ?></strong></td>
</tr>
<tr>
<th scope="row"><?php _e('Default time format:') ?></th>
<td><input name="time_format" type="text" id="time_format" size="30" value="<?php form_option('time_format'); ?>" /><br />
<?php _e('Output:') ?> <strong><?php echo gmdate(get_option('time_format'), current_time('timestamp')); ?></strong></td>
</tr> 
<tr>
<th scope="row">&nbsp;</th>
<td><?php _e('<a href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date formatting</a>. Click "Update options" to update sample output.') ?> </td>
</tr>
<tr>
<th scope="row"><?php _e('Weeks in the calendar should start on:') ?></th>
<td><select name="start_of_week" id="start_of_week">
<?php
for ($day_index = 0; $day_index <= 6; $day_index++) :
	$selected = (get_option('start_of_week') == $day_index) ? 'selected="selected"' : '';
	echo "\n\t<option value='$day_index' $selected>" . $wp_locale->get_weekday($day_index) . '</option>';
endfor;
?>
Пример #28
0
    function view()
    {
        echo '<h2>' . __("Technical Information", "sp-cdm") . '</h2>' . sp_client_upload_nav_menu() . '';
        ?>
        
   <div class="sp-cdm-status-report">     
<div class="updated Client Document Manager-message">
	<p><?php 
        _e('Please copy and paste this information in your ticket when contacting support:', "sp-cdm");
        ?>
 </p>
	<p class="submit"><a href="#" class="button-primary debug-report"><?php 
        _e('Get System Report', "sp-cdm");
        ?>
</a>
</p>
	<div id="debug-report" style="display:none">
		<textarea readonly style="width:100%;height:400px"></textarea>
		<p class="submit"><button id="copy-for-support" class="button-primary" href="#" data-tip="<?php 
        _e('Copied!', "sp-cdm");
        ?>
"><?php 
        _e('Copy for Support', "sp-cdm");
        ?>
</button></p>
	</div>
</div>
<br/>
<table class="wc_status_table widefat" cellspacing="0" id="status">
	<thead>
		<tr>
			<th colspan="3" data-export-label="WordPress Environment"><?php 
        _e('WordPress Environment', "sp-cdm");
        ?>
</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td data-export-label="Home URL"><?php 
        _e('Home URL', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The URL of your site\'s homepage.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        form_option('home');
        ?>
</td>
		</tr>
		<tr>
			<td data-export-label="Site URL"><?php 
        _e('Site URL', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The root URL of your site.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        form_option('siteurl');
        ?>
</td>
		</tr>
        		<tr>
			<td data-export-label="WP Version"><?php 
        _e('WP Version', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The version of WordPress installed on your site.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        bloginfo('version');
        ?>
</td>
		</tr>
		<tr>
			<td data-export-label="CDM Version"><?php 
        _e('CDM Version', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The version of Client Document Manager installed on your site.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        echo esc_html(get_option('sp_client_upload'));
        ?>
</td>
		</tr>
        <?php 
        if (get_option('sp_client_upload_premium') != false) {
            ?>
        <tr>
			<td data-export-label="CDM Premium Version"><?php 
            _e('CDM Premium Version', "sp-cdm");
            ?>
:</td>
			<td class="help"><?php 
            echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The version of Client Document Manager that the database is formatted for. This should be the same as your Client Document Manager Version.', "sp-cdm") . '"></a>';
            ?>
</td>
			<td><?php 
            echo esc_html(get_option('sp_client_upload_premium'));
            ?>
</td>
		</tr>
        <?php 
        }
        ?>
		
		<tr>
			<td data-export-label="Uploads Folder Writeable?"><?php 
        _e('Uploads Folder Writeable?', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('If your folder is not writable files will never make it to the server.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        if (@fopen(SP_CDM_UPLOADS_DIR . 'test-log.log', 'a')) {
            echo '<mark class="yes">' . 'Yes <code>' . SP_CDM_UPLOADS_DIR . ' is Writable!</code></mark> ';
        } else {
            printf('<mark class="error">' . '&#10005; ' . __('To upload properly, make <code>%s</code> writable or define a custom <code>SP_CDM_UPLOADS_DIR</code>.', "sp-cdm") . '</mark>', SP_CDM_UPLOADS_DIR);
        }
        ?>
</td>
		</tr>

		<tr>
			<td data-export-label="WP Multisite"><?php 
        _e('WP Multisite', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('Whether or not you have WordPress Multisite enabled.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        if (is_multisite()) {
            echo 'Yes';
        } else {
            echo 'No';
        }
        ?>
</td>
		</tr>
		<tr>
			<td data-export-label="WP Memory Limit"><?php 
        _e('WP Memory Limit', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The maximum amount of memory (RAM) that your site can use at one time.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        $memory = $this->let_to_num(WP_MEMORY_LIMIT);
        if ($memory < 67108864) {
            echo '<mark class="error">' . sprintf(__('%s - We recommend setting memory to at least 64MB. See: <a href="%s" target="_blank">Increasing memory allocated to PHP</a>', "sp-cdm"), size_format($memory), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP') . '</mark>';
        } else {
            echo '<mark class="yes">' . size_format($memory) . '</mark>';
        }
        ?>
</td>
		</tr>
		<tr>
			<td data-export-label="WP Debug Mode"><?php 
        _e('WP Debug Mode', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('Displays whether or not WordPress is in Debug Mode.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        if (defined('WP_DEBUG') && WP_DEBUG) {
            echo '<mark class="yes">' . 'Yes' . '</mark>';
        } else {
            echo '<mark class="no">' . 'No' . '</mark>';
        }
        ?>
</td>
		</tr>
		<tr>
			<td data-export-label="Language"><?php 
        _e('Language', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The current language used by WordPress. Default = English', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        echo get_locale();
        ?>
</td>
		</tr>
	</tbody>
</table>
<table class="wc_status_table widefat" cellspacing="0" id="status">
	<thead>
		<tr>
			<th colspan="3" data-export-label="Server Environment"><?php 
        _e('Server Environment', "sp-cdm");
        ?>
</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td data-export-label="Server Info"><?php 
        _e('Server Info', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('Information about the web server that is currently hosting your site.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        echo esc_html($_SERVER['SERVER_SOFTWARE']);
        ?>
</td>
		</tr>
		<tr>
			<td data-export-label="PHP Version"><?php 
        _e('PHP Version', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The version of PHP installed on your hosting server.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        // Check if phpversion function exists
        if (function_exists('phpversion')) {
            $php_version = phpversion();
            if (version_compare($php_version, '5.4', '<')) {
                echo '<mark class="error">' . sprintf(__('%s - We recommend a minimum PHP version of 5.4. See: <a href="%s" target="_blank">How to update your PHP version</a>', "sp-cdm"), esc_html($php_version), 'http://docs.woothemes.com/document/how-to-update-your-php-version/') . '</mark>';
            } else {
                echo '<mark class="yes">' . esc_html($php_version) . '</mark>';
            }
        } else {
            _e("Couldn't determine PHP version because phpversion() doesn't exist.", "sp-cdm");
        }
        ?>
</td>
		</tr>
		<?php 
        if (function_exists('ini_get')) {
            ?>
			<tr>
				<td data-export-label="PHP Post Max Size"><?php 
            _e('PHP Post Max Size', "sp-cdm");
            ?>
:</td>
				<td class="help"><?php 
            echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The largest filesize that can be contained in one post.', "sp-cdm") . '"></a>';
            ?>
</td>
				<td><?php 
            echo size_format($this->let_to_num(ini_get('post_max_size')));
            ?>
</td>
			</tr>
			<tr>
				<td data-export-label="PHP Time Limit"><?php 
            _e('PHP Time Limit', "sp-cdm");
            ?>
:</td>
				<td class="help"><?php 
            echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups)', "sp-cdm") . '"></a>';
            ?>
</td>
				<td><?php 
            echo ini_get('max_execution_time');
            ?>
</td>
			</tr>
			<tr>
				<td data-export-label="PHP Max Input Vars"><?php 
            _e('PHP Max Input Vars', "sp-cdm");
            ?>
:</td>
				<td class="help"><?php 
            echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The maximum number of variables your server can use for a single function to avoid overloads.', "sp-cdm") . '"></a>';
            ?>
</td>
				<td><?php 
            echo ini_get('max_input_vars');
            ?>
</td>
			</tr>
			<tr>
				<td data-export-label="SUHOSIN Installed"><?php 
            _e('SUHOSIN Installed', "sp-cdm");
            ?>
:</td>
				<td class="help"><?php 
            echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('Suhosin is an advanced protection system for PHP installations. It was designed to protect your servers on the one hand against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself. If enabled on your server, Suhosin may need to be configured to increase its data submission limits.', "sp-cdm") . '"></a>';
            ?>
</td>
				<td><?php 
            echo extension_loaded('suhosin') ? 'Yes' : 'No';
            ?>
</td>
			</tr>
		<?php 
        }
        ?>
		<tr>
			<td data-export-label="MySQL Version"><?php 
        _e('MySQL Version', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The version of MySQL installed on your hosting server.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td>
				<?php 
        /** @global wpdb $wpdb */
        global $wpdb;
        echo $wpdb->db_version();
        ?>
			</td>
		</tr>
		<tr>
			<td data-export-label="Max Upload Size"><?php 
        _e('Max Upload Size', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The largest filesize that can be uploaded to your WordPress installation.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        echo size_format(wp_max_upload_size());
        ?>
</td>
		</tr>
		<tr>
			<td data-export-label="Default Timezone is UTC"><?php 
        _e('Default Timezone is UTC', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The default timezone for your server.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        $default_timezone = date_default_timezone_get();
        if ('UTC' !== $default_timezone) {
            echo '<mark class="error">' . '&#10005; ' . sprintf(__('Default timezone is %s - it should be UTC', "sp-cdm"), $default_timezone) . '</mark>';
        } else {
            echo '<mark class="yes">' . 'Yes' . '</mark>';
        }
        ?>
			</td>
		</tr>
		<?php 
        $posting = array();
        // fsockopen/cURL
        $posting['fsockopen_curl']['name'] = 'fsockopen/cURL';
        $posting['fsockopen_curl']['help'] = '<a href="#" class="help_tip" data-tip="' . esc_attr__('Payment gateways can use cURL to communicate with remote servers to authorize payments, other plugins may also use it when communicating with remote services.', "sp-cdm") . '"></a>';
        if (function_exists('fsockopen') || function_exists('curl_init')) {
            $posting['fsockopen_curl']['success'] = true;
        } else {
            $posting['fsockopen_curl']['success'] = false;
            $posting['fsockopen_curl']['note'] = __('Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', "sp-cdm") . '</mark>';
        }
        // SOAP
        $posting['soap_client']['name'] = 'SoapClient';
        $posting['soap_client']['help'] = '<a href="#" class="help_tip" data-tip="' . esc_attr__('Some webservices like shipping use SOAP to get information from remote servers, for example, live shipping quotes from FedEx require SOAP to be installed.', "sp-cdm") . '"></a>';
        if (class_exists('SoapClient')) {
            $posting['soap_client']['success'] = true;
        } else {
            $posting['soap_client']['success'] = false;
            $posting['soap_client']['note'] = sprintf(__('Your server does not have the <a href="%s">SOAP Client</a> class enabled - some gateway plugins which use SOAP may not work as expected.', "sp-cdm"), 'http://php.net/manual/en/class.soapclient.php') . '</mark>';
        }
        // DOMDocument
        $posting['dom_document']['name'] = 'DOMDocument';
        $posting['dom_document']['help'] = '<a href="#" class="help_tip" data-tip="' . esc_attr__('HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', "sp-cdm") . '"></a>';
        if (class_exists('DOMDocument')) {
            $posting['dom_document']['success'] = true;
        } else {
            $posting['dom_document']['success'] = false;
            $posting['dom_document']['note'] = sprintf(__('Your server does not have the <a href="%s">DOMDocument</a> class enabled - HTML/Multipart emails, and also some extensions, will not work without DOMDocument.', "sp-cdm"), 'http://php.net/manual/en/class.domdocument.php') . '</mark>';
        }
        // GZIP
        $posting['gzip']['name'] = 'GZip';
        $posting['gzip']['help'] = '<a href="#" class="help_tip" data-tip="' . esc_attr__('GZip (gzopen) is used to open the GEOIP database from MaxMind.', "sp-cdm") . '"></a>';
        if (is_callable('gzopen')) {
            $posting['gzip']['success'] = true;
        } else {
            $posting['gzip']['success'] = false;
            $posting['gzip']['note'] = sprintf(__('Your server does not support the <a href="%s">gzopen</a> function - this is required to use the GeoIP database from MaxMind. The API fallback will be used instead for geolocation.', "sp-cdm"), 'http://php.net/manual/en/zlib.installation.php') . '</mark>';
        }
        // WP Remote Post Check
        $posting['wp_remote_post']['name'] = __('Remote Post', "sp-cdm");
        $posting['wp_remote_post']['help'] = '<a href="#" class="help_tip" data-tip="' . esc_attr__('PayPal uses this method of communicating when sending back transaction information.', "sp-cdm") . '"></a>';
        $response = wp_safe_remote_post('https://www.paypal.com/cgi-bin/webscr', array('timeout' => 60, 'user-agent' => 'Client Document Manager/', 'body' => array('cmd' => '_notify-validate')));
        if (!is_wp_error($response) && $response['response']['code'] >= 200 && $response['response']['code'] < 300) {
            $posting['wp_remote_post']['success'] = true;
        } else {
            $posting['wp_remote_post']['note'] = __('wp_remote_post() failed. PayPal IPN won\'t work with your server. Contact your hosting provider.', "sp-cdm");
            if (is_wp_error($response)) {
                $posting['wp_remote_post']['note'] .= ' ' . sprintf(__('Error: %s', "sp-cdm"), wc_clean($response->get_error_message()));
            } else {
                $posting['wp_remote_post']['note'] .= ' ' . sprintf(__('Status code: %s', "sp-cdm"), wc_clean($response['response']['code']));
            }
            $posting['wp_remote_post']['success'] = false;
        }
        // WP Remote Get Check
        $posting['wp_remote_get']['name'] = __('Remote Get', "sp-cdm");
        $posting['wp_remote_get']['help'] = '<a href="#" class="help_tip" data-tip="' . esc_attr__('Client Document Manager plugins may use this method of communication when checking for plugin updates.', "sp-cdm") . '"></a>';
        $response = wp_safe_remote_get('http://www.woothemes.com/wc-api/product-key-api?request=ping&network=' . (is_multisite() ? '1' : '0'));
        if (!is_wp_error($response) && $response['response']['code'] >= 200 && $response['response']['code'] < 300) {
            $posting['wp_remote_get']['success'] = true;
        } else {
            $posting['wp_remote_get']['note'] = __('wp_remote_get() failed. The Client Document Manager plugin updater won\'t work with your server. Contact your hosting provider.', "sp-cdm");
            if (is_wp_error($response)) {
                $posting['wp_remote_get']['note'] .= ' ' . sprintf(__('Error: %s', "sp-cdm"), wc_clean($response->get_error_message()));
            } else {
                $posting['wp_remote_get']['note'] .= ' ' . sprintf(__('Status code: %s', "sp-cdm"), wc_clean($response['response']['code']));
            }
            $posting['wp_remote_get']['success'] = false;
        }
        $posting = apply_filters('Client Document Manager_debug_posting', $posting);
        foreach ($posting as $post) {
            $mark = !empty($post['success']) ? 'yes' : 'error';
            ?>
				<tr>
					<td data-export-label="<?php 
            echo esc_html($post['name']);
            ?>
"><?php 
            echo esc_html($post['name']);
            ?>
:</td>
					<td class="help"><?php 
            echo isset($post['help']) ? $post['help'] : '';
            ?>
</td>
					<td>
						<mark class="<?php 
            echo $mark;
            ?>
">
							<?php 
            echo !empty($post['success']) ? 'Yes' : 'No';
            ?>
							<?php 
            echo !empty($post['note']) ? wp_kses_data($post['note']) : '';
            ?>
						</mark>
					</td>
				</tr>
				<?php 
        }
        ?>
	</tbody>
</table>
<table class="wc_status_table widefat" cellspacing="0" id="status">
	<thead>
		<tr>
			<th colspan="3" data-export-label="Active Plugins (<?php 
        echo count((array) get_option('active_plugins'));
        ?>
)"><?php 
        _e('Active Plugins', "sp-cdm");
        ?>
 (<?php 
        echo count((array) get_option('active_plugins'));
        ?>
)</th>
		</tr>
	</thead>
	<tbody>
		<?php 
        $active_plugins = (array) get_option('active_plugins', array());
        if (is_multisite()) {
            $active_plugins = array_merge($active_plugins, get_site_option('active_sitewide_plugins', array()));
        }
        foreach ($active_plugins as $plugin) {
            $plugin_data = @get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin);
            $dirname = dirname($plugin);
            $version_string = '';
            $network_string = '';
            if (!empty($plugin_data['Name'])) {
                // link the plugin name to the plugin url if available
                $plugin_name = esc_html($plugin_data['Name']);
                if (!empty($plugin_data['PluginURI'])) {
                    $plugin_name = '<a href="' . esc_url($plugin_data['PluginURI']) . '" title="' . __('Visit plugin homepage', "sp-cdm") . '" target="_blank">' . $plugin_name . '</a>';
                }
                if (strstr($dirname, 'Client Document Manager-')) {
                    if (false === ($version_data = get_transient(md5($plugin) . '_version_data'))) {
                        $changelog = wp_safe_remote_get('http://dzv365zjfbd8v.cloudfront.net/changelogs/' . $dirname . '/changelog.txt');
                        $cl_lines = explode("\n", wp_remote_retrieve_body($changelog));
                        if (!empty($cl_lines)) {
                            foreach ($cl_lines as $line_num => $cl_line) {
                                if (preg_match('/^[0-9]/', $cl_line)) {
                                    $date = str_replace('.', '-', trim(substr($cl_line, 0, strpos($cl_line, '-'))));
                                    $version = preg_replace('~[^0-9,.]~', '', stristr($cl_line, "version"));
                                    $update = trim(str_replace("*", "", $cl_lines[$line_num + 1]));
                                    $version_data = array('date' => $date, 'version' => $version, 'update' => $update, 'changelog' => $changelog);
                                    set_transient(md5($plugin) . '_version_data', $version_data, DAY_IN_SECONDS);
                                    break;
                                }
                            }
                        }
                    }
                    if (!empty($version_data['version']) && version_compare($version_data['version'], $plugin_data['Version'], '>')) {
                        $version_string = ' No <strong style="color:red;">' . esc_html(sprintf(_x('%s is available', 'Version info', "sp-cdm"), $version_data['version'])) . '</strong>';
                    }
                    if ($plugin_data['Network'] != false) {
                        $network_string = ' No <strong style="color:black;">' . __('Network enabled', "sp-cdm") . '</strong>';
                    }
                }
                ?>
				<tr>
					<td><?php 
                echo $plugin_name;
                ?>
</td>
					<td class="help">&nbsp;</td>
					<td><?php 
                echo sprintf(_x('by %s', 'by author', "sp-cdm"), $plugin_data['Author']) . ' No ' . esc_html($plugin_data['Version']) . $version_string . $network_string;
                ?>
</td>
				</tr>
				<?php 
            }
        }
        ?>
	</tbody>
</table>

<table class="wc_status_table widefat" cellspacing="0" id="status">
	<thead>
		<tr>
			<th colspan="3" data-export-label="Theme"><?php 
        _e('Theme', "sp-cdm");
        ?>
</th>
		</tr>
	</thead>
		<?php 
        $active_theme = wp_get_theme();
        if ($active_theme->{'Author URI'} == 'http://www.woothemes.com') {
            $theme_dir = substr(strtolower(str_replace(' ', '', $active_theme->Name)), 0, 45);
            if (false === ($theme_version_data = get_transient($theme_dir . '_version_data'))) {
                $theme_changelog = wp_safe_remote_get('http://dzv365zjfbd8v.cloudfront.net/changelogs/' . $theme_dir . '/changelog.txt');
                $cl_lines = explode("\n", wp_remote_retrieve_body($theme_changelog));
                if (!empty($cl_lines)) {
                    foreach ($cl_lines as $line_num => $cl_line) {
                        if (preg_match('/^[0-9]/', $cl_line)) {
                            $theme_date = str_replace('.', '-', trim(substr($cl_line, 0, strpos($cl_line, '-'))));
                            $theme_version = preg_replace('~[^0-9,.]~', '', stristr($cl_line, "version"));
                            $theme_update = trim(str_replace("*", "", $cl_lines[$line_num + 1]));
                            $theme_version_data = array('date' => $theme_date, 'version' => $theme_version, 'update' => $theme_update, 'changelog' => $theme_changelog);
                            set_transient($theme_dir . '_version_data', $theme_version_data, DAY_IN_SECONDS);
                            break;
                        }
                    }
                }
            }
        }
        ?>
	<tbody>
		<tr>
			<td data-export-label="Name"><?php 
        _e('Name', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The name of the current active theme.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        echo $active_theme->Name;
        ?>
</td>
		</tr>
		<tr>
			<td data-export-label="Version"><?php 
        _e('Version', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The installed version of the current active theme.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        echo $active_theme->Version;
        if (!empty($theme_version_data['version']) && version_compare($theme_version_data['version'], $active_theme->Version, '!=')) {
            echo ' No <strong style="color:red;">' . $theme_version_data['version'] . ' ' . __('is available', "sp-cdm") . '</strong>';
        }
        ?>
</td>
		</tr>
		<tr>
			<td data-export-label="Author URL"><?php 
        _e('Author URL', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The theme developers URL.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        echo $active_theme->{'Author URI'};
        ?>
</td>
		</tr>
		<tr>
			<td data-export-label="Child Theme"><?php 
        _e('Child Theme', "sp-cdm");
        ?>
:</td>
			<td class="help"><?php 
        echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('Displays whether or not the current theme is a child theme.', "sp-cdm") . '"></a>';
        ?>
</td>
			<td><?php 
        echo is_child_theme() ? '<mark class="yes">' . 'Yes' . '</mark>' : '&#10005; No ' . sprintf(__('If you\'re modifying Client Document Manager or a parent theme you didn\'t build personally we recommend using a child theme. See: <a href="%s" target="_blank">How to create a child theme</a>', "sp-cdm"), 'http://codex.wordpress.org/Child_Themes');
        ?>
</td>
		</tr>
		<?php 
        if (is_child_theme()) {
            $parent_theme = wp_get_theme($active_theme->Template);
            ?>
		<tr>
			<td data-export-label="Parent Theme Name"><?php 
            _e('Parent Theme Name', "sp-cdm");
            ?>
:</td>
			<td class="help"><?php 
            echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The name of the parent theme.', "sp-cdm") . '"></a>';
            ?>
</td>
			<td><?php 
            echo $parent_theme->Name;
            ?>
</td>
		</tr>
		<tr>
			<td data-export-label="Parent Theme Version"><?php 
            _e('Parent Theme Version', "sp-cdm");
            ?>
:</td>
			<td class="help"><?php 
            echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The installed version of the parent theme.', "sp-cdm") . '"></a>';
            ?>
</td>
			<td><?php 
            echo $parent_theme->Version;
            ?>
</td>
		</tr>
		<tr>
			<td data-export-label="Parent Theme Author URL"><?php 
            _e('Parent Theme Author URL', "sp-cdm");
            ?>
:</td>
			<td class="help"><?php 
            echo '<a href="#" class="help_tip" data-tip="' . esc_attr__('The parent theme developers URL.', "sp-cdm") . '"></a>';
            ?>
</td>
			<td><?php 
            echo $parent_theme->{'Author URI'};
            ?>
</td>
		</tr>
		<?php 
        }
        ?>
		
	</tbody>
</table>
<?php 
        do_action('Client Document Manager_system_status_report');
        ?>

<script type="text/javascript">

	jQuery( 'a.help_tip' ).click( function() {
		return false;
	});

	jQuery( 'a.debug-report' ).click( function() {

		var report = '';

		jQuery( '#status thead, #status tbody' ).each(function(){

			if ( jQuery( this ).is('thead') ) {

				var label = jQuery( this ).find( 'th:eq(0)' ).data( 'export-label' ) || jQuery( this ).text();
				report = report + "\n### " + jQuery.trim( label ) + " ###\n\n";

			} else {

				jQuery('tr', jQuery( this ) ).each(function(){

					var label       = jQuery( this ).find( 'td:eq(0)' ).data( 'export-label' ) || jQuery( this ).find( 'td:eq(0)' ).text();
					var the_name    = jQuery.trim( label ).replace( /(<([^>]+)>)/ig, '' ); // Remove HTML
					var the_value   = jQuery.trim( jQuery( this ).find( 'td:eq(2)' ).text() );
					var value_array = the_value.split( ', ' );

					if ( value_array.length > 1 ) {

						// If value have a list of plugins ','
						// Split to add new line
						var output = '';
						var temp_line ='';
						jQuery.each( value_array, function( key, line ){
							temp_line = temp_line + line + '\n';
						});

						the_value = temp_line;
					}

					report = report + '' + the_name + ': ' + the_value + "\n";
				});

			}
		});

			jQuery( "#debug-report" ).slideDown();
			jQuery( "#debug-report textarea" ).val( report ).focus().select();
			jQuery( this ).fadeOut();
			return false;

		return false;
	});

	jQuery( document ).ready( function ( $ ) {
		$( '#copy-for-support' ).tipTip({
			'attribute':  'data-tip',
			'activation': 'click',
			'fadeIn':     50,
			'fadeOut':    50,
			'delay':      0
		});

		$( 'body' ).on( 'copy', '#copy-for-support', function ( e ) {
			e.clipboardData.clearData();
			e.clipboardData.setData( 'text/plain', $( '#debug-report textarea' ).val() );
			e.preventDefault();
		});

	});

</script>
</div>
        
        <?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" /></td>
</tr>
<tr valign="top">
<th scope="row"><label for="mailserver_pass"><?php 
    _e('Password');
    ?>
</label></th>
<td>
<input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php 
    form_option('mailserver_pass');
    ?>
" class="regular-text" />
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="default_email_category"><?php 
    _e('Default Mail Category');
    ?>
</label></th>
<td>
<?php 
    wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_email_category', 'orderby' => 'name', 'selected' => get_option('default_email_category'), 'hierarchical' => true));
    ?>
</td>
</tr>
<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 valign="top">
<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 valign="top">
<th scope="row"><?php 
_e('For each article in a feed, show');
?>
 </th>
<td><fieldset><legend class="screen-reader-text"><span><?php 
_e('For each article in a feed, show');
?>
 </span></legend>