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

Default attributes #2

Open
braseidon opened this issue Sep 2, 2014 · 1 comment
Open

Default attributes #2

braseidon opened this issue Sep 2, 2014 · 1 comment

Comments

@braseidon
Copy link

Hey there, awesome package! I've already gotten a ton of use for this.

This isn't really an issue, I was just wondering how you would go about adding default attributes for each shortcode. Currently I am creating a new file for each shortcode class, and registering them when the application loads the content. Each shortcode has its own default attributes set as protected variables. If the array_get turns up null, then we grab the default attribute.

Cheers!

@braseidon
Copy link
Author

After looking into this... I found that array_get actually has a default attribute!

array_get($array, $key, $default = null)

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

1 participant