ID, '_aitepc_expiry_date', true ); $expiry_action = get_post_meta( $post->ID, '_aitepc_expiry_action', true ); $redirect_url = get_post_meta( $post->ID, '_aitepc_redirect_url', true ); // Fallback to site-wide default when no per-post action is set. $site_default = get_option( 'aitepc_default_expiry_action', 'draft' ); $actions = function_exists( 'aitepc_get_expiry_actions' ) ? aitepc_get_expiry_actions() : array( 'draft' => __( 'Set to Draft', 'ait-easy-post-customization' ) ); $show_redirect = ( 'redirect' === $expiry_action ) ? '' : 'display:none;'; $show_delete = ( 'delete' === $expiry_action ) ? '' : 'display:none;'; ?>