Guest User

Untitled

a guest
Jun 21st, 2018
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.20 KB | None | 0 0
  1. add_action( 'after_setup_theme', function () {
  2.     remove_action( 'tgmpa_register', 'mb_aio_load_free_extensions' );
  3. }, 20 );
  4.  
  5. add_action( 'tgmpa_register', function() {
  6.     $plugins = array(
  7.         array(
  8.             'name'     => 'Meta Box',
  9.             'slug'     => 'meta-box',
  10.             'required' => true,
  11.         ),
  12.         // Add more free extensions here
  13.     );
  14.     $config  = array(
  15.         'id'          => 'meta-box-aio',
  16.         'parent_slug' => 'meta-box',
  17.         'strings'     => array(
  18.             'notice_can_install_required'     => _n_noop(
  19.                 // translators: 1: plugin name(s).
  20.                 'The Meta Box AIO plugin requires the following plugin: %1$s.',
  21.                 'The Meta Box AIO plugin requires the following plugins: %1$s.',
  22.                 'meta-box-aio'
  23.             ),
  24.             'notice_can_install_recommended'  => _n_noop(
  25.                 // translators: 1: plugin name(s).
  26.                 'The Meta Box AIO plugin recommends the following plugin: %1$s.',
  27.                 'The Meta Box AIO plugin recommends the following plugins: %1$s.',
  28.                 'meta-box-aio'
  29.             ),
  30.         ),
  31.     );
  32.     tgmpa( $plugins, $config );
  33. } );
Advertisement
Add Comment
Please, Sign In to add comment