WP Render Blogroll Links
php notices (3 posts)

  1. Michael Albers
    Posted 3 years ago #

    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.


  2. Workshopshed
    Posted 3 years ago #

    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');

    Ref: http://codex.wordpress.org/Function_Reference/add_options_page

  3. Workshopshed
    Posted 3 years ago #

    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 . '"';

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic