In fact to be super pedantic, I think the correct code is actually:
echo '<option value="' . esc_attr( $folder ) . '">' . esc_html( $folder ) . '</option>';
Since the first variable is an attribute, and the second is encased in html, although I wold bet that the code you have would pass review, and is certainly fit for purpose.
Related Posts:
- Sanitizing, Validating and Escaping in WordPress (Plugin)
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- What are the differences between WPINC and ABSPATH?
- Using require_once in a Plugin?
- WordPress Capabilities: edit_user vs edit_users
- Making plugin unique to not conflict with plugins with the same name
- How to find out if option exists but is empty?
- How To Ignore a Filter On Applying Filter the Content In a Function
- Errors while using ajax from external wordpress page
- Should I use RIPS tool to test my themes and plugins?
- shortcode doesn’t work
- How Restrict access to admin dashboard by specific static ip?
- Scope for PHP Variables Assigned in functions.php or a plugin
- Update Option Error: Notice: Undefined index
- Where should I save an API key of my user when installing my plugin?
- Custom form action to handle data inside a plugin
- Self deactivate plugins after an action occurs
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- WP Post Template – Templates in own folder
- wp_create_nonce function doesn’t work inside a plugin?
- Avoid class name collision when using third party libraries in plugins?
- wordpress plugin is not activating from widget
- Using a custom plugin to capture input data via Ajax and PHP
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Image upload and download from front-end
- How to output CMB2 select options from repeated groups select elements?
- Creating a Callback URL for WordPress Woocommerce to update Order Status
- Ajax call returning 0
- How to deal with WordPress and Pocket API to automate content curation on my hosted wordpress blog? [closed]
- WP All Import – Execute Imports
- How to replace WordPress Media Upload Window with user’s device window?
- Conditional attributes and logic per product category
- WordPress get_avatar function not correct working
- Setup wp_schedule_event within a custom plugin
- I should enable automatic updates?
- Check if variable is set in filter
- Prevent direct access to WordPress plugin assets?
- execute function after one completed
- Include a php file from another plugin
- Integrating boxtal PHP library into a custom WordPress Plugin
- Add User Role: Pre-saved in User-Meta [SOLVED]
- How to create plugin/ page that reads from database
- Save user total active time after login in wordpress [closed]
- How WordPress core manage the plugin installation
- Switch from wp-cron to a server cron job
- Why is it important to check for isset and is_array before checking in_array in this example?
- Calling a save function from a “submit” button
- Wp Debug Enabled True Notices and Warning
- How to call external functions from a PHP script in a WordPress plugin?
- Is this plugin safe to run?
- How to add custom function to pluggable.php
- How to displaying Custom image, text and default image logo from Redux Framework option panel
- How to correctly escape an echo
- Security of a WordPress Plugin
- i need to make custom cron_schedule with custom interval time as a parameter into a custom payment gateway plugin wordpress
- save_post_product action not firing
- How to get the custom field value using SQL query
- Unexpected add action function in WP plugin
- How to create admin setting for this small plugin
- Prevent WordPress from sending set-cookie http header
- Cookie value changes back to previous value after changing
- How use wp_insert_post and add og:custom tags?
- Is there any way to sync Facebook Comments and with comments on WordPress website?
- Problem with checked box on wp car manager plugin
- WordPress rewrite rule depend on meta values not ids
- How to change “Read More” text?
- Problem with wordpress has_action() function
- Offering a freemium plugin (a free version + paid version)
- Using id to show item
- Securing a plugin pop-up window
- Generate and send ICS file through WordPress
- Is admin section completely customizable in terms of styling?
- Woocommerce list variations that are added already to cart in Single Product
- WordPress Admin sub-level menu issue
- Change pricing in Woocommerce based on Category and Product [closed]
- Passing ajax variable to more than one wordpress plugin function
- WordPress environment not loading properly
- WordPress not displaying information on post sent from custom admin form
- Displaying friend’s posts only
- Creating a user ‘add custom field’ section
- Autoloading a PHP class – working outside, but not inside WordPress plugin
- Saving an array to get_options
- Doing action based on input from options menu
- Help me with my first very basic plugin
- How use Dynamic hyperlink on each wordpress post?
- My wordpress website admin panel loads very slow, what can i do about that? [closed]
- How to create post comparison in wordpress
- What can I do to customize a widget provided with this plugin? from where have I to start?
- How to add custom html to the Media > Attachment Details modal?
- How to rename files during upload to a random string?
- Function not being called on form submit, only blank admin-post.php page
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- How to override plugin function in code snippets WordPress
- How to create a “Most Popular” & “Latest” TAB in WordPress
- WordPress Throwing Deprecated Errors on its own Files
- Use inline callable for hooks and filters
- Error in using ‘admin_enqueue_scripts’ action through a class
- plugin doesn’t retrieve data from database