Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Add shortcode name to shortcode_atts function #45

Open
JiveDig opened this issue May 4, 2018 · 0 comments
Open

Add shortcode name to shortcode_atts function #45

JiveDig opened this issue May 4, 2018 · 0 comments

Comments

@JiveDig
Copy link

JiveDig commented May 4, 2018

I just went to use this to fix #44

// Force Genesis Simple FAQs scripts to load any time shortcode is used.
add_filter( 'shortcode_atts_gs_faq', function( $out ) {
	if ( function_exists( 'Genesis_Simple_FAQ' ) ) {
		Genesis_Simple_FAQ()->assets->enqueue_scripts();
	}
});

but shortcode atts doesn't add the actual shortcode, which makes that filter unusable.

This:

$a = shortcode_atts( array(
	'id'    => '',
	'cat'   => '',
	'limit' => -1,
), $atts );

Should be:

$a = shortcode_atts( array(
	'id'    => '',
	'cat'   => '',
	'limit' => -1,
), $atts, 'gs_faq' );
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants