Forums

[Plugin: Automatic SEO Links] Setting Captions as an Exception (4 posts)

  1. FinkAboutIt.com
    Member
    Posted 1 year ago #

    Hope somebody can help me:

    I want to exclude captions from being linked. Captions are organised like this:
    <img class="size-full wp-image-1341" title="Word" src="****/icon_word.jpg" alt="word" height="37" width="37"><p class="wp-caption-text">Word</p>

    How do I add a routine ignoring thise wp-caption-texts in here:

    $noChanges = array(
    						'/<h[1-6][^>]*>[^<]*'.$link->text.'[^<]*<\/h[1-6]>/i',
    						'/<a[^>]+>[^<]*'.$link->text.'[^<]*<\/a>/i',
    						'/href=("|\')[^"\']+'.$link->text.'(.*)[^"\']+("|\')/i',
    						'/src=("|\')[^"\']*'.$link->text.'[^"\']*("|\')/i',
    						'/alt=("|\')[^"\']*'.$link->text.'[^"\']*("|\')/i',
    						'/title=("|\')[^"\']*'.$link->text.'[^"\']*("|\')/i',
    						'/content=("|\')[^"\']*'.$link->text.'[^"\']*("|\')/i',
    						'/<script[^>]*>[^<]*'.$link->text.'[^<]*<\/script>/i',
    						'/<embed[^>]+>[^<]*'.$link->text.'[^<]*<\/embed>/i',
    						'/wmode=("|\')[^"\']*'.$link->text.'[^"\']*("|\')/i'
                                                   );

    Can anybody tell me?

    Thanks?

  2. FinkAboutIt.com
    Member
    Posted 1 year ago #

    Come on, guys.

  3. warevil
    Member
    Posted 1 year ago #

    Here you got the answer:

    $noChanges = array(
    						'/<h[1-6][^>]*>[^<]*'.$link->text.'[^<]*<\/h[1-6]>/i',
    						'/<a[^>]+>[^<]*'.$link->text.'[^<]*<\/a>/i',
    						'/href=("|\')[^"\']+'.$link->text.'(.*)[^"\']+("|\')/i',
    						'/src=("|\')[^"\']*'.$link->text.'[^"\']*("|\')/i',
    						'/alt=("|\')[^"\']*'.$link->text.'[^"\']*("|\')/i',
    						'/title=("|\')[^"\']*'.$link->text.'[^"\']*("|\')/i',
    						'/content=("|\')[^"\']*'.$link->text.'[^"\']*("|\')/i',
    						'/caption=("|\')[^"\']*'.$link->text.'[^"\']*("|\')/i',
    						'/<script[^>]*>[^<]*'.$link->text.'[^<]*<\/script>/i',
    						'/<embed[^>]+>[^<]*'.$link->text.'[^<]*<\/embed>/i',
    						'/wmode=("|\')[^"\']*'.$link->text.'[^"\']*("|\')/i'
    					);
  4. FinkAboutIt.com
    Member
    Posted 10 months ago #

    You are the CHAMP! Thanks a lot, mate!

Topic Closed

This topic has been closed to new replies.

About this Topic