'; // The shortcodes run after the filter. So we'll check for them in $content instead. $pinit = $options['pinit_pinit']; if ( strpos($content, '[nopinit]') ) $pinit = false; if ( strpos($content, '[dopinit]') ) $pinit = true; // First see if we want to show pins according to the settings. $options = get_option('pin_it_buttons_options'); if ( $pinit==false ) return $content; // Tag all images $html = str_get_html( $content, true, true, DEFAULT_TARGET_CHARSET, false ); if ( $html == false) return $content; foreach($html->find('img') as $e) $e->class .= ' pin-it'; $content = $html; //$html->clear(); unset($html); return $content; } ?>