Changeset 4607
- Timestamp:
- 12/20/2012 01:40:53 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/includes/common/template-tags.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/common/template-tags.php
r4606 r4607 1690 1690 1691 1691 // Enable additional TinyMCE plugins before outputting the editor 1692 add_filter( 'tiny_mce_plugins', 'bbp_get_tiny_mce_plugins' ); 1693 add_filter( 'teeny_mce_plugins', 'bbp_get_tiny_mce_plugins' ); 1694 add_filter( 'teeny_mce_buttons', 'bbp_get_teeny_mce_buttons' ); 1692 add_filter( 'tiny_mce_plugins', 'bbp_get_tiny_mce_plugins' ); 1693 add_filter( 'teeny_mce_plugins', 'bbp_get_tiny_mce_plugins' ); 1694 add_filter( 'teeny_mce_buttons', 'bbp_get_teeny_mce_buttons' ); 1695 add_filter( 'quicktags_settings', 'bbp_get_quicktags_settings' ); 1695 1696 1696 1697 // Output the editor … … 1709 1710 1710 1711 // Remove additional TinyMCE plugins after outputting the editor 1711 remove_filter( 'tiny_mce_plugins', 'bbp_get_tiny_mce_plugins' ); 1712 remove_filter( 'teeny_mce_plugins', 'bbp_get_tiny_mce_plugins' ); 1713 remove_filter( 'teeny_mce_buttons', 'bbp_get_teeny_mce_buttons' ); 1712 remove_filter( 'tiny_mce_plugins', 'bbp_get_tiny_mce_plugins' ); 1713 remove_filter( 'teeny_mce_plugins', 'bbp_get_tiny_mce_plugins' ); 1714 remove_filter( 'teeny_mce_buttons', 'bbp_get_teeny_mce_buttons' ); 1715 remove_filter( 'quicktags_settings', 'bbp_get_quicktags_settings' ); 1714 1716 1715 1717 /** … … 1765 1767 1766 1768 /** 1767 * Edit T inyMCE buttons to match allowedtags1769 * Edit TeenyMCE buttons to match allowedtags 1768 1770 * 1769 1771 * @since bbPress (r4605) … … 1787 1789 1788 1790 return apply_filters( 'bbp_get_teeny_mce_buttons', $buttons ); 1791 } 1792 1793 /** 1794 * Edit TinyMCE quicktags buttons to match allowedtags 1795 * 1796 * @since bbPress (r4606) 1797 * 1798 * @param array $buttons 1799 * @see quicktags_settings 1800 * @return array Quicktags settings 1801 */ 1802 function bbp_get_quicktags_settings( $settings = array() ) { 1803 1804 // Get buttons out of settings 1805 $buttons_array = explode( ',', $settings['buttons'] ); 1806 1807 // Diff the ones we don't want out 1808 $buttons = array_diff( $buttons_array, array( 1809 'ins', 1810 'img', 1811 'more', 1812 'spell' 1813 ) ); 1814 1815 // Put them back into a string in the $settings array 1816 $settings['buttons'] = implode( ',', $buttons ); 1817 1818 return apply_filters( 'bbp_get_quicktags_settings', $settings ); 1789 1819 } 1790 1820
Note: See TracChangeset
for help on using the changeset viewer.