Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-19665 WordPress: set canonical URL when using basepage #107

Merged
merged 7 commits into from
Mar 8, 2017

Conversation

agh1
Copy link
Contributor

@agh1 agh1 commented Nov 18, 2016

@kcristiano
Copy link
Member

commented on JIRA issue https://issues.civicrm.org/jira/browse/CRM-19665


// Yoast SEO has separate way of establishing canonical URL
add_filter( 'wpseo_canonical', array($this, 'basepage_canonical_url' ), 999);

Copy link
Member

@kcristiano kcristiano Nov 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in the CRM-19665 I would want to add:
add_filter( 'aioseop_canonical_url', array($this, 'basepage_canonical_url' ), 999);
here,

@christianwach
Copy link
Member

Likewise commented on Jira. My only observations on the PR itself are minor and somewhat pedantic, but these things tend to build up over time. I'd prefer less idiosyncratic (or perhaps more consistent) use of whitespace, though I recognise that the code styling of this plugin favours CiviCRM's codestyle over that of WordPress. I also note that there's a missing @param description in the new method's docblock.

@kcristiano
Copy link
Member

kcristiano commented Nov 19, 2016

Good point about the docblock.

I have tested this on WP 4.5.4 and WP 4.6.1 and it solves the problem described.

I think we should add All in One SEO support alongside Yoast SEO support. Commented with the code we would need to add.

One added benefit of using the Yoast and AIOSEO filters is that they also work on WP versions prior to 4.5

@agh1
Copy link
Contributor Author

agh1 commented Nov 29, 2016

Those recent changes can be ignored--@kcristiano made a PR against the branch that I didn't see till today, and I merged it not remembering that the change was already included.

@kcristiano
Copy link
Member

I commented here: https://issues.civicrm.org/jira/browse/CRM-19665

Tested again against current master branches, works propoerly. Tested with Yoast SEO, AIOSEO and with no SEO plugin. Works in all conditions.

I consider this a bug fix, and would like to see this patch included with 4.7.17

@kcristiano
Copy link
Member

@colemanw @totten This is ready to merge. Can you review?

@kcristiano
Copy link
Member

@eileenmcnaughton since you have been watching this repo lately, can you take a look at this? It's ready to merge, having this in the next release (4.7.18) would be great.

Thanks

@eileenmcnaughton eileenmcnaughton merged commit 6f391d9 into civicrm:master Mar 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants