chuckreynolds / WPFBOGP

WordPress Open Graph plugin development
wordpress.org/plugins/wp-facebook-open-graph-protocol/
13 stars 19 forks source link

Check post thumbnail images for relative paths and prepend site URLs #33

Closed jjeaton closed 10 years ago

jjeaton commented 10 years ago

The find_images method already does this for all images in the post that aren't the featured image. (lines 92-96)

The same logic would need to be added starting around line 266 where the post thumbnail is added to the $wpfbogp_images array. I didn't think it would be possible for this to not have the full URL, but if a site has the "Full URL path to files" set in the Media settings (ugh), this will happen.

2014-04-21 at 11 03 am

If, by chance, this could make it into a 2.0.11 release, that would be awesome and I can happily throw away my forked version of the plugin. :smiley:

jjeaton commented 10 years ago

I can submit a PR for master if that helps grease the wheels for 2.0.11. :)

chuckreynolds commented 10 years ago

@jjeaton looks ok i'd have to test it but looks fine. Also would site_url not break if in multisite?

I'd like to make sure it won't break multisite, then feel free to pull to 2.0.10.

I'd like to really get this dev version out to production/repo but was having problem updating from the repo - it white-screened some sites and I had to revert.

jjeaton commented 10 years ago

Will it break multisite? (I don't have a multisite install handy right now to test.)

http://queryposts.com/function/get_site_url/

site_url just calls get_site_url with null for the blog_id which defaults to the current blog, so while I don't have a quick way to test that right now, it "shouldn't" break anything.

jjeaton commented 10 years ago

@chuckreynolds I finally got a multisite up and running on my vagrant setup and tested these changes on a multisite network. As I mentioned before, site_url works just fine with multisite, and I verified that relative images are prepended with the correct site_url (depending on the current site in the network). I'll submit another PR for the master branch as well for a hopeful 2.0.11 release. Thanks!

chuckreynolds commented 10 years ago

merged into develop and doing initial push to master for 2.0.11 w/ this. need to test it then make sure there's nothing else I need to do to 2.0.11/master before pushing it into the wild. just backed up today. hopefully this weekend I can zip through this plugin

jjeaton commented 10 years ago

Awesome thanks!

On Friday, May 16, 2014, Chuck Reynolds notifications@github.com wrote:

Closed #33 https://github.com/chuckreynolds/WPFBOGP/issues/33.

— Reply to this email directly or view it on GitHubhttps://github.com/chuckreynolds/WPFBOGP/issues/33#event-122089520 .