Cristi Burcă
Cristi Burcă
Can you post a few "before and after" examples of this new behavior?
Actually, I think this would be a good time to introduce some phpunit tests that cover all the branches touched by the pull request: T_IF, T_WHILE etc.
I know that, compared to implementing a new feature, writing tests seems like a chore, but it's necessary, particularly for such a script, with many many branches. If you're not...
When passing the first code block through wp-phptidy, it should remain unchanged.
We should add some automated tests before making this change. I'm thinking a series of sample PHP code that needs to remain unchanged when passed through phptidy.
> i think we could copy how the laravel blade template "engine" tests are done. The problem with that approach is that it's messy to have big chunks of PHP...
That's a good idea. editable_option() could accept a 'subkey' parameter: ``` php ```
It prefixes the option name with `editable_option_` for safety. You can disable the prefixing by passing `theme_option => false`: `editable_option( array( 'key' => 'my_option', 'theme_option' => false ) );`
This is a bigger problem that needs to be fixed: #57
I guess you can put it like that.