-
Notifications
You must be signed in to change notification settings - Fork 219
Allow for alternative file path for json rules #623
Allow for alternative file path for json rules #623
Conversation
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.
There was a problem hiding this 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.
💅
class-instant-articles-post.php
Outdated
@@ -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 ); |
There was a problem hiding this comment.
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 );
💅
There was a problem hiding this comment.
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.
@andykillen, Thanks for this awesome feature in a really simple way to implement it. |
Please join our group @ Facebook: https://web.facebook.com/groups/629655867187397/ |
Added formatting (space before the filter name)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
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: