Well that depends on how you define secure.
I assume your embed code is an iframe which means that you are putting something not under your control (that could in theory always change into something malicious) into your site. This isn’t 100% secure itself. That is why esc_html
strips that out.
The question you have to ask yourself is how much of a risk this is regarding the person who has the right to change this field.
But maybe there is an alternative if the embed you are using is from a site that has oEmbed support in WordPress.
Then you can easily embed it using wp_oembed_get. This still puts an iframe from somewhere else into your site, but at least it doesn’t allow arbitrary HTML or JS.
If you add some more info about what embed code we are actually talking about I might even be able to provide an example.
Related Posts:
- What are nulled themes?
- Extra themes – ok or bad?
- How to get the post-ID in my plugin?
- Is that a malicious code?
- Is a very simple theme secure enough?
- WP Snippet to Hide Theme Editor In Dashboard Only Works On LocalHost Site
- Is there significant risk in not keeping a theme updated? [closed]
- Meta title W3C Validation Error with
- Load all files from folder in theme – Security concerns?
- hardened wordpress linux install
- suspicious boolean.php file in wp web root [closed]
- get_post_meta() doesn’t allow email
- How do I change the header image height in Twenty Seventeen?
- Is it OK to remove theme credits from footer? [duplicate]
- How to create a new theme from scratch?
- What theme is good for posting code? [closed]
- How to see files in directories in “Edit Themes” screen
- WordPress generating 404 on .mp4 file in theme folder
- Why are my widgets not saving when being added to a sidebar?
- Building useful features into your theme
- Editing theme files and access to the Code pages only to super-admin?
- Current theme broken – after server and domain migration
- Categories for Pages Not Saving in Admin with Custom Categories Metabox?
- Switch Theme Through Options Panel
- Weird post pagination url redirect
- How get Themes list via REST api?
- Activate a new WordPress Theme Only for Admins
- WordPress Fatal error: Call to undefined get_header() in index.php on line 15 [closed]
- Whats the safest way to output custom JavaScript and Css code entered by the admin in the Theme Settings?
- Theme Editor Not Showing
- Pros and cons of using Backbone for WordPress theming [closed]
- Can I create multiple instances of the BuddyPress Activity Stream with separate themes? [closed]
- Can I rename a theme’s folder and still receive updates?
- Child theme not visible
- Custom theme folder
- How to load parent theme style.css?
- How to setup a new WordPress theme without deactivating the current theme?
- WordPress is not able to change themes
- Inject widgets from one sidebar into another with PHP
- Where all are child themes recorded when they are created in WordPress
- I have some doubts regarding how to implement child theme
- Incompatible Archive. PCLZIP_ERR_BAD_FORMAT (-10)
- how to remove category nav from Bueno (WordPress Theme) header [closed]
- What is the safe way to print tracking code / pixel code before tag or tag
- Web site Header tag links some resources with HTTPS
- How to style the post previews/links without it affecting the main posts?
- customize color in WP child theme doesn’t saved
- How to work on a new Theme for a site while still keeping the old Theme live
- Loading Bootstrap with wp_enqueue_style and wp_enqueue_script
- WordPress use of @ in core files
- Unable to upload/install any WordPress themes
- Change the name of the root name of an already built WordPress theme
- How to switch theme if the current user is admin?
- Cannot apply custom css to IE in the theme
- How to assign custom template to specific products in Woocommerce?
- Getting a ‘slide down’ js panel implemented within WP
- The requested theme does not exist. Stylesheet is missing – error after changing style.css name to my-styles.css in wp child theme?
- Re-zipping or extracting theme from wordpress site files
- Why does wordpress add Theme not list a specific theme anymore?
- WordPress theme layout problem
- current_user_can(‘manage_options’) causes white screen of death?
- header.php-tweak: How to do that getting Meta-Slider into the header-center?
- Does WP, php, or a current framework (woofoo / genesis, etc). Offer a way to schedule text / bg color changes?
- different theme in one website
- Migrating a website using custom image tags to use featured images instead
- Editing Theme and Moving Servers
- WordPress | Theme error
- Fix threaded comments
- Using DePo Masthead with WP 3+
- setcookie on WordPress Page Template
- How to get this taxonomy name from wp_get_object_terms()?
- Will I still have my website wordpress theme if I transfer my website to sites like Namecheap?
- How to change wordpress gutenberg editor font to match default theme font?
- Facebook Icon on top of WordPress Site Header and Top Bar
- How to make wordpress theme option page in columns?
- 404 not working, going to homepage; how to fix?
- Local LAMP Stack on Linux Mint theme upload fails
- How do WordPress themes work in relation to content?
- Custom CSS is overwritten by WordPress?
- Incorrect Theme and Upload URLs After Migration
- Using two stylesheets for mobile compatibility
- Copy from wordpress for dev gives different output in browser
- Target Internal Link Of Another Page On Website
- Change whole theme depending on resolution
- post_prev & post_next within same category
- Costum Theme template directoy url problem
- How to remove the option data of a theme when that theme is removed?
- How to find out which template the HTML content comes from?
- Convert theme to be based on Bootstrap?
- Include root files into header files
- Static posts page is not working
- Cannot use some themes within Managed WordPress of Go Daddy [closed]
- How to track your theme usage on the internet?
- How to add Company Logo to Chosen Theme
- What security risk is not having “default” theme?
- Is it possible to dynamically show different themes for different users? [duplicate]
- Why does WP theme not look like promoted? [closed]
- Table of Contents in Left Navbar [closed]
- How do I get rid of the Mindblown and the book recommendations?
- Adding PHP code to single template in 2023 edition of WordPress theme