Sindbad~EG File Manager

Current Path : /proc/142261/cwd/plugins/redux-framework/redux-core/assets/js/redux/
Upload File :
Current File : //proc/142261/cwd/plugins/redux-framework/redux-core/assets/js/redux/redux-hook.js

/* jshint unused:false */

function redux_hook( object, functionName, callback, before ) {
	'use strict';

	(function ( originalFunction ) {
		object[functionName] = function () {
			let returnValue;

			if ( true === before ) {
				callback.apply( this, [returnValue, originalFunction, arguments] );
			}

			returnValue = originalFunction.apply( this, arguments );

			if ( true !== before ) {
				callback.apply( this, [returnValue, originalFunction, arguments] );
			}

			return returnValue;
		};
	}( object[functionName] ) );
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists