• Hola, estoy intentando crear un nuevo plugin, pero no logro activar esta funcion

    <?php
    
    /*
    
    Plugin Name: DM Calculator
    
    Plugin URI:
    
    Description: Calculo del tipo de cambio para sitio web.
    
    Version: 1.0
    
    Author: Daniel Manchego
    
    Author URI: https://la520.pe
    
    Text Domain: dm-calculator
    
    License: GPLv2
    
    */
    
    function Activar()
    
    {}
    
    fuction Desactivar()
    
    {}
    
    function Borrar()
    
    {}
    
    register_activation_hook( __FILE__, 'Activar' );
    
    register_deactivation_hook( __FILE__, 'Desactivar' );
    
    add_action('admin_menu','CrearMenu');
    
    function CrearMenu(){
    
    ? ? add_menu_page(
    
    ? ? ? ? 'DM Calculador', //titulo de la pagina
    
    ? ? ? ? 'Menu de Calculadora', //titulo del menu
    
    ? ? ? ? 'manage_options', //capability
    
    ? ? ? ? 'dmcalc-menu', //slug o prefijo
    
    ? ? ? ? 'MostrarContenido',
    
    ? ? ? ? plugin_dir_url(__FILE__).'admin/img/icon.png',
    
    ? ? ? ? '1' ? ? ? ?
    
    ? ? );
    
    }
    
    function MostrarContenido(){
    
    ? ? echo ("<h1>Menu menu menu</h1>");
    
    }

    Could you help me, please?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘El plugin no ha podido activarse porque ha provocado un error fatal.’ is closed to new replies.