You’re not closing the first if tag.
/* Update user information. */
if ( !empty( $_POST['url'] ) ){
update_user_meta( $current_user->id, 'user_url', esc_url( $_POST['url'] ) );
} else{
delete_user_meta( $current_user->id, 'user_url');
}
Also, you should use esc_url_raw
on a raw url and then if you’re echoing into the html use esc_url
. You also shouldn’t save esc_attr
values. This is to be used when echoing as an html attribute value. Instead, try wp_filter_kses()
.
Related Posts:
- Unable to locate WordPress Content directory (wp-content)
- Update wordpress fail – There has been a critical error on your website
- 418 header status, I’m a teapot [closed]
- Recommend a guide to catching plugin errors, please?
- File available but giving 404 in wordpress
- is_wp_error() and handling errors
- After upgrading Debian Buster to Bullseye, WordPress sites no longer updating
- How to Fix “Are You Sure You Want to Do This”, while uploading my theme?
- Error on moving WordPress site to Host from Local installation
- 500 error after update
- Unable to locate WordPress content directory
- WP Core Update Issue
- styles/default.css in markup, where does it come from? [closed]
- Internal Server Error only on frontend and certain admin pages
- Critical error but refresh fixes it
- CSS and JS not loading after uploading onto server
- Crawl Errors in Search console
- A SINGLE Post Giving an “Under Maintenance” Message
- Seeing “error” as text on white when accessing admin
- WordPress installation self deleted in server restart. SQL Tables gone too!
- Error updating WordPress, does not ask for FTP password, just error
- Error establishing a database connection in godaddy.com
- Can (slow) Internet speed get you a 500 server error? [closed]
- Critical error after updating my wordpress
- An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration
- Notice: Use of undefined constant SCRIPT_DEBUG
- WordPress Redirecting to wp-admin/install.php
- How to override wp-login.php
- This webpage is not available ERR_NAME_NOT_RESOLVED
- Error 310 too many redirects after switching domains
- How do I set up Debugging?
- get_terms return errors
- Error Logs to Diagnose Error 500 in LAMP
- Error messages when adding code to function.php or trying to delete inactive plugin files
- Does wordpress have an error log?
- Call to undefined function get_header() in index.php
- ‘Invalid post type’ error when importing from one site to another
- Check Title Unique Or Not and If not error message and dont save
- Unexpected Output: register_activation_hook with namespace
- WP Site Only Shows Javascript for Main Page
- PHP notice coming from the WordPress core?
- Get notified by email when Fatal error occurs on wordpress site?
- media_buttons_context is deprecated
- PHP Fatal error: Call to a member function get() on null in /wp-includes/cache.php on line 123
- Extending WP_Widget throws error when Monster Widget used
- Unable To Login With Correct Credentials?
- error: An Unexpected HTTP Error occurred during the API request
- I am getting an error some times when uploading themes
- is_wp_error is missing error
- Error establishing a database connection only on some pages
- Deprecated issue in WordPress [closed]
- Why getting “The input type is invalid” when accessing edit.php?
- Problem with running javascript in a shortcode
- “load-scripts.php” hangs and times out when plupload is requested
- customize wordpress database error page
- I have an error message coming up after I type in my domain. How Do I get my site back
- is wpdb->replace() already sanitized?
- Site Address (URL) – causing error 404
- After adding my website to a new server, I keep getting a unexpected end of file error, but the file is identitcal to it’s original source
- 500 error for all pages and post after move localhost to server
- Object of class stdClass could not be converted to string in
- How to trace an Error when it says nothing about any plugin?
- WordPress fonts need to upload with Google fonts?
- require_once() error after moving WordPressto another server
- Method Not Implemented GET to wp-admin/post.php not supported
- Removed plugin generating error message
- Parse error:syntax error [closed]
- Why do these errors appear on my wordpress site? [closed]
- WordPress + Buddpyress – troubleshooting server overloading
- Error when activating child theme: `failed to open stream: No such file or directory`
- My blog suddenly can’t find my stylesheet?
- MySQL: Possible to replace all of wp_posts.post_content(id#) via UPDATE + REPLACE + SELECT?
- Error when trying to logout
- WordPress cracked? Posts not found in dashboard
- How do I fix this: syntax error, unexpected ‘:’, expecting ‘)’
- Plugin.php not found
- A critical error has occurred on the site
- Fatal Error: Uncaught Error: call to undefined function get_plugin_data after uploading 2 blog posts(wp-shopify)
- WordPress error when update to new version
- How to fix this CORS error?
- Manual Backup – How to save to Firefox or Chrome (instead of IE which brings up popup I can’t get rid of)
- Regular 503 error every 5 minutes for logged in users
- One page is showing the “Index of /” error
- Parse error: syntax error, unexpected ”tax_query” in wordpress
- WordPress Dashboard visible but site is not after migration
- 403 error with no reason
- All of my wordpress sites showing †Ù¥
- Restoring .sql backup results in “Error establishing a database connection”
- Possible to hide the search engine indexing disabled prompt/error message?
- WordPress Error Missing Argument [duplicate]
- To merge customized codes upon wordpress update
- Post show up as post and pages
- The ( error_log ) file size is very large
- Theme-Check plugin using MY_THEME check error genrate
- index page is not loading [closed]
- Fatal error trace not shown in development setup
- Is it possible to empty debug.log programmatically?
- File doesn’t exist! in wordpress function.php file while creating new post or page
- Core error when calling remove_menu_page
- Convert Image to Webp on upload without plugin