Support » Plugin: Easy Plugin Demo Builder » Change expire date for one particular site

  • Resolved Baksteen

    (@baksteen)


    Every site I create gets an expire date. I would like one particular site to never expire. Is that possible?

Viewing 1 replies (of 1 total)
  • Plugin Author Michael Howard

    (@mikeyhoward1977)

    Hi @baksteen,

    There is no setting option to exclude a site from deletion, but you can create a function that hooks into the epd_delete_sites_query action to exclude a site ID.

    Something similar to the below – Not tested!

    function ws_epd_exclude_sites_from_expiration( $args ) {
        if ( ! isset( $args['site__not_in'] ) {
            $args['site__not_in'] = array();
        }
    
        if ( ! is_array( $args['site__not_in'] ) {
            $args['site__not_in'] = array( $args['site__not_in'] );
        }
    
        $args['site__not_in'][] = 'SITE_ID_TO_EXCLUDE'
    
        return $args;
    }
    add_filter( 'epd_delete_sites_query', 'ws_epd_exclude_sites_from_expiration' );
Viewing 1 replies (of 1 total)
  • The topic ‘Change expire date for one particular site’ is closed to new replies.