mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Improved single author deprecated notices
- single authors were deprecated in v1.22 when we added multiple authors - we always thought we'd clean this up a lot sooner, but it's stuck because it's an annoying thing to break people's shit over - still saying "remove in vX" isn't useful, we need to know how long a feature has been deprecated so we can judge whether it's safe to remove
This commit is contained in:
parent
75169b705b
commit
814a0054e7
4 changed files with 5 additions and 5 deletions
|
@ -14,7 +14,7 @@ const buildInHelpers = hbs.handlebars.helpers;
|
|||
const _ = require('lodash');
|
||||
|
||||
/**
|
||||
* @deprecated: will be removed in Ghost 3.0
|
||||
* @deprecated: single authors was superceded by multiple authors in Ghost 1.22.0
|
||||
*/
|
||||
module.exports = function author(options) {
|
||||
if (options.fn) {
|
||||
|
|
|
@ -18,7 +18,7 @@ const buildApiOptions = function buildApiOptions(options, post) {
|
|||
|
||||
const apiOptions = {
|
||||
/**
|
||||
* @deprecated: `author`, will be removed in Ghost 3.0
|
||||
* @deprecated: single authors was superceded by multiple authors in Ghost 1.22.0
|
||||
*/
|
||||
include: 'author,authors,tags',
|
||||
order: 'published_at ' + order,
|
||||
|
|
|
@ -38,7 +38,7 @@ module.exports = {
|
|||
validations: {isIn: [['none', 'all', 'free', 'paid']]}
|
||||
},
|
||||
/**
|
||||
* @deprecated: `author_id`, might be removed in Ghost 3.0
|
||||
* @deprecated: single authors was superceded by multiple authors in Ghost 1.22.0
|
||||
* If we keep it, then only, because you can easier query post.author_id than posts_authors[*].sort_order.
|
||||
*/
|
||||
author_id: {type: 'string', maxlength: 24, nullable: false},
|
||||
|
|
|
@ -108,7 +108,7 @@ module.exports.extendModel = function extendModel(Post, Posts, ghostBookshelf) {
|
|||
const ops = [];
|
||||
|
||||
/**
|
||||
* @deprecated: `author`, is unused in Ghost 3.0, should be removed before Ghost 4.0
|
||||
* @deprecated: single authors was superceded by multiple authors in Ghost 1.22.0 - `author`, is unused in Ghost 3.0
|
||||
*/
|
||||
model.unset('author');
|
||||
|
||||
|
@ -191,7 +191,7 @@ module.exports.extendModel = function extendModel(Post, Posts, ghostBookshelf) {
|
|||
|
||||
/**
|
||||
* CASE: `author` was requested, `posts.authors` must exist
|
||||
* @deprecated: `author`, will be removed in Ghost 3.0
|
||||
* @deprecated: single authors was superceded by multiple authors in Ghost 1.22.0
|
||||
*/
|
||||
if (this._originalOptions.withRelated && this._originalOptions.withRelated && this._originalOptions.withRelated.indexOf('author') !== -1) {
|
||||
if (!authors.models.length) {
|
||||
|
|
Loading…
Add table
Reference in a new issue