Title: Deprecated: Function create_function() is deprecated
Last modified: July 6, 2021

---

# Deprecated: Function create_function() is deprecated

 *  [Chad](https://wordpress.org/support/users/chadi/)
 * (@chadi)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-is-deprecated-4/)
 * Need to tweak my WP theme code to fix below debug errors. Would appreciate help
   on this if anyone of you know a workaround. I cannot add a custom link in the
   main menu, nothing happens when I click add. When I try using live preview mode,
   Same when trying to add a new page or new blog post.
 * I get an error.
 * “Looks like something’s gone wrong. Wait a couple seconds, and then try again.”
 * I disabled all plugins, tried again. Same issue. Very weird. I am using Cloudflare,
   even cleared all cache including CF and W3Cache.`
 * Backend:
 *     ```
       Deprecated: Function create_function() is deprecated in /home/xxxxxxx/public_html/wp-content/themes/satria/inc/ThemeFilters.php on line 34
   
       Notice: Constant COOKIE_DOMAIN already defined in /home/xxxxxxx/public_html/wp-config.php on line 119
   
       Notice: Constant WP_DEBUG already defined in /home/xxxxxxx/public_html/wp-config.php on line 119
       ```
   
 * Frontend:
 *     ```
       Deprecated: Function create_function() is deprecated in /home/xxxxxxx/public_html/wp-content/themes/satria/inc/ThemeFilters.php on line 34
   
       Notice: Constant COOKIE_DOMAIN already defined in /home/xxxxxxx/public_html/wp-config.php on line 119
   
       Notice: Constant WP_DEBUG already defined in /home/xxxxxxx/public_html/wp-config.php on line 119
   
       Notice: Undefined variable: bgimage in /home/xxxxxxx/public_html/wp-content/themes/satria/inc/walker/SatriaUikitMenuWalker.php on line 158
       ```
   
 * <strong>This is the current line 34 in ThemeFilters.php</strong>
 *     ```
       // Search Form
       add_filter( 'get_search_form', array($this, 'satria_search_form'), 10);
       ```
   
 * This is the entire ThemeFilters.php file:
    [https://pastebin.com/eE17tkid](https://pastebin.com/eE17tkid)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdeprecated-function-create_function-is-deprecated-4%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-is-deprecated-4/#post-14633202)
 * Your `satria` theme seems to be the error.
 * Since you use a commercial theme and need support, please go to their official
   support channel. In order to be good stewards of the WordPress community, and
   encourage innovation and progress, we feel it’s important to direct people to
   those official locations: [https://mhthemes.com/wp-themes/satria-hosting-wordpress-theme/](https://mhthemes.com/wp-themes/satria-hosting-wordpress-theme/)
 * Forum volunteers are also not given access to commercial products, so they would
   not know why your commercial theme or plugin is not working properly. This is
   one other reason why volunteers forward you to the commercial product’s vendors.
   The vendors are responsible for supporting their commercial product.
 * **Commercial products are [not supported in these forums](https://make.wordpress.org/support/trouble/section-1-getting-started/what-is-not-supported).**
 *  Thread Starter [Chad](https://wordpress.org/support/users/chadi/)
 * (@chadi)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-is-deprecated-4/#post-14633205)
 * Thanks, but it’s no longer a commercial product nor is the author providing support,
   updates of any kind. It’s been EOL for a while and right now installing a new
   theme from scratch is a big undertaking. Look for possible workarounds in the
   meantime.
 * [https://themeforest.net/item/satria-professional-hosting-wp-theme/13946339](https://themeforest.net/item/satria-professional-hosting-wp-theme/13946339)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Deprecated: Function create_function() is deprecated’ is closed to new
replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Chad](https://wordpress.org/support/users/chadi/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-is-deprecated-4/#post-14633205)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
