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

Make SEO attribute length public values for use in filters #9861

Open
galbaras opened this issue May 26, 2018 · 6 comments
Open

Make SEO attribute length public values for use in filters #9861

galbaras opened this issue May 26, 2018 · 6 comments

Comments

@galbaras
Copy link

The length of the meta description is about to change again, and it's hardcoded in the plugin, which means that any filter I write that uses the length-du-jour must be updated.

Can this be made accessible to filters somehow, e.g. via a wpseo_meta_description_length() function?

@galbaras
Copy link
Author

Actually, a better idea is to put a filter on it. Then, plugin users can override the length if they want to, but the default will be the length set by the plugin.

@Pcosta88
Copy link
Contributor

related: #10030

@galbaras
Copy link
Author

I was referring to programming filters, not view filters on admin pages. Sorry if this wasn't clear.

So basically, instead of using the literal number 155, the plugin code should use apply_filters( 'wpseo_meta_description_length', 155 );

@benvaassen
Copy link
Contributor

Thank you for opening a feature request.

I've labeled this issue needs decision which means our product managers will assess your request.

@jonoalderson
Copy link

This makes sense. Given Google's intentional ambiguity around what an 'optimal' length is (and likely future changes), we're likely to have users with different preferences and opinions on what an appropriate length may be in their case.

We should make this easily filterable.

@ogodoabiola
Copy link

Please inform the customer of conversation #781185 when this conversation has been closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants