WordPress.org

Ready to get started?Download WordPress

Forums

Attachments
remove warning in WP debug mode (4 posts)

  1. Daniele Raimondi
    Member
    Posted 3 years ago #

    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/

  2. holden321
    Member
    Posted 3 years ago #

    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

  3. holden321
    Member
    Posted 3 years ago #

    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

  4. holden321
    Member
    Posted 3 years ago #

    changing
    8 to 'administrator'
    fixed the problem :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic