wp admin color

I get this Error when i am trying to add a php script to the functions file in the child theme


Your PHP code changes were rolled back due to an error on line 308 of file wp-includes/class-wp-hook.php. Please fix and try saving again.

  1. Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "wessal_admin_color_scheme" not found or invalid function name in wp-includes/class-wp-hook.php:308
  2. Stack trace:
  3. #0 wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
  4. #1 wp-includes/plugin.php(517): WP_Hook->do_action()
  5. #2 wp-admin/admin.php(175): do_action()
  6. #3 wp-admin/theme-editor.php(10): require_once('/home/u35317260...')
  7. #4 {main}
  8. thrown

Dismiss

 this is the scrip (its to change the colors of the admin panel)


function wpacg_wessal_admin_color_scheme() {

 //Get the theme directory

 $theme_dir = get_stylesheet_directory_uri();


 //Wessal

 wp_admin_css_color( 'wessal', __( 'Wessal' ),

  $theme_dir . '/wessal.css',

  array( '#e5e5e5', '#333', '#d64e07' , '#04a4cc')

 );

}

add_action('admin_init', 'wessal_admin_color_scheme');

Comments

  • Hi,

    What you ask for requires file customization, which is not allowed in reference to the Item Support Policy. http://themeforest.net/page/item_support_policy

    So if you want to modify files and don't know how, you should contact your web developer. Item Policy says:

    Item support does not include services to modify or extend the item beyond the original features, style, and functionality described on the item page. For customization services that will help you tailor the item to your specific requirements, we recommend contacting the author to see if they privately offer paid customization services or checking out the great service providers on Envato Studio.

    Thanks

  • I have always added the above script to change admin to any wp theme and i haven't faced any issues with any of them until now all i am doing is adding the script to change admin color and the error that is preventing that from happening is coming from your script, so i am not asking you for customization i am asking you why is your scripting giving me this error?

  • Sorry, but this is not Betheme related question, and we do not provide help with file customization.

    With your question, you should contact your web developer, as I mentioned in my previous message.


    Best regards

  • I have sent the message yesterday and waiting for your reply

  • Sorry, but I do not know what you are referring to.

    I have answered you.


    Best regards

Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.