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

Rendering shortcodes twice was disable #525

Closed
maiakhoa opened this issue May 7, 2015 · 4 comments
Closed

Rendering shortcodes twice was disable #525

maiakhoa opened this issue May 7, 2015 · 4 comments

Comments

@maiakhoa
Copy link

maiakhoa commented May 7, 2015

Currently, I'm using the first rendering shortcodes to collect dynamic css, after upgrade to new version of Shortcodes Extension. It was turned off that functions. Anyone have the solutions for this case ?

@ghost
Copy link

ghost commented May 7, 2015

Try this action

@danyj
Copy link
Contributor

danyj commented May 7, 2015

see this #275 (comment)

I did this

in

themes\themename\inc\unyson-extend-name\extensions\shortcodes

add file name hooks.php

inside add

function _thz_section_css($data) {

    $atts = _thz_shortcode_options($data);
    // my section inline css
}
add_action(
    'fw_ext_shortcodes_enqueue_static:section',
    '_thz_section_css'
);

/*
    get sortcode options

*/
function _thz_shortcode_options($data){

    $atts = shortcode_parse_atts( $data['atts_string'] );
    $atts = fw_ext('page-builder')->get_shortcode_atts_coder()->decode_atts( $atts );   

    return $atts;
}

@ghost
Copy link

ghost commented May 7, 2015

If you want to extract attributes encoded array values, use this #275 (comment)

@maiakhoa
Copy link
Author

maiakhoa commented May 7, 2015

Thank @moldcraft and @danyj
it's the way that solve my case.

@maiakhoa maiakhoa closed this as completed May 7, 2015
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

No branches or pull requests

2 participants