Created
July 29, 2017 15:41
-
-
Save deryckoe/c9432b51228556d24fad4f495d06e3b5 to your computer and use it in GitHub Desktop.
Agrega un video 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 video al Dashboard de WordPress | |
*/ | |
function wpe_add_dashboard_widgets() { | |
wp_add_dashboard_widget( 'dashboard_custom_videos', 'Aprende a utilizar tu sitio web', 'wpe_videos_widget' ); //add new RSS feed output | |
} | |
/** | |
* Toma un video de Yotube y lo muestra en el widget | |
*/ | |
function wpe_videos_widget() { | |
echo apply_filters( 'the_content', 'https://youtu.be/KiS8rZBeIO0' ); | |
} | |
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