{"action":"created","issue":{"url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/5047","repository_url":"https://api.github.com/repos/Yoast/wordpress-seo","labels_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/5047/labels{/name}","comments_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/5047/comments","events_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/5047/events","html_url":"https://github.com/Yoast/wordpress-seo/pull/5047","id":162995310,"number":5047,"title":"Added \"wpseo_sitemap_index_url\" filter to $url['loc'] variable within…","user":{"login":"meta4creations","id":1682207,"avatar_url":"https://avatars.githubusercontent.com/u/1682207?v=3","gravatar_id":"","url":"https://api.github.com/users/meta4creations","html_url":"https://github.com/meta4creations","followers_url":"https://api.github.com/users/meta4creations/followers","following_url":"https://api.github.com/users/meta4creations/following{/other_user}","gists_url":"https://api.github.com/users/meta4creations/gists{/gist_id}","starred_url":"https://api.github.com/users/meta4creations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meta4creations/subscriptions","organizations_url":"https://api.github.com/users/meta4creations/orgs","repos_url":"https://api.github.com/users/meta4creations/repos","events_url":"https://api.github.com/users/meta4creations/events{/privacy}","received_events_url":"https://api.github.com/users/meta4creations/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Yoast/wordpress-seo/labels/xml%20sitemap","name":"xml sitemap","color":"006b75"}],"state":"closed","locked":false,"assignee":{"login":"Rarst","id":737584,"avatar_url":"https://avatars.githubusercontent.com/u/737584?v=3","gravatar_id":"","url":"https://api.github.com/users/Rarst","html_url":"https://github.com/Rarst","followers_url":"https://api.github.com/users/Rarst/followers","following_url":"https://api.github.com/users/Rarst/following{/other_user}","gists_url":"https://api.github.com/users/Rarst/gists{/gist_id}","starred_url":"https://api.github.com/users/Rarst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rarst/subscriptions","organizations_url":"https://api.github.com/users/Rarst/orgs","repos_url":"https://api.github.com/users/Rarst/repos","events_url":"https://api.github.com/users/Rarst/events{/privacy}","received_events_url":"https://api.github.com/users/Rarst/received_events","type":"User","site_admin":false},"assignees":[{"login":"Rarst","id":737584,"avatar_url":"https://avatars.githubusercontent.com/u/737584?v=3","gravatar_id":"","url":"https://api.github.com/users/Rarst","html_url":"https://github.com/Rarst","followers_url":"https://api.github.com/users/Rarst/followers","following_url":"https://api.github.com/users/Rarst/following{/other_user}","gists_url":"https://api.github.com/users/Rarst/gists{/gist_id}","starred_url":"https://api.github.com/users/Rarst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rarst/subscriptions","organizations_url":"https://api.github.com/users/Rarst/orgs","repos_url":"https://api.github.com/users/Rarst/repos","events_url":"https://api.github.com/users/Rarst/events{/privacy}","received_events_url":"https://api.github.com/users/Rarst/received_events","type":"User","site_admin":false}],"milestone":null,"comments":15,"created_at":"2016-06-29T18:31:54Z","updated_at":"2016-09-20T14:44:50Z","closed_at":"2016-08-22T16:32:04Z","pull_request":{"url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/5047","html_url":"https://github.com/Yoast/wordpress-seo/pull/5047","diff_url":"https://github.com/Yoast/wordpress-seo/pull/5047.diff","patch_url":"https://github.com/Yoast/wordpress-seo/pull/5047.patch"},"body":"… the sitemap_index_url function. Line 189\r\n\r\nI would like to add a filter to the sitemap_index_url. We are using WP Multisite with domain mapping and want to keep the Dashboard rendering as the full multisite url so we can navigate easily between sites. But, keeping this option makes our sitemaps render the multisite urls as opposed to the mapped domain urls. I am able to filter individual post urls using the \"wpseo_sitemap_entry\" filter, but there currently isn't a filter to modify the urls contained in the \"sitemap_index.xml\" file. This merge would resolve that issue.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/comments/248322975","html_url":"https://github.com/Yoast/wordpress-seo/pull/5047#issuecomment-248322975","issue_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/5047","id":248322975,"user":{"login":"meta4creations","id":1682207,"avatar_url":"https://avatars.githubusercontent.com/u/1682207?v=3","gravatar_id":"","url":"https://api.github.com/users/meta4creations","html_url":"https://github.com/meta4creations","followers_url":"https://api.github.com/users/meta4creations/followers","following_url":"https://api.github.com/users/meta4creations/following{/other_user}","gists_url":"https://api.github.com/users/meta4creations/gists{/gist_id}","starred_url":"https://api.github.com/users/meta4creations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meta4creations/subscriptions","organizations_url":"https://api.github.com/users/meta4creations/orgs","repos_url":"https://api.github.com/users/meta4creations/repos","events_url":"https://api.github.com/users/meta4creations/events{/privacy}","received_events_url":"https://api.github.com/users/meta4creations/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T14:44:50Z","updated_at":"2016-09-20T14:44:50Z","body":"I'm sorry, but I'm having a hard time following your suggestions or questions. Do you know where @moorscode is suggesting that I add the following code?:\r\n```\r\nadd_filter( 'option_home', array( self, 'force_base_url' ) );\r\n$url = home_url( $base . $page, parse_url( get_option( 'home' ), PHP_URL_SCHEME ) );\r\nremove_filter( 'option_home', array( self, 'force_base_url' ) );\r\n\r\nreturn $url;\r\n```\r\nIt looks like he's suggesting modifying the SEO plugin to add this, which is what I'm attempting to get around so I don't have to modify the file with every update of the plugin.\r\n\r\n@Rarst, you suggested:\r\n\r\n> Do it conditionally in a context you need? Such as sitemap being loaded. If it's not just not add a filter.\r\n\r\nPlease let me know how to do it conditionally when the sitemap is being loaded. This is what I'm stuck on. I understand that I can filter what the home_url return using the \"option_home\" filter, but how do I limit it to only filter when the sitemaps are being rendered?\r\n\r\nAgain, my only goal is to be able to modify the link urls contained on the sitemap_index.xml file. There is already a built in filter to modify links contained on individual page/post sitemap files (wpseo_sitemap_entry). I'm a little confused as to why it's such a bad idea to add a filter to links for the sitemap_index file?\r\n\r\nThanks again for the help!"}}
{"actor":{"display_login":"meta4creations"}}