Multisite create new site hook

On the admin dashboard, when we add a new site to a multisite network, i’d like to add a tick box. Once ticked, an action will be triggered (i’ll need the new site’s id in this hook action).

Could you point me to the right direction as to how i can do this? I’m comfortable with writing PHP.

Thank you!

  • Milan
    • WordPress Wizard

    Hello BW

    Glad to know that solution helped you with something. :slight_smile:

    Now you want to add tick box to the "Add new Site" screen means on this page right ?

    If yes, then I am sorry there isn't any easy extensible way for that page except custom coding in site-new.php file. If this seems okay to you please do let me know I'll guide you how you can do that. :slight_smile:

    Just one note here I want to make :

    Editing core files of WordPress is not a advisable way of achieving anything with WordPress as update to WordPress in future will remove changes you have done in core files

    Looking forward to hearing back. :slight_smile:

    Kind Regards,

    Milan

  • BW
    • Site Builder, Child of Zeus

    Hi Milan,

    that's exactly what i want to do. I don't want to edit the wordpress core files. I was looking to creating a plugin that can do that. Very much like WPMUdev's Blog Templates plugin which adds an additional "Template" drop down on the Add New Site screen (attached)

  • Milan
    • WordPress Wizard

    Hello BW

    Hope you are doing fine. :slight_smile:

    Yes you are right, I completely forgot that its possible to do with bit of javascript and php stuff. Thanks for reminding about New Blog Template.

    But to create flexible solution for you, requires accountable custom amount of coding to be done, for that I suggest you to hire developer or to use our Job Portal if you wish to. You’ll find our Job Portal here,

    https://premium.wpmudev.org/wordpress-development/

    However, as for simple walk-through I’ve created tiny plugin which you can review to understand how you can add tick box on that page and handle it with PHP. You’ll find it attached with this post. :slight_smile:

    Hope this helps you. :slight_smile:

    Kind Regards,

    Milan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.