Last active
July 29, 2017 15:40
-
-
Save deryckoe/25033fd269f300eff1452e67bef5305c to your computer and use it in GitHub Desktop.
Agrega un Widget de contacto al Dashboard de WordPress
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 | |
/** | |
* Agrega un Widget de contacto al Dashboard de WordPress | |
*/ | |
function wpe_add_dashboard_widgets() { | |
wp_add_dashboard_widget( 'dashboard_custom_contact', 'Contáctanos', 'wpe_contact_widget' ); | |
} | |
/** | |
* Incrusta un formulario de Google en un widget | |
*/ | |
function wpe_contact_widget() { | |
echo '<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSdrw0GevFORnLcWU6IDcIBXLf0LcpJNfQI_fxykqgh5vDb0Yg/viewform?embedded=true" width="100%" height="700" frameborder="0" marginheight="0" marginwidth="0">Cargando…</iframe>'; | |
} | |
add_action('wp_dashboard_setup', 'wpe_add_dashboard_widgets'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment