%s', admin_url( 'options-general.php?page=advanced-tinymce-configuration' ), __( 'Settings', 'adv-mce-config' ) ); $links = (array) $links; array_unshift( $links, $settings_link ); } return $links; } add_action( 'admin_menu', 'advmceconf_menu' ); function advmceconf_menu() { if ( function_exists( 'add_options_page' ) ) { add_options_page( 'TinyMCE Config', 'TinyMCE Config', 'manage_options', 'advanced-tinymce-configuration', 'advmceconf_admin' ); } } function advmceconf_admin() { global $advmceconf_show_defaults; if ( ! current_user_can( 'manage_options' ) ) { wp_die( 'Invalid request' ); } $message = ''; $options = get_option( 'advmceconf_options', array() ); $version = get_option( 'advmceconf_version', 0 ); if ( ! empty( $_POST['advmceconf_save'] ) ) { check_admin_referer( 'advmceconf-save-options' ); $old_options = $options; if ( empty( $_POST['advmceconf_options'] ) || ! is_array( $_POST['advmceconf_options'] ) ) { $new_options = array(); } else { $new_options = $_POST['advmceconf_options']; } if ( ! empty( $_POST['advmceconf-new'] ) && isset( $_POST['advmceconf-new-val'] ) ) { $new_options[ $_POST['advmceconf-new'] ] = $_POST['advmceconf-new-val']; } foreach ( $new_options as $key => $val ) { $key = preg_replace( '/[^a-z0-9_]+/i', '', $key ); if ( empty( $key ) ) continue; if ( isset( $_POST[ $key ] ) && empty( $_POST[ $key ] ) ) { unset( $options[ $key ] ); continue; } $val = trim( stripslashes( $val ) ); if ( 'true' === $val ) { $options[ $key ] = true; } elseif ( 'false' === $val ) { $options[ $key ] = false; } else { $options[ $key ] = $val; } } if ( $options != $old_options ) { update_option( 'advmceconf_options', $options ); $message = '
' . __( 'Options saved.', 'adv-mce-config' ) . '
false. These strings are converted to boolean when saving.', 'adv-mce-config' ); ?>block_formats setting from the example in the TinyMCE documentation:', 'adv-mce-config' ); ?>

block_formats in the Option name field and Paragraph=p;Header 1=h1;Header 2=h2;Header 3=h3 in the Value field:', 'adv-mce-config' ); ?>
