Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js
File: wp-api.js
* @param {Object} [args]
[1500] Fix | Delete
* @param {string} [args.nonce] The nonce. Optional, defaults to wpApiSettings.nonce.
[1501] Fix | Delete
* @param {string} [args.apiRoot] The api root. Optional, defaults to wpApiSettings.root.
[1502] Fix | Delete
* @param {string} [args.versionString] The version string. Optional, defaults to wpApiSettings.root.
[1503] Fix | Delete
* @param {Object} [args.schema] The schema. Optional, will be fetched from API if not provided.
[1504] Fix | Delete
*/
[1505] Fix | Delete
wp.api.init = function( args ) {
[1506] Fix | Delete
var endpoint, attributes = {}, deferred, promise;
[1507] Fix | Delete
[1508] Fix | Delete
args = args || {};
[1509] Fix | Delete
attributes.nonce = _.isString( args.nonce ) ? args.nonce : ( wpApiSettings.nonce || '' );
[1510] Fix | Delete
attributes.apiRoot = args.apiRoot || wpApiSettings.root || '/wp-json';
[1511] Fix | Delete
attributes.versionString = args.versionString || wpApiSettings.versionString || 'wp/v2/';
[1512] Fix | Delete
attributes.schema = args.schema || null;
[1513] Fix | Delete
attributes.modelEndpoints = args.modelEndpoints || [ 'me', 'settings' ];
[1514] Fix | Delete
if ( ! attributes.schema && attributes.apiRoot === wpApiSettings.root && attributes.versionString === wpApiSettings.versionString ) {
[1515] Fix | Delete
attributes.schema = wpApiSettings.schema;
[1516] Fix | Delete
}
[1517] Fix | Delete
[1518] Fix | Delete
if ( ! initializedDeferreds[ attributes.apiRoot + attributes.versionString ] ) {
[1519] Fix | Delete
[1520] Fix | Delete
// Look for an existing copy of this endpoint.
[1521] Fix | Delete
endpoint = wp.api.endpoints.findWhere( { 'apiRoot': attributes.apiRoot, 'versionString': attributes.versionString } );
[1522] Fix | Delete
if ( ! endpoint ) {
[1523] Fix | Delete
endpoint = new Endpoint( attributes );
[1524] Fix | Delete
}
[1525] Fix | Delete
deferred = jQuery.Deferred();
[1526] Fix | Delete
promise = deferred.promise();
[1527] Fix | Delete
[1528] Fix | Delete
endpoint.schemaConstructed.done( function( resolvedEndpoint ) {
[1529] Fix | Delete
wp.api.endpoints.add( resolvedEndpoint );
[1530] Fix | Delete
[1531] Fix | Delete
// Map the default endpoints, extending any already present items (including Schema model).
[1532] Fix | Delete
wp.api.models = _.extend( wp.api.models, resolvedEndpoint.get( 'models' ) );
[1533] Fix | Delete
wp.api.collections = _.extend( wp.api.collections, resolvedEndpoint.get( 'collections' ) );
[1534] Fix | Delete
deferred.resolve( resolvedEndpoint );
[1535] Fix | Delete
} );
[1536] Fix | Delete
initializedDeferreds[ attributes.apiRoot + attributes.versionString ] = promise;
[1537] Fix | Delete
}
[1538] Fix | Delete
return initializedDeferreds[ attributes.apiRoot + attributes.versionString ];
[1539] Fix | Delete
};
[1540] Fix | Delete
[1541] Fix | Delete
/**
[1542] Fix | Delete
* Construct the default endpoints and add to an endpoints collection.
[1543] Fix | Delete
*/
[1544] Fix | Delete
[1545] Fix | Delete
// The wp.api.init function returns a promise that will resolve with the endpoint once it is ready.
[1546] Fix | Delete
wp.api.loadPromise = wp.api.init();
[1547] Fix | Delete
[1548] Fix | Delete
} )();
[1549] Fix | Delete
[1550] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function