Yoast/wordpress-seo — pull request #1520 by mgmartel (2014-08-31 09:22:02+00:00)
Title: Pass $post_id in all WPSEO_Meta::get_value calls in metabox - fixes #1519

If another plugin overwrites the global $post in `post.php`, the SEO metabox displays the metadata from the wrong post, and consequently saves the wrong data to the right post, leading to the strange behaviour of #1519.

WP SEO already fetched the correct post by checking for `$_GET['post']` first, but didn't pass this post on in `WPSEO_Meta::get_value` calls. All `get_value` calls in the metabox now get the post ID as well. The check for `$_GET['post']` was happening quite often in the class, so I also abstracted that into the private method `WPSEO_Metabox::get_metabox_post()`.