# charitable/1.8.11/assets/js/admin/charitable-admin-utils.js

Charitable – Donation &amp; Fundraising Platform (Donation Forms, Recurring Donations &amp; Fundraising Campaigns), version 1.8.11. 61 lines.

- Page: https://pluginprobe.com/plugins/charitable/1.8.11/code/assets/js/admin/charitable-admin-utils.js
- Raw: https://pluginprobe.com/plugins/charitable/1.8.11/raw/assets/js/admin/charitable-admin-utils.js
- Modified: 2024-10-31T13:33:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/charitable/1.8.11/code/assets/js/admin/charitable-admin-utils.js#L10-L20`.

```javascript
/* eslint-disable no-undef */

// if wpchar is not defined, define it.
if ( typeof wpchar === 'undefined' ) {

    var wpchar = {

        // This file contains a collection of utility functions.

        /**
         * Start the engine.
         *
         * @since 1.0.1
         */
        init: function() {
            jQuery( wpchar.ready );
        },

        /**
         * Document ready.
         *
         * @since 1.0.1
         */
        ready: function() {
        },

        /**
         * Debug output helper.
         *
         * @since 1.3.8
         *
         * @param {string|integer|boolean|Array|object} msg Debug message (any data).
         */
        debug: function( msg, type = '' ) {

            if ( ! wpchar.isDebug() ) {
                return;
            }

            if ( type ) {
                type = '(' + type + ')';
            }

            console.log( '%cCharitable Debug: ' + type, 'color: #cd6622;', msg );
        },

        /**
         * Is debug mode.
         *
         * @since 1.3.8
         */
        isDebug: function() {
            return ( ( window.location.hash && '#charitabledebug' === window.location.hash ) );
        },

    }

wpchar.init();

}

```
