$values = get_option( 'option_name')
// Create array from string
$values_array = explode( PHP_EOL, $values );
sort( $values_array );
// Create string from sorted array
$sorted_values = implode( PHP_EOL, $values_array );
Read more about the sort function
Related Posts:
- Where, When, & How to Properly Flush Rewrite Rules Within the Scope of a Plugin?
- How to add multiple images to custom post type?
- WordPress metabox file upload in custom post [duplicate]
- Save or update data when custom post published
- How to: add option to add more checkboxes on custom post type
- How to add multiple featured image in meta box in post editor?
- how to set default value for checkbox in wordpress
- Adding Meta Boxes while Registering a Post Type in a Class
- How to use TinyMCE Editor for one of my custom post meta field?
- Adding a metabox on a CPT’s submenu page
- Wrap meta boxes & data handling for specific post types in classes?
- Save Multiple Metabox values
- populate array with posts
- How to insert data into meta box from another plugin?
- Custom Meta Box returns no HTML
- How to Use Custom Meta Field Instead of CPT Title in Post URL
- Creating alternate meta box context locations
- Create a select metabox that the user can pupolate?
- shopping cart plugin development
- Wp Meta Query does not work while simple Query Works
- Show a custom post title in another custom post type in Meta box
- WP_List_Table Inside Metabox Not Working on Clicking Search Button
- Getting data from dynamically allocated metaboxes within a custom post
- Admin metabox with custom post type dropdown option not update choosed input after saving
- Run query on specific admin options page and send results to select field in another function
- How save custom meta type posts multicheck grouped by taxonomy (with CMB2) [closed]
- php output of generated custom metabox
- Custom meta box in editor of custom post type not working
- Not Able to Display Metabox Saved Checkbox and Selected option After Save/ Update
- Custom Post Type featured option
- How to consume external API from WordPress post editor and display the response data in the custom field?
- Remove tabs from media uploader for a CPT
- Priority of Meta Box for Custom Post Type
- Unable to filter on field on edit.php page
- Using ‘strtotime’ function to convert a custom-meta-box to a date-stamp
- How to Change the Title of a Meta Box on a Specified Custom Post Type? [duplicate]
- How to save the checked boxes?
- add_meta_box: Datepicker like the one for postdate?
- template_redirect not working, apparently for no reason
- Formatting custom meta box date from YYYY/MM/DD to a more readable alternative
- Using WPAlchemy metabox values in another metabox
- handling csv data with a custom post type
- Custom Post Type rewrite
- Admin notice not displaying
- How can I create a custom meta box to add an mp4 video to a page?
- Pull a post based on a meta value in a custom post type
- Change meta box when the page’s template is changed
- Insert Multiple Post with Same Publish Button
- Cannot save Checkbox meta box value from a Custom Post Type
- Undefined Variable – Custom Post Type Meta
- Adding a custom post type taxonomy template in plugin
- Plugin: register custom post types, child ready and performance best practices
- Getting meta in editor plugin, and event triggering issue
- Found 2 elements with non-unique id (#_ajax_nonce) and (#_wpnonce)
- Metabox not show in categories custom post type cmb2
- Repeatable Fields Metabox with Textarea (or wp_editor)
- pre_get_posts for custom page builder meta box
- How to make custom taxonomy into drop down select in a custom metabox
- Deleting taxonomy terms and relationships on a custom post_type when a user is deleted
- Custom fields for custom post type
- Add additional field to custom post_type
- Create metaboxes based on custom post type
- What’s an efficient way to change the post status of many posts at once?
- How to Echo Metadata Value in Currency Format
- Problem with $post_id object’s property
- How To Display A List Of CPT Posts In A Meta Box On Menus Page?
- How exclude or skip post type with get_next_post_link
- Invalid file type when using wp_upload_bits to upload PDF to a custom post type
- Metabox does not show in custom post type
- One Custom Post Type two different Templates
- Limiting Amount of Posts in a Custom Post Type again
- Auto update publish date of CPT Post if default post custom field value match to cpt post CF Value
- Why are custom taxonomies only appearing on the edit page of one of these types, but not the other?
- URL issue retrieving Custom Post Types using Backbone JS API
- WordPress Custom Post Loop
- How to get custom post type with dynamic ID
- ‘Simple’ Reservation System
- Custom metabox with image gallery upload that won’t attach images to post
- Show Post columns to specific users on condition
- Custom Post type plugin is using theme single.php and style.css
- call a function when insert and update a custom post type
- How to retrieve custom post type permalink in another cpt?
- do action inside a class is not working
- Registering an optional custom post type from a plugin
- How to add a custom meta box below publish box in CPT that is like publish meta box and can contains html?
- Search form to find custom meta box generated data
- Edit post meta direct from post.php?
- Generate custom RSS from a plugin
- How to Arrange Support => Thumbnail
- How to add jquery to my custom post type wp plugin
- Custom metabox value not saving
- Yearly Archive from a custom date metabox (Event Start Date)
- loop through custom post-type with two meta_keys
- Custom Post Type + Custom Meta Query Not Showing 2012 Posts
- CPT Template Option to Top
- Use a Variable in update_post_meta as the $meta_key
- Menu Structure and URL structure, with Pages and Post-Type-Posts
- Custom Post Type urls not working
- Just the First Metabox what saves the data!
- I want to show a list of post with title that have link goes to that post and icon under the specific category to which it belongs