Multisite: Move site-specific metadata integrations from the wrapper functions to the low-level Meta API functions.
This complements the work in [43729] and prepares site metadata for future REST API support. Props spacedmonkey. Fixes #45091. See #44467. git-svn-id: https://develop.svn.wordpress.org/trunk@44468 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4657735ba6
commit
5fdfac40f2
134
package-lock.json
generated
134
package-lock.json
generated
@ -1291,7 +1291,7 @@
|
||||
},
|
||||
"lodash": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "http://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
|
||||
"integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
|
||||
"dev": true
|
||||
}
|
||||
@ -1322,7 +1322,7 @@
|
||||
},
|
||||
"archiver": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "http://registry.npmjs.org/archiver/-/archiver-1.3.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/archiver/-/archiver-1.3.0.tgz",
|
||||
"integrity": "sha1-TyGU1tj5nfP1MeaIHxTxXVX6ryI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -2201,7 +2201,7 @@
|
||||
},
|
||||
"bin-build": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "http://registry.npmjs.org/bin-build/-/bin-build-2.2.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/bin-build/-/bin-build-2.2.0.tgz",
|
||||
"integrity": "sha1-EfjdYfcP/Por3KpbRvXo/t1CIcw=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -2247,7 +2247,7 @@
|
||||
},
|
||||
"bin-version": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "http://registry.npmjs.org/bin-version/-/bin-version-1.0.4.tgz",
|
||||
"resolved": "https://registry.npmjs.org/bin-version/-/bin-version-1.0.4.tgz",
|
||||
"integrity": "sha1-nrSY7m/Xb3q5p8FgQ2+JV5Q1144=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -2257,7 +2257,7 @@
|
||||
},
|
||||
"bin-version-check": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "http://registry.npmjs.org/bin-version-check/-/bin-version-check-2.1.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-2.1.0.tgz",
|
||||
"integrity": "sha1-5OXfKQuQaffRETJAMe/BP90RpbA=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -2270,7 +2270,7 @@
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "4.3.6",
|
||||
"resolved": "http://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
|
||||
"integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
@ -2279,7 +2279,7 @@
|
||||
},
|
||||
"bin-wrapper": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "http://registry.npmjs.org/bin-wrapper/-/bin-wrapper-3.0.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-3.0.2.tgz",
|
||||
"integrity": "sha1-Z9MwYmLksaXy+I7iNGT2plVneus=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -2501,7 +2501,7 @@
|
||||
},
|
||||
"browserify-rsa": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
|
||||
"integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -2755,7 +2755,7 @@
|
||||
},
|
||||
"camelcase-keys": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
|
||||
"integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -2834,7 +2834,7 @@
|
||||
},
|
||||
"chalk": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||
"requires": {
|
||||
"ansi-styles": "^2.2.1",
|
||||
@ -3332,7 +3332,7 @@
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "http://registry.npmjs.org/commander/-/commander-2.8.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz",
|
||||
"integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3965,7 +3965,7 @@
|
||||
},
|
||||
"cson-parser": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "http://registry.npmjs.org/cson-parser/-/cson-parser-1.3.5.tgz",
|
||||
"resolved": "https://registry.npmjs.org/cson-parser/-/cson-parser-1.3.5.tgz",
|
||||
"integrity": "sha1-fsZ14DkUVTO/KmqFYHPxWZ2cLSQ=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -4709,7 +4709,7 @@
|
||||
"dependencies": {
|
||||
"domelementtype": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
|
||||
"integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=",
|
||||
"dev": true
|
||||
},
|
||||
@ -4905,7 +4905,7 @@
|
||||
},
|
||||
"entities": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "http://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
|
||||
"integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=",
|
||||
"dev": true
|
||||
},
|
||||
@ -5025,7 +5025,7 @@
|
||||
},
|
||||
"eventemitter2": {
|
||||
"version": "0.4.14",
|
||||
"resolved": "http://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz",
|
||||
"resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz",
|
||||
"integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=",
|
||||
"dev": true
|
||||
},
|
||||
@ -5042,7 +5042,7 @@
|
||||
},
|
||||
"events": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "http://registry.npmjs.org/events/-/events-1.1.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
|
||||
"integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=",
|
||||
"dev": true
|
||||
},
|
||||
@ -5179,7 +5179,7 @@
|
||||
},
|
||||
"expand-range": {
|
||||
"version": "1.8.2",
|
||||
"resolved": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
|
||||
"integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -5517,7 +5517,7 @@
|
||||
},
|
||||
"find-versions": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "http://registry.npmjs.org/find-versions/-/find-versions-1.2.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/find-versions/-/find-versions-1.2.1.tgz",
|
||||
"integrity": "sha1-y96fEuOFdaCvG+G5osXV/Y8Ya2I=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -5540,7 +5540,7 @@
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "http://registry.npmjs.org/commander/-/commander-2.1.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.1.0.tgz",
|
||||
"integrity": "sha1-0SG7roYNmZKj1Re6lvVliOR8Z4E=",
|
||||
"dev": true
|
||||
}
|
||||
@ -5771,14 +5771,12 @@
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
@ -5793,20 +5791,17 @@
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
@ -5923,8 +5918,7 @@
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
@ -5936,7 +5930,6 @@
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
@ -5951,7 +5944,6 @@
|
||||
"version": "3.0.4",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
@ -5959,14 +5951,12 @@
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.2.4",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.1",
|
||||
"yallist": "^3.0.0"
|
||||
@ -5985,7 +5975,6 @@
|
||||
"version": "0.5.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
@ -6066,8 +6055,7 @@
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
@ -6079,7 +6067,6 @@
|
||||
"version": "1.4.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
@ -6201,7 +6188,6 @@
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
@ -6363,7 +6349,7 @@
|
||||
},
|
||||
"get-stream": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
|
||||
},
|
||||
"get-value": {
|
||||
@ -6398,7 +6384,7 @@
|
||||
},
|
||||
"gifsicle": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "http://registry.npmjs.org/gifsicle/-/gifsicle-3.0.4.tgz",
|
||||
"resolved": "https://registry.npmjs.org/gifsicle/-/gifsicle-3.0.4.tgz",
|
||||
"integrity": "sha1-9Fy17RAWW2ZdySng6TKLbIId+js=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -6654,7 +6640,7 @@
|
||||
},
|
||||
"got": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "http://registry.npmjs.org/got/-/got-5.7.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/got/-/got-5.7.1.tgz",
|
||||
"integrity": "sha1-X4FjWmHkplifGAVp6k44FoClHzU=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -6901,7 +6887,7 @@
|
||||
},
|
||||
"grunt-contrib-uglify": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "http://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-2.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-2.0.0.tgz",
|
||||
"integrity": "sha1-jJlw1pCTbN5tJaoRk1Sb2SkBaTA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -7506,7 +7492,7 @@
|
||||
},
|
||||
"handle-thing": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "http://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz",
|
||||
"resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz",
|
||||
"integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=",
|
||||
"dev": true
|
||||
},
|
||||
@ -7813,7 +7799,7 @@
|
||||
},
|
||||
"htmlparser2": {
|
||||
"version": "3.8.3",
|
||||
"resolved": "http://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz",
|
||||
"integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -7832,7 +7818,7 @@
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "1.1.14",
|
||||
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -7844,7 +7830,7 @@
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "0.10.31",
|
||||
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
||||
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
|
||||
"dev": true
|
||||
}
|
||||
@ -8591,7 +8577,7 @@
|
||||
},
|
||||
"is-builtin-module": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
|
||||
"integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -8715,7 +8701,7 @@
|
||||
},
|
||||
"is-gif": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "http://registry.npmjs.org/is-gif/-/is-gif-1.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/is-gif/-/is-gif-1.0.0.tgz",
|
||||
"integrity": "sha1-ptKumIkwB7/6l6HYwB1jIFgyCX4=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
@ -8759,7 +8745,7 @@
|
||||
},
|
||||
"is-obj": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
|
||||
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
|
||||
"dev": true
|
||||
},
|
||||
@ -8989,7 +8975,7 @@
|
||||
},
|
||||
"jpegtran-bin": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "http://registry.npmjs.org/jpegtran-bin/-/jpegtran-bin-3.2.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/jpegtran-bin/-/jpegtran-bin-3.2.0.tgz",
|
||||
"integrity": "sha1-9g7PSumZwL2tLp+83ytvCYHnops=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -9192,12 +9178,12 @@
|
||||
},
|
||||
"json5": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
|
||||
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE="
|
||||
},
|
||||
"jsonfile": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
||||
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -9260,7 +9246,7 @@
|
||||
},
|
||||
"lazy-req": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "http://registry.npmjs.org/lazy-req/-/lazy-req-1.1.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/lazy-req/-/lazy-req-1.1.0.tgz",
|
||||
"integrity": "sha1-va6+rTD42CQDnODOFJ1Nqge6H6w=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
@ -9297,7 +9283,7 @@
|
||||
},
|
||||
"load-json-file": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
|
||||
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -10024,7 +10010,7 @@
|
||||
},
|
||||
"media-typer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
|
||||
"dev": true
|
||||
},
|
||||
@ -10056,7 +10042,7 @@
|
||||
},
|
||||
"meow": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
|
||||
"integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -10292,7 +10278,7 @@
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
@ -10395,7 +10381,7 @@
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "1.1.14",
|
||||
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -10407,7 +10393,7 @@
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "0.10.31",
|
||||
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
||||
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
|
||||
"dev": true
|
||||
}
|
||||
@ -10829,7 +10815,7 @@
|
||||
},
|
||||
"node-status-codes": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "http://registry.npmjs.org/node-status-codes/-/node-status-codes-1.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/node-status-codes/-/node-status-codes-1.0.0.tgz",
|
||||
"integrity": "sha1-WuVUHQJGRdMqWPzdyc7s6nrjrC8=",
|
||||
"dev": true
|
||||
},
|
||||
@ -11231,7 +11217,7 @@
|
||||
},
|
||||
"os-tmpdir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
|
||||
},
|
||||
"osenv": {
|
||||
@ -11432,7 +11418,7 @@
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
|
||||
},
|
||||
"path-is-inside": {
|
||||
@ -13783,7 +13769,7 @@
|
||||
},
|
||||
"shelljs": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "http://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz",
|
||||
"integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=",
|
||||
"dev": true
|
||||
},
|
||||
@ -14490,7 +14476,7 @@
|
||||
},
|
||||
"stream-browserify": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "http://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
|
||||
"integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -14641,7 +14627,7 @@
|
||||
},
|
||||
"strip-dirs": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "http://registry.npmjs.org/strip-dirs/-/strip-dirs-1.1.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-1.1.1.tgz",
|
||||
"integrity": "sha1-lgu9EoeETzl1pFWKoQOoJV4kVqA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -14655,7 +14641,7 @@
|
||||
},
|
||||
"strip-eof": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
|
||||
},
|
||||
"strip-indent": {
|
||||
@ -14964,13 +14950,13 @@
|
||||
},
|
||||
"through": {
|
||||
"version": "2.3.8",
|
||||
"resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
|
||||
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
|
||||
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
|
||||
"dev": true
|
||||
},
|
||||
"through2": {
|
||||
"version": "0.6.5",
|
||||
"resolved": "http://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
|
||||
"resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
|
||||
"integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -14986,7 +14972,7 @@
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "1.0.34",
|
||||
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
|
||||
"integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -14998,7 +14984,7 @@
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "0.10.31",
|
||||
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
||||
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
|
||||
"dev": true
|
||||
}
|
||||
@ -16548,7 +16534,7 @@
|
||||
},
|
||||
"wrap-ansi": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
|
||||
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
|
||||
"requires": {
|
||||
"string-width": "^1.0.1",
|
||||
@ -16572,7 +16558,7 @@
|
||||
},
|
||||
"xmlbuilder": {
|
||||
"version": "8.2.2",
|
||||
"resolved": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz",
|
||||
"integrity": "sha1-aSSGc0ELS6QuGmE2VR0pIjNap3M=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -1329,5 +1329,5 @@ function populate_site_meta( $site_id, array $meta = array() ) {
|
||||
|
||||
$wpdb->query( "INSERT INTO $wpdb->blogmeta ( blog_id, meta_key, meta_value ) VALUES " . $insert ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
|
||||
|
||||
wp_cache_set( 'last_changed', microtime(), 'sites' );
|
||||
wp_cache_set_sites_last_changed();
|
||||
}
|
||||
|
@ -756,10 +756,6 @@ function update_site_cache( $sites, $update_meta_cache = true ) {
|
||||
* @return array|false Returns false if there is nothing to update. Returns an array of metadata on success.
|
||||
*/
|
||||
function update_sitemeta_cache( $site_ids ) {
|
||||
if ( ! is_site_meta_supported() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return update_meta_cache( 'blog', $site_ids );
|
||||
}
|
||||
|
||||
@ -1475,21 +1471,7 @@ function update_blog_option( $id, $option, $value, $deprecated = null ) {
|
||||
* @return int|false Meta ID on success, false on failure.
|
||||
*/
|
||||
function add_site_meta( $site_id, $meta_key, $meta_value, $unique = false ) {
|
||||
// Bail if site meta table is not installed.
|
||||
if ( ! is_site_meta_supported() ) {
|
||||
/* translators: %s: database table name */
|
||||
_doing_it_wrong( __FUNCTION__, sprintf( __( 'The %s table is not installed. Please run the network database upgrade.' ), $GLOBALS['wpdb']->blogmeta ), '5.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
$added = add_metadata( 'blog', $site_id, $meta_key, $meta_value, $unique );
|
||||
|
||||
// Bust site query cache.
|
||||
if ( $added ) {
|
||||
wp_cache_set( 'last_changed', microtime(), 'sites' );
|
||||
}
|
||||
|
||||
return $added;
|
||||
return add_metadata( 'blog', $site_id, $meta_key, $meta_value, $unique );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1508,21 +1490,7 @@ function add_site_meta( $site_id, $meta_key, $meta_value, $unique = false ) {
|
||||
* @return bool True on success, false on failure.
|
||||
*/
|
||||
function delete_site_meta( $site_id, $meta_key, $meta_value = '' ) {
|
||||
// Bail if site meta table is not installed.
|
||||
if ( ! is_site_meta_supported() ) {
|
||||
/* translators: %s: database table name */
|
||||
_doing_it_wrong( __FUNCTION__, sprintf( __( 'The %s table is not installed. Please run the network database upgrade.' ), $GLOBALS['wpdb']->blogmeta ), '5.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
$deleted = delete_metadata( 'blog', $site_id, $meta_key, $meta_value );
|
||||
|
||||
// Bust site query cache.
|
||||
if ( $deleted ) {
|
||||
wp_cache_set( 'last_changed', microtime(), 'sites' );
|
||||
}
|
||||
|
||||
return $deleted;
|
||||
return delete_metadata( 'blog', $site_id, $meta_key, $meta_value );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1538,13 +1506,6 @@ function delete_site_meta( $site_id, $meta_key, $meta_value = '' ) {
|
||||
* field if $single is true.
|
||||
*/
|
||||
function get_site_meta( $site_id, $key = '', $single = false ) {
|
||||
// Bail if site meta table is not installed.
|
||||
if ( ! is_site_meta_supported() ) {
|
||||
/* translators: %s: database table name */
|
||||
_doing_it_wrong( __FUNCTION__, sprintf( __( 'The %s table is not installed. Please run the network database upgrade.' ), $GLOBALS['wpdb']->blogmeta ), '5.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
return get_metadata( 'blog', $site_id, $key, $single );
|
||||
}
|
||||
|
||||
@ -1567,21 +1528,7 @@ function get_site_meta( $site_id, $key = '', $single = false ) {
|
||||
* false on failure.
|
||||
*/
|
||||
function update_site_meta( $site_id, $meta_key, $meta_value, $prev_value = '' ) {
|
||||
// Bail if site meta table is not installed.
|
||||
if ( ! is_site_meta_supported() ) {
|
||||
/* translators: %s: database table name */
|
||||
_doing_it_wrong( __FUNCTION__, sprintf( __( 'The %s table is not installed. Please run the network database upgrade.' ), $GLOBALS['wpdb']->blogmeta ), '5.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
$updated = update_metadata( 'blog', $site_id, $meta_key, $meta_value, $prev_value );
|
||||
|
||||
// Bust site query cache.
|
||||
if ( $updated ) {
|
||||
wp_cache_set( 'last_changed', microtime(), 'sites' );
|
||||
}
|
||||
|
||||
return $updated;
|
||||
return update_metadata( 'blog', $site_id, $meta_key, $meta_value, $prev_value );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1593,21 +1540,7 @@ function update_site_meta( $site_id, $meta_key, $meta_value, $prev_value = '' )
|
||||
* @return bool Whether the site meta key was deleted from the database.
|
||||
*/
|
||||
function delete_site_meta_by_key( $meta_key ) {
|
||||
// Bail if site meta table is not installed.
|
||||
if ( ! is_site_meta_supported() ) {
|
||||
/* translators: %s: database table name */
|
||||
_doing_it_wrong( __FUNCTION__, sprintf( __( 'The %s table is not installed. Please run the network database upgrade.' ), $GLOBALS['wpdb']->blogmeta ), '5.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
$deleted = delete_metadata( 'blog', null, $meta_key, '', true );
|
||||
|
||||
// Bust site query cache.
|
||||
if ( $deleted ) {
|
||||
wp_cache_set( 'last_changed', microtime(), 'sites' );
|
||||
}
|
||||
|
||||
return $deleted;
|
||||
return delete_metadata( 'blog', null, $meta_key, '', true );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2309,3 +2242,32 @@ function wp_update_blog_public_option_on_site_update( $site_id, $public ) {
|
||||
|
||||
update_blog_option( $site_id, 'blog_public', $public );
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the last changed time for the 'sites' cache group.
|
||||
*
|
||||
* @since 5.1.0
|
||||
*/
|
||||
function wp_cache_set_sites_last_changed() {
|
||||
wp_cache_set( 'last_changed', microtime(), 'sites' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Aborts calls to site meta if it is not supported.
|
||||
*
|
||||
* @since 5.1.0
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @param mixed $check Skip-value for whether to proceed site meta function execution.
|
||||
* @return mixed Original value of $check, or false if site meta is not supported.
|
||||
*/
|
||||
function wp_check_site_meta_support_prefilter( $check ) {
|
||||
if ( ! is_site_meta_supported() ) {
|
||||
/* translators: %s: database table name */
|
||||
_doing_it_wrong( __FUNCTION__, sprintf( __( 'The %s table is not installed. Please run the network database upgrade.' ), $GLOBALS['wpdb']->blogmeta ), '5.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
return $check;
|
||||
}
|
||||
|
@ -53,6 +53,19 @@ add_action( 'wp_initialize_site', 'newblog_notify_siteadmin', 100, 1 );
|
||||
add_action( 'wp_uninitialize_site', 'wp_uninitialize_site', 10, 1 );
|
||||
add_action( 'update_blog_public', 'wp_update_blog_public_option_on_site_update', 1, 2 );
|
||||
|
||||
// Site meta
|
||||
add_action( 'added_blog_meta', 'wp_cache_set_sites_last_changed' );
|
||||
add_action( 'updated_blog_meta', 'wp_cache_set_sites_last_changed' );
|
||||
add_action( 'deleted_blog_meta', 'wp_cache_set_sites_last_changed' );
|
||||
add_filter( 'get_blog_metadata', 'wp_check_site_meta_support_prefilter' );
|
||||
add_filter( 'add_blog_metadata', 'wp_check_site_meta_support_prefilter' );
|
||||
add_filter( 'update_blog_metadata', 'wp_check_site_meta_support_prefilter' );
|
||||
add_filter( 'delete_blog_metadata', 'wp_check_site_meta_support_prefilter' );
|
||||
add_filter( 'get_blog_metadata_by_mid', 'wp_check_site_meta_support_prefilter' );
|
||||
add_filter( 'update_blog_metadata_by_mid', 'wp_check_site_meta_support_prefilter' );
|
||||
add_filter( 'delete_blog_metadata_by_mid', 'wp_check_site_meta_support_prefilter' );
|
||||
add_filter( 'update_blog_metadata_cache', 'wp_check_site_meta_support_prefilter' );
|
||||
|
||||
// Register Nonce
|
||||
add_action( 'signup_hidden_fields', 'signup_nonce_fields' );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user