Created
July 6, 2017 10:49
-
-
Save maugelves/4d11e004f87fb448d1465e9b67e052d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 1. Declaro el include a la librería TGM Plugin Activation | |
include_once __DIR__ . "/inc/lib/class-tgm-plugin-activation.php"; | |
/** | |
* 2. En la acción 'tgmpa_register' declaro las dependencias del plugin | |
* siguiendo las pautas de la documentación oficial: | |
* http://tgmpluginactivation.com/configuration/ | |
*/ | |
function crear_depedendencia_de_plugin() { | |
// Array con dependencias de plugins | |
$plugins = array( | |
array( | |
'name' => 'Advanced Custom Fields', // El nombre del plugin. | |
'slug' => 'advanced-custom-fields', // El slug del plugin (normalmente el nombre de la carpeta). | |
'required' => true, // En caso de no estar instalado generará un enlace para descargarlo. | |
), | |
); | |
tgmpa( $plugins ); | |
} | |
add_action( 'tgmpa_register', 'crear_depedendencia_de_plugin' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment