Support » Plugin: WP Render Blogroll Links » [Plugin: WP Render Blogroll Links] php notices

  • Michael Albers


    Hi, while i was looking for some other problem i found that your plugin gives some notices.

    Notice: Use of undefined constant WPRBLVERSION – assumed ‘WPRBLVERSION’ in WP-Render-Blogroll.php on line 19


    Notice: Undefined variable: classname in WP-Render-Blogroll.php on line 83

    I guess for the first one, the single quotes are missing.
    For the second one i think $classname could be replaced by $linkclass. All other checks for empty variable you use the same variable names.

    Of course, there could be a reason why you set $classname instead of $linkclass.

    Hope this helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • There is also a depreciated function message.

    “Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.”

    Looking at the code the issue is the number 8 in the line below. This should be replaced by a string such as ‘manage_options’

    function renderlinks_admin() {
    	if (function_exists('add_options_page')) {
    		add_options_page('WP Render Blogroll Links', 'WP Blogroll Links', 8, basename(__FILE__), 'renderlinks_settings_page');


    Michael, yes adding the ‘ fixes the issue with the undefined constant.

    To fix the other the issue is that $classname never gets set if the $linkclass is passed so the correct fix would be a few lines above and would be as follows.

    $classname = '';
    	if ( '' != $linkclass){
    		$classname = ' class="' . $linkclass . '"';
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP Render Blogroll Links] php notices’ is closed to new replies.