mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 07:51:55 +03:00
Rename unregisterFilter to deregisterFilter
fixes #2167 - Rename functions - Adjust tests
This commit is contained in:
parent
0dea6a2754
commit
3993b676b6
@ -7,7 +7,7 @@ var proxy = {
|
|||||||
|
|
||||||
filters: {
|
filters: {
|
||||||
register: filters.registerFilter.bind(filters),
|
register: filters.registerFilter.bind(filters),
|
||||||
unregister: filters.unregisterFilter.bind(filters)
|
deregister: filters.deregisterFilter.bind(filters)
|
||||||
},
|
},
|
||||||
helpers: {
|
helpers: {
|
||||||
register: helpers.registerThemeHelper.bind(helpers),
|
register: helpers.registerThemeHelper.bind(helpers),
|
||||||
|
@ -38,7 +38,7 @@ Filters.prototype.registerFilter = function (name, priority, fn) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Unregister a filter callback function
|
// Unregister a filter callback function
|
||||||
Filters.prototype.unregisterFilter = function (name, priority, fn) {
|
Filters.prototype.deregisterFilter = function (name, priority, fn) {
|
||||||
// Curry the priority optional parameter to a default of 5
|
// Curry the priority optional parameter to a default of 5
|
||||||
if (_.isFunction(priority)) {
|
if (_.isFunction(priority)) {
|
||||||
fn = priority;
|
fn = priority;
|
||||||
|
@ -57,7 +57,7 @@ describe('Apps', function () {
|
|||||||
it('creates a ghost proxy', function () {
|
it('creates a ghost proxy', function () {
|
||||||
should.exist(appProxy.filters);
|
should.exist(appProxy.filters);
|
||||||
should.exist(appProxy.filters.register);
|
should.exist(appProxy.filters.register);
|
||||||
should.exist(appProxy.filters.unregister);
|
should.exist(appProxy.filters.deregister);
|
||||||
|
|
||||||
should.exist(appProxy.helpers);
|
should.exist(appProxy.helpers);
|
||||||
should.exist(appProxy.helpers.register);
|
should.exist(appProxy.helpers.register);
|
||||||
|
Loading…
Reference in New Issue
Block a user