Beispiel #1
0
/**
 * Custom Features Active
 * @since 0.1.0
 * @return bool
**/
function fx_editor_is_custom_feature_active()
{
    if (fx_editor_get_option('boxes', false) || fx_editor_get_option('buttons', false) || fx_editor_get_option('columns', false)) {
        return apply_filters('fx_editor_is_custom_feature_active', true);
    }
    return apply_filters('fx_editor_is_custom_feature_active', false);
}
Beispiel #2
0
/**
 * Force visual editor feature only for content.
 * @since 1.1.0
 */
function fx_editor_force_content_only($editor_ids)
{
    if (fx_editor_get_option('content_only', true)) {
        $editor_ids = array('content');
    }
    return $editor_ids;
}
Beispiel #3
0
 /**
  * Switch Default Behaviour in TinyMCE to use "<br>"
  * On Enter instead of "<p>"
  * 
  * @link https://shellcreeper.com/?p=1041
  * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/tiny_mce_before_init
  * @link http://www.tinymce.com/wiki.php/Configuration:forced_root_block
  */
 public function p_to_br($settings)
 {
     if (fx_editor_get_option('p_to_br', false)) {
         $settings['forced_root_block'] = false;
     }
     return $settings;
 }
Beispiel #4
0
    /**
     * Settings Field Callback : General Options
     * @since 0.1.0
     */
    public function settings_field_general_options()
    {
        ?>

		<p><label for="fx_editor_content_only"><input type="checkbox" value="1" id="fx_editor_content_only" name="<?php 
        echo esc_attr($this->option_name . '[content_only]');
        ?>
" <?php 
        checked(fx_editor_get_option('content_only', true));
        ?>
> <?php 
        _ex('Only enable features in main "content" editor.', 'settings page', 'fx-editor');
        ?>
</label></p>

	<?php 
    }