2017 © Pedro PelĆ”ez
 

wordpress-muplugin multisite-global-media

Multisite Global Media is a WordPress plugin which shares media across the Multisite network.

image

bueltge/multisite-global-media

Multisite Global Media is a WordPress plugin which shares media across the Multisite network.

  • Wednesday, July 4, 2018
  • by bueltge
  • Repository
  • 4 Watchers
  • 34 Stars
  • 69 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 9 Forks
  • 3 Open issues
  • 5 Versions
  • 667 % Grown

The README.md

Multisite Global Media

Build Status Scrutinizer Code Quality Php Min Version MIT License, (*1)

Multisite Global Media is a WordPress plugin that shares media across the Multisite network., (*2)

Description

This small plugin adds a new tab to the media library, which allows you to share media from one site to all the other sites of the network. By default, the Site ID is set to '1'. You can set/change this Site ID via the filter hook global_media.site_id which is run in a custom plugin like so, (*3)

php add_filter( 'global_media.site_id', function() { return 1234; } );, (*4)

To get Global Media to work, please follow these steps:, (*5)

  1. Decide which blog/site will host the shared media for the network.
  2. Add media to the media library for the chosen blog/site.
  3. Find the Site ID of your chosen site by going to your Network WP Admin. In the left-hand menu, choose "All Sites", and then click on "edit" under the site you need. In the address bar, you will see site-info.php?id=4 where the last number is the ID.

Finding the site ID, (*6)

  1. If the Site ID of your chosen site is '1', then you don't need to make any changes. If it's a different ID number, then please read the section below about modifying the Site ID via hook and a custom plugin.

Note: A useful enhancement in the Multisite context is the plugin Multisite Enhancement. It also helps to identify the site and get his site ID., (*7)

Set your Site ID for the Global Mediathek

If you need to change the default Site ID '1' to another value, then you can do so by creating a small custom plugin., (*8)

  1. In /wp-content/mu-plugins/ create a new folder mgm-set-my-site-id.
  2. In /wp-content/mu-plugins/mgm-set-my-site-id/ create a new file mgm-set-my-site-id.php.
  3. Add the following content to 'my-plugin.php'. Change the return value to your chosen Site ID., (*9)

    ```php <?php /**, (*10)

    • Plugin Name: Multisite Global Media Site ID
    • Plugin URI: https://github.com/bueltge/multisite-global-media/
    • Description: Set my Multisite Global Media site in the network.
    • Version: 1.0.0
    • Network: true */

add_filter( 'global_media.site_id', function() { return 1234; } );, (*11)


4. Activation is not necessary if you store this plugin inside the [Must Use Plugin](https://codex.wordpress.org/Must_Use_Plugins) directory /wp-content/mu-plugins/. ## Installation ### Manual * Download the plugin as zip (available inside the [release](https://github.com/bueltge/multisite-global-media/releases)), use a clone of the repo or use Composer, see below. * Install the plugin in your environment, recommend as [Must Use plugin](https://codex.wordpress.org/Must_Use_Plugins). * Optional: See here for a quick [hint](https://github.com/bueltge/must-use-loader) for a helping solution [Must Use Loader](https://github.com/bueltge/must-use-loader). This plugin is not necessary, but helpful if you use more as one plugin as Must Use plugin and use it in sub-directories. * Set the Site ID for the Global Media Library, see above the description to change the ID with a hook in a custom plugin. * Active the plugin for the whole network if you don't store it as Must Use Plugin. ### Composer The plugin is also available as [Composer package](https://packagist.org/packages/bueltge/multisite-global-media). ```bash composer require bueltge/multisite-global-media

Screenshots

Media Modal, (*12)

Usage in Featured Image, (*13)

Contributing

Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated., (*14)

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Other Notes

Crafted by Inpsyde Ā· Engineering the web since 2006.

Bugs, technical hints or contribute

Please give me feedback, contribute and file technical bugs on this GitHub Repo, use Issues., (*15)

License

Good news, this plugin is free for everyone! Since it's released under the GPLv2+., (*16)

Contact & Feedback

The plugin is designed and developed by team members from the Inpsyde crew. Special thanks and praise to Dominik Schilling and Guido Scialfa for his help and engagement., (*17)

Please let me know if you like the plugin or you hate it or whatever., (*18)

Please fork it and improve the plugin. However, see the Contributing note above. Add an issue for ideas and bugs. Also, we say thank you for improvements in the documentation and help in the support., (*19)

Disclaimer

We don't speak the English language natively, and maybe it might be gruesome here and there. So please be patient with me and let me know of typos or grammatical errors. Thank you!, (*20)

The Versions

04/07 2018

dev-master

9999999-dev https://github.com/bueltge/Multisite-Global-Media

Multisite Global Media is a WordPress plugin which shares media across the Multisite network.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin wordpress multisite muplugin

04/07 2018

0.0.5

0.0.5.0 https://github.com/bueltge/Multisite-Global-Media

Multisite Global Media is a WordPress plugin which shares media across the Multisite network.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin wordpress multisite muplugin

23/04 2018

dev-#13

dev-#13 https://github.com/bueltge/Multisite-Global-Media

Multisite Global Media is a WordPress plugin which shares media across the Multisite network.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin wordpress multisite

15/02 2018

0.0.4

0.0.4.0 https://github.com/bueltge/Multisite-Global-Media

Multisite Global Media is a WordPress plugin which shares media across the Multisite network.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin wordpress multisite

01/12 2017

0.0.3

0.0.3.0 https://github.com/bueltge/Multisite-Global-Media

Multisite Global Media is a WordPress plugin which shares media across the Multisite network.

  Sources   Download

MIT

The Requires

 

plugin wordpress multisite