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


PHP the_editor函数代码示例

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


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

示例1: get_champ

function get_champ($o, $val)
{
    switch ($o['type']) {
        case 'textarea':
            //echo '	<textarea rows="2" cols="40" name="'.$o['id'].'" id="'.$o['id'].'">'.$val.'</textarea>';
            the_editor($var, $id = $o['id'], $prev_id = 'title', $media_buttons = true, $tab_index = 2);
            break;
        case 'text':
            echo '	<input type="text" style="width:100%;" name="' . $o['id'] . '" id="' . $o['id'] . '" value="' . $val . '"/>';
            break;
        case 'checkbox':
            echo '<input type="checkbox" name="' . $o['id'] . '" id="' . $o['id'] . '" value="1" ';
            if ($val == 1) {
                echo 'checked="checked';
            }
            echo '/><label for="' . $o['id'] . '">' . $o['name'] . '</label>';
            break;
        case 'select':
            echo '	<select name="' . $o['id'] . '" style="width:100%;" id="' . $o['id'] . '"><option value="">-</option>';
            foreach ($o['options'] as $opt) {
                echo '<option value="' . $opt . '"';
                if ($opt == $val) {
                    echo 'selected="selected"';
                }
                echo '>' . $opt . '</option>';
            }
            echo '</select>';
            break;
    }
}
开发者ID:Netsoro,项目名称:gdnlteamgroup,代码行数:30,代码来源:projet.php

示例2: _page_content_hook

 function _page_content_hook()
 {
     $this->page_header();
     $this->page_content();
     $this->page_footer();
     the_editor('', 'bogus_editor');
 }
开发者ID:rarescosma,项目名称:wp-ric,代码行数:7,代码来源:OptionPanel.php

示例3: adbarx_admin

 function adbarx_admin()
 {
     if ($_POST['nonce']) {
         if (!wp_verify_nonce($_POST['nonce'], 'adbarx_admin')) {
             die('Invalid Security Token');
         }
         $this->options['remember'] = $_POST['showOnce'] == 'on' ? 1 : 0;
         $this->options['content'] = $_POST['content'];
         $this->options['title'] = $_POST['title'];
         if ($_POST['resetViews'] == 'on') {
             $this->options['cookie'] = 'adx_' . substr(md5(microtime()), 5, 20);
         }
         update_option('adbarx_options', $this->options);
     }
     add_filter('admin_head', array($this, 'adbarx_showEditor'));
     require_once PHPX_DIR . 'phpx_form.php';
     $form = new phpx_form();
     $form->instantReturn = true;
     $text = '<div class="wrap"><h2>Ad Bar X</h2>';
     $text .= $form->startForm('themes.php?page=adbarx/includes/adbarx_functions.php', 'adbarxForm');
     $text .= $form->hidden('nonce', wp_create_nonce('adbarx_admin'));
     print $text;
     the_editor(stripslashes($this->options['content']), 'content');
     $text = '<br /><br />';
     $text .= $form->textField('Bar Title', 'title', $this->options['title']);
     $text .= $form->checkBox('Show Adbar Once', 'showOnce', 1);
     $text .= $form->checkBox('Reset All Views', 'resetViews', 0);
     $text .= $form->endForm();
     $text .= '</div>';
     print $text;
 }
开发者ID:laiello,项目名称:suitex,代码行数:31,代码来源:adbarx_functions.php

示例4: editor

 function editor($field)
 {
     //3.3
     if (function_exists('wp_editor')) {
         wp_editor($this->parent->options->loading[$field], "wp_easy_scroll_posts[loading][{$field}]", array('media_buttons' => false, 'textarea_rows' => 5, 'teeny' => true));
     } else {
         the_editor($this->parent->options->loading[$field], "wp_easy_scroll_posts[loading][{$field}]", null, false);
     }
 }
开发者ID:jsd-aaron,项目名称:keni-thomas,代码行数:9,代码来源:scroll-admin.php

示例5: admin_footer

    function admin_footer()
    {
        ?>
	   	<div style="display:none;">
	   	<?php 
        the_editor('', 'acf_settings');
        ?>
	   	</div>
	   	<?php 
    }
开发者ID:xuandungpy,项目名称:vuong,代码行数:10,代码来源:wysiwyg.php

示例6: field

 function field($args, $instance)
 {
     extract($args);
     $entries = is_array($entries) ? $entries['name'] : $entries;
     $title = apply_filters('widget_title', empty($instance['title']) ? __('Editor', 'custom-fields') : $instance['title'], $instance, $this->id_base);
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     the_editor($entries, $this->get_field_name('name'), 'title', false, 10);
     echo $after_widget;
 }
开发者ID:emaxees,项目名称:elpandecadadia,代码行数:12,代码来源:editor.php

示例7: createHomePageAdminMenu

    /** FUNCTION sparkCreateHomePageAdminMenu
     * applies actions to be run at admin init
     **/
    function createHomePageAdminMenu()
    {
        if (!($homeGallery = get_option('home_gallery'))) {
            add_option('home_gallery', '');
        }
        ?>
	<div class="wrap">
		<form name="form1" method="post" action="">
<?php 
        settings_fields('home_gallery');
        do_settings_sections('home_gallery');
        ?>
			<div id="poststuff">
				<div id="post-body">
					<div id="postdivrich" class="postarea">
						<h3><?php 
        _e('Content');
        ?>
</h3>
						<?php 
        the_editor($homeGallery);
        ?>
						<?php 
        wp_nonce_field('autosave', 'autosavenonce', false);
        ?>
						<?php 
        wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
        ?>
						<?php 
        wp_nonce_field('getpermalink', 'getpermalinknonce', false);
        ?>
						<?php 
        wp_nonce_field('samplepermalink', 'samplepermalinknonce', false);
        ?>
						<?php 
        submit_button();
        ?>
					</div>
				</div>
			</div>
		</form>
	</div>
<?php 
    }
开发者ID:bcbroussard,项目名称:POST,代码行数:47,代码来源:theme.spark.php

示例8: wk_core_richtexteditor

function wk_core_richtexteditor($display, $name, $translation, $default, $media_buttons, $object_id = '', $object_type = 'post')
{
    if ($object_type == 'post') {
        if ($object_id != 0) {
            //check if it is the post_title, the tags, or a post meta
            if ($name == 'post_content') {
                //fetch the post we are trying to edit
                $post = query_posts('p=' . $object_id);
                $value = $post[0]->post_title;
            } else {
                $value = get_post_meta($object_id, $name, true);
            }
        } else {
            $value = $default;
        }
    } else {
        //if user display then db value, or leave empty.
        //We dont use the default value because 1) object_id will never be 0
        //2) we dont want to fill a field that the user left empty
        $user_info = get_userdata($object_id);
        $value = $user_info->{$name};
    }
    if ($display) {
        ?>
		<p class="<?php 
        echo $name;
        ?>
">
			<label for="<?php 
        echo $name;
        ?>
"><?php 
        echo $translation;
        ?>
</label>
			<?php 
        the_editor($value, $name, '', $media_buttons, 0);
        ?>
		</p>
	<?php 
    } else {
        echo '<input type="hidden" name="' . $name . '" value="' . $value . '" />';
    }
}
开发者ID:Knorcedger,项目名称:main,代码行数:44,代码来源:richtexteditor.php

示例9: milatTinyMCE

function milatTinyMCE()
{
    add_filter('wp_default_editor', create_function('', 'return "html";'));
    if (get_bloginfo('version') < "3.2") {
        add_filter('wp_default_editor', create_function('', 'return "html";'));
        echo '<div id="poststuff"><div id="postdivrich" class="postarea">';
        the_editor(stripcslashes(get_option('milat_yazi')), "milat_yazi", false, false);
        echo '</div></div>';
    } else {
        if (get_bloginfo('version') < "3.3") {
            echo '<div id="poststuff"><div id="postdivrich" class="postarea">';
            the_editor(stripcslashes(get_option('milat_yazi')), "milat_yazi", false, false);
            echo '</div></div>';
        } else {
            wp_editor(stripcslashes(get_option('milat_yazi')), 'milat_yazi', array('media_buttons' => false, 'tinymce' => false, 'quicktags' => true, 'textarea_rows' => 7));
        }
    }
    function _r($str, $bak)
    {
        if ($str == $bak) {
            return 'checked="checked"';
        }
    }
}
开发者ID:pathumego,项目名称:easykarma,代码行数:24,代码来源:admin.options.php

示例10: the_editor

if (!empty($thispost->post_title)) {
    echo $thispost->post_title;
}
?>
" name="user_post_title" id="user_post_title" >
      </li>
   <li> 
         <div style="clear: both;"></div>
         <!--<textarea name="user_post_desc" id="user_post_desc" style="width: 532px; height: 137px;"><?php 
if (!empty($thispost->post_content)) {
    echo $thispost->post_content;
}
?>
</textarea>-->
         <?php 
the_editor($thispost->post_content, 'user_post_desc');
?>
      </li>


          
       

     
     <?php 
//div for excerpt
?>
 
     <?php 
//if(get_option('_wpup_excerpt')=="excerpt"){
?>
开发者ID:qhuit,项目名称:UrbanPekor,代码行数:31,代码来源:post_form.php

示例11: em_categories_edit_layout

function em_categories_edit_layout($message = "")
{
    global $EM_Category, $EM_Notices;
    if (!is_object($EM_Category)) {
        $EM_Category = new EM_Category();
    }
    //check that user can access this page
    if (is_object($EM_Category) && !$EM_Category->can_manage('edit_categories')) {
        ?>
		<div class="wrap"><h2><?php 
        _e('Unauthorized Access', 'dbem');
        ?>
</h2><p><?php 
        implode('<br/>', $EM_Category->get_errors());
        ?>
</p></div>
		<?php 
        return;
    }
    ?>
	<div class='wrap'>
		<div id='icon-edit' class='icon32'>
			<br/>
		</div>
			
		<h2><?php 
    echo __('Edit category', 'dbem');
    ?>
</h2>  
 		
		<?php 
    echo $EM_Notices;
    ?>

		<div id='ajax-response'></div>

		<div id="poststuff" class="metabox-holder">
			<div id="post-body">
				<div id="post-body-content">
					<form enctype='multipart/form-data' name='editcat' id='editcat' method='post' action='admin.php?page=events-manager-categories' class='validate'>
						<input type='hidden' name='action' value='category_save' />
						<input type='hidden' name='category_id' value='<?php 
    echo $EM_Category->id;
    ?>
'/>
						<input type="hidden" name="_wpnonce" value="<?php 
    echo wp_create_nonce('category_save');
    ?>
" />
						
						<?php 
    do_action('em_admin_category_form_header');
    ?>
						
							<div id="category_description" class="postbox">
								<h3><?php 
    echo __('Category name', 'dbem');
    ?>
</h3>
								<div class="inside">					
									<input name='category_name' id='category-name' type='text' value='<?php 
    echo $EM_Category->name;
    ?>
' size='40'  />
									<br />
					           		<em><?php 
    echo __('The name of the category', 'dbem');
    ?>
</em>
								</div>
							</div>
											
							<div id="category_description" class="postbox">
								<h3>
									<?php 
    _e('Details', 'dbem');
    ?>
								</h3>
								<div class="inside">
									<div id="<?php 
    echo user_can_richedit() ? 'postdivrich' : 'postdiv';
    ?>
" class="postarea">
										<?php 
    the_editor($EM_Category->description);
    ?>
									</div>
									<br />
									<em><?php 
    _e('Details about the category', 'dbem');
    ?>
</em>
								</div>
							</div>
										
							<div id="category_description" class="stuffbox">
								<h3>
									<?php 
    _e('Category image', 'dbem');
    ?>
//.........这里部分代码省略.........
开发者ID:hypenotic,项目名称:slowfood,代码行数:101,代码来源:em-categories.php

示例12: meta_options

    function meta_options()
    {
        global $post;
        $es_options = get_option('es_options');
        $custom = get_post_custom($post->ID);
        $alap_google_terkep_szelesseg = ($es_options['google_terkep_szelesseg'] and is_numeric($es_options['google_terkep_szelesseg'])) ? $es_options['google_terkep_szelesseg'] : ALAP_TERKEP_SZELESSEG;
        $alap_google_terkep_magassag = ($es_options['google_terkep_magassag'] and is_numeric($es_options['google_terkep_magassag'])) ? $es_options['google_terkep_magassag'] : ALAP_TERKEP_MAGASSAG;
        $alap_google_terkep_nagyitas = ($es_options['google_terkep_nagyitas'] and is_numeric($es_options['google_terkep_nagyitas'])) ? $es_options['google_terkep_nagyitas'] : ALAP_TERKEP_NAGYITAS;
        $cim = $custom["esemeny-helyszin"][0];
        $kezdes = $custom["esemeny-idopont-kezdo"][0];
        $befejezes = $custom["esemeny-idopont-befejezo"][0];
        $terkep = $custom["esemeny-google-terkep"][0] ? 'checked="checked"' : '';
        $lng = $custom["esemeny-google-terkep-lng"][0];
        $lat = $custom["esemeny-google-terkep-lat"][0];
        $sz = $custom["esemeny-google-terkep-szelesseg"][0] ? $custom["esemeny-google-terkep-szelesseg"][0] : $alap_google_terkep_szelesseg;
        $m = $custom["esemeny-google-terkep-magassag"][0] ? $custom["esemeny-google-terkep-magassag"][0] : $alap_google_terkep_magassag;
        $nagyitas = $custom["esemeny-google-terkep-nagyitas"][0] ? $custom["esemeny-google-terkep-nagyitas"][0] : $alap_google_terkep_nagyitas;
        $infobuborek = $custom["esemeny-google-terkep-info-buborek-tartalom"][0];
        $mutato = $custom["esemeny-google-terkep-mutato-felirat"][0];
        ?>
    <table class="form-table">
        <tr valign="top">
        	<th scope="row"><label for="idopont-kezdo">Kezdő időpont:</label></th>
        	<td><input name="esemeny-idopont-kezdo" id="idopont-kezdo" size="16" value="<?php 
        echo $kezdes;
        ?>
" /></td>
        </tr>
        <tr valign="top">
        	<th scope="row"><label for="idopont-befejezo">Befejező időpont:</label></th>
        	<td><input name="esemeny-idopont-befejezo" id="idopont-befejezo" size="16" value="<?php 
        echo $befejezes;
        ?>
" /></td>
        </tr>
        <tr valign="top">
        	<th scope="row"><label for="esemeny-helyszin">Helyszín:</label></th>
        	<td><input name="esemeny-helyszin" id="esemeny-helyszin" size="25" value="<?php 
        echo $cim;
        ?>
" /></td>
        </tr>
        <tr valign="top">
        	<th scope="row"><label for="esemeny-google-terkep">Kell térkép az eseményhez?</label></th>
        	<td><input type="checkbox" name="esemeny-google-terkep" id="esemeny-google-terkep" <?php 
        echo $terkep;
        ?>
 value="1" /></td>
        </tr>
    </table>


    <table class="form-table" id="terkep-adatok">
        <tr><td colspan="2"><button id="terkepBetolto" type="button">Térképadatok frissítése</button></td></tr>
        <tr valign="top">
        	<th scope="row"><label for="esemeny-google-terkep-mutato-felirat">Mutató felirata:</label></th>
        	<td><input name="esemeny-google-terkep-mutato-felirat" id="esemeny-google-terkep-mutato-felirat" value="<?php 
        echo $mutato;
        ?>
" ></td>
        </tr>
        <tr valign="top">
        	<th scope="row"><label for="esemeny-google-terkep-info-buborek-tartalom">Információs buborék tartalma:</label></th>
        	<td>
        	    <div id="<?php 
        echo user_can_richedit() ? 'postdivrich' : 'postdiv';
        ?>
" class="postarea">
            		<?php 
        the_editor(isset($infobuborek) ? $infobuborek : '', 'esemeny-google-terkep-info-buborek-tartalom');
        ?>
	
            	</div>
        	</td>
        </tr>
        <tr valign="top">
        	<th scope="row"><label for="esemeny-google-terkep-lng">Szélességi koordináta:</label></th>
        	<td><input name="esemeny-google-terkep-lng" id="esemeny-google-terkep-lng" value="<?php 
        echo $lng;
        ?>
" size="8" ></td>
        </tr>
        <tr valign="top">
        	<th scope="row"><label for="esemeny-google-terkep-lat">Hosszúsági koordináta:</label></th>
        	<td><input name="esemeny-google-terkep-lat" id="esemeny-google-terkep-lat" value="<?php 
        echo $lat;
        ?>
" size="8" ></td>
        </tr>
        <tr valign="top">
        	<th scope="row"><label for="esemeny-google-terkep-szelesseg">Térkép szélessége:</label></th>
        	<td><input name="esemeny-google-terkep-szelesseg" id="esemeny-google-terkep-szelesseg" value="<?php 
        echo $sz;
        ?>
" size="3" >px</td>
        </tr>
        <tr valign="top">
        	<th scope="row"><label for="esemeny-google-terkep-magassag">Térkép magassága:</label></th>
        	<td><input name="esemeny-google-terkep-magassag" id="esemeny-google-terkep-magassag" value="<?php 
        echo $m;
//.........这里部分代码省略.........
开发者ID:hargitaidavid,项目名称:Esemenyek,代码行数:101,代码来源:esemenyek.php

示例13: _e

_e('Assignment Title', 'bpsp');
?>
"/>
        </div>
        <div id="new-assignment-content-textarea">
            <div id="editor-toolbar">
                <div id="media-toolbar">
                    <?php 
echo bpsp_media_buttons();
?>
                </div>
                <?php 
$content = $posted_data['content'] ? $posted_data['content'] : '';
?>
                <?php 
the_editor($content, 'assignment[content]', 'assignment[title]', false);
?>
            </div>
        </div>
        <div id="new-assignment-content-options">
            <input type="hidden" id="new-assignment-post-object" name="assignment[object]" value="group"/>
            <input type="hidden" id="new-assignment-post-in" name="assignment[group_id]" value="<?php 
echo $group_id;
?>
">
            <?php 
echo $nonce ? $nonce : '';
?>
            <div id="new-assignment-content-submit">
                <input type="submit" name="assignment[submit]" id="new-assignment-submit" value="<?php 
_e('Add a new assignment', 'bpsp');
开发者ID:Nuttify,项目名称:buddypress-courseware,代码行数:31,代码来源:new_assignment.php

示例14: attribute_escape

</label></h3>
<div class="inside">
<input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" value="<?php 
echo attribute_escape($comment->comment_author_url);
?>
" tabindex="3" />
</div>
</div>

<div id="postdiv" class="postarea">
<h3><label for="content"><?php 
_e('Comment');
?>
</label></h3>
<?php 
the_editor($comment->comment_content, 'content', 'newcomment_author_url', false, 4);
wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
?>
</div>

<?php 
do_meta_boxes('comment', 'normal', $comment);
?>

<input type="hidden" name="c" value="<?php 
echo $comment->comment_ID;
?>
" />
<input type="hidden" name="p" value="<?php 
echo $comment->comment_post_ID;
?>
开发者ID:nurpax,项目名称:saastafi,代码行数:31,代码来源:edit-form-comment.php

示例15: emodal_admin_modal_form_general_tab_settings_content

function emodal_admin_modal_form_general_tab_settings_content()
{
    ?>
<tr>
		<th scope="row">
			<label for="content">
				<?php 
    _e('Content', EMCORE_SLUG);
    ?>
			</label>
		</th>
		<td>
			<?php 
    $settings = array('textarea_name' => 'modal[content]', 'wpautop' => false);
    if (!function_exists('wp_editor')) {
        the_editor(get_current_modal('content'), "content", $settings);
    } else {
        wp_editor(get_current_modal('content'), "content", $settings);
    }
    ?>
			<p class="description"><?php 
    _e('Modal content. Can contain shortcodes.', EMCORE_SLUG);
    ?>
</p>
		</td>
	</tr><?php 
}
开发者ID:maesson,项目名称:lyft,代码行数:27,代码来源:modal-form-general-tab.php


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