WordPress.org

Support

Support » Plugins and Hacks » Attachments » [Plugin: Attachments] remove warning in WP debug mode

[Plugin: Attachments] remove warning in WP debug mode

  • Hi Jchristopher and thanks for this useful plugin. I’ve switched to debug mode on a WP project of mine that makes use of your plugin and found a warning about WP_ADMIN constant not defined on line 40 of attachments.php

    I’ve corrected

    if( WP_ADMIN )

    to

    if( defined( 'WP_ADMIN' ) )

    Please update your code before releasing a new version.
    Thanks, Mad Max.

    http://wordpress.org/extend/plugins/attachments/

Viewing 3 replies - 1 through 3 (of 3 total)
  • how about warning
    Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in ..\wp-includes\functions.php on line 3387

    I noticed that when string #108 of
    plugins/attachments/attachments.php
    is removed, then the notice disappears

    add_options_page(‘Settings’, ‘Attachments’, 8, __FILE__, ‘attachments_options’);

    but there is no options on the options’ page of the plugin
    so maybe it’s nothing wrong to remove this string

    changing
    8 to ‘administrator’
    fixed the problem 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Attachments] remove warning in WP debug mode’ is closed to new replies.
Skip to toolbar