WordPress.org

Support

Support » Plugins and Hacks » WPBook » [Resolved] [Plugin: WPBook] Allow 3rd party plugins to edit the attachment

[Resolved] [Plugin: WPBook] Allow 3rd party plugins to edit the attachment

  • Hi.

    Thanks for all the effort you put in this pluggin.

    I want to allow mudslideshow (a plugin of mine) to edit the ‘attachment’ after WPBook sends it to Facebook. The reason: thumbnails in MudSlideShow comes from picasa, and WPBook can’t get them.

    To solve this, I want you to add this line before each api call where WPBook send the attachment:

    $attachment = apply_filters('wpbook_attachment', $attachment, $my_post->ID);

    This way I can add the filter inside Mudslideshow and allow the plugin to define the thumbnail.

    Thanks in advance.

    http://wordpress.org/extend/plugins/wpbook/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor BandonRandon

    @bandonrandon

    Do you know if there are other plugins that would use the attachment feature. Personally this seems like it’s a customization that very few users would benifit from so I don’t think it needs to be in core. It also seems simple enough for you to be able to modify the code for your own need.

    Thanks for your quick answer.

    Let me use the WP core as an example. Imagine how hard would it be to create new plugins without WP’s filters, and pay attention to the fact that there are filters everywhere in the core, even in the strangest functions, although the core developers didn’t know if someone would use them. They do it to allow us -3rd party plugin developers- to interact with the core.

    Add the filter at this moment would help only one developer, but you don’t know how would it help others in the future. And it only requires to add the line I suggest just before call the api with the attachment.

    I searched through the WP core trying to figure how to do it inside MudSlideShow without having to ask for your help, but the ‘thumbnail’ functions requieres the image to be in the local server, and MudSlideShow uses the images in Picasa or Flickr. As you have suggested I can modify the code inside WPBook, but this would require me to modify it on every new release.

    Add this filter would help me at this mommnent, but would come handdy when other users ask you how to interact with WPBook.

    Plugin Author John Eckman

    @johneckman

    I’m open to the concept – thanks for the suggestion.

    In general I’d like lots of other plugins to be able to modify what WPBook does, and adding a filter will be a nice way to handle it.

    Thanks for add the filter. The next release of mudslideshow would use it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] [Plugin: WPBook] Allow 3rd party plugins to edit the attachment’ is closed to new replies.
Skip to toolbar