• Great plugin, can be called with a function to show popular posts anywhere.
    I was able to create a category for popular posts and then call the plugin function when that category was viewed.

    However, only giving it 4 stars as I’ve realised that when the plugin is deactivated, all the database info is deleted, the whole table for this plugin is gone!
    This should only happen when the plugin is deleted, not deactivated.. Deactivation should be viewed as a temporary thing, possibly while testing another plugin, it shouldn’t remove all the data!

    If this is fixed it would be worthy of 5 stars.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter RustyH

    (@russhorne)

    Looks like I fixed it..
    In the plugin folder find wp-most-popular.php.

    Change this line:
    register_deactivation_hook( WP_PLUGIN_DIR . ‘/wp-most-popular/wp-most-popular.php’, ‘WMP_system::uninstall’ );

    To this:
    register_uninstall_hook( WP_PLUGIN_DIR . ‘/wp-most-popular/wp-most-popular.php’, ‘WMP_system::uninstall’ );

    Used this guide for hints on what needed changing:
    https://developer.www.ads-software.com/plugins/the-basics/uninstall-methods/

    Seems to work well, deactivate now doesn’t remove the database entries, but deleting the plugin does.
    Hope that’s of use for the next version/update.

    Thanks, you help me too.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Simple and versatile’ is closed to new replies.