balmet.com

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

ace-editor.php (2032B)


      1 <?php
      2 /**
      3  * Redux Framework ACE editor config.
      4  * For full documentation, please visit: http://devs.redux.io/
      5  *
      6  * @package Redux Framework
      7  */
      8 
      9 defined( 'ABSPATH' ) || exit;
     10 
     11 Redux::set_section(
     12 	$opt_name,
     13 	array(
     14 		'title'      => esc_html__( 'ACE Editor', 'your-textdomain-here' ),
     15 		'id'         => 'editor-ace',
     16 		'subsection' => true,
     17 		'desc'       => esc_html__( 'For full documentation on the this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/ace-editor.html" target="_blank">https://devs.redux.io/core-fields/ace-editor.html</a>',
     18 		'fields'     => array(
     19 			array(
     20 				'id'       => 'opt-ace-editor-css',
     21 				'type'     => 'ace_editor',
     22 				'title'    => esc_html__( 'CSS Code', 'your-textdomain-here' ),
     23 				'subtitle' => esc_html__( 'Paste your CSS code here.', 'your-textdomain-here' ),
     24 				'mode'     => 'css',
     25 				'theme'    => 'monokai',
     26 				'desc'     => 'Possible modes can be found at <a href="//ace.c9.io" target="_blank">ace.c9.io/</a>.',
     27 				'default'  => '#header{
     28 	margin: 0 auto;
     29 }',
     30 			),
     31 			array(
     32 				'id'       => 'opt-ace-editor-js',
     33 				'type'     => 'ace_editor',
     34 				'title'    => esc_html__( 'JS Code', 'your-textdomain-here' ),
     35 				'subtitle' => esc_html__( 'Paste your JS code here.', 'your-textdomain-here' ),
     36 				'mode'     => 'javascript',
     37 				'theme'    => 'chrome',
     38 				'desc'     => 'Possible modes can be found at <a href="//ace.c9.io" target="_blank">ace.c9.io/</a>.',
     39 				'default'  => 'jQuery(document).ready(function(){\n\n});',
     40 			),
     41 			array(
     42 				'id'         => 'opt-ace-editor-php',
     43 				'type'       => 'ace_editor',
     44 				'full_width' => true,
     45 				'title'      => esc_html__( 'PHP Code', 'your-textdomain-here' ),
     46 				'subtitle'   => esc_html__( 'Paste your PHP code here.', 'your-textdomain-here' ),
     47 				'mode'       => 'php',
     48 				'theme'      => 'chrome',
     49 				'desc'       => 'Possible modes can be found at <a href="//ace.c9.io" target="_blank">ace.c9.io/</a>.',
     50 				'default'    => '<?php
     51     echo "PHP String";',
     52 			),
     53 		),
     54 	)
     55 );