2018-12-13 23:41:57 -05:00
this [ "wp" ] = this [ "wp" ] || { } ; this [ "wp" ] [ "deprecated" ] =
/******/ ( function ( modules ) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = { } ;
/******/
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/
/******/ // Check if module is in cache
/******/ if ( installedModules [ moduleId ] ) {
/******/ return installedModules [ moduleId ] . exports ;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules [ moduleId ] = {
/******/ i : moduleId ,
/******/ l : false ,
/******/ exports : { }
/******/ } ;
/******/
/******/ // Execute the module function
/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , _ _webpack _require _ _ ) ;
/******/
/******/ // Flag the module as loaded
/******/ module . l = true ;
/******/
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ _ _webpack _require _ _ . m = modules ;
/******/
/******/ // expose the module cache
/******/ _ _webpack _require _ _ . c = installedModules ;
/******/
/******/ // define getter function for harmony exports
/******/ _ _webpack _require _ _ . d = function ( exports , name , getter ) {
/******/ if ( ! _ _webpack _require _ _ . o ( exports , name ) ) {
/******/ Object . defineProperty ( exports , name , { enumerable : true , get : getter } ) ;
/******/ }
/******/ } ;
/******/
/******/ // define __esModule on exports
/******/ _ _webpack _require _ _ . r = function ( exports ) {
/******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
/******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
/******/ }
/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
/******/ } ;
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ _ _webpack _require _ _ . t = function ( value , mode ) {
/******/ if ( mode & 1 ) value = _ _webpack _require _ _ ( value ) ;
/******/ if ( mode & 8 ) return value ;
/******/ if ( ( mode & 4 ) && typeof value === 'object' && value && value . _ _esModule ) return value ;
/******/ var ns = Object . create ( null ) ;
/******/ _ _webpack _require _ _ . r ( ns ) ;
/******/ Object . defineProperty ( ns , 'default' , { enumerable : true , value : value } ) ;
/******/ if ( mode & 2 && typeof value != 'string' ) for ( var key in value ) _ _webpack _require _ _ . d ( ns , key , function ( key ) { return value [ key ] ; } . bind ( null , key ) ) ;
/******/ return ns ;
/******/ } ;
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ _ _webpack _require _ _ . n = function ( module ) {
/******/ var getter = module && module . _ _esModule ?
/******/ function getDefault ( ) { return module [ 'default' ] ; } :
/******/ function getModuleExports ( ) { return module ; } ;
/******/ _ _webpack _require _ _ . d ( getter , 'a' , getter ) ;
/******/ return getter ;
/******/ } ;
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ _ _webpack _require _ _ . o = function ( object , property ) { return Object . prototype . hasOwnProperty . call ( object , property ) ; } ;
/******/
/******/ // __webpack_public_path__
/******/ _ _webpack _require _ _ . p = "" ;
/******/
/******/
/******/ // Load entry module and return exports
2021-02-02 00:17:13 -05:00
/******/ return _ _webpack _require _ _ ( _ _webpack _require _ _ . s = 444 ) ;
2018-12-13 23:41:57 -05:00
/******/ } )
/************************************************************************/
/******/ ( {
2021-02-02 00:17:13 -05:00
/***/ 33 :
2018-12-17 22:14:52 -05:00
/***/ ( function ( module , exports ) {
2021-01-27 21:04:13 -05:00
( function ( ) { module . exports = window [ "wp" ] [ "hooks" ] ; } ( ) ) ;
2018-12-17 22:14:52 -05:00
/***/ } ) ,
2021-02-02 00:17:13 -05:00
/***/ 444 :
2018-12-13 23:41:57 -05:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "logged" , function ( ) { return logged ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return deprecated ; } ) ;
2021-02-02 00:17:13 -05:00
/* harmony import */ var _wordpress _hooks _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 33 ) ;
2018-12-13 23:41:57 -05:00
/* harmony import */ var _wordpress _hooks _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _hooks _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/ * *
* WordPress dependencies
* /
/ * *
* Object map tracking messages which have been logged , for use in ensuring a
* message is only logged once .
*
2021-01-27 21:04:13 -05:00
* @ type { Record < string , true | undefined > }
2018-12-13 23:41:57 -05:00
* /
var logged = Object . create ( null ) ;
/ * *
* Logs a message to notify developers about a deprecated feature .
*
2021-01-27 21:04:13 -05:00
* @ param { string } feature Name of the deprecated feature .
* @ param { Object } [ options ] Personalisation options
* @ param { string } [ options . version ] Version in which the feature will be removed .
* @ param { string } [ options . alternative ] Feature to use instead
* @ param { string } [ options . plugin ] Plugin name if it ' s a plugin feature
* @ param { string } [ options . link ] Link to documentation
* @ param { string } [ options . hint ] Additional message to help transition away from the deprecated feature .
2019-03-21 08:48:00 -04:00
*
* @ example
* ` ` ` js
* import deprecated from '@wordpress/deprecated' ;
*
* deprecated ( 'Eating meat' , {
* version : 'the future' ,
* alternative : 'vegetables' ,
* plugin : 'the earth' ,
* hint : 'You may find it beneficial to transition gradually.' ,
* } ) ;
*
* // Logs: 'Eating meat is deprecated and will be removed from the earth in the future. Please use vegetables instead. Note: You may find it beneficial to transition gradually.'
* ` ` `
2018-12-13 23:41:57 -05:00
* /
function deprecated ( feature ) {
var options = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : { } ;
var version = options . version ,
alternative = options . alternative ,
plugin = options . plugin ,
link = options . link ,
hint = options . hint ;
var pluginMessage = plugin ? " from " . concat ( plugin ) : '' ;
2019-09-19 11:19:18 -04:00
var versionMessage = version ? " and will be removed" . concat ( pluginMessage , " in version " ) . concat ( version ) : '' ;
2018-12-13 23:41:57 -05:00
var useInsteadMessage = alternative ? " Please use " . concat ( alternative , " instead." ) : '' ;
var linkMessage = link ? " See: " . concat ( link ) : '' ;
var hintMessage = hint ? " Note: " . concat ( hint ) : '' ;
2019-09-19 11:19:18 -04:00
var message = "" . concat ( feature , " is deprecated" ) . concat ( versionMessage , "." ) . concat ( useInsteadMessage ) . concat ( linkMessage ) . concat ( hintMessage ) ; // Skip if already logged.
2018-12-13 23:41:57 -05:00
if ( message in logged ) {
return ;
}
/ * *
* Fires whenever a deprecated feature is encountered
*
* @ param { string } feature Name of the deprecated feature .
* @ param { ? Object } options Personalisation options
* @ param { ? string } options . version Version in which the feature will be removed .
* @ param { ? string } options . alternative Feature to use instead
* @ param { ? string } options . plugin Plugin name if it ' s a plugin feature
* @ param { ? string } options . link Link to documentation
* @ param { ? string } options . hint Additional message to help transition away from the deprecated feature .
* @ param { ? string } message Message sent to console . warn
* /
Object ( _wordpress _hooks _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "doAction" ] ) ( 'deprecated' , feature , options , message ) ; // eslint-disable-next-line no-console
console . warn ( message ) ;
logged [ message ] = true ;
}
/***/ } )
2018-12-17 22:14:52 -05:00
/******/ } ) [ "default" ] ;