WordPress.org

Forums

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

  1. Daniele Raimondi
    Member
    Posted 1 year 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(document).ready(function(){
    	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;
    	}
    }

    http://wordpress.org/plugins/prettyphoto/

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 1 year ago by Daniele Raimondi
  • This topic is not a support question
  • WordPress version: 3.6

Tags

No tags yet.