Decoding of attributes not working #776
Decoding of attributes not working #776sathyapulse wants to merge 1 commit intowp-shortcake:masterfrom
Conversation
… private variable
|
I'm not sure I understand the problem you're describing. Are you saying that I'd look at the way you're calling |
|
@goldenapples Yes, the attributes are not decoded even after passing shortcode name as its third parameter. The function The function The CC: @mattheu |
|
My question, though, is: how are you registering the shortcode UI? On what hook? It's true that the Or am I misunderstanding your question? |
|
@goldenapples Yes, I understand what you mean. The shortcode UI function is called in the action hook |
When we set the encode attribute to any field, the values are encoded and stored in the database but the decode is not working in the post edit screen or the front end. The reason for that is the action
register_shortcode_uiis called from https://github.com/wp-shortcake/shortcake/blob/master/inc/class-shortcode-ui.php#L81 and it will hook the filter here https://github.com/wp-shortcake/shortcake/blob/master/inc/class-shortcode-ui.php#L170. The filter is not called every time. It causes issues with decoding.The PR does not actually solves the problem but it will enable developers to register the filter outside of the plugin. The decode function is not working when we hook it because it uses the private variable to get the shortcodes. The PR changes modifies it to use the function.