Lars Schenk

Software-Development since 1980

Menu
  • Services
    • Ihre eigene, moderne Website
    • WordPress CMS
    • Content Delivery Network
    • Cloud Hosting
    • Suchmaschinen Optimierung
    • Online Marketing
    • Social Media Marketing
    • Development
    • Digital Publishing für iOS und Android
    • Alexa Skills
    • Barcode Solutions
    • WP Responsive Flickr Gallery
  • History
    • 1988 MS DOS Applications
    • 1990 EtikettenStar
    • 1991 CardStar Plus
    • 1994 SH-CopyStar
    • 1995 Games for Windows
    • 1995 First Website
    • 1997 Websites…
  • About
    • History
    • Partner

WordPress mit FeedWordPress und PostTeaser

  • 25. July 2007
  • 0 comments

Für ein WordPress basierte Projekt werden die Plugins PostTeaser und FeedWordPress eingesetzt.

In dieser Kombination gibt es dabei Probleme: Die von FeedWordPress importierten Beiträge werden nicht vom PostTeaser verarbeitet, so dass sie in den Listendarstellung vollständig erscheinen anstatt angeteasert zu werden. Auch beim Editieren der via FeedWordPress importieren Beiträge gibt es Probleme: Die Absatzformatierungen gehen verloren.

Ich habe mir beide Plugins angeschaut und herausgefunden, dass das Problem durch das Content-Filter-Handling des FeedWordPress Plugins verursacht wird.

Der Autor dokumentiert sein Dilemma wie folgt:

Syndicated items are generally received in output-ready (X)HTML and
should not be folded, crumpled, mutilated, or spindled by WordPress
formatting filters. But we don’t want to interfere with filters for
any locally-authored posts, either.

What WordPress should really have is a way for upstream filters to
stop downstream filters from running at all. Since it doesn’t, and
since a downstream filter can’t access the original copy of the text
that is being filtered, what we will do here is (1) save a copy of the
original text upstream, before any other filters run, and then (2)
retrieve that copy downstream, after all the other filters run, *if*
this is a syndicated post.

Bei meinem Anwendungsfall ist dieses Verhalten aber nicht gewünscht und nicht erforderlich. Damit also der Filter von PostTeaser greifen kann, muss das eigentlich gute Verhalten von FeedWordPress deaktiviert werden. Hierzu kommentiere ich die beiden Zeilen aus, die die entsprechenden Filter in FeedWordPress einklinken:

[PHP]
// add_filter(‘the_content’, ‘feedwordpress_preserve_syndicated_content’, -10000);
// add_filter(‘the_content’, ‘feedwordpress_restore_syndicated_content’, 10000);
[/PHP]

Surftipp: http://projects.radgeek.com/2007/02/23/feedwordpress-filter-poll/

  • Posted in: tech-recipes, Wordpress
  • Tagged: FeedWordPress, PostTeaser, Wordpress
Next Post »
« Previous Post

ActiveBarcode

Barcode solutions since 1994 ActiveBarcode Barcode solution for office and developers


Archive

2016
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004

Lars Schenk

1980 Software-Development

1988 Freelancer

More ...

Social Links

  • Twitter
  • Facebook
  • Flickr
  • Instagram
  • Lastfm
  • Soundcloud
  • GitHub
  • LinkedIn
  • WordPress

 

  • Blog
  • GitHub
  • Keybase
  • Links
  • Imprint
  • Terms
  • Privacy Policy
Top