WordPress prettyPhoto
use class instead of rel attribute (1 post)

  1. Daniele Raimondi
    Posted 2 years ago #

    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;


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress prettyPhoto
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by Daniele Raimondi
  • This topic is not a support question
  • WordPress version: 3.6


No tags yet.