当前位置: 首页>>代码示例>>PHP>>正文


PHP disabled函数代码示例

本文整理汇总了PHP中disabled函数的典型用法代码示例。如果您正苦于以下问题:PHP disabled函数的具体用法?PHP disabled怎么用?PHP disabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了disabled函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _wpsc_country_dropdown_options

/**
 * Get the country dropdown options, presumably for the checkout or customer profile pages
 *
 * @param 	string|array  	$args
 *
 * @return 	string			HTML representation of the dropdown
 */
function _wpsc_country_dropdown_options($args = '')
{
    $defaults = array('acceptable' => null, 'acceptable_ids' => null, 'selected' => '', 'disabled' => null, 'disabled_ids' => null, 'placeholder' => __('Please select a country', 'wpsc'), 'include_invisible' => false);
    $args = wp_parse_args($args, $defaults);
    $output = '';
    $countries = WPSC_Countries::get_countries($args['include_invisible']);
    // if the user has a choice of countries the
    if (count($countries) > 1 && !empty($args['placeholder'])) {
        $output .= "<option value=''>" . esc_html($args['placeholder']) . "</option>\n\r";
    }
    foreach ($countries as $country) {
        $isocode = $country->get_isocode();
        $name = $country->get_name();
        // if there is only one country in the list select it
        if (count($countries) == 1) {
            $args['selected'] = $isocode;
        }
        // if we're in admin area, and the legacy country code "UK" or "TP" is selected as the
        // base country, we should display both this and the more proper "GB" or "TL" options
        // and distinguish these choices somehow
        if (is_admin() && 11 > wpsc_core_get_db_version()) {
            if (in_array($isocode, array('TP', 'UK'))) {
                /* translators: This string will mark the legacy isocode "UK" and "TP" in the country selection dropdown as "legacy" */
                $name = sprintf(__('%s (legacy)', 'wpsc'), $name);
            } elseif (in_array($isocode, array('GB', 'TL'))) {
                /* translators: This string will mark the legacy isocode "GB" and "TL" in the country selection dropdown as "ISO 3166" */
                $name = sprintf(__('%s (ISO 3166)', 'wpsc'), $name);
            }
        }
        $output .= sprintf('<option value="%1$s" %2$s %3$s>%4$s</option>' . "\n\r", esc_attr($isocode), selected($args['selected'], $isocode, false), disabled(_wpsc_is_country_disabled($country, $args), true, false), esc_html($name));
    }
    return $output;
}
开发者ID:dreamteam111,项目名称:dreamteam,代码行数:40,代码来源:country-region-tax-util.php

示例2: wc_display_yotpo_settings

function wc_display_yotpo_settings($success_type = false)
{
    $yotpo_settings = get_option('yotpo_settings', wc_yotpo_get_degault_settings());
    $app_key = $yotpo_settings['app_key'];
    $secret = $yotpo_settings['secret'];
    $language_code = $yotpo_settings['language_code'];
    $widget_tab_name = $yotpo_settings['widget_tab_name'];
    if (empty($yotpo_settings['app_key'])) {
        if ($success_type == 'b2c') {
            wc_yotpo_display_message('We have sent you a confirmation email. Please check and click on the link to get your app key and secret token to fill out below.', true);
        } else {
            wc_yotpo_display_message('Set your API key in order the Yotpo plugin to work correctly', false);
        }
    }
    $google_tracking_params = '&utm_source=yotpo_plugin_woocommerce&utm_medium=header_link&utm_campaign=woocommerce_customize_link';
    if (!empty($yotpo_settings['app_key']) && !empty($yotpo_settings['secret'])) {
        $dashboard_link = '<a href="https://api.yotpo.com/users/b2blogin?app_key=' . $yotpo_settings['app_key'] . '&secret=' . $yotpo_settings['secret'] . $google_tracking_params . '" target="_blank">Yotpo Dashboard.</a></div>';
    } else {
        $dashboard_link = "<a href='https://www.yotpo.com/?login=true{$google_tracking_params}' target='_blank'>Yotpo Dashboard.</a></div>";
    }
    $read_only = isset($_POST['log_in_button']) || $success_type == 'b2c' ? '' : 'readonly';
    $cradentials_location_explanation = isset($_POST['log_in_button']) ? "<tr valign='top'>  \t\n\t\t             \t\t\t\t\t\t\t\t\t\t\t\t\t\t<th scope='row'><p class='description'>To get your api key and secret token <a href='https://www.yotpo.com/?login=true' target='_blank'>log in here</a> and go to your account settings.</p></th>\n\t                 \t\t                  \t\t\t\t\t\t\t   </tr>" : '';
    $submit_past_orders_button = $yotpo_settings['show_submit_past_orders'] ? "<input type='submit' name='yotpo_past_orders' value='Submit past orders' class='button-secondary past-orders-btn' " . disabled(true, empty($app_key) || empty($secret), false) . ">" : '';
    $settings_html = "<div class='wrap'>" . screen_icon() . "<h2>Yotpo Settings</h2>\t\t\t\t\t\t  \n\t\t\t  <h4>To customize the look and feel of the widget, and to edit your Mail After Purchase settings, just head to the " . $dashboard_link . "</h4>\n\t\t\t  <form  method='post' id='yotpo_settings_form'>\n\t\t\t  \t<table class='form-table'>" . wp_nonce_field('yotpo_settings_form') . "<fieldset>\n\t                 <tr valign='top'>\n\t                 \t<th scope='row'><div>If you would like to choose a set language, please type the 2-letter language code here. You can find the supported langauge codes <a class='y-href' href='http://support.yotpo.com/entries/21861473-Languages-Customization-' target='_blank'>here.</a></div></th>\n\t                 \t<td><div><input type='text' class='yotpo_language_code_text' name='yotpo_widget_language_code' maxlength='5' value='{$language_code}'/></div></td>\n\t                 </tr>\n\t\t\t  \t     <tr valign='top'>  \t\n\t\t             \t<th scope='row'><div>For multiple-language sites, mark this check box. This will choose the language according to the user's site language.</div></th>\n\t                 \t<td><input type='checkbox' name='yotpo_language_as_site' value='1' " . checked(1, $yotpo_settings['yotpo_language_as_site'], false) . "/></td>\t                  \n\t                 </tr>\n\t\t\t\t\t <tr valign='top'>\n\t\t   \t\t       <th scope='row'><div>Disable native reviews system:</div></th>\n\t\t   \t\t       <td><input type='checkbox' name='disable_native_review_system' value='1' " . checked(1, $yotpo_settings['disable_native_review_system'], false) . " /></td>\n\t\t   \t\t     </tr>\t                 \t                 \n\t    \t         <tr valign='top'>\t\t\t\n\t\t\t\t       <th scope='row'><div>Select widget location</div></th>\n\t\t\t\t       <td>\n\t\t\t\t         <select name='yotpo_widget_location' class='yotpo-widget-location'>\n\t\t\t\t  \t       <option value='footer' " . selected('footer', $yotpo_settings['widget_location'], false) . ">Page footer</option>\n\t\t\t \t\t       <option value='tab' " . selected('tab', $yotpo_settings['widget_location'], false) . ">Tab</option>\n\t\t\t \t           <option value='other' " . selected('other', $yotpo_settings['widget_location'], false) . ">Other</option>\n\t\t\t\t         </select>\n\t\t   \t\t       </td>\n\t\t   \t\t     </tr>\n\t\t   \t\t     <tr valign='top' class='yotpo-widget-location-other-explain'>\n                 \t\t<th scope='row'><p class='description'>In order to locate the widget in a custome location open 'wp-content/plugins/woocommerce/templates/content-single-product.php' and add the following line <code>wc_yotpo_show_widget();</code> in the requested location.</p></th>\t                 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t                 </tr>\n\t\t   \t\t     <tr valign='top' class='yotpo-widget-tab-name'>\n\t\t   \t\t       <th scope='row'><div>Select tab name:</div></th>\n\t\t   \t\t       <td><div><input type='text' name='yotpo_widget_tab_name' value='{$widget_tab_name}' /></div></td>\n\t\t   \t\t     </tr>\n\t\t   \t\t     {$cradentials_location_explanation}\n\t\t\t\t\t <tr valign='top'>\n\t\t   \t\t       <th scope='row'><div>App key:</div></th>\n\t\t   \t\t       <td><div class='y-input'><input id='app_key' type='text' name='yotpo_app_key' value='{$app_key}' {$read_only} '/></div></td>\n\t\t   \t\t     </tr>\n\t\t\t\t\t <tr valign='top'>\n\t\t   \t\t       <th scope='row'><div>Secret token:</div></th>\n\t\t   \t\t       <td><div class='y-input'><input id='secret' type='text'  name='yotpo_oauth_token' value='{$secret}' {$read_only} '/></div></td>\n\t\t   \t\t     </tr>\t\n\t\t   \t\t     <tr valign='top'>\n\t\t   \t\t       <th scope='row'><p class='description'>Yotpo's Bottom Line shows the star rating of the product and the number of reviews for the product. <a href='http://support.yotpo.com/entries/24467793-What-is-the-Yotpo-Bottomline-' target='_blank'>learn more.</a></p></th>\t\t   \t\t       \n\t\t   \t\t     </tr>\t\t\t\t \t \n\t\t\t\t\t <tr valign='top'>\n\t\t   \t\t       <th scope='row'><div>Enable bottom line in product page:</div></th>\n\t\t   \t\t       <td><input type='checkbox' name='yotpo_bottom_line_enabled_product' value='1' " . checked(1, $yotpo_settings['bottom_line_enabled_product'], false) . " /></td>\n\t\t   \t\t     </tr>\t\t\t\t\t  \t \n\t\t\t\t\t <tr valign='top'>\n\t\t   \t\t       <th scope='row'><div>Enable bottom line in category page:</div></th>\n\t\t   \t\t       <td><input type='checkbox' name='yotpo_bottom_line_enabled_category' value='1' " . checked(1, $yotpo_settings['bottom_line_enabled_category'], false) . " />\t\t   \t\t       \n\t\t   \t\t       </td>\n\t\t   \t\t     </tr>\t\t\t\t\t \t \n\t\t           </fieldset>\n\t\t         </table></br>\t\t\t  \t\t\n\t\t         <div class='buttons-container'>\n\t\t        <button type='button' id='yotpo-export-reviews' class='button-secondary' " . disabled(true, empty($app_key) || empty($secret), false) . ">Export Reviews</button>\n\t\t\t\t<input type='submit' name='yotpo_settings' value='Update' class='button-primary' id='save_yotpo_settings'/>{$submit_past_orders_button}\n\t\t\t  </br></br><p class='description'>*Learn <a href='http://support.yotpo.com/entries/24454261-Exporting-reviews-for-Woocommerce' target='_blank'>how to export your existing reviews</a> into Yotpo.</p>\n\t\t\t</div>\n\t\t  </form>\n\t\t  <iframe name='yotpo_export_reviews_frame' style='display: none;'></iframe>\n\t\t  <form action='' method='get' target='yotpo_export_reviews_frame' style='display: none;'>\n\t\t\t<input type='hidden' name='download_exported_reviews' value='true' />\n\t\t\t<input type='submit' value='Export Reviews' class='button-primary' id='export_reviews_submit'/>\n\t\t  </form> \n\t\t</div>";
    echo $settings_html;
}
开发者ID:brian3t,项目名称:orchidmate,代码行数:26,代码来源:wc-yotpo-settings.php

示例3: render_content

    public function render_content()
    {
        ?>
		<label>
			<?php 
        if (!empty($this->label)) {
            ?>
				<span class="customize-control-title"><?php 
            echo esc_html($this->label);
            ?>
</span>
			<?php 
        }
        if (!empty($this->description)) {
            ?>
				<span class="description customize-control-description"><?php 
            echo $this->description;
            ?>
</span>
			<?php 
        }
        ?>
			<input type="checkbox" value="<?php 
        echo esc_attr($this->value());
        ?>
" <?php 
        $this->link();
        checked($this->value());
        disabled($this->disabled, true);
        ?>
>
		</label>
		<?php 
    }
开发者ID:yemingyuen,项目名称:mingsg,代码行数:34,代码来源:class-switch-control.php

示例4: display

    public function display()
    {
        $this->echoOptionHeader();
        ?>
<select name="<?php 
        echo $this->getID();
        ?>
"><?php 
        foreach ($this->settings['options'] as $value => $label) {
            // this is if we have option groupings
            if (is_array($label)) {
                ?>
<optgroup label="<?php 
                echo $value;
                ?>
"><?php 
                foreach ($label as $subValue => $subLabel) {
                    printf("<option value=\"%s\" %s %s>%s</option>", $subValue, selected($this->getValue(), $subValue, false), disabled(stripos($subValue, '!'), 0, false), $disabled, $subLabel);
                }
                ?>
</optgroup><?php 
                // this is for normal list of options
            } else {
                printf("<option value=\"%s\" %s %s>%s</option>", $value, selected($this->getValue(), $value, false), disabled(stripos($value, '!'), 0, false), $label);
            }
        }
        ?>
</select><?php 
        $this->echoOptionFooter();
    }
开发者ID:natalieryder,项目名称:snaptactix,代码行数:30,代码来源:class-option-select.php

示例5: start_el

 /**
  * Start the element output.
  *
  * @param string $output   Passed by reference. Used to append additional content.
  * @param object $category The current term object.
  * @param int    $depth    Depth of the term in reference to parents. Default 0.
  * @param array  $args     An array of arguments.
  * @param int    $id       ID of the current term.
  */
 public function start_el(&$output, $category, $depth = 0, $args = array(), $id = 0)
 {
     if (empty($args['taxonomy'])) {
         $taxonomy = 'category';
     } else {
         $taxonomy = $args['taxonomy'];
     }
     if ($taxonomy == 'category') {
         $name = 'post_category';
     } else {
         $name = 'tax_input[' . $taxonomy . ']';
     }
     $args['popular_cats'] = empty($args['popular_cats']) ? array() : $args['popular_cats'];
     $class = in_array($category->term_id, $args['popular_cats']) ? ' class="popular-category"' : '';
     $args['selected_cats'] = empty($args['selected_cats']) ? array() : $args['selected_cats'];
     if (!empty($args['list_only'])) {
         $aria_cheched = 'false';
         $inner_class = 'category';
         if (in_array($category->term_id, $args['selected_cats'])) {
             $inner_class .= ' selected';
             $aria_cheched = 'true';
         }
         /** This filter is documented in wp-includes/category-template.php */
         $output .= "\n" . '<li' . $class . '>' . '<div class="' . $inner_class . '" data-term-id=' . $category->term_id . ' tabindex="0" role="checkbox" aria-checked="' . $aria_cheched . '">' . esc_html(apply_filters('the_category', $category->description)) . '</div>';
     } else {
         /** This filter is documented in wp-includes/category-template.php */
         $output .= "\n<li id='{$taxonomy}-{$category->term_id}'{$class}>" . '<label class="selectit"><input value="' . $category->slug . '" type="checkbox" name="' . $name . '[]" id="in-' . $taxonomy . '-' . $category->term_id . '"' . checked(in_array($category->term_id, $args['selected_cats']), true, false) . disabled(empty($args['disabled']), false, false) . ' /> ' . esc_html(apply_filters('the_category', $category->description)) . '</label>';
     }
 }
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:38,代码来源:class-bp-walker-category-checklist.php

示例6: start_el

 function start_el(&$output, $term, $depth = 0, $args = array(), $id = 0)
 {
     global $post;
     /* $args array includes:
        taxonomy
        disabled
        selected_cats
        popular_cats
        has_children
        */
     //echo '<pre>'; var_dump( $args ); echo '</pre>';
     extract($args);
     if (empty($taxonomy)) {
         $taxonomy = 'category';
     }
     $name = 'radio_tax_input[' . $taxonomy . ']';
     //get first term object
     $current_term = !empty($selected_cats) && !is_wp_error($selected_cats) ? array_pop($selected_cats) : false;
     // if no term, match the 0 "no term" option
     $current_id = $current_term ? $current_term : 0;
     //small tweak so that it works for both hierarchical and non-hierarchical tax
     $value = is_taxonomy_hierarchical($taxonomy) ? $term->term_id : $term->slug;
     $class = in_array($term->term_id, $popular_cats) ? ' class="popular-category"' : '';
     $output .= sprintf("\n" . '<li id="%1$s-%2$s" %3$s><label class="selectit"><input id="%4$s" type="radio" name="%5$s" value="%6$s" %7$s %8$s/> %9$s</label>', $taxonomy, $value, $class, "in-{$taxonomy}-{$term->term_id}", $name . '[]', esc_attr(trim($value)), checked($current_id, $term->term_id, false), disabled(empty($args['disabled']), false, false), esc_html(apply_filters('the_category', $term->name)));
 }
开发者ID:enlacee,项目名称:anb.platicom.com.pe,代码行数:25,代码来源:class.Walker_Category_Radio.php

示例7: get_field

 /**
  * 投稿画面にフィールドを表示
  *
  * @param int $index インデックス番号
  * @param mixed $value 保存されている値(check のときだけ配列)
  * @return string html
  */
 public function get_field($index, $value)
 {
     $name = $this->get_field_name_in_editor($index);
     $disabled = $this->get_disable_attribute($index);
     $data_js = $this->get_data_js();
     return sprintf('<input type="text" name="%s" value="%s" class="%s" %s data-js=\'%s\' />', esc_attr($name), esc_attr($value), esc_attr(SCF_Config::PREFIX . 'datepicker'), disabled(true, $disabled, false), $data_js);
 }
开发者ID:hiroki-tkg,项目名称:bitmaker,代码行数:14,代码来源:class.field-datepicker.php

示例8: cpt_navmenu_metabox_content

 function cpt_navmenu_metabox_content()
 {
     $post_types = get_post_types(array('show_in_nav_menus' => true, 'has_archive' => true), 'object');
     if ($post_types) {
         foreach ($post_types as &$post_type) {
             $post_type->classes = array();
             $post_type->type = $post_type->name;
             $post_type->object_id = $post_type->name;
             $post_type->title = $post_type->labels->name . ' ' . __('Archive', 'andromedamedia');
             $post_type->object = 'cpt-archive';
         }
         $walker = new Walker_Nav_Menu_Checklist(array());
         echo '<div id="cpt-archive" class="posttypediv">';
         echo '<div id="tabs-panel-cpt-archive" class="tabs-panel tabs-panel-active">';
         echo '<ul id="ctp-archive-checklist" class="categorychecklist form-no-clear">';
         echo walk_nav_menu_tree(array_map('wp_setup_nav_menu_item', $post_types), 0, (object) array('walker' => $walker));
         echo '</ul>';
         echo '</div><!-- /.tabs-panel -->';
         echo '</div>';
         echo '<p class="button-controls">';
         echo '<span class="add-to-menu">';
         echo '<img class="waiting" src="' . esc_url(admin_url('images/wpspin_light.gif')) . '" alt="" />';
         echo '<input type="submit"' . disabled($nav_menu_selected_id, 0) . ' class="button-secondary submit-add-to-menu" value="' . __('Add to Menu', 'andromedamedia') . '" name="add-ctp-archive-menu-item" id="submit-cpt-archive" />';
         echo '</span>';
         echo '</p>';
     }
 }
开发者ID:ascarius,项目名称:wordpress-bootstrap,代码行数:27,代码来源:cpt-in-navmenu.php

示例9: metabox

    public function metabox()
    {
        // Inform user no CPTs available to be shown.
        if (empty($this->sites)) {
            echo '<p>' . __('No items.') . '</p>';
            return;
        }
        global $nav_menu_selected_id;
        $html = '<ul id="multisite-nav-list">';
        foreach ($this->sites as $site) {
            $blog = get_blog_details($site['blog_id']);
            $html .= '<h4>' . $blog->blogname . ' Pages</h4>';
            foreach ($site['pages'] as $pt) {
                $html .= sprintf('<li>
					<label>
					<input type="hidden" name="blogId" value="' . $blog->blog_id . '">
					<input type="checkbox" value="%s" />&nbsp;%s</label></li>', $pt->ID, $pt->post_title);
            }
        }
        $html .= '</ul>';
        // 'Add to Menu' button
        $html .= '<p class="button-controls"><span class="add-to-menu">';
        $html .= '<input type="submit"' . disabled($nav_menu_selected_id, 0, false) . ' class="button-secondary
			  submit-add-to-menu right" value="' . esc_attr__('Add to Menu', 'hptal-textdomain') . '"
			  name="add-post-type-menu-item" id="submit-post-type-archives" />';
        $html .= '<span class="spinner"></span>';
        $html .= '</span></p>';
        print $html;
    }
开发者ID:ryan2407,项目名称:Vision,代码行数:29,代码来源:index.php

示例10: start_el

 function start_el(&$output, $term, $depth = 0, $args = [], $current_object_id = 0)
 {
     $indent = str_repeat("&dash;", $depth) . ' ';
     extract($args);
     $taxonomy_obj = get_taxonomy($taxonomy);
     $option = sprintf('<option id="%s-%d" value="%s" %s%s />%s%s</option>', esc_attr($taxonomy), esc_attr($term->term_id), $taxonomy_obj->hierarchical ? esc_attr($term->term_id) : esc_attr($term->slug), selected(in_array($term->term_id, $selected_cats), true, false), disabled(empty($args['disabled']), false, false), $indent, esc_html(apply_filters('the_category', $term->name)));
     $output .= "\n" . $option;
 }
开发者ID:functionlabs,项目名称:wp-single-value-taxonomy-ui,代码行数:8,代码来源:wp-single-value-taxonomy-ui.php

示例11: field

 /**
  * Filter the HTML markup for a particular field
  * @param  string $input   original markup (at this point, always an empty string)
  * @param  object $field   field object
  * @param  string $value   default value
  * @param  int    $lead_id lead id
  * @param  int    $form_id form id
  * @filter gform_field_input
  */
 static function field($input, $field, $value, $lead_id, $form_id)
 {
     $html_id = 'input_' . (is_admin() || !$form_id ? '' : $form_id . '_') . $field->id;
     if (self::field_is_places($field)) {
         return '<div class="ginput_container"><input type="text" class="medium geo-complete"' . ' name="input_' . esc_attr($field->id) . '" id="' . esc_attr($html_id) . '" value="' . esc_attr($value) . '" ' . disabled(is_admin(), true, false) . ' data-field-id="' . esc_attr($field->id) . '"' . 'placeholder="' . esc_html($field->placeholder) . '"></div>';
     }
     return $input;
 }
开发者ID:oomphinc,项目名称:gravity-forms-google-places,代码行数:17,代码来源:Plugin.php

示例12: start_el

 function start_el(&$output, $category, $depth = 0, $args = array(), $current_object_id = 0)
 {
     extract($args);
     if (!is_array($categories)) {
         $categories = array();
     }
     $output .= "\n<li id='{$field_id}-{$category->term_id}' >" . '<input value="' . $category->term_id . '" type="checkbox" name="' . $field_name . '[' . $category->term_id . ']" id="' . $field_id . '-' . $category->term_id . '"' . checked(in_array($category->term_id, $categories), true, false) . disabled(empty($args['disabled']), false, false) . ' /> ' . esc_html(apply_filters('the_category', $category->name)) . '';
 }
开发者ID:part-time-project,项目名称:italians,代码行数:8,代码来源:TFuse_Widget_Selected_Categories.php

示例13: get_field

 /**
  * Getting the field
  *
  * @param int $index
  * @param int $value
  * @return string html
  */
 public function get_field($index, $value)
 {
     $name = $this->get_field_name_in_editor($index);
     $disabled = $this->get_disable_attribute($index);
     $true = sprintf('<label><input type="radio" name="%s" value="1" class="widefat" %s %s />%s ( true )</label>', esc_attr($name), checked(1, $value, false), disabled(true, $disabled, false), $this->get('true_label'));
     $false = sprintf('<label><input type="radio" name="%s" value="0" class="widefat" %s %s />%s ( false )</label>', esc_attr($name), checked(0, $value, false), disabled(true, $disabled, false), $this->get('false_label'));
     return $true . $false;
 }
开发者ID:1shiharat,项目名称:smart-custom-fields,代码行数:15,代码来源:class.field-boolean.php

示例14: start_el

 function start_el(&$output, $category, $depth = 0, $args = array(), $id = 0)
 {
     extract($args);
     if (empty($taxonomy)) {
         $taxonomy = 'category';
     }
     $name = $this->field_name;
     $class = in_array($category->term_id, $popular_cats) ? ' class="popular-category"' : '';
     $output .= "\n<li id='{$taxonomy}-{$category->term_id}'{$class}>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="' . $name . '[]" id="in-' . $taxonomy . '-' . $category->term_id . '"' . checked(in_array($category->term_id, $selected_cats), true, false) . disabled(empty($args['disabled']), false, false) . ' /> ' . esc_html(apply_filters('the_category', $category->name)) . '</label>';
 }
开发者ID:prdanielmota,项目名称:faama-debug,代码行数:10,代码来源:gk-nsp-form-walkers.php

示例15: template_checkbox

 function template_checkbox($rss = false, $trextra = '')
 {
     global $yarpp;
     $pre = $rss ? 'rss_' : '';
     $chosen_template = yarpp_get_option("{$pre}template");
     echo "<tr valign='top'{$trextra}><th colspan='2'><input type='checkbox' name='{$pre}use_template' class='{$pre}template' value='true'";
     disabled(!count($yarpp->admin->get_templates()), true);
     checked(!!$chosen_template);
     echo " /> " . __("Display using a custom template file", 'yarpp') . " <a href='#' class='info'>" . __('more&gt;', 'yarpp') . "<span>" . __("This advanced option gives you full power to customize how your related posts are displayed. Templates (stored in your theme folder) are written in PHP.", 'yarpp') . "</span></a>" . "</th></tr>";
 }
开发者ID:robjcordes,项目名称:nexnewwp,代码行数:10,代码来源:options-meta-boxes.php


注:本文中的disabled函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。