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

Add shortcode name to shortcode_atts function #45

Open
@JiveDig

Description

@JiveDig

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

Metadata

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