Rewrite static link as dynamic

In Admin Message module static links added that leads to Wocomrece product page and to another 3rd party plugin settings on the main site.

What needs to be done so each subsite administrator, of a site with subdomain structure, could open the same plugin's settings on the subsite.

Example of a static link:
site.com/wp-admin/settings

Dynamic URL
site.com/%subsite-slug%/wp-admin/settings

  • Nastia

    Hello antony

    Hope you're doing well!

    Out of the box, this is not possible to achieve with Admin Message module. Admin Message module is deprecated and it is suggested using Admin Panel Tips module instead. Although admin Panel Tips module doesn't have global configurations and the Dashboard Notice needs to be added manually to each subsite.

    Because of this, our developer provided a code that needs to be included in mu-plugin. Although the plugin still may need some modifications, since the last two links in a message are coming from a 3rd party plugin, please see if these links are working on your end.

    function wpmudev_blog_id_in_admin_notice(){
    
        global $blog_id;
        ?>
        <div id="message" class="updated">
            <p>
                <strong>BASIC TIPS (To start you must do the following:)</strong>
                <ol>
                    <li>Set up your store via store setup and add store details.</li>
                    <li>Add products if you are using an independent dropshipping supplier.</li>
                    <li>If you are dropshipping with an independent supplier use the Dropshippers module.</li>
                    <li>If you are dropshipping with Aliexpress you have to register at https://portals.aliexpress.com for an API key then go to Affiliate AI ->settings ->Aliexpress settings and enter.</li>
                </ol>
    
                <a href="<?php echo get_admin_url( $blog_id, 'admin.php?page=wc-settings' ); ?>"><img class="alignnone size-full wp-image-1054" src="https://bajestore.com/dropship/wp-content/uploads/2017/11/store13.png" alt="" width="100" height="101" /></a>
                <a href=""><img class="alignnone size-full wp-image-1055" src="https://bajestore.com/dropship/wp-content/uploads/2017/11/products-13.png" alt="" width="102" height="101" /></a>
                <a href="<?php echo get_admin_url( $blog_id, 'admin.php?page=WooCommerce_Dropshippers'); ?>"><img class="alignnone size-full wp-image-1056" src="https://bajestore.com/dropship/wp-content/uploads/2017/11/DROPSHIPP.png" alt="" width="102" height="102" /></a>
                <a href="<?php echo get_admin_url( $blog_id, 'admin.php?page=aeidn'); ?>"><img class="alignnone size-full wp-image-1057" src="https://bajestore.com/dropship/wp-content/uploads/2017/11/ALIDROP.png" alt="" width="101" height="101" /></a>
            </p>
    
        </div>
    
        <?php
    
    }
    
    add_action( 'admin_notices', 'wpmudev_blog_id_in_admin_notice' );
    add_action( 'network_admin_notices', 'wpmudev_blog_id_in_admin_notice' );

    Hope this will help!

    Kind regards,
    Nastia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.