public function addEventDateArgsToPermalinks($permalink, $post, $leavename)
    {
        if (!isset($post->start_date) || $post->post_type != $this->eventPostType) {
            return $permalink;
        }

        return esc_url(add_query_arg('date', preg_replace('/\D/', '', $post->start_date), $permalink));
    }
public function addEventDateArgsToPermalinks($permalink, $post, $leavename)
    {
        if (!isset($post->start_date) || $post->post_type != $this->eventPostType) {
            return $permalink;
        }

        return esc_url(add_query_arg('date', preg_replace('/\D/', '', $post->start_date), $permalink));
    }
public function addEventDateArgsToPermalinks ( $ permalink , $ post , $ leavename ) { if ( ! isset ( $ post -> start_date ) || $ post -> post_type != $ this -> eventPostType ) { return $ permalink ; } return esc_url ( add_query_arg ( 'date' , preg_replace ( '/\D/' , '' , $ post -> start_date ) , $ permalink ) ) ; }
Add date arguments to event permalink URL
Add date arguments to event permalink URL