• Hello!

    I have downloaded Plugin Peter’s Login Redirect and activated it in the admin area. After activating I am getting notice in the top of each page in admin area:

    Notice: Функция has_cap вызвана с аргументом, который считается устаревшим с версии 2.0! Использование уровней пользователей в плагинах и темах считается устаревшим. Используйте роли и возможности.. in /home/aleksey/work/projects/my_sites/training360.ru/wp/wp-includes/functions.php on line 3387 Call Stack: 0.0717 462508 1. {main}() /home/aleksey/work/projects/my_sites/training360.ru/wp/wp-admin/options-general.php:0 0.0722 543628 2. require_once('/home/aleksey/work/projects/my_sites/training360.ru/wp/wp-admin/admin.php') /home/aleksey/work/projects/my_sites/training360.ru/wp/wp-admin/options-general.php:10 0.6839 26357340 3. require('/home/aleksey/work/projects/my_sites/training360.ru/wp/wp-admin/menu.php') /home/aleksey/work/projects/my_sites/training360.ru/wp/wp-admin/admin.php:106 0.6921 26459760 4. require_once('/home/aleksey/work/projects/my_sites/training360.ru/wp/wp-admin/includes/menu.php') /home/aleksey/work/projects/my_sites/training360.ru/wp/wp-admin/menu.php:253 0.7082 26462260 5. do_action(string(10), string(0)) /home/aleksey/work/projects/my_sites/training360.ru/wp/wp-admin/includes/menu.php:97 0.7082 26463396 6. call_user_func_array(string(18), array(1)) /home/aleksey/work/projects/my_sites/training360.ru/wp/wp-includes/plugin.php:395 0.7082 26463424 7. rul_addoptionsmenu(string(0)) /home/aleksey/work/projects/my_sites/training360.ru/wp/wp-includes/plugin.php:0 0.7082 26463812 8. add_options_page(string(15), string(15), long, string(20), string(15)) /home/aleksey/work/projects/my_sites/training360.ru/wp/wp-content/plugins/peters-login-redirect/wplogin_redirect.php:888 0.7082 26463900 9. add_submenu_page(string(19), string(15), string(15), long, string(20), string(15)) /home/aleksey/work/projects/my_sites/training360.ru/wp/wp-admin/includes/plugin.php:1057 0.7083 26464324 10. current_user_can(long) /home/aleksey/work/projects/my_sites/training360.ru/wp/wp-admin/includes/plugin.php:985 0.7084 26464996 11. call_user_func_array(array(2), array(1)) /home/aleksey/work/projects/my_sites/training360.ru/wp/wp-includes/capabilities.php:1036 0.7084 26465292 12. WP_User->has_cap(long) /home/aleksey/work/projects/my_sites/training360.ru/wp/wp-includes/capabilities.php:0 0.7085 26465712 13. _deprecated_argument(string(7), string(3), string(202)) /home/aleksey/work/projects/my_sites/training360.ru/wp/wp-includes/capabilities.php:727 0.7086 26466432 14. trigger_error(string(359)) /home/aleksey/work/projects/my_sites/training360.ru/wp/wp-includes/functions.php:3387

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter pchelovod

    (@pchelovod)

    Notice in english will look like this:

    Notice: Function has_cap is called with argument which is considered obsolete since version 2.0! Using users’ levels in plugins and themes considered obsolete. Use roles and abilities.. in

    It is the add Menu call usually –
    remove user level and use capabilities instead.

    Actually would be really great if you would develop with wp-debug switched on as your plugin spews a bunch of notices.

    Good practice to deal with these as addressinf them can prevent weird bugs due to unset variables.

    Thread Starter pchelovod

    (@pchelovod)

    Thank you for advise.

    Thanks all for pointing that out. I’ve done some code cleanup which should remove those notices in version 2.1.1 of the plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Peter's Login Redirect] have got a notice after activating’ is closed to new replies.