/**
  * Register options.
  */
 public function register()
 {
     $fields = array(array('id' => 'beans_compiler_items', 'type' => 'flush_cache', 'description' => 'Clear CSS and Javascript cached files. New cached versions will be compiled on page load.'));
     // Add styles compiler option only if supported
     if (beans_get_component_support('wp_styles_compiler')) {
         $fields = array_merge($fields, array(array('id' => 'beans_compile_all_styles', 'label' => false, 'checkbox_label' => __('Compile all WordPress styles', 'tm-beans'), 'type' => 'checkbox', 'default' => false, 'description' => 'Compile and cache all the CSS files that have been enqueued to the WordPress head.')));
     }
     // Add scripts compiler option only if supported
     if (beans_get_component_support('wp_scripts_compiler')) {
         $fields = array_merge($fields, array(array('id' => 'beans_compile_all_scripts', 'label' => false, 'checkbox_label' => __('Compile all WordPress scripts', 'tm-beans'), 'type' => 'checkbox', 'default' => false, 'description' => 'Compile and cache all the Javascript files that have been enqueued to the WordPress head.')));
     }
     beans_register_options($fields, 'beans_settings', 'compiler_options', array('title' => __('Compiler options', 'tm-beans'), 'context' => 'normal'));
 }
示例#2
0
 /**
  * Register options.
  */
 public function register()
 {
     $fields = array(array('id' => 'beans_compiler_items', 'type' => 'flush_cache', 'description' => __('Clear CSS and Javascript cached files. New cached versions will be compiled on page load.', 'tm-beans')));
     // Add styles compiler option only if supported
     if (beans_get_component_support('wp_styles_compiler')) {
         $fields = array_merge($fields, array(array('id' => 'beans_compile_all_styles', 'label' => false, 'checkbox_label' => __('Compile all WordPress styles', 'tm-beans'), 'type' => 'checkbox', 'default' => false, 'description' => __('Compile and cache all the CSS files that have been enqueued to the WordPress head.', 'tm-beans'))));
     }
     // Add scripts compiler option only if supported
     if (beans_get_component_support('wp_scripts_compiler')) {
         $fields = array_merge($fields, array(array('id' => 'beans_compile_all_scripts_group', 'label' => __('Compile all WordPress scripts', 'tm-beans'), 'type' => 'group', 'fields' => array(array('id' => 'beans_compile_all_scripts', 'type' => 'activation', 'default' => false), array('id' => 'beans_compile_all_scripts_mode', 'type' => 'select', 'default' => 'aggressive', 'attributes' => array('style' => 'margin: -3px 0 0 -8px;'), 'options' => array('aggressive' => __('Aggressive', 'tm-beans'), 'standard' => __('Standard', 'tm-beans')))), 'description' => __('Compile and cache all the Javascript files that have been enqueued to the WordPress head.<!--more-->JavaSript is outputted in the footer if the level is set to <strong>Aggressive</strong> and might conflict with some third party plugins which are not following WordPress standards.', 'tm-beans'))));
     }
     beans_register_options($fields, 'beans_settings', 'compiler_options', array('title' => __('Compiler options', 'tm-beans'), 'context' => 'normal'));
 }
示例#3
0
 /**
  * Register options.
  */
 public function register()
 {
     global $wp_meta_boxes;
     $fields = array(array('id' => 'beans_dev_mode', 'checkbox_label' => __('Enable development mode', 'beans'), 'type' => 'checkbox', 'description' => 'This option should be enabled while your website is in development.'));
     beans_register_options($fields, 'beans_settings', 'mode_options', array('title' => __('Mode options', 'beans'), 'context' => beans_get('beans_settings', $wp_meta_boxes) ? 'column' : 'normal'));
 }
 /**
  * Register options.
  */
 public function register()
 {
     global $wp_meta_boxes;
     $fields = array(array('id' => 'beans_edited_images_directories', 'type' => 'flush_edited_images', 'description' => 'Clear all edited images. New images will be created on page load.'));
     beans_register_options($fields, 'beans_settings', 'images_options', array('title' => __('Images options', 'tm-beans'), 'context' => beans_get('beans_settings', $wp_meta_boxes) ? 'column' : 'normal'));
 }