$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?
- Using My-Meta-Box-Class plugin, how is ‘Date’ value stored?
- Pull a post based on a meta value in a custom post type
- Populate Custom Fields in a Custom Post Type?
- Change meta box when the page’s template is changed
- Duplicate Custom Header Functionality into the post edit screen
- Send email button in custom post type backend
- Hook to override title, image and content
- Insert Multiple Post with Same Publish Button
- Why is conditionally loading a custom plugin’s code only on a specific custom post type causing the site content to disappear?
- Cannot save Checkbox meta box value from a Custom Post Type
- Adding dropdown select meta box to custom post type – seems restAPI is interfering
- Custom meta box not saving
- Custom meta box data array: foreach not working correctly?
- Undefined Variable – Custom Post Type Meta
- What’s the difference between same wp functions get_posts(); functions in different form?
- Update menu when saving settings
- get_object_taxonomies() returns empty array for custom post type
- WordPress theme custom capabilities not works
- custom post type not showing in menu
- Custom posts don’t work
- Keep display metadata value on backend – Custom Metabox
- Populate dropdown from one custom post type inside another custom post type
- No posts found – Custom Post Type show_ui
- Push metadata in array
- How to customize a permalink (URL) structure?
- Troubles with saving metabox
- Adding a custom post type taxonomy template in plugin
- Plugin: register custom post types, child ready and performance best practices
- How to add a custom taxonomy to show up in a custom post type menu?
- How to check if user meta field is empty in conditional else statement
- Custom Post Type with Templates using Meta Boxes?
- Why is my select meta data not saving?
- WordPress 3.5 Media Uploader – Only allow 1 upload and certain file types
- Add Standard Page Attributes Metabox for Page Parent
- dynamically add a custom field or metabox to custom post type [duplicate]
- Give a permalink to Custom Post Types without title
- Make metabox of custom post type fully autosave- and bulk-/quick-edit compatible
- Custom Post Type uses Custom Tags in add_filter?
- Post Quote with image on header for news site
- Custom date changer post_date => future – missed schedule error
- How to Create an Image Upload Box for Custom Posts?
- How to store multiple values in 1 meta_key with radio input?
- What is the best way to correlate one-to-many content-type relationships?
- Getting template_include to work when allow_url_include is off?
- Is it possible to create relational metabox values in a custom post?
- Changing custom type name hides the posts
- WordPress post_where & posts_join not working only for custom post type
- Add custom ID to CPT posts only create not update
- Add custom post type as submenu [closed]
- WordPress multiple custom post types capability conflict in a single menu
- Visual editor issue by having multiple tiny mce editors in a CPT
- Getting meta in editor plugin, and event triggering issue
- Found 2 elements with non-unique id (#_ajax_nonce) and (#_wpnonce)
- Orderby CPT custom fields not working
- A better way to add a meta box to custom post types
- Unable to get Custom Plugin Options data
- Update post meta not working in transition_post_status
- Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?
- How to automatically set ‘default image size’ for specific Custom Post Type
- Plugin – Combine Meta Box Input Fields into single saveble record
- Use custom metabox to update automatically a post after a given date
- Getting Custom Post Type Meta on Publish
- Custom setting to show or hide field
- Options page – dropdown of users
- Addition of custom option panel crashes Media Library & Admin Area
- Meta Query Filtering not working on Custom Meta Box using Radio Buttons
- How to Upload CSV Data into Custom Post Type Data with Metabox programmatically
- Grouping metadatas into one
- Anon function and add_meta_box