WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Daniele Raimondi
    Member
    Posted 10 months 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/

Reply

You must log in to post.

About this Plugin

About this Topic

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

Tags

No tags yet.