Fix filters for tinymce plugin
This commit is contained in:
		@@ -59,12 +59,6 @@ if ( !class_exists( 'CognitoFormsPlugin' ) ) {
 | 
				
			|||||||
				add_action( $action, array( $this, $action ) );
 | 
									add_action( $action, array( $this, $action ) );
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// Registers plug-in filters
 | 
					 | 
				
			||||||
		private function add_filters( $filters ) {
 | 
					 | 
				
			||||||
			foreach ( $filters as $filter )
 | 
					 | 
				
			||||||
				add_filter( $filter, array( $this, $filter ) );
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		// Registers shortcodes
 | 
							// Registers shortcodes
 | 
				
			||||||
		private function add_shortcodes( $shortcodes ) {
 | 
							private function add_shortcodes( $shortcodes ) {
 | 
				
			||||||
			foreach ( $shortcodes as $tag => $func )
 | 
								foreach ( $shortcodes as $tag => $func )
 | 
				
			||||||
@@ -171,10 +165,8 @@ if ( !class_exists( 'CognitoFormsPlugin' ) ) {
 | 
				
			|||||||
		// Initialize classic editor (TinyMCE)
 | 
							// Initialize classic editor (TinyMCE)
 | 
				
			||||||
		public function tinymce_init() {
 | 
							public function tinymce_init() {
 | 
				
			||||||
			if ( get_user_option( 'rich_editing' ) == 'true' ) {
 | 
								if ( get_user_option( 'rich_editing' ) == 'true' ) {
 | 
				
			||||||
				$this->add_filters( array(
 | 
									add_filter( 'mce_buttons', array( $this, 'tinymce_buttons' ) );
 | 
				
			||||||
					'tinymce_buttons',
 | 
									add_filter( 'mce_external_plugins', array( $this, 'tinymce_external_plugins' ) );
 | 
				
			||||||
					'tinymce_external_plugins'
 | 
					 | 
				
			||||||
				) );
 | 
					 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user