You have added an extra )
. You need to remove that.
Use this code
function clean($str) {
$str = @trim($str);
if( get_magic_quotes_gpc() ) {
$str = stripslashes($str);
}
return mysql_real_escape_string($str);
}
Related Posts:
- How to add a .php file to WordPress
- When to use Exceptions vs Error Objects vs just plain false/null
- Woocommerce get selected shipping zone id for the current user
- Include files in functions.php
- Woocommerce -How to set product regular price default
- Display all meta for a post?
- Is there a reason why my wordpress PHP page isn’t loading into my PHP template
- Add to previous posts under post
- How to show order data by multiple ID?
- Print html when custom field has value inside while loop
- how to create and show sessions in word press?
- Mail not sent when I set HTML headers
- Categories Template Assistance
- Stop Duplicating Terms in a Foreach Loop
- Generating add_settings_section() calls dynamically
- Is this code malidcous
- How to trash multiple post/product programmatically
- Loading jQuery in the footer after removing jQuery migrate?
- Force SSL using FORCE_SSL_ADMIN
- Proper way to edit a post via phpMyAdmin without breaking the compare revisions tool
- Sending jsPDF documents to the server
- Unit Test in WordPress
- “before delete post” action fire when the post is updated?
- Register non hierarchical taxonomy and the show meta box in the post type
- Admin username and password
- Sum custom field values of particular taxonomy
- WordPress excerpt not working
- Random Default Avatar Function
- Custom Text in WooCommerce Order Processing Email Based on Products
- Redirect to another page after submission using wp_mail
- Loop with slider (slider not loading)
- Displaying admin notices inside the block editor from rest_after_insert_{$this->post_type} hook
- How to set up VS Code for WP plugin/theme development in 2021? [closed]
- Error when adding excerpt to the content through functions.php
- wordpress media library new uploads don’t write to database
- Add data attribute to each li in menu
- Fresh Install WP error – “The site is experiencing technical difficulties” [closed]
- Woocommerce : Can’t get product info in loop
- inserting a post from an extern php file but post content doesn’t show on wp site
- Way to add captions to gallery images by code
- Echo possibly causing custom template formatting conflict
- get_template_part for specific page
- proper way to add css using functions.php?
- How do I create my own .php file with a code part and echo it on different pages?
- “Undefined index” error when saving empty array with checkboxes
- Conditional using get_the_ID() not working [closed]
- WordPress plugin admin page – using WordPress function in linked php file
- How to fix this PHP warning in WP-Admin after upgrading to 3.1.2?
- Cant register rest routs from class instance
- if isset not working for undefined index, how to fix
- Decoded malware code [closed]
- PHP Notice: Undefined offset: -1 – Navigation Previous/Next
- Where is the PHP code generating an element?
- How do I check or test a WordPress Auto Year Change Script?
- Prevent redirect to wp-login.php
- Trying to enqueue script – Nothing Happens
- Undefined offset: 0-wp-includes/meta.php:488 -Melding
- WordPress and PHP Version Upgrade issue [closed]
- calling function in external js file
- How can I get my Media Uploader Button to function on 1 click rather than requiring 2 clicks?
- Images Uploaded saving onto older/previous year folders
- PHP Redirect condition
- WordPress 4.2.3 on Windows Server 2008 R2 Creating Files as read only
- WooCommerce “Checkout Now” button [closed]
- Woocommerce getting top level category parent and make all sub categories have the same template and menu
- Defining multiple categories for showing latest posts
- Finding and removing duplicates within WP Arrays
- Hard-coding a shortcode as the last menu item in primary navigation?
- Removal of all posts content in bulk, keeping the posts itself
- Blog suddenly shows Archive instead of index page
- WP-CLi PHP Warning: mysqli_query(): (HY000/1356): View During Search Replace
- Is it possible to access admin-ajax.php using PHP?
- Loading Elementor templates in a Bootstrap modal on button clicking
- Adding custom field to product category and show it to shop/category shop page
- How to check if is page template inside functions.php
- How to hide a div section when user is logged in, in single product woocommerce
- REST API custom endpoint to fetch pages and posts not working
- display custom plugin view on front end inside template body
- Meta inserted through wp_insert_post gets messed up
- If i use a child theme to add new code blocks to header.php, how does it get inserted in the right place in parent’s header.php?
- Wp redirect – reset password
- How do I get data from my database into my Custom Export Field
- Fix hover images blink
- How to auto-generate random numbers in username?
- How to add a custom class for iframe by embed_oembed_html
- Generate random access token to a post page
- Filter loop by ‘price’ with meta_query
- remove public static function wp_link_dialog()
- Find the method which AJAX GET calls
- Adding button to wordpress menu
- List users in a dropdown for login
- WordPress pagination broken on blog page, working for search results page
- How do I / Is it possible to execute an external PHP file / function inside WordPress?
- wp_get_archive for category returning different URLs on different but similar sites
- Widget header unique classes
- Trouble using wordpress functions in a pop-up modal form
- admin-ajax.php loading many times
- custom contact form no longer working (because of 3.2?)
- Import js variables loaded via wp_localize_script() into js module without global scope connection
- Custom taxonomy with page post type – WordPress