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.

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
Stack trace:
#0 wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#1 wp-includes/plugin.php(517): WP_Hook->do_action()
#2 wp-admin/admin.php(175): do_action()
#3 wp-admin/theme-editor.php(10): require_once('/home/u35317260...')
#4 {main}
  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.