disabled example

$user_can_assign_terms = current_user_can( $taxonomy->cap->assign_terms );
    $comma                 = _x( ',', 'tag delimiter' );
    $terms_to_edit         = get_terms_to_edit( $post->ID, $tax_name );
    if ( ! is_string( $terms_to_edit ) ) {
        $terms_to_edit = '';
    }
    ?> <div class="tagsdiv" id="<?php echo $tax_name; ?>"> <div class="jaxtag"> <div class="nojs-tags hide-if-js"> <label for="tax-input-<?php echo $tax_name; ?>"><?php echo $taxonomy->labels->add_or_remove_items; ?></label> <p><textarea name="<?php echo "tax_input[$tax_name]"; ?>" rows="3" cols="20" class="the-tags" id="tax-input-<?php echo $tax_name; ?>" <?php disabled( ! $user_can_assign_terms ); ?> aria-describedby="new-tag-<?php echo $tax_name; ?>-desc"><?php echo str_replace( ',', $comma . ' ', $terms_to_edit ); // textarea_escaped by esc_attr() ?></textarea></p> </div> <?php if ( $user_can_assign_terms ) : ?> <div class="ajaxtag hide-if-no-js"> <label class="screen-reader-text" for="new-tag-<?php echo $tax_name; ?>"><?php echo $taxonomy->labels->add_new_item; ?></label> <input data-wp-taxonomy="<?php echo $tax_name; ?>" type="text" id="new-tag-<?php echo $tax_name; ?>" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" aria-describedby="new-tag-<?php echo $tax_name; ?>-desc" value="" /> <input type="button" class="button tagadd" value="<?php esc_attr_e( 'Add' ); ?>" /> </div> <p class="howto" id="new-tag-<?php echo $tax_name; ?>-desc"><?php echo $taxonomy->labels->separate_items_with_commas; ?></p> <?php elseif ( empty( $terms_to_edit ) ) : ?> <p><?php echo $taxonomy->labels->no_terms; ?></p> <?php endif; ?>


    public function refresh(EntityWrittenContainerEvent $event): void
    {
        $context = $event->getContext();

        if ($this->working) {
            return;
        }
        $this->working = true;

        if ($this->disabled($context)) {
            $this->working = false;

            return;
        }

        $useQueue = $this->useQueue($context);

        foreach ($this->indexer as $indexer) {
            $message = $indexer->update($event);

            if (!$message) {
                


  /** * Disables the given field on the resource type to be built. * * @param \Drupal\jsonapi\ResourceType\ResourceTypeField $field * The field for which to set a public name. */
  public function disableField(ResourceTypeField $field) {
    foreach ($this->fields as $index => $value) {
      if ($field === $value) {
        $this->fields[$index] = $value->disabled();
        return;
      }
    }
  }

}
<tr> <th scope="row"><?php _e( 'Attributes' ); ?></th> <td> <fieldset> <legend class="screen-reader-text"> <?php                 /* translators: Hidden accessibility text. */
                _e( 'Set site attributes' );
                ?> </legend> <?php foreach ( $attribute_fields as $field_key => $field_label ) : ?> <label><input type="checkbox" name="blog[<?php echo $field_key; ?>]" value="1" <?php checked( (bool) $details->$field_key, true ); ?> <?php disabled( ! in_array( (int) $details->$field_key, array( 0, 1 ), true ) ); ?> /> <?php echo $field_label; ?></label><br /> <?php endforeach; ?> <fieldset> </td> </tr> </table> <?php     /** * Fires at the end of the site info form in network admin. * * @since 5.6.0 * * @param int $id The site ID. */
if ( ! $display ) { // Hack for Ajax use.             continue;
        }

        $id      = "popular-$taxonomy-$term->term_id";
        $checked = in_array( $term->term_id, $checked_terms, true ) ? 'checked="checked"' : '';
        ?> <li id="<?php echo $id; ?>" class="popular-category"> <label class="selectit"> <input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php disabled( ! current_user_can( $tax->cap->assign_terms ) ); ?> /> <?php                 /** This filter is documented in wp-includes/category-template.php */
                echo esc_html( apply_filters( 'the_category', $term->name, '', '' ) );
                ?> </label> </li> <?php     }
    return $popular_ids;
}

'<div class="' . $inner_class . '" data-term-id=' . $category->term_id .
                ' tabindex="0" role="checkbox" aria-checked="' . $aria_checked . '">' .
                /** This filter is documented in wp-includes/category-template.php */
                esc_html( apply_filters( 'the_category', $category->name, '', '' ) ) . '</div>';
        } else {
            $is_selected = in_array( $category->term_id, $args['selected_cats'], true );
            $is_disabled = ! empty( $args['disabled'] );

            $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( $is_selected, true, false ) .
                disabled( $is_disabled, true, false ) . ' /> ' .
                /** This filter is documented in wp-includes/category-template.php */
                esc_html( apply_filters( 'the_category', $category->name, '', '' ) ) . '</label>';
        }
    }

    /** * Ends the element output, if needed. * * @see Walker::end_el() * * @since 2.5.1 * @since 5.9.0 Renamed `$category` to `$data_object` to match parent class for PHP 8 named parameter support. * * @param string $output Used to append additional content (passed by reference). * @param WP_Term $data_object The current term object. * @param int $depth Depth of the term in reference to parents. Default 0. * @param array $args An array of arguments. @see wp_terms_checklist() */
 else {
                    $option->option_value = 'SERIALIZED DATA';
                    $disabled             = true;
                    $class                = 'all-options disabled';
                }
            }

            if ( str_contains( $option->option_value, "\n" ) ) {
                ?> <tr class="form-field"> <th scope="row"><label for="<?php echo esc_attr( $option->option_name ); ?>" class="code"><?php echo esc_html( $option->option_name ); ?></label></th> <td><textarea class="<?php echo $class; ?>" rows="5" cols="40" name="option[<?php echo esc_attr( $option->option_name ); ?>]" id="<?php echo esc_attr( $option->option_name ); ?>"<?php disabled( $disabled ); ?>><?php echo esc_textarea( $option->option_value ); ?></textarea></td> </tr> <?php             } else {
                ?> <tr class="form-field"> <th scope="row"><label for="<?php echo esc_attr( $option->option_name ); ?>" class="code"><?php echo esc_html( $option->option_name ); ?></label></th> <?php if ( $is_main_site && in_array( $option->option_name, array( 'siteurl', 'home' ), true ) ) { ?> <td><code><?php echo esc_html( $option->option_value ); ?></code></td> <?php } else { ?> <td><input class="<?php echo $class; ?>" name="option[<?php echo esc_attr( $option->option_name ); ?>]" type="text" id="<?php echo esc_attr( $option->option_name ); ?>" value="<?php echo esc_attr( $option->option_value ); ?>" size="40" <?php disabled( $disabled ); ?> /></td> <?php } ?>
public function withPublicName($public_name) {
    $relationship = parent::withPublicName($public_name);
    return isset($this->relatableResourceTypes)
      ? $relationship->withRelatableResourceTypes($this->relatableResourceTypes)
      : $relationship;
  }

  /** * {@inheritdoc} */
  public function disabled() {
    $relationship = parent::disabled();
    return isset($this->relatableResourceTypes)
      ? $relationship->withRelatableResourceTypes($this->relatableResourceTypes)
      : $relationship;
  }

}
$wp_home_class     = '';
    if ( defined( 'WP_SITEURL' ) ) {
        $wp_site_url_class = ' disabled';
    }
    if ( defined( 'WP_HOME' ) ) {
        $wp_home_class = ' disabled';
    }
    ?> <tr> <th scope="row"><label for="siteurl"><?php _e( 'WordPress Address (URL)' ); ?></label></th> <td><input name="siteurl" type="url" id="siteurl" value="<?php form_option( 'siteurl' ); ?>"<?php disabled( defined( 'WP_SITEURL' ) ); ?> class="regular-text code<?php echo $wp_site_url_class; ?>" /></td> </tr> <tr> <th scope="row"><label for="home"><?php _e( 'Site Address (URL)' ); ?></label></th> <td><input name="home" type="url" id="home" aria-describedby="home-description" value="<?php form_option( 'home' ); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php echo $wp_home_class; ?>" /> <?php if ( ! defined( 'WP_HOME' ) ) : ?> <p class="description" id="home-description"> <?php         printf(
            /* translators: %s: Documentation URL. */
            __( 'Enter the same address here unless you <a href="%s">want your site home page to be different from your WordPress installation directory</a>.' ),
            
$class               = 'all-options';
    }

    $name = esc_attr( $option->option_name );
    ?> <tr> <th scope="row"><label for="<?php echo $name; ?>"><?php echo esc_html( $option->option_name ); ?></label></th> <td> <?php if ( str_contains( $value, "\n" ) ) : ?> <textarea class="<?php echo $class; ?>" name="<?php echo $name; ?>" id="<?php echo $name; ?>" cols="30" rows="5"><?php echo esc_textarea( $value ); ?></textarea> <?php else : ?> <input class="regular-text <?php echo $class; ?>" type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr( $value ); ?>"<?php disabled( $disabled, true ); ?> /> <?php endif; ?></td> </tr> <?php endforeach; ?> </table> <input type="hidden" name="page_options" value="<?php echo esc_attr( implode( ',', $options_to_update ) ); ?>" /> <?php submit_button( __( 'Save Changes' ), 'primary', 'Update' ); ?> </form> </div>
$hostname_value .= ":$port";
    }

    $password_value = '';
    if ( defined( 'FTP_PASS' ) ) {
        $password_value = '*****';
    }
    ?> </p> <label for="hostname"> <span class="field-title"><?php _e( 'Hostname' ); ?></span> <input name="hostname" type="text" id="hostname" aria-describedby="request-filesystem-credentials-desc" class="code" placeholder="<?php esc_attr_e( 'example: www.wordpress.org' ); ?>" value="<?php echo $hostname_value; ?>"<?php disabled( defined( 'FTP_HOST' ) ); ?> /> </label> <div class="ftp-username"> <label for="username"> <span class="field-title"><?php echo $label_user; ?></span> <input name="username" type="text" id="username" value="<?php echo esc_attr( $username ); ?>"<?php disabled( defined( 'FTP_USER' ) ); ?> /> </label> </div> <div class="ftp-password"> <label for="password"> <span class="field-title"><?php echo $label_pass; ?></span> <input name="password" type="password" id="password" value="<?php echo $password_value; ?>"<?php disabled( defined( 'FTP_PASS' ) ); ?> spellcheck="false" />
$check = '';
            }
        } elseif ( ! $check && $enabled && 'thumbnail' !== $size ) {
            /* * If $check is not enabled, default to the first available size * that's bigger than a thumbnail. */
            $check   = $size;
            $checked = " checked='checked'";
        }

        $html = "<div class='image-size-item'><input type='radio' " . disabled( $enabled, false, false ) . "name='attachments[$post->ID][image-size]' id='{$css_id}' value='{$size}'$checked />";

        $html .= "<label for='{$css_id}'>$label</label>";

        // Only show the dimensions if that choice is available.         if ( $enabled ) {
            $html .= " <label for='{$css_id}' class='help'>" . sprintf( '(%d&nbsp;&times;&nbsp;%d)', $downsize[1]$downsize[2] ) . '</label>';
        }
        $html .= '</div>';

        $output[] = $html;
    }

    

function wp_nav_menu_disabled_check( $nav_menu_selected_id$display = true ) {
    global $one_theme_location_no_menus;

    if ( $one_theme_location_no_menus ) {
        return false;
    }

    return disabled( $nav_menu_selected_id, 0, $display );
}

/** * Displays a meta box for the custom links menu item. * * @since 3.0.0 * * @global int $_nav_menu_placeholder * @global int|string $nav_menu_selected_id */
function wp_nav_menu_item_link_meta_box() {
    
Home | Imprint | This part of the site doesn't use cookies.