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

Introduce meta description presenter #13411

Closed
wants to merge 11 commits into from
Closed

Conversation

herregroen
Copy link
Contributor

Summary

Introduces the first presenter for indexables. Intended primarily to serve as an example for future development.

This PR can be summarized in the following changelog entry:

  • No user-facing changes.

Relevant technical choices:

  • Only simple pages are supported for now, in all other cases it falls back to the original behaviour.

Test instructions

This PR can be tested by following these steps:

  • Enable the YOAST_SEO_EXPERIMENTAL_PHP56 and YOAST_SEO_INDEXABLES feature flags.
  • The meta description on the front-end should remain identical.
  • For every post you visit on the front-end a new entry in the indexables table should be created.

Documentation

  • I have written documentation for this change.

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests to verify the code works as intended

/**
* @var Meta_Description_Presenter
*/
protected $post_type_meta_description_presenter;
Copy link

Choose a reason for hiding this comment

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

Avoid excessively long variable names like $post_type_meta_description_presenter. Keep variable name length under 30.

* @param Meta_Description_Presenter $post_type_meta_description_presenter
*/
public function __construct(
Post_Type_Meta_Description_Presenter $post_type_meta_description_presenter
Copy link

Choose a reason for hiding this comment

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

Avoid excessively long variable names like $post_type_meta_description_presenter. Keep variable name length under 30.

@herregroen herregroen closed this Nov 11, 2019
@herregroen herregroen deleted the meta-description-presenter branch November 11, 2019 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant