Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter jjchinquist

    (@jjchinquist)

    Index: wp-cron-cleaner.php
    ===================================================================
    --- wp-cron-cleaner.php	(revision 1407292)
    +++ wp-cron-cleaner.php	(working copy)
    @@ -62,6 +62,17 @@
    
     /********************************************************************
     *
    +* Add menu in a network environment (where tools.php does not exist)
    +*
    +********************************************************************/
    +add_action('network_admin_menu', 'WPCC_add_network_admin_menu');
    +function WPCC_add_network_admin_menu() {
    +    global $WPCC_tool_submenu;
    +    $WPCC_tool_submenu = add_submenu_page('settings.php', 'WP Cron Cleaner', 'WP Cron Cleaner', 'manage_options', 'wp_cron_cleaner', 'WPCC_main_page_callback');
    +}
    +
    +/********************************************************************
    +*
     * Load CSS and JS
     *
     ********************************************************************/
    @@ -111,6 +122,18 @@
    
     /********************************************************************
     *
    +* Add direct link from plugin overview page to plugin tools page
    +*
    +********************************************************************/
    +add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'WPCC_tools_link' );
    +function WPCC_tools_link($links){
    +    return array_merge( $links, array (
    +        '<a href="' . admin_url( 'tools.php?page=wp_cron_cleaner' ) . '">' . __( 'Settings' ) . '</a>',
    +    ));
    +}
    +
    +/********************************************************************
    +*
     * The admin page of the plugin
     *
     ********************************************************************/
    Thread Starter jjchinquist

    (@jjchinquist)

    Had to do a slight workaround in the previous patch because the multisite network admin menu does not have the tools menu item (although mine was not a clean install…).
    In the patch version, the network submenu item has been moved under the settings menu item.

    Regards,

    Jeremy

    Plugin Author Younes JFR.

    (@symptote)

    Thank you dear “jjchinquist” for your contribution.

    The plugin is developed to be launched from the admin panel of your main site (under tools) of your network, not from the network admin panel itself. That is why you can’t access it from the network admin.

    To launch the plugin properly, please go to your main site admin panel -> tools -> WP Cron Cleaner

    Best regards.

    Thread Starter jjchinquist

    (@jjchinquist)

    Hi Younes, I do not understand your feedback.

    I attempted the following (activate the plugin for all sites in the multi-site instance):

    1. https://dev.mydomain.com/wp-admin/network/plugin-install.php – search and download the plugin
    2. https://dev.mydomain.com/wp-admin/network/plugins.php – activate for all sites
    3. https://dev.mydomain.com/wp-admin/network/plugins.php – activate for all sites
    4. I am able to visit the page directly (as this is my primary site in the multi-site set up) https://dev.mydomain.com/wp-admin/tools.php?page=wp_cron_cleaner
    5. There is, however, no menu item. That is the issue I wished to fix with this patch. If there is no menu item in the administration menu, the plugin will not work for my needs.

    Regards,

    Jeremy

    Plugin Author Younes JFR.

    (@symptote)

    Hi Jeremy,

    The plugin menu is not accessible via https://dev.mydomain.com/wp-admin/network. The menu is inserted under “tools” in your https://dev.mydomain.com/wp-admin (primary site). That is why you are not able to see any menu in your network dashboard https://dev.mydomain.com/wp-admin/network.

    Go to https://dev.mydomain.com/wp-admin >> Tools >> WP Cron Cleaner

    Regards.

    Thread Starter jjchinquist

    (@jjchinquist)

    Hi Younes,

    We have an (internal) issue because our WP Multisite instalation is an older multisite installation that has been updated over the years (properly). But it does not have the menu item “tools” for the main site (only on non-main sites). Not certain why that is. On a clean installation I have the menu item, and so I can get to the page as you stated.

    I still think adding a “settings” link from the plugin overview page would be helpful (that was the .patch above). See the code where it starts with:
    add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'WPCC_tools_link' );

    Plugin Author Younes JFR.

    (@symptote)

    If it is the case, then a menu should be added as you suggested. I will add it as soon as possible. I will inform you once this is done.

    Thank you Jeremy for your contribution and for the patch.

    Best regards.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Multisite variation does not display the tools.php?page=wp_cron_cleaner link’ is closed to new replies.