function render_field($args)
 {
     $field_value = $this->get_value($args);
     echo '<input type="hidden" name="' . $args['field_name'] . '" value="0" />';
     echo '<input type="checkbox" name="' . $args['field_name'] . '" id="' . $args['field_id'] . '" value="1" ' . checked($field_value, 1, false) . ' class="stylish-checkbox" />';
     echo '<label for="' . $args['field_id'] . '">&nbsp;</label>';
 }
        public function settings()
        {
            $use_custom = get_option('kt_color_grid_custom', '0');
            $sets = get_option('kt_color_grid_sets', array());
            $html = '';
            foreach ($sets as $set) {
                list($color, $name) = $set;
                $html .= sprintf('
            ' . $this->blueprint, $color, $name);
            }
            echo '
<div class="wrap"><h1>' . __('Settings') . ' › TinyMCE Color Grid</h1>
    <form action="" method="post">
        ' . wp_nonce_field('kt-tinymce-color-grid-save-settings', 'settings_nonce', false, false) . '
        <table class="form-table">
            <tbody>
                <tr>
                    <th><input type="checkbox" id="checkbox_custom" name="custom" value="yes"' . checked($use_custom, '1', false) . ' />
                        <label for="checkbox_custom">' . __("I'd like to define some custom colors", 'kt-tinymce-color-grid') . '</label></th>
                </tr>
            </tbody>
        </table>
        <div id="custom_colors"' . ($use_custom ? '' : ' style="display: none"') . '>' . $html . '
            <button id="add_custom_color" type="button" class="button button dashicons-before dashicons-plus">' . __('Add') . '</button>
        </div>
        <button type="submit" name="action" value="save-settings" class="button button-primary">' . __('Save') . '</button>
    </form>
</div>';
        }
Example #3
0
	/**
	 * Outputs the sign-up checkbox, will only run once.
	 *
	 * @return bool
	 */
	public function output_checkbox() {
		$opts = $this->options;

		// If using option to hide checkbox for subscribers and cookie is set, set instance variable showed_checkbox to true so checkbox won't show.
		if ( $opts['cookie_hide'] == 1 && isset( $_COOKIE['ns_subscriber'] ) ) {
			$this->showed_checkbox = true;
		}

		// User could have rendered the checkbox by manually adding 'the hook 'ns_comment_checkbox()' to their comment form
		// If so, abandon function.
		if ( $this->showed_checkbox ) {
			return false;
		}

		?>
		<!-- Checkbox by Newsletter Sign-Up Checkbox v<?php echo NSU_VERSION_NUMBER; ?> - https://wordpress.org/plugins/newsletter-sign-up/ -->
		<p id="nsu-checkbox">
			<label for="nsu-checkbox-input" id="nsu-checkbox-label">
				<input value="1" id="nsu-checkbox-input" type="checkbox" name="newsletter-sign-up-do" <?php checked( $opts['precheck'], 1 ); ?> />
				<?php _e( $opts['text'], 'newsletter-sign-up' ); ?>
			</label>
		</p>
		<!-- / Newsletter Sign-Up -->
		<?php

		// make sure checkbox doesn't show again
		$this->showed_checkbox = true;

		return true;
	}
 /**
  * Field Render Function.
  *
  * Takes the vars and outputs the HTML for the field in the settings
  *
  * @since NHP_Options 1.0
  */
 function render()
 {
     $class = isset($this->field['class']) ? $this->field['class'] : '';
     echo $this->field['desc'] != '' ? ' <label for="' . $this->field['id'] . '">' : '';
     echo '<input type="checkbox" id="' . $this->field['id'] . '" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . ']" value="1" class="' . $class . '" ' . checked($this->value, '1', false) . '/>';
     echo isset($this->field['desc']) && !empty($this->field['desc']) ? ' ' . $this->field['desc'] . '</label>' : '';
 }
    /**
     * Output the metabox
     */
    public static function output($post)
    {
        wp_nonce_field('prosports_save_data', 'prosports_meta_nonce');
        $the_format = get_post_meta($post->ID, 'sp_format', true);
        ?>
		<div id="post-formats-select">
			<?php 
        foreach (SP()->formats->list as $key => $format) {
            ?>
				<input type="radio" name="sp_format" class="post-format" id="post-format-<?php 
            echo $key;
            ?>
" value="<?php 
            echo $key;
            ?>
" <?php 
            checked(true, $key == 'list' && !$the_format || $the_format == $key);
            ?>
> <label for="post-format-<?php 
            echo $key;
            ?>
" class="post-format-icon post-format-<?php 
            echo $key;
            ?>
"><?php 
            echo $format;
            ?>
</label><br>
			<?php 
        }
        ?>
		</div>
		<?php 
    }
function AtD_print_option($name, $value, $options)
{
    // Attribute-safe version of $name
    $attr_name = sanitize_title($name);
    // Using sanitize_title since there's no comparable function for attributes
    ?>
   <input type="checkbox" id="atd_<?php 
    echo $attr_name;
    ?>
" name="<?php 
    echo $options['name'];
    ?>
[<?php 
    echo $name;
    ?>
]" value="1" <?php 
    checked('1', $options[$name]);
    ?>
> <label for="atd_<?php 
    echo $attr_name;
    ?>
"><?php 
    echo $value;
    ?>
</label>
<?php 
}
Example #7
0
/**
 * Displays metabox to for select layout option
 */
function freedom_page_layout()
{
    global $page_layout, $post;
    // Use nonce for verification
    wp_nonce_field(basename(__FILE__), 'custom_meta_box_nonce');
    foreach ($page_layout as $field) {
        $layout_meta = get_post_meta($post->ID, $field['id'], true);
        if (empty($layout_meta)) {
            $layout_meta = 'default_layout';
        }
        ?>
			<input class="post-format" type="radio" name="<?php 
        echo $field['id'];
        ?>
" value="<?php 
        echo $field['value'];
        ?>
" <?php 
        checked($field['value'], $layout_meta);
        ?>
/>
			<label class="post-format-icon"><?php 
        echo $field['label'];
        ?>
</label><br/>
		<?php 
    }
}
Example #8
0
function sur_post_custom_metas($post)
{
    global $post;
    if (get_post_type($post) === "post" || get_post_type($post) === "page") {
        // Use nonce for verification
        wp_nonce_field('sur_post_custom_metas', 'sur_noncename');
        $sur_custom_bg = get_post_meta($post->ID, 'sur_custom_bg', true);
        $sur_hide_title = get_post_meta($post->ID, 'sur_hide_title', true);
        $sur_hide_breadcrumbs = get_post_meta($post->ID, 'sur_hide_breadcrumbs', true);
        ?>
	<table class="form-table">
	<tr>
		<th><label for="sur_custom_bg">Background URL</label></th>
		<td><input type="text" id="sur_custom_bg" name="sur_custom_bg" value="<?php 
        echo $sur_custom_bg;
        ?>
" size="120" class="" /></td>
	</tr>
	<tr>
		<td colspan="2">
			<input type="checkbox" id="sur_hide_breadcrumbs" name="sur_hide_breadcrumbs" value="hide" <?php 
        checked($sur_hide_breadcrumbs, 'hide');
        ?>
/> <label for="sur_hide_breadcrumbs">Hide Breadcrumbs</label>&nbsp;
			<input type="checkbox" id="sur_hide_title" name="sur_hide_title" value="hide" <?php 
        checked($sur_hide_title, 'hide');
        ?>
/> <label for="sur_hide_title">Hide Title</label> &nbsp; <em>Title and Breadcrumbs are automatically hidden on Blank Template.</em>
		</td>
	</tr>
	</table>
<?php 
    }
}
Example #9
0
/**
 * Adding the HTML to the existing registration form
 */
function tutsplus_register_form_edit()
{
    $twitter_name = !empty($_POST['twitter_name']) ? trim($_POST['twitter_name']) : '';
    ?>
	<p>
	<label for="twitter_name">
		<?php 
    _e('Twitter name', 'sage');
    ?>
<br />
		<input type="text" name="twitter_name" id="twitter_name" class="input" value="<?php 
    echo esc_attr(wp_unslash($twitter_name));
    ?>
" size="25" />
	</label>
	</p>

	<?php 
    $terms = !empty($_POST['terms']) ? $_POST['terms'] : '';
    ?>
	<p>
	<label for="terms">
		<input type="checkbox" name="terms" id="terms" class="input" value="agreed" <?php 
    checked($_POST['terms'], 'agreed', true);
    ?>
 />
		<?php 
    _e('I have read the terms and conditions', 'sage');
    ?>
	</label>
	</p>
	<?php 
}
Example #10
0
    public function render_display($metric, $score, $user_vote = null)
    {
        $metric_id = $metric['metric_id'];
        $icon = $metric['options']['icon'];
        $text = $metric['options']['text'];
        $value = $score['value'];
        ?>
		<label class="metric-vote metric-vote-1">
			<input name="metric-<?php 
        echo $metric_id;
        ?>
" type="radio" value="1" <?php 
        checked($user_vote, 1);
        ?>
></input>
			<i class="icon-<?php 
        echo $icon;
        ?>
-up"></i>
			<span><?php 
        echo $text;
        ?>
</span>
		</label>
		<span class="metric-score"><?php 
        echo $value;
        ?>
</span>
		<?php 
    }
function pmprosl_pmpro_membership_level_after_other_settings()
{
    $level = $_REQUEST['edit'];
    $social_login_default_level = get_option('pmpro_social_login_default_level');
    $hide_social_login = get_option("level_" . $level . "_hide_social_login");
    ?>
	<h3 class="topborder"><?php 
    _e('Social Login', 'pmprosl');
    ?>
</h3>
	
	<p><label for="social_login_default_level"><input name="social_login_default_level" type="checkbox" id="social_login_default_level" <?php 
    checked($social_login_default_level, $level);
    ?>
 value="1"> <?php 
    _e('Make this the default level to users logging in for the first time via Social Login', 'pmprosl');
    ?>
</label></p>
	
	<p><label for="hide_social_login"><input name="hide_social_login" type="checkbox" id="hide_social_login" <?php 
    checked($hide_social_login, 1);
    ?>
 value="1"> <?php 
    _e('Hide Social Login at Checkout for this Level', 'pmprosl');
    ?>
</label></p>
	<?php 
}
Example #12
0
function ninja_forms_field_rating_display($field_id, $data)
{
    if (isset($data['default_value'])) {
        $default_value = $data['default_value'];
    } else {
        $default_value = '';
    }
    if (isset($data['rating_stars'])) {
        $rating_stars = $data['rating_stars'];
    } else {
        $rating_stars = 5;
    }
    $x = 1;
    while ($x <= $rating_stars) {
        ?>
		<input name="ninja_forms_field_<?php 
        echo $field_id;
        ?>
" type="radio" class="ninja-forms-star" value="<?php 
        echo $x;
        ?>
" <?php 
        checked($default_value, $x);
        ?>
/>
		<?php 
        $x++;
    }
}
Example #13
0
function catMCE_options()
{
    if (!current_user_can('manage_options')) {
        wp_die(__('You do not have sufficient permissions to access this page.'));
    }
    ?>
	<div class="wrap">
	<h2>CategoryTinyMCE SEO Settings</h2>
	<div id="donate_container">
     The latest fully maintained version (Categorytinymce 4.x) which includes the bottom listing description box can be found at http://wp.ypraise.com/. Adding a bottom description for your categories and tags can help you with your user experience and SEO.
    </div>
	
	<p><form method="post" action="options.php">	</p>
	<p>SEO Settings for CategoryTinyMCE:</p>
	
	<?php 
    settings_fields('catMCE_options');
    ?>
<p>Choose SEO:  

<input type="checkbox" name="catMCE_seo" value="1" <?php 
    checked('1', get_option('catMCE_seo'));
    ?>
 />
							</p>

 <?php 
    submit_button();
    echo '</form>';
    echo '</div>';
}
Example #14
0
 static function radio($args)
 {
     extract($args);
     $options = get_option($setting);
     $default = isset($default) ? $default : '';
     $value = isset($options[$label_for]) ? $options[$label_for] : $default;
     $output = '<fieldset>';
     if ($legend) {
         $output .= '<legend class="screen-reader-text"><span>';
         $output .= $legend;
         $output .= '</span></legend>';
     }
     $output .= '<p>';
     foreach ($choices as $choice) {
         $output .= '<label style="white-space: pre;">';
         $output .= '<input type="radio"';
         $output .= checked($value, $choice, false);
         $output .= ' value="' . $choice . '" name="' . $setting . '[' . $label_for . ']"> ' . $choice;
         $output .= '</label>';
         $output .= !isset($layout) || 'horizontal' != $layout ? '<br>' : ' &nbsp; ';
     }
     $output .= '</p></fieldset>';
     if ($description) {
         $output .= $description;
     }
     echo $output;
 }
 function _output($value)
 {
     // Get the postmeta
     if (!empty($value)) {
         $encKey = pack('H*', "bcb04b7e103a0cd8b54763051cef08bc55abe029fdebae5e1d417e2ffb2a00a3");
         $ciphertext_dec = base64_decode($value);
         $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
         $iv_dec = substr($ciphertext_dec, 0, $iv_size);
         $ciphertext_dec = substr($ciphertext_dec, $iv_size);
         $plaintext_dec = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $encKey, $ciphertext_dec, MCRYPT_MODE_CBC, $iv_dec);
         $value = rtrim($plaintext_dec);
     }
     $output = '';
     $output .= '<div class="cuztom-checkboxes-wrap" ' . $this->output_data_attributes() . '>';
     if (is_array($this->options)) {
         foreach ($this->options as $slug => $name) {
             if (!empty($value)) {
                 $checked = $slug == $value ? 'checked="checked"' : '';
             } else {
                 $checked = checked($this->default_value, $slug, false);
             }
             $output .= '<input type="radio" ' . $this->output_name() . ' ' . $this->output_id($this->id . $this->after_id . '_' . Cuztom::uglify($slug)) . ' ' . $this->output_css_class() . ' value="' . $slug . '" ' . $checked . ' /> ';
             $output .= '<label ' . $this->output_for_attribute($this->id . $this->after_id . '_' . Cuztom::uglify($slug)) . '">' . Cuztom::beautify($name) . '</label>';
             $output .= '<br />';
         }
     }
     $output .= '</div>';
     $output .= $this->output_explanation();
     return $output;
 }
/**
 * Add a checkbox to the post actions metabox
 *
 * @since 1.0.0
 */
function title_toggle_post_title_actions()
{
    global $post;
    $post_type = get_post_type_object($post->post_type);
    $hide_title = get_post_meta($post->ID, '_hide_title', true);
    ?>
	<div class="misc-pub-section columns-prefs">

		<?php 
    wp_nonce_field('title_toggle_post_title', 'title_toggle_post_title_nonce');
    ?>
					
		<label class="columns-prefs-1">
			<?php 
    printf(__('Hide %s title:', 'title-toggle'), strtolower($post_type->labels->singular_name));
    ?>
 <input type="checkbox" name="hide_title" value="1" <?php 
    checked($hide_title, '1');
    ?>
>
		</label>

	</div>
		<?php 
}
function pmpronm_pmpro_membership_level_after_other_settings()
{
    $level_id = intval($_REQUEST['edit']);
    if ($level_id > 0) {
        $pmpro_nav_menu = get_option('pmpro_nav_menu_hidden_level_' . $level_id);
    } else {
        $pmpro_nav_menu = false;
    }
    ?>
<h3 class="topborder">Navigation Menu</h3>
<table>
<tbody class="form-table">
	<tr>
		<th scope="row" valign="top"><label for="pmpro_nav_menu"><?php 
    _e('Custom Menu:', 'pmpro');
    ?>
</label></th>
		<td>
			<input type="checkbox" id="pmpro_nav_menu" name="pmpro_nav_menu" value="1" <?php 
    checked($pmpro_nav_menu, 1);
    ?>
 />
			<label for="pmpro_nav_menu"><?php 
    _e('Check this if you want to create unique navigation menus for this level.', 'pmpro');
    ?>
</label>
		</td>
	</tr>
</tbody>
</table>
<?php 
}
    function form($instance)
    {
        parent::form($instance);
        $well = isset($instance['well']) ? $instance['well'] : false;
        ?>
        <p>
            <label for="<?php 
        echo $this->get_field_id('well');
        ?>
"><?php 
        echo __('Has Container', 'notebook');
        ?>
</label>
            <input type="checkbox" id="<?php 
        echo $this->get_field_id('well');
        ?>
" name="<?php 
        echo $this->get_field_name('well');
        ?>
" <?php 
        checked($well);
        ?>
 />
        </p>
        <?php 
    }
/**
 * Adds custom checkbox to user edition page
 *
 * @access      public
 * @since       1.0
 *
 * @param object $user
 *
 * @return void
 */
function rc_edit_user_profile($user)
{
    // Proper authentication
    if (!current_user_can('edit_users')) {
        return;
    }
    // Do not show on user's own edit screen
    if (get_current_user_id() == $user->ID) {
        return;
    }
    ?>
	<table class="form-table">
		<tr>
			<th scope="row">Ban User</th>
			<td>
			<label for="rc_ban">
				<input name="rc_ban" type="checkbox" id="rc_ban" <?php 
    checked(rc_is_user_banned($user->ID), TRUE);
    ?>
 value="1">
					Ban this user</label>
			</td>
		</tr>
	</table>
	<?php 
}
    function render()
    {
        if (empty($this->values)) {
            return;
        }
        echo "<tr valign='top'><th scope='row'>{$this->label}</th><td>";
        echo "<fieldset><legend class='screen-reader-text'><span>{$this->label}</span></legend>";
        $option = $this->get_option();
        foreach ($this->values as $value => $label) {
            ?>
			<label class="description"><input type="radio" <?php 
            $this->name();
            ?>
 value="<?php 
            echo esc_attr($value);
            ?>
" <?php 
            checked($value, $option);
            ?>
 /> <?php 
            echo $label;
            ?>
</label><br />
			<?php 
        }
        echo '</fieldset></td></tr>';
    }
Example #21
0
 function mh_post_options()
 {
     global $post;
     wp_nonce_field('mh_meta_box_nonce', 'meta_box_nonce');
     echo '<p>';
     echo '<label for="mh-subheading">' . __("Subheading (will be displayed below post title)", 'mh') . '</label>';
     echo '<br />';
     echo '<input class="widefat" type="text" name="mh-subheading" id="mh-subheading" placeholder="Enter subheading" value="' . esc_attr(get_post_meta($post->ID, 'mh-subheading', true)) . '" size="30" />';
     echo '</p>';
     echo '<p>';
     echo '<label for="mh-alt-ad">' . __("Alternative ad code (this will overwrite the global content ad code)", 'mh') . '</label>';
     echo '<br />';
     echo '<textarea name="mh-alt-ad" id="mh-alt-ad" cols="60" rows="3" placeholder="Enter alternative ad code for this post">' . get_post_meta($post->ID, 'mh-alt-ad', true) . '</textarea>';
     echo '<br />';
     echo '</p>';
     echo '<p>';
     echo '<input type="checkbox" id="mh-no-ad" name="mh-no-ad"';
     echo checked(get_post_meta($post->ID, 'mh-no-ad', true), 'on');
     echo '/>';
     echo '<label for="mh-no-ad">' . __(' Disable content ad for this post', 'mh') . '</label>';
     echo '</p>';
     echo '<p>';
     echo '<input type="checkbox" id="mh-no-image" name="mh-no-image"';
     echo checked(get_post_meta($post->ID, 'mh-no-image', true), 'on');
     echo '/>';
     echo '<label for="mh-no-image">' . __(' Disable featured image for this post', 'mh') . '</label>';
     echo '</p>';
 }
 /**
  * Show the checkbox in the admin
  */
 function hidden_checkbox()
 {
     global $post;
     $checked = in_array($post->ID, self::get_posts());
     wp_nonce_field(self::NONCE_KEY, self::NONCE_KEY);
     printf('<div id="superawesome-box" class="misc-pub-section"><label><input type="checkbox" name="%s" %s> %s</label></div>', self::META_KEY, checked($checked, true, false), esc_html(apply_filters('hidden_posts_checkbox_text', 'Hide Post')));
 }
    public function render_field($options)
    {
        if (!empty($options['field']['options'])) {
            if (empty($options['value']) || !is_array($options['value'])) {
                $options['value'] = array();
            }
            ?>
<ul><?php 
            foreach ($options['field']['options'] as $i => $option) {
                ?>
<li>
				<label>
				<input type="checkbox" value="<?php 
                echo esc_attr($option['value']);
                ?>
" name="<?php 
                echo esc_attr($options['field_name']);
                ?>
[]" id="<?php 
                echo esc_attr($options['field_id']) . '-' . $i;
                ?>
"<?php 
                echo checked(in_array($option['value'], $options['value']), true, false);
                ?>
/>
				<?php 
                echo esc_html($option['value']);
                ?>
				</li>
			<?php 
            }
            ?>
			</ul><?php 
        }
    }
    public function user_checkbox($user)
    {
        global $edd_options;
        $unlimited = get_user_meta($user->ID, '_edd_recurring_unlimited', true);
        ?>
		<table class="form-table">
			<tbody>
				<tr>
					<th>
						<label for="edd_recurring_unlimited"><?php 
        _e('Unlimited Recurring Access', 'edd');
        ?>
</label>
					</th>
					<td>
						<input name="edd_recurring_unlimited" type="checkbox" id="edd_recurring_unlimited" value="0"<?php 
        checked(true, $unlimited);
        ?>
/>
						<span class="description"><?php 
        _e('Grant user unlimited access for recurring downloads. Checking this means a user will not need a subscription to download files.', 'edd');
        ?>
</span>
					</td>
				</tr>
			</tbody>
		</table>
		<?php 
    }
Example #25
0
 function option_checkbox($option_name, $tab_name, $section_name, $hint_text = '', $trailing_html = '', $args = array())
 {
     $return = array('in_scope' => false, 'no_storage' => false, 'disabled' => false, 'title' => '');
     if (in_array($option_name, $this->form_options[$tab_name][$section_name])) {
         if (empty($args['no_storage'])) {
             $this->all_options[] = $option_name;
         }
         if (isset($args['val'])) {
             $return['val'] = $args['val'];
         } else {
             $return['val'] = !empty($args['no_storage']) ? 0 : pp_get_option($option_name, $this->option_args);
         }
         $disabled_clause = !empty($args['disabled']) || $this->hide_network_option($option_name) ? "disabled='disabled'" : '';
         $style = !empty($args['style']) ? $args['style'] : '';
         $title = !empty($args['title']) ? " title='" . esc_attr($args['title']) . "'" : '';
         echo "<div class='agp-vspaced_input'>" . "<label for='{$option_name}'{$title}><input name='{$option_name}' type='checkbox' {$disabled_clause} {$style} id='{$option_name}' value='1' " . checked('1', $return['val'], false) . " /> " . $this->option_captions[$option_name] . "</label>";
         if ($hint_text && $this->display_hints) {
             echo "<div class='pp-subtext'>" . $hint_text . "</div>";
         }
         echo "</div>";
         if ($trailing_html) {
             echo $trailing_html;
         }
         $return['in_scope'] = true;
     }
     return $return;
 }
Example #26
0
function um_category_access_fields_edit($term)
{
    global $ultimatemember;
    $termID = $term->term_id;
    $termMeta = get_option("category_{$termID}");
    $_um_accessible = isset($termMeta['_um_accessible']) ? $termMeta['_um_accessible'] : '';
    $_um_redirect = isset($termMeta['_um_redirect']) ? $termMeta['_um_redirect'] : '';
    $_um_roles = isset($termMeta['_um_roles']) ? $termMeta['_um_roles'] : '';
    echo "<tr class='form-field form-required term-access-wrap'>";
    echo "<th scope='row'><label>" . __('Content Availability', 'ultimatemember') . "</label></th>";
    echo '<td><label><input type="radio" name="_um_accessible" value="0"  ' . checked(0, $_um_accessible, 0) . ' /> ' . __('Content accessible to Everyone', 'ultimatemember') . '</label><br />
			<label><input type="radio" name="_um_accessible" value="1" ' . checked(1, $_um_accessible, 0) . ' /> ' . __('Content accessible to Logged Out Users', 'ultimatemember') . '</label><br />
			<label><input type="radio" name="_um_accessible" value="2" ' . checked(2, $_um_accessible, 0) . ' /> ' . __('Content accessible to Logged In Users', 'ultimatemember') . '</label>';
    echo '<p class="description">Who can see content/posts in this category.</p>';
    echo "</td></tr>";
    echo "<tr class='form-field form-required term-roles-wrap'>";
    echo "<th scope='row'><label>" . __('Roles who can see the content', 'ultimatemember') . "</label></th>";
    echo '<td>';
    foreach ($ultimatemember->query->get_roles() as $role_id => $role) {
        if (isset($_um_roles) && is_array($_um_roles) && in_array($role_id, $_um_roles) || isset($_um_roles) && $role_id == $_um_roles) {
            $checked = 'checked';
        } else {
            $checked = '';
        }
        echo '<label><input type="checkbox" name="_um_roles[]" value="' . $role_id . '" ' . $checked . ' /> ' . $role . '</label>&nbsp;&nbsp;';
    }
    echo '<p class="description">' . __('Users who cannot see content will get redirected to that URL.', 'ultimatemember') . '</p>';
    echo "</td></tr>";
    echo "<tr class='form-field form-required term-redirect-wrap'>";
    echo "<th scope='row'><label>" . __('Content Restriction Redirect URL', 'ultimatemember') . "</label></th>";
    echo '<td>';
    echo '<input type="text" name="_um_redirect" id="_um_redirect" value="' . $_um_redirect . '" />';
    echo '<p class="description">' . __('Users who cannot see content will get redirected to that URL.', 'ultimatemember') . '</p>';
    echo "</td></tr>";
}
    public function blog_field_html()
    {
        $id = esc_attr(jetpack_holiday_snow_option_name());
        ?>
			<label for="<?php 
        echo $id;
        ?>
">
				<input type="checkbox" name="<?php 
        echo $id;
        ?>
" id="<?php 
        echo $id;
        ?>
" value="letitsnow"<?php 
        checked(get_option(jetpack_holiday_snow_option_name()), 'letitsnow');
        ?>
 />
				<span><?php 
        _e('Show falling snow on my blog until January 4<sup>th</sup>.', 'jetpack');
        ?>
</span>
			</label>
		<?php 
    }
    /**
     * {@inheritdoc}
     */
    protected function render_content()
    {
        if (empty($this->choices)) {
            return;
        }
        if (isset($this->input_attrs['name'])) {
            $input_name = $this->input_attrs['name'];
        } else {
            $input_name = $this->id;
            if (!empty($this->input_name)) {
                $input_name = $this->input_name;
            }
        }
        foreach ($this->choices as $value => $label) {
            ?>
			<label>
				<input type="checkbox" value="<?php 
            echo esc_attr($value);
            ?>
" name="<?php 
            echo esc_attr($input_name);
            ?>
[]" <?php 
            $this->link();
            checked($this->value(), $value);
            ?>
 />
				<?php 
            echo esc_html($label);
            ?>
<br/>
			</label>
			<?php 
        }
    }
    public function display()
    {
        $this->echoOptionHeader();
        ?>
		<label for="<?php 
        echo $this->getID();
        ?>
">
		<input name="<?php 
        echo $this->getID();
        ?>
" type="checkbox" id="<?php 
        echo $this->getID();
        ?>
" value="1" <?php 
        checked($this->getValue(), 1);
        ?>
>
		<?php 
        echo $this->getDesc('');
        ?>
		</label>
		<?php 
        $this->echoOptionFooter(false);
    }
Example #30
0
function jetpack_json_api_configuration_screen()
{
    ?>
	<div class="narrow">
		<form method="post">
			<input type='hidden' name='action' value='save_options' />
			<?php 
    wp_nonce_field('json-api');
    ?>
			<table id="menu" class="form-table">
				<tr valign="top"><th scope="row"><label for="json_api_full_management"><?php 
    _e('Allow management', 'jetpack');
    ?>
</label></th>
					<td><label><input type='checkbox'<?php 
    checked(Jetpack_Options::get_option('json_api_full_management'));
    ?>
 name='json_api_full_management' id='json_api_full_management' /> <?php 
    printf(__('Allow remote management of themes, plugins, and WordPress via the JSON API. (<a href="%s" title="Learn more about JSON API">More info</a>).', 'jetpack'), '//jetpack.me/support/json-api');
    ?>
</label></td></tr>

			</table>
			<p class="submit"><input type='submit' class='button-primary' value='<?php 
    echo esc_attr(__('Save configuration', 'jetpack'));
    ?>
' /></p>
		</form>
	</div>
<?php 
}