balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

js-button.php (1885B)


      1 <?php
      2 /**
      3  * Redux Pro JS Button Sample config.
      4  *
      5  * For full documentation, please visit: http:https://devs.redux.io/
      6  *
      7  * @package Redux Pro
      8  */
      9 
     10 defined( 'ABSPATH' ) || exit;
     11 
     12 Redux::set_section(
     13 	$opt_name,
     14 	array(
     15 		'title'      => esc_html__( 'JS Button', 'your-textdomain-here' ),
     16 		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/premium/js-button.html" target="_blank">https://devs.redux.io/premium/js-button.html</a>',
     17 		'subsection' => true,
     18 		'fields'     => array(
     19 			array(
     20 				'id'       => 'opt-js-button',
     21 				'type'     => 'js_button',
     22 				'title'    => esc_html__( 'JS Button', 'your-textdomain-here' ),
     23 				'subtitle' => esc_html__( 'Run javascript in the options panel from button clicks.', 'your-textdomain-here' ),
     24 				'desc'     => esc_html__( 'Click the Add Date button to add the current date into the text field below.', 'your-textdomain-here' ),
     25 				'script'   => array(
     26 					'url'       => plugins_url( 'sample/sections/pro-fields/js-button.js', REDUX_PLUGIN_FILE ),
     27 					'dir'       => dirname( __FILE__ ) . '/js-button.js',
     28 					'dep'       => array( 'jquery' ),
     29 					'ver'       => time(),
     30 					'in_footer' => true,
     31 				),
     32 				'buttons'  => array(
     33 					array(
     34 						'text'     => esc_html__( 'Add Date', 'your-textdomain-here' ),
     35 						'class'    => 'button-primary',
     36 						'function' => 'redux_add_date',
     37 					),
     38 					array(
     39 						'text'     => esc_html__( 'Alert', 'your-textdomain-here' ),
     40 						'class'    => 'button-secondary',
     41 						'function' => 'redux_show_alert',
     42 					),
     43 
     44 				),
     45 			),
     46 			array(
     47 				'id'       => 'opt-blank-text',
     48 				'type'     => 'text',
     49 				'title'    => esc_html__( 'Date', 'your-textdomain-here' ),
     50 				'subtitle' => esc_html__( 'Click the Add Date button above to fill out this field.', 'your-textdomain-here' ),
     51 			),
     52 		),
     53 	)
     54 );