Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Unminified Javascript


  • qwertyzw
    Participant

    @qwertyzw

    How do I get buddypress to serve the unmified javascript for development/debugging purposes?

Viewing 4 replies - 1 through 4 (of 4 total)

  • Henry Wright
    Moderator

    @henrywright

    You can dequeue a minified script with wp_dequeue_script() and then enqueue the non-minified version with wp_enqueue_script().

    Ref


    qwertyzw
    Participant

    @qwertyzw

    Thanks, this hack didn’t work out the way I hoped though.

    I did manage to successfully swap out the .min.js with the .js but buddypress is exhibiting broken behaviour.

    To be specific I’m swapping out bp-cover-image.min.js and bp-plupload.min.js with their unminified equivalents, and that’s breaking the cover photo step in group creation.

    add_action('wp_enqueue_scripts', function () {
        /*
         * Unminified js breaking cover photo
         */
        wp_dequeue_script('bp-plupload');
        wp_enqueue_script('bp-pluploadz',    plugins_url() . '/buddypress/bp-core/js/bp-plupload.js');
    
        wp_dequeue_script('bp-cover-image');
        wp_enqueue_script('bp-cover-imagez', plugins_url() . '/buddypress/bp-core/js/cover-image.js');
    
    }, 100);

    shanebp
    Moderator

    @shanebp

    Try using define( 'SCRIPT_DEBUG', true ); in your wp-config file.


    qwertyzw
    Participant

    @qwertyzw

    That did the trick. Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Unminified Javascript’ is closed to new replies.
Skip to toolbar