当前位置: 首页>>代码示例>>PHP>>正文


PHP wp_tiny_mce函数代码示例

本文整理汇总了PHP中wp_tiny_mce函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_tiny_mce函数的具体用法?PHP wp_tiny_mce怎么用?PHP wp_tiny_mce使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了wp_tiny_mce函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: add_css

    function add_css()
    {
        $css = apply_filters('more_fields_write_css', '');
        $js = apply_filters('more_fields_write_js', '');
        ?>
		<script type="text/javascript">
		//<![CDATA[
			jQuery(document).ready(function($){
				$(".mf_update_on_edit").change(function() {
					var val = $(this).val();
					$(this).next().html(val);
				});
				<?php 
        echo $js;
        ?>
			});
		//]]>
		</script>
		<style type="text/css">
			<?php 
        echo $css;
        ?>
		</style>
		<?php 
        wp_tiny_mce(false);
        // true gives you a stripped down version of the editor
    }
开发者ID:Netsoro,项目名称:gdnlteamgroup,代码行数:27,代码来源:more-fields-settings-object.php

示例2: ctslider_show_slidecaption_1_box

/**
 * Display the meta boxes
 *
 * @access      private
 * @since       1.0.0
 * @return      void
 */
function ctslider_show_slidecaption_1_box()
{
    global $post, $ctslider_slidecaption_1_metabox, $ctslider_prefix, $wp_version;
    // Use nonce for verification
    echo '<input type="hidden" name="ctslider_slidecaption_1_meta_box_nonce" value="' . wp_create_nonce(basename(__FILE__)) . '" />';
    echo '<table class="form-table">';
    foreach ($ctslider_slidecaption_1_metabox['fields'] as $field) {
        $meta = get_post_meta($post->ID, $field['id'], true);
        echo '<tr>', '<th style="width:20%"><label for="', $field['id'], '">', stripslashes($field['name']), '</label></th>', '<td class="ctslider_field_type_' . str_replace(' ', '_', $field['type']) . '">';
        switch ($field['type']) {
            case 'text':
                echo '<input type="text" name="', $field['id'], '" id="', $field['id'], '" value="', $meta ? $meta : $field['std'], '" size="30" style="width:97%" /><br/>', '', __(stripslashes($field['desc']), 'ctslider');
                break;
            case 'textarea':
                if ($field['rich_editor'] == 1) {
                    if ($wp_version >= 3.3) {
                        echo wp_editor($meta, $field['id'], array('textarea_name' => $field['id']));
                    } else {
                        $editor = '';
                        if (!post_type_supports($post->post_type, 'editor')) {
                            $editor = wp_tiny_mce(true, array('editor_selector' => $field['class'], 'remove_linebreaks' => false));
                        }
                        $field_html = '<div style="width: 97%; border: 1px solid #DFDFDF;"><textarea name="' . $field['id'] . '" class="' . $field['class'] . '" id="' . $field['id'] . '" cols="60" rows="8" style="width:100%">' . $meta . '</textarea></div><br/>' . __(stripslashes($field['desc']), 'ctslider');
                        echo $editor . $field_html;
                    }
                } else {
                    echo '<div style="width: 100%;"><textarea name="', $field['id'], '" class="', $field['class'], '" id="', $field['id'], '" cols="60" rows="8" style="width:97%">', $meta ? $meta : $field['std'], '</textarea></div>', '', __(stripslashes($field['desc']), 'ctslider');
                }
                break;
        }
        echo '<td>', '</tr>';
    }
    echo '</table>';
}
开发者ID:krbvroc1,项目名称:Captain-Slider,代码行数:41,代码来源:meta-box.php

示例3: simplepopup_enqueue_editor

function simplepopup_enqueue_editor()
{
    wp_enqueue_script('common');
    wp_enqueue_script('jquery-affect');
    wp_admin_css('thickbox');
    wp_print_scripts('post');
    wp_print_scripts('media-upload');
    wp_print_scripts('jquery');
    wp_print_scripts('jquery-ui-core');
    wp_print_scripts('jquery-ui-tabs');
    wp_print_scripts('tiny_mce');
    wp_print_scripts('editor');
    wp_print_scripts('editor-functions');
    /* Include thе link dialog functions */
    require_once ABSPATH . 'wp-admin/includes/internal-linking.php';
    wp_print_scripts('wplink');
    wp_print_styles('wplink');
    add_action('tiny_mce_preload_dialogs', 'wp_link_dialog');
    add_thickbox();
    wp_tiny_mce();
    wp_admin_css();
    wp_enqueue_script('utils');
    do_action("admin_print_styles-post-php");
    do_action('admin_print_styles');
    //remove_all_filters('mce_external_plugins');
}
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:26,代码来源:sp-options.php

示例4: my_enqueue_mce

function my_enqueue_mce()
{
    wp_enqueue_script('tiny_mce');
    if (function_exists('wp_tiny_mce')) {
        wp_tiny_mce();
    }
}
开发者ID:nmedia82,项目名称:rotary,代码行数:7,代码来源:theme-functions.php

示例5: add_js

 function add_js()
 {
     global $bp;
     $baseurl = includes_url('js/tinymce');
     if ($this->enable_tinymce_on_page()) {
         wp_tiny_mce($this->is_teeny, array('mode' => 'textareas'));
     }
 }
开发者ID:adisonc,项目名称:MaineLearning,代码行数:8,代码来源:bp-tinymce.php

示例6: admin_head

 function admin_head()
 {
     // Add TinyMCE
     wp_print_scripts('editor');
     if (function_exists('wp_tiny_mce')) {
         wp_tiny_mce();
     }
 }
开发者ID:rarescosma,项目名称:wp-ric,代码行数:8,代码来源:OptionPanel.php

示例7: add_tiny_mce

 function add_tiny_mce()
 {
     global $post;
     if ($post && post_type_supports($post->post_type, 'editor')) {
         // do nothing, wysiwyg will render correctly!
     } else {
         wp_tiny_mce();
     }
 }
开发者ID:niko-lgdcom,项目名称:barrows,代码行数:9,代码来源:wysiwyg.php

示例8: wpframe_add_editor_js

 function wpframe_add_editor_js()
 {
     wp_enqueue_script('common');
     wp_enqueue_script('jquery-color');
     wp_print_scripts('editor');
     if (function_exists('add_thickbox')) {
         add_thickbox();
     }
     wp_print_scripts('media-upload');
     if (function_exists('wp_tiny_mce')) {
         wp_tiny_mce();
     }
     wp_admin_css();
     wp_enqueue_script('utils');
     do_action("admin_print_styles-post-php");
     do_action('admin_print_styles');
 }
开发者ID:umairriaz90,项目名称:Daschug1,代码行数:17,代码来源:wpframe.php

示例9: mod_tinymce

    function mod_tinymce()
    {
        add_filter('tiny_mce_before_init', create_function('$a', '
	    $a["theme"] = "advanced";
	    $a["onpageload"] = "";
	    $a["width"] = "100";
	    $a["height"] = "300";
	    $a["mode"] = "specific_textareas";
	    $a["editor_selector"] = "wpui-active-edit";
	    $a["plugins"] = "safari,inlinepopups,spellchecker";
	    $a["forced_root_block"] = false;
	    $a["force_br_newlines"] = true;
	    $a["force_p_newlines"] = false;
	    $a["convert_newlines_to_brs"] = true;
	   	$a["setup"] = \'function(ed) { ed.onChange.add(function(ed, l){  tinymce.triggerSave(); })   }\';		
	    return $a;'));
        wp_tiny_mce(false);
    }
开发者ID:Blueprint-Marketing,项目名称:interoccupy.net,代码行数:18,代码来源:widgets-3.2.php

示例10: admin_head

 function admin_head()
 {
     if (!array_key_exists('options_page', $this->parent->activated_fields)) {
         exit;
     }
     // save
     if (isset($_POST['update_options'])) {
         $this->update_options();
     }
     // create tyn mce instance for wysiwyg
     wp_tiny_mce();
     // add these acf's to the page
     echo '<link rel="stylesheet" type="text/css" href="' . $this->dir . '/css/style.global.css" />';
     echo '<link rel="stylesheet" type="text/css" href="' . $this->dir . '/css/style.input.css" />';
     echo '<script type="text/javascript" src="' . $this->dir . '/js/functions.input.js" ></script>';
     // date picker!
     echo '<link rel="stylesheet" type="text/css" href="' . $this->dir . '/core/fields/date_picker/style.date_picker.css" />';
     echo '<script type="text/javascript" src="' . $this->dir . '/core/fields/date_picker/jquery.ui.datepicker.js" ></script>';
 }
开发者ID:besimhu,项目名称:legacy,代码行数:19,代码来源:options_page.php

示例11: ecpt_show_research_meta_box

function ecpt_show_research_meta_box()
{
    global $post;
    global $research_meta_metabox;
    global $ecpt_prefix;
    global $wp_version;
    // Use nonce for verification
    echo '<input type="hidden" name="ecpt_research_meta_meta_box_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />';
    echo '<table class="form-table">';
    foreach ($research_meta_metabox['fields'] as $field) {
        // get current post meta data
        $meta = get_post_meta($post->ID, $field['id'], true);
        echo '<tr>', '<th style="width:20%"><label for="', $field['id'], '">', $field['name'], '</label></th>', '<td class="ecpt_field_type_' . str_replace(' ', '_', $field['type']) . '">';
        switch ($field['type']) {
            case 'text':
                echo '<input type="text" name="', $field['id'], '" id="', $field['id'], '" value="', $meta ? $meta : $field['std'], '" size="30" style="width:97%" /><br/>', '', $field['desc'];
                break;
            case 'textarea':
                if ($field['rich_editor'] == 1) {
                    if ($wp_version >= 3.3) {
                        echo wp_editor($meta, $field['id'], array('textarea_name' => $field['id'], 'wpautop' => false));
                    } else {
                        // older versions of WP
                        $editor = '';
                        if (!post_type_supports($post->post_type, 'editor')) {
                            $editor = wp_tiny_mce(true, array('editor_selector' => $field['class'], 'remove_linebreaks' => false));
                        }
                        $field_html = '<div style="width: 97%; border: 1px solid #DFDFDF;"><textarea name="' . $field['id'] . '" class="' . $field['class'] . '" id="' . $field['id'] . '" cols="60" rows="8" style="width:100%">' . $meta . '</textarea></div><br/>' . __($field['desc']);
                        echo $editor . $field_html;
                    }
                } else {
                    echo '<div style="width: 100%;"><textarea name="', $field['id'], '" class="', $field['class'], '" id="', $field['id'], '" cols="60" rows="8" style="width:97%">', $meta ? $meta : $field['std'], '</textarea></div>', '', $field['desc'];
                }
                break;
            case 'upload':
                echo '<input type="text" class="ecpt_upload_field" name="', $field['id'], '" id="', $field['id'], '" value="', $meta ? $meta : $field['std'], '" size="30" style="width:80%" /><input class="ecpt_upload_image_button" type="button" value="Upload" /><br/>', '', $field['desc'];
                break;
        }
        echo '<td>', '</tr>';
    }
    echo '</table>';
}
开发者ID:pranastae,项目名称:archive_all_plugins,代码行数:42,代码来源:ksas-research-meta.php

示例12: admin_head_addition

 function admin_head_addition()
 {
     global $am_option;
     echo '<link rel="stylesheet" href="' . $am_option['url']['themeoptions_url'] . '/admin.css" type="text/css" />';
     echo '<script type="text/javascript" src="' . $am_option['url']['themeoptions_url'] . '/supporting_scripts.js"></script>';
     wp_enqueue_script('common');
     wp_enqueue_script('jquery-color');
     wp_print_scripts('editor');
     if (function_exists('add_thickbox')) {
         add_thickbox();
     }
     wp_print_scripts('media-upload');
     if (function_exists('wp_tiny_mce')) {
         wp_tiny_mce();
     }
     wp_admin_css();
     wp_enqueue_script('utils');
     do_action('admin_print_styles-post-php');
     do_action('admin_print_styles');
 }
开发者ID:besimhu,项目名称:legacy,代码行数:20,代码来源:fn-admin.php

示例13: wp_super_edit_set_user_default

/**
* WP Super Edit Default User
*
* Sets default user settings from most recent TinyMCE scan, sets initial options, and removes unnecessary WordPress options
*/
function wp_super_edit_set_user_default()
{
    global $wp_super_edit, $wp_super_edit_tinymce_default;
    // Output buffering to get default TinyMCE init
    ob_start();
    wp_tiny_mce();
    ob_end_clean();
    $wp_super_edit->register_user_settings('wp_super_edit_default', 'Default Editor Settings', $wp_super_edit_tinymce_default, 'single');
    $wp_super_edit->set_option('tinymce_scan', $wp_super_edit_tinymce_default);
    $wp_super_edit->set_option('management_mode', 'single');
    /**
     * Remove old options for versions 2.2
     */
    delete_option('wp_super_edit_tinymce_scan');
    /**
     * Remove old options for versions 1.5 
     */
    delete_option('superedit_options');
    delete_option('superedit_buttons');
    delete_option('superedit_plugins');
}
开发者ID:howardlei82,项目名称:IGSM-Website,代码行数:26,代码来源:wp-super-edit-defaults.php

示例14: admin_head

    public static function admin_head()
    {
        if ($_REQUEST['action'] == 'edit') {
            $elements = 'description';
            $selector = 'form#addtag #submit, form#addtag';
        } else {
            $elements = 'tag-description';
            $selector = 'form#edittag #submit, form#edittag';
        }
        wp_tiny_mce(true, array('mode' => 'exact', 'elements' => $elements, 'width' => '100%', 'theme_advanced_buttons1' => 'bold,italic,strikethrough,|,bullist,numlist,blockquote,|,link,unlink,|,undo,redo,|,removeformat'));
        echo <<<SCRIPT
\t\t<script type="text/javascript">
\t\tjQuery(function() {
\t\t\t
\t\t\tjQuery('{$selector}').submit(function(){
\t\t\t\ttinyMCE.getInstanceById("tag-description").save()\t
\t\t\t})
\t\t\t
\t\t} )
\t\t</script>
SCRIPT;
    }
开发者ID:voituk,项目名称:Misc,代码行数:22,代码来源:rich-category-description.php

示例15: render

    function render()
    {
        global $comicpress_manager;
        if (is_null(get_category($comicpress_manager->properties['comiccat']))) {
            ?>
      <p><strong>You don't have a comics category defined!</strong> Go to the
      <a href="?page=<?php 
            echo plugin_basename(__FILE__);
            ?>
-config">ComicPress Config</a> screen and choose a category.
      <?php 
            return;
        }
        $this->category_checkboxes = $this->_generate_additional_categories_checkboxes();
        if ($comicpress_manager->scale_method != false) {
            $this->thumbnail_writes = $comicpress_manager->get_thumbnails_to_generate();
        }
        $this->all_tags = get_tags();
        if (function_exists('wp_tiny_mce')) {
            wp_tiny_mce();
        }
        include $this->_partial_path('table');
    }
开发者ID:johnbintz,项目名称:comicpress-manager-1.5,代码行数:23,代码来源:ComicPressPostEditor.php


注:本文中的wp_tiny_mce函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。