Penci Design replied
Hi,
Do you want use in the customize panel like screenshot http://prntscr.com/n37bpu
If right, please add custom code to register customize panel on function.php file
http://prntscr.com/n37df7 , http://prntscr.com/n37dq5, http://prntscr.com/n37dze
add_action('customize_register', 'themename_customize_register');
function themename_customize_register($wp_customize){
$sanitizer = new Penci_Customize_Sanitizer();
$wp_customize->add_section( 'penci_section_transition_custom_text', array(
'title' => esc_html__( 'Custom Text with Translation', 'pennews' ),
'description' => sprintf(
esc_html__( 'Use shortcode [pencilang] with multiple languages site (ex: [pencilang en_US='Share' fr_FR='Partager' language_code='Your language text' /]). You can check language code %s', 'pennews' ),
'' . esc_html__( 'here', 'pennews' ) . ''
),
'priority' => 1,
) );
$wp_customize->add_setting( 'id_option_tran_custom_text', array(
'sanitize_callback' => array( $sanitizer, 'html' ),
'default' => 'something',
) );
$wp_customize->add_control( 'id_option_tran_custom_text', array(
'label' => 'Text: "Custom text"',
'section' => 'penci_section_transition_custom_text',
'settings' => 'id_option_tran_custom_text',
'type' => 'text',
) );
$wp_customize->add_setting( 'id_option_tran_custom_text2', array(
'sanitize_callback' => array( $sanitizer, 'html' ),
'default' => 'something2',
) );
$wp_customize->add_control( 'id_option_tran_custom_text2', array(
'label' => 'Text: "Custom text 2"',
'section' => 'penci_section_transition_custom_text',
'settings' => 'id_option_tran_custom_text2',
'type' => 'text',
) );
}
Usage<?php echo penci_get_tran_setting( 'id_option_tran_custom_text' );
echo penci_get_tran_setting( 'id_option_tran_custom_text2' ); ?>
Best Regards,
PenciDesign