Jetpack_Custom_CSS_Enhancements::get_revisions_url PHP Method

get_revisions_url() public static method

Core doesn't have a function to get the revisions url for a given post ID.
public static get_revisions_url ( string $stylesheet = '' ) : null | string | void
$stylesheet string Stylesheet name.
return null | string | void
    public static function get_revisions_url($stylesheet = '')
    {
        $post = wp_get_custom_css_post($stylesheet);
        // If we have any currently saved customizations...
        if ($post instanceof WP_Post) {
            $revisions = wp_get_post_revisions($post->ID, array('posts_per_page' => 1));
            if (empty($revisions) || is_wp_error($revisions)) {
                return admin_url('themes.php?page=editcss');
            }
            $revision = reset($revisions);
            return get_edit_post_link($revision->ID);
        }
        return admin_url('themes.php?page=editcss');
    }