WordPress.org

Ready to get started?Download WordPress

Forums

Blubrry PowerPress Podcasting plugin
powerpress_admin_init Issue (3 posts)

  1. Sean Klein
    Member
    Posted 3 years ago #

    The powerpress_admin_init function is running everywhere. The function is called at init and there are no checks to see if the current load an admin load.

    This is causing multiple CSS/JS files to be loaded in all parts of the site where I don't believe they are needed. Tell me if I'm wrong.

    I would suggest either running the function at admin_init or adding an if (is_admin()) check at the beginning of the function.

  2. Angelo Mandato
    Member
    Plugin Author

    Posted 3 years ago #

    There is such code. Check line 2257-2261 in powerpress.php (main file for plugin). Logic:

    if( is_admin() )
    {
    require_once(POWERPRESS_ABSPATH.'/powerpressadmin.php');
    register_activation_hook( __FILE__, 'powerpress_admin_activate' );
    }

    So essentially only powerpress.php is ever loaded, unless you are in the admin area of your WordPress blog. This logic is there for performance reasons, we take pride in providing a light weight plugin when not in the admin.

    The only other case when the powerpressadmin.php file is included is when posts scheduled for the future are processed, which happens at random times based on the internal cron system built into WordPress. This should only occur once, and not repeatedly, and even then it should only happen when the 'future_to_publish' hook is called by WordPress. (Side note, this feature will be going away in PowerPress 3.x, as iTunes has dropped their ping support, which was why this logic was added).

    My suggestion is to disable other plugins one by one until you find out what is causing the conflict. You may either have a plugin that is invoking the 'future_to_publish' hook, or forcing WordPress to think the site is in the admin mode (even when it is not).

    Please contact me directly at cio [at] rawvoice.com, we would like to get to the bottom of such an issue, and if we know which plugin is causing the issue we will put a warning message in PowerPress settings (which we have for a handful of other plugins).

    The next version of PowerPress will move that 'init' hook to 'admin_init', but more alarming is the fact that it shouldn't be occurring in the first place.

  3. Swiss Gear Backpack
    Member
    Posted 2 years ago #

    That theme has being updated and is currently being reviewed for release in WP theme repository in a few days. Thank you for your patience.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags