Multisite subsite expiration

Since my need is two-fold, I found these answers here with a bit more searching.

  1. To add to the Edit Site page, the best option is to add another ‘tab’ to that page. I found an answer here: Add site options UI in Multisite Sites > Infos page , which referenced a tutorial by one of the answerers: https://rudrastyh.com/wordpress-multisite/custom-tabs-with-options.html (tutorial updated Dec 2022).

Using that tutorial as the basis, I was able to add my own tab to the Edit Site page, where I used update_option to save my own options to that site.

  1. To add a column to the Sites page, I found guidance here Add new column to sites page , which referenced code on GitHub that I used as a starting point https://gist.github.com/yratof/1e16da7e375c0a1bc278fb46e9bcf7c0

That code is as follows, which I modified for my needs:

/* Add site_name as a column */
        add_filter( 'wpmu_blogs_columns', 'add_useful_columns' );
        function add_useful_columns( $site_columns ) {
            $site_columns['site_name'] = 'Site Name';
            return $site_columns;
        }

        /* Populate site_name with blogs site_name */
        add_action( 'manage_sites_custom_column', 'column_site_name' , 10, 2 );
        function column_site_name( $column_name, $blog_id ) {
            $current_blog_details = get_blog_details( array( 'blog_id' => $blog_id ) );
            echo ucwords( $current_blog_details->blogname );
        }

With the above guidance, I was able to add my own settings tab, and then view settings in the Sites page.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)