I can’t find any documentation that will allow adding any tag attributes to the wp_editor
except for the id. You’ve got two options that I can think of. The first is to include a jQuery dependent (or not) javascript file which will add the required attribute to the editor textarea after the DOM is fully rendered.
The other option is to include a validation function either server side or browser side to make sure the data is present. I suggest this approach because the required attribute is not universally implemented across browsers.
Your code won’t work because there’s no apply_filter
function that fires on $statement
.
Related Posts:
- Hide old attachments from wp media library
- Detect a focus on wp_editor
- Add a wp editor to custom plugin and save data
- wp_editor and WPAlchemy messes up tags when updating
- Wp_editor doesn’t send the required data
- How to make the WordPress Editor not accept HTML?
- How to load WP_Editor JS files manually (with AJAX)?
- Having trouble customizing toolbar on wp_editor
- Is there a way to get wp_editor (tinymce) content?
- Error Warning: Declaration of description_walker::start_el after PHP upgrade [duplicate]
- WordPress Warning: preg_replace(): JIT compilation failed: no more memory
- Autoloading in Child Theme
- WSOD but WP_DEBUG not giving any errors
- Append code into wp-config.php
- How to turn off redirection from ‘domain.com/login’ to ‘domain.com/wp-login.php’
- Looking for a better way to handle an ajax script that pulls in post data on click
- Adding featured image via PHP
- How to strip non-alphanumeric characters, convert spaces to dashes, uppercase to lowercase in this context
- How to return multiples lines in a shortcode?
- wp_enqueue_style with style.php and WordPress functions
- fallback image for featured image
- How to set status codes such as 401 and 403?
- Add attribute / custom attribute to product in woocommerce
- Access/update database with jQuery
- How to create another version of my site based on the same database
- How to get bool with `get_option()` when already registered setting with type `boolean`
- How do themes render caption texts in extended markup (e.g. “wp-caption” paragraphs)
- Count the number of times the search form template gets included on a page
- Displaying theme options in css
- PHP code inside shortcodes
- PHP help get_template_directory + PHP include
- Querying wpdb using PHP
- Reload part of checkout on changed shipping method
- how to combine wordpress htaccess on my root domain + php on subfolder
- Input data from email form not going to JSON file
- Remove echo from shortcode
- Should `wp_login` be used since it’s deprecated?
- admin-ajax Firing Error 400 When Logged In
- How to use a custom hook
- Hide HTML element (by class or ID) with PHP
- wp_force_remove_style’ not found
- Pagination on Custom Post
- How to check $_GET isset for a parameter and value? [closed]
- Why can’t I return a value from $wpdb->get var?
- how to save checkbox data for custom setting?
- How to keep the capability of users and disable Gutenberg editor in WordPress?
- change title page on search result
- Refactoring long if/else php chains
- Trouble with a php code that adds a log in/log out button [closed]
- How to add aria role and schema markup to custom walker container
- jQuery accordion menu
- Restrict characters in comment section
- Required PHP version: 5.3.3 – Version found: 5.2.17… How or where do upgrade to 5.33 [closed]
- WPDB secure custom form
- Adding custom url to readmore link using get_permalink()
- Remove submenu item from list
- is_user_logged_in returning nothing on custom page
- Getting text from custom field from customizer
- WordPress navigation wont appear with wp_head
- WordPress: Export/Import Yoast meta title & description to custom taxonomy
- Page not visible in ‘All pages’ after being added through PHP
- Pass a PHP function to javascript
- Nested Queries of decreasing specificity
- Wrong pagination results, page counter resets when navigating
- Replace jQuery with PHP or CSS for Customized WordPress wp_nav_menu
- Check $post->ID against multiple values
- alternate left – right content inside the loop
- I have a lot of JavaScript erorrs after SSL someone can help me?
- why not selecting multiple rows of same standard_id using SQL query from database?
- Show the subcategory name based on current product
- Why my Ajax events are no longer detected after dynamic change of shortcode content
- Add function to head “no product found”
- How to separate the taxonomies list from the form so that editing taxonmies is the same as pages and posts?
- Add custom attribute to product’s HTML to woocommerce cart page
- Change WooCommerce template for PDF – access to custom field
- Detect what link user clicks and Redirect to a specific page for logged in users only
- Displaying logged in user name
- Advanced WordPress SQL Query
- How to detect if a revision was made by woocommerce or wordpress?
- Editing existing pre-created menus in PHP
- Create a hierarchical loop at predefined markup requirements
- Setting ‘post_format’
- Custom Meta Boxes and Fields Multicheck Issue
- nested divs, classes for a grid in loop [duplicate]
- Showing all post from all post type in admin backstage
- Or operators in PHP [closed]
- how to iterate through xml data?
- Adding slides to an existing carousel manually
- Shortcode to include PHP file, pass various parameters to include?
- Why can’t I include echo inside a variable? [closed]
- WP_Query not returning results
- Really slow WordPress site [closed]
- $post->ID calls for current page, but what is the code to call for any new page created and published in WordPress?
- How to increase excerpt length in wordpress? [duplicate]
- Are WordPress & PHP objectively and based on evidence going to die because the future is made of frontend rendering instead of server side rendering? [closed]
- Not able to see the error [closed]
- How do I link the side images?
- Custom taxonomy pagination shows 404
- duplicating page templates
- Upload multiple files via ajax from an HTML file input