Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // para renderizar o editor:
- function apresentacao_texto_setting() {
- $options = get_option('p_apresentacao');
- wp_editor( get_post_meta(
- $post->ID,
- 'apresentacaotexto',
- true
- ),
- 'apresentacaotexto', // editor id
- $settings = array(
- 'wpautop' => false,
- 'media_buttons' => false,
- 'editor_height' => 150,
- 'teeny' => true
- )
- );
- }
- // depois, para tentar salvar no banco de dados:
- function proserv_save_custom_fields() {
- global $post;
- update_post_meta(
- $post->ID,
- 'apresentacaotexto',
- $_POST['apresentacaotexto']
- );
- }
- add_action('save_post', 'proserv_save_custom_fields');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement