Support » Plugin: WordPress prettyPhoto » use class instead of rel attribute

  • As the only way to add a rel attribute to links is to switch to the text editor, I’ve made a little change in js/wpp-active.js in the plugin, to enable activation of prettyPhoto via class attribute also:

    	jQuery("a[rel^='prettyPhoto'], a.prettyPhoto").prettyPhoto();

    This way we can even add a “prettyPhoto” class to the tinyMce class selector and make the “prettified link operation” simple for every user.

    add_filter('tiny_mce_before_init', 'myCustomTinyMCE' );
    /* Custom CSS styles on TinyMCE Editor */
    if ( ! function_exists( 'myCustomTinyMCE' ) ) {
    	function myCustomTinyMCE($init) {
    		//$init['theme_advanced_styles'] = 'In evidenza=evidenced; Bottone Verde=verde';
    		$init['theme_advanced_styles'] = 'prettyPhoto=prettyPhoto';
    		return $init;

  • The topic ‘use class instead of rel attribute’ is closed to new replies.