Skip to content

Instantly share code, notes, and snippets.

@ohyeahdev
Created March 27, 2019 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohyeahdev/94c644dff7fc7051602f54724beebcff to your computer and use it in GitHub Desktop.
Save ohyeahdev/94c644dff7fc7051602f54724beebcff to your computer and use it in GitHub Desktop.
<?php
/**
* Añadir widgets al escritorio de administración
*
* @package Dashboard Widgets
* @author Oh! Yeah Dev
* @copyright 2019 Oh! Yeah Dev
* @license GPL-2.0+
*
* @wordpress-plugin
* Plugin Name: Funciones Dashboard Widgets
* Plugin URI: https://ohyeahdev.com
* Description: Añadir widgets al escritorio de administración.
* Version: 1.0
* Author: Oh! Yeah Dev
* Author URI: https://ohyeahdev.com
* Text Domain: ohyeahdev
* Domain Path: /languages
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*
* Prefix: ohy
*/
add_action( 'wp_dashboard_setup', 'oh_yeah_add_dashboard_widgets' );
function oh_yeah_add_dashboard_widgets() {
wp_add_dashboard_widget(
'wp-live', // Widget slug.
'Develotips de WP-Live', // Title.
'oh_yeah_widget' // Display function.
);
}
function oh_yeah_widget() {
echo '<h1>Hola WP-LIVE</h1>';
echo '<a href="https://wplive.es">Vis&iacute;tanos</a>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment