Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.
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

Description

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' );

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions