でリッチテキストエディタを追加は、私はこれらのコードを使用して、私のWPのプラグインにTinyMCEのテキストエディタを追加WPプラグイン
the_editor("", "content", "", false);
私の質問は、私入力し、いくつかの場合、ありますエディタに物事をデータはどこに保存されますか?どのテーブルに?
でリッチテキストエディタを追加は、私はこれらのコードを使用して、私のWPのプラグインにTinyMCEのテキストエディタを追加WPプラグイン
the_editor("", "content", "", false);
私の質問は、私入力し、いくつかの場合、ありますエディタに物事をデータはどこに保存されますか?どのテーブルに?
どのように設定プラグインによっては、これはオプションとして保存「することができ」、
すなわち:
<?php
// Grab our options, IF your using Options
// if not you can create and use your own tables to store data
$options = get_option('your_plugin_options');
// using a hidden field on the form called action with a value of 'save'
if(isset($_POST['action']) && ($_POST['action']=='save')){
$options['main_content'] = trim($_POST['content']);
$newOptions = array('main_content' => $options['main_content']);
update_option('your_plugin_options', $newOptions);
}
?>
これは、ワードプレスのテーブルwp_options内
をオプションを作成します。あなたがそのオプションを参照したいのであれば、単にそれを叫ぶだけです。
<?php
$options = get_option('your_plugin_options');
$new_content = $options['main_content'];
echo $options['main_content'];
//or
echo $new_content;
?>
うまくいけば、これは正しい方向にあなたを指します。 を通読している:
は// getオプションを使用して http://codex.wordpress.org/Function_Reference/get_option
//更新オプション http://codex.wordpress.org/Function_Reference/update_option
//プラグイン http://codex.wordpress.org/Creating_Tables_with_Plugins
幸運 マーティで別々のテーブルを作成します