Use the same technique as $checked:
$disabled = ( $ed->ID != get_current_user_id() ) ? ' disabled="disabled"' : '';
your code:
foreach ($alleds as $ed) {
$checked = (in_array($ed->ID,(array)$currenteds)) ? ' checked="checked"' : '';
$disabled = ( $ed->ID != get_current_user_id() ) ? ' disabled="disabled"' : '';
echo '<input type="checkbox" name="currenteds[]" value="' . $ed->ID . '"' . $checked . $disabled . '"/><label for="ratings[]">'.$ed->user_nicename.'</label>';
}
Related Posts:
- Only Showing Upcoming Events
- Metabox repeating fields – radio buttons not saving correctly
- How to remove a metabox from menu editor page?
- Why is my custom meta box input not saving
- add_meta_boxes action with refresh on save
- Save selected item from dropdown menu in a meta box as a metadata value for a custom post type
- Second select list values are not saved after clicking update
- Saving metabox repeatable fields
- Listing all sub-pages?
- WordPress widget/sidebar dividers?
- wp_editor and WPAlchemy messes up tags when updating
- Register non hierarchical taxonomy and the show meta box in the post type
- Customize Plugin
- How to select the contents in the text view textrea in wp_editor?
- Can I prevent the user from adding more than two levels deep of terms inside of a taxonomy metabox?
- Image media upload metabox
- Loop with slider (slider not loading)
- Linking text within textarea of custom meta box
- Need Help Fixing My Iframes [closed]
- Remove metabox from WordPress menu editor page?
- MetaBox body is not showing (the callback function)
- Trying to retrieve post meta
- can i fetch a custom metabox data in another page or post type?
- WordPress from url get external source title
- How to convert select to HTML with PHP tags inside of it [closed]
- Sanitizing text fields in array
- Saving zero in meta box
- Show meta box only for default page template
- Illegal string offset in PHP function
- Find a way to retrive data updated through metabox plugin to web page
- Why does this update_post_meta function not delete the custom field itself?
- Metabox Not saving data
- meta box not display data input in the textarea
- Apply class to every third list item? [duplicate]
- How to Configure Events List in WordPress to Disappear Event Once Date is Past
- Usage of call back function of add_meta_box()
- How to store multiple custom meta box
- Show metabox only for homepage
- Add editor toolbar to Metabox
- How do i wrap woocomerce attribute in list?
- Output custom text field as unordered list
- Warning: call_user_func() expects parameter 1 to be a valid callback, function
- How do I make this Metabox show current DB value?
- How to insert data from metabox to custom table
- save metabox with new values _wp_page_template
- Unable to Call More than One Meta Box Output
- Dynamically replicate custom metabox in custom post type
- Post meta select input, if statement
- Display background color or image with custom meta box?
- save_post action inside a custom metabox class not working
- Meta boxes only displayed when editing normal (default wp post_type) posts
- Remove the Tag from wp_nav_menu
- Validate search against a list of codes in wordpress
- display the months of a specific category
- Add a Metabox checkbox to the Page Edit screen of wp-admin , which only certain roles can see and Makes only certain roles able to Edit said page
- Checkbox doesn’t save inside metabox
- Dropdown category field inside repeatable metabox
- Create shortcode for metabox gallery
- Display metabox galleries on specific page template in admin editor
- add ‘publish metabox’ to Gravity forms edit page/form area
- Unable to update the meta boxes with multiple fields
- Meta Box clears saved field content
- Get value of submit button in custom post type
- Metabox – Displaying the Value of a Metabox
- meta field for numerous links
- Custom fields changes the formatting of metabox input
- WordPress AJAX load post metadata in modal
- Inline Styling a div from a Custom Metabox
- Custom meta box save values issues – Deprecated: Function ereg() and more
- custom field meta-box with dropdown/autocomplete
- Display a post based on its metabox selection
- Save data of select list after clicking save
- Repeatable field within repeatable group of fields
- Help with my first Metabox helper class
- Custom Meta Boxes and Fields Multicheck Issue
- If custom field doesn’t exist, or exists and it’s true show title?
- Hide sharing box and author box with a metabox on WordPress
- Metabox Input Not saving
- Creating a function that sanitizes the custom metabox excerpt
- How to callback custom field text
- How to Publish WP original Source metabox value on front-end webpage
- Where can I find the code for the menu page meta boxes?
- Custom Meta Box If Else Statement
- PHP Puzzle: Unique Styles with PHP loop
- Display custom meta box in my template file
- send meta box input data without publish button
- metabox displaying on incorrect page
- Warning: Illegal string offset ‘post’ and ‘page’
- REST API custom endpoints for metaboxes
- Save Edit button then disabled readonly metabox
- How to get meta box labels?
- Is_template how to add one more template [closed]
- How to modify URL (add GET values) after front end form submission?
- Posts are not looping through correctly
- form $_post action value gets truncated after it passes through two forms
- How to echo the_title from an array of posts?
- WordPress -> If Is Role Subscriber Show Image?
- My single.php page skips the first div tag
- direct query to post_meta table
- WP Simple Fields – Single repeatable field inside repeatable field group