Last active
August 29, 2015 14:01
-
-
Save igmoweb/34b625214dae88dc220c to your computer and use it in GitHub Desktop.
Creando secciones
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 | |
class WC_Settings_Hola_Dolly extends WC_Settings_Page { | |
public function __construct() { | |
$this->id = 'hola-dolly'; | |
$this->label = __( 'Hola Dolly', 'hola-dolly' ); | |
add_filter( 'woocommerce_settings_tabs_array', array( $this, 'add_settings_page' ), 20 ); | |
add_action( 'woocommerce_settings_' . $this->id, array( $this, 'output' ) ); | |
} | |
public function get_settings() { | |
$settings = array( | |
array( 'title' => __( 'Opciones Generales', 'hola-dolly' ), 'type' => 'title', 'id' => 'holadolly_general_options', 'desc' => __( 'Nuestras opciones generales.', 'hola-dolly' ) ), | |
array( 'type' => 'sectionend', 'id' => 'holadolly_general_options' ), | |
array( 'title' => __( 'Opciones Especiales', 'hola-dolly' ), 'type' => 'title', 'id' => 'holadolly_special_options', 'desc' => __( 'Nuestras opciones especiales.', 'hola-dolly' ) ), | |
array( 'type' => 'sectionend', 'id' => 'holadolly_special_options' ), | |
); | |
return apply_filters( 'holadolly_woocommerce_holadolly_settings', $settings ); | |
} | |
} | |
new WC_Settings_Hola_Dolly(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment