bueltge / multisite-global-media

Share a media library across the WordPress Multisite network
GNU General Public License v2.0
216 stars 51 forks source link

add theme support for Customizer Image Control #90

Open studiolxv opened 5 years ago

studiolxv commented 5 years ago

It appears the Global Media gallery not populating on customizer image uploads pop up dialogs.

studiolxv commented 5 years ago

Solved: Just enqueue the .js on the customize.php

// Add Global Media Gallery JS to Customize.php
function add_multisite_global_media_to_customizer() {
    wp_register_script( 'multisite_global_media', '/wp-content/plugins/multisite-global-media/assets/js/global-media.js', array('jquery'),'1.1', true );
    wp_enqueue_script( 'multisite_global_media' );
}
add_action( 'customize_controls_print_footer_scripts', 'add_multisite_global_media_to_customizer' );`
bueltge commented 5 years ago

Thanks - added top the wiki https://github.com/bueltge/multisite-global-media/wiki

widoz commented 5 years ago

@bueltge Cannot we enqueue the script as @studiolxv suggested? I can create a pull request in case.

bueltge commented 5 years ago

@widoz Why not, sure. Currently I have no time for work on the plugin. However I would create a new version, include release script to makes much easier for user to use them without composer knowledge and improve the readme.