• i really like this plugin, it’s very helpful. to make it even more flexible can you please add in a filter right before you add the post. on line 398 please consider adding:

    if ( apply_filters( 'sitewide_tags_add_post', true, $post ) == false )
    		return;

    or something more elegant. that way I can check if a post has this or that before the plugin copies it over. many thanks.

    http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Ron Rennick

    (@wpmuguru)

    The easy way you can do that now is hook save_post at priority 9, check the post & if you don’t want it to publish, add a filter the SWT settings and turn it off for that post.

    Thread Starter Dwenaus

    (@dwenaus)

    that is helpful. but how do I know the save post is happening from within this plugin? Is there a downside to adding the filter. now that I think about it more, perhaps the filter should not be just for true, but it should be for the post itself, that way people could alter the post, add stuff, change it, etc. using your cool plugin. this is the second time I’ve needed to hack your plugin because not enough action or filter hooks exits. luckily you don’t update it that often! thanks so much.

    Plugin Author Ron Rennick

    (@wpmuguru)

    SWT uses the save_post hook to copy the post to the tags blog.

    The filter you need to add in your plugin is pre_site_option_sitewide_tags_blog.

    old topic but seems to adres my issue.

    i would like to trim the post like an excerpt before it’s saved to the tags-blog.

    you suggest to use pre_site_option_sitewide_tags_blog but this one fires before the plugin is loaded?

    Plugin Author Ron Rennick

    (@wpmuguru)

    i would like to trim the post like an excerpt before it’s saved to the tags-blog.

    you suggest to use pre_site_option_sitewide_tags_blog but this one fires before the plugin is loaded?

    No, I didn’t suggest the filter for that purpose.

    To do what you are describing, you’ll have to write your own post handling function. There is nothing in SWT that makes any changes to the post content.

    With SWT if you want to limit what’s displayed on the tags blog you do that in the theme used on the tags blog.

    right,

    A filter action on the post en the global meta would help.

    to modify the permalink for example to the correct mapped domain

    I could set a content filter before the output, however i prefer to have the content trimmed before it’s copied.

    Plugin Author Ron Rennick

    (@wpmuguru)

    You missed what I said in the second paragraph:

    To do what you are describing, you‘ll have to write your own post handling function.

    hi,

    didn’t mis your remark about the post-handling function. Adding one to the theme is not my prefered option.

    I can’t add a filter to the save post because that one would fire for any post. So to be able to alter the content of the post I would need a filter like swt_save_post applied just before the call the wp_inster_post

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WordPress MU Sitewide Tags Pages] suggestion for filter’ is closed to new replies.