Préparer les éléments

Répétez les opérations présentées au chapitre Créer une extension avec PHP/MySQL.

1. Configurer l’extension

Créez un dossier my-mails dans le dossier plugins, avec un fichier my-mails.php.

Insérez le commentaire d’en-tête suivant, permettant d’afficher les informations sur l’extension, dans l’administration :

<?php 
/* 
Plugin Name: My Mails  
Description: Récupérer des adresses e-mail par un formulaire 
Version: 1.0 
License: GPLv2 
 
This program is free software; you can redistribute it and/or 
modify it under the terms of the GNU General Public License 
as published by the Free Software Foundation; either version 2 
of the License, or (at your option) any later version. 
 
This program is distributed in the hope that it will be useful, 
but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
GNU General Public License for more details. 
 
You should have received a copy of the GNU General Public License 
along with this program; if not, write to the Free Software 
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  
02110-1301, USA. 
 
Copyright {année} {mon_nom} (email : {mon_email}) 
 
*/ 
?> 

Vous devez voir ceci dans l’administration :

images/ei13p04n1.png

Page Extensions, on voit le widget My Mails apparaître...

couv_EI45WOR.png

Découvrez 

le livre :

Aussi inclus dans nos :

Précédent
Introduction
Suivant
Créer le shortcode et l'ajouter au site