Classic_Editor::tinymce()

Add filters to put tinymce plugin buttons on editor rich edit mode


Return

(null)


Source

File: includes/libs/admin/editor/classic-editor.class.php

	public function tinymce(){
		// Don't bother doing this stuff if the current user lacks permissions
		if( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) )
			return;

			// Don't load unless is post editing (includes post, page and any custom posts set)
		$screen = get_current_screen();
		if( !$screen || 'post' != $screen->base || Plugin::instance()->get_cpt()->get_post_type() == $screen->post_type ){
			return;
		}

		// Add only in Rich Editor mode
		if( get_user_option( 'rich_editing' ) == 'true' ){

			wp_enqueue_script( [
					'jquery-ui-dialog'
			] );

			wp_enqueue_style( [
					'wp-jquery-ui-dialog'
			] );

			add_filter( 'mce_external_plugins', [
					$this,
					'tinymce_plugins'
			] );
			add_filter( 'mce_buttons', [
					$this,
					'tinymce_buttons'
			] );
		}
	}

Start your video site now!

Manage and coordinate your Vimeo channels, albums or videos with your WordPress website. Perfect fit for membership, portfolio, online courses or any type of video collection.

Get Vimeotheque PRO!