Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Allow for alternative file path for json rules #623

Conversation

andykillen
Copy link

@andykillen andykillen commented Feb 21, 2017

Added ability to set own file path for the rules-configuration.json file so that developers can specify their own json rules and not run the risk of updates to this plugin effecting the way their transformed instant articles behave.

This PR:

  • Adds a new filter for setting up the rules-configuration.json ('instant_articles_transformer_rules_configuration_json_file_path')

Added ability to set own file path for the rules-configuration.json file so that developers can specify their own json rules and not run the risk of updates to this plugin effecting the way their transformed instant articles behave.
Copy link
Collaborator

@everton-rosario everton-rosario left a comment

Choose a reason for hiding this comment

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

Just small glitch on spacing.
💅

@@ -602,6 +602,7 @@ public function to_instant_article() {

// Initialize transformer
$file_path = plugin_dir_path( __FILE__ ) . 'rules-configuration.json';
$file_path = apply_filters('instant_articles_transformer_rules_configuration_json_file_path', $file_path );
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just mind the spacing.
$file_path = apply_filters( 'instant_articles_transformer_rules_configuration_json_file_path', $file_path );
💅

Copy link
Author

@andykillen andykillen Mar 13, 2017

Choose a reason for hiding this comment

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

great stuff. many thanks for implementing this little code change/pull request. I'm glad you like it.

@everton-rosario
Copy link
Collaborator

@andykillen,
Just mind the small cosmetic fix.

Thanks for this awesome feature in a really simple way to implement it.

@everton-rosario
Copy link
Collaborator

Please join our group @ Facebook: https://web.facebook.com/groups/629655867187397/
There we have releases, announcements, events and all exchange between all Open Source tools regarding Instant Articles.

Added formatting (space before the filter name)
Copy link
Collaborator

@everton-rosario everton-rosario left a comment

Choose a reason for hiding this comment

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

👍
:shipit:

@everton-rosario everton-rosario merged commit 8cd8141 into Automattic:master Mar 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants