Last active
December 5, 2024 19:23
-
-
Save codigoconjuan/2d85ef01cfb3b06ba0ce4d886ff6a925 to your computer and use it in GitHub Desktop.
Crear un Widget para 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
<?php | |
if(!defined('ABSPATH')) die(); | |
class GymFitness_Clases_Widget extends WP_Widget { | |
function __construct() { | |
parent::__construct( | |
'gymfitness_widget', | |
esc_html__( 'GymFitness Clases', 'gymfitness' ), | |
array( 'description' => esc_html__( 'Agrega las Clases como Widget', 'gymfitness' ), ) | |
); | |
} | |
public function widget( $args, $instance ) { | |
} | |
public function form( $instance ) { | |
} | |
public function update( $new_instance, $old_instance ) { | |
} | |
} | |
function gymfitness_registrar_widget() { | |
register_widget( 'GymFitness_Clases_Widget' ); | |
} | |
add_action( 'widgets_init', 'gymfitness_registrar_widget' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment