• Hi,
    Following the Plugin API/Action Reference/admin head-(plugin page), i try to use a javascript file in my plugin, but it didn’t work, because i can’t add the javascript line in the head…

    I use this:

    add_action( 'admin_head-'.add_submenu_page($dir_socioswp.$fich_opciones, 'Añadir Socios', 'Añadir Socios', 'add_users', $dir_socioswp.$fich_anyadir_socios), 'admin_header_calendar_socioswp' );
    
    function admin_header_calendar_socioswp(){//Header necesario para el  datapicker del calendario
    		echo '<script language="javascript" src="bibliotecas/calendar/calendar.js"></script>';
    	}

    What are i’m doing wrong?

    A lot of thanks.

    P.S.: All that i do with my first plugin works, but i didn’t known what happen with this simple add_action…

The topic ‘Problem with "admin head-xxx"’ is closed to new replies.