Skip to content

Instantly share code, notes, and snippets.

@igmoweb
Last active August 29, 2015 14:01
Show Gist options
  • Save igmoweb/e164b6d3f9a5158a3b37 to your computer and use it in GitHub Desktop.
Save igmoweb/e164b6d3f9a5158a3b37 to your computer and use it in GitHub Desktop.
Creando un campo sencillo en las opciones de WooCommerce
<?php
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(
'title' => __( 'Un número', 'hola-dolly' ),
'id' => 'holadolly_general_options_number',
'default' => 0,
'type' => 'number',
'desc_tip' => __( 'Pon un número por aquí', '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 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment