Created
June 21, 2018 06:08
-
-
Save AndreaBarghigiani/b2cf08303e0a3bb275db5ea0f551c792 to your computer and use it in GitHub Desktop.
Codice di esempio per la creazione di una widget WordPress utilizzato nella pagina di definizione del termine API: https://skillsandmore.org/glossario/api/
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 // Inserito soltanto per la colorazione della sintassi | |
class SAM_Widget extends WP_Widget{ | |
public function __construct(){ | |
// Cosa impostare durante l'inizializzazione della widget | |
} | |
public function widget(){ | |
// Mostra il contenuto della widget | |
} | |
public function form(){ | |
// Mostra il modulo delle opzioni nella bacheca | |
} | |
public function update( $new_instance, $old_instance ){ | |
// Gestisce il salvataggio delle opzioni | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment