Last active
September 14, 2015 17:23
-
-
Save erikasarti/d71dcb1ef3298a1d0eb5 to your computer and use it in GitHub Desktop.
Como criar um widget personalizado no dashboard do WordPress
This file contains hidden or 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
// Criar um widget no painel administrativo do WordPress | |
function erikasarti_dashboard_widget_manual() { | |
echo '<p>Olá, este é um widget personalizado.</p>'; | |
echo '<p>Você pode <a href="http://erikasarti.com/" target="_blank">acrescentar um link</a> ou <strong>marcações html</strong> nele.</p>'; | |
} | |
function erikasarti_adiciona_dashboard_widget_manual() { | |
add_meta_box('id', 'Meu widget personalizado', 'erikasarti_dashboard_widget_manual', 'dashboard', 'side', 'high'); | |
} | |
add_action('wp_dashboard_setup', 'erikasarti_adiciona_dashboard_widget_manual' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment