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

Add shortcode IsNamedParams property #1597

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@moorereason
Contributor

moorereason commented Nov 21, 2015

It would be helpful to know whether a shortcode was called with positional or
named parameters. This commit adds a ParamsType function that returns name
or position.

If this proposed change is acceptable, I can write tests for it.

@bep

This comment has been minimized.

Member

bep commented Nov 21, 2015

I agree this is useful, but I would just make a bool IsNamedParams -- I fail to see how we'll get a third option in there.

Add shortcode IsNamedParams property
It would be helpful to know whether a shortcode was called with positional or
named parameters.  This commit adds a boolean `IsNamedParams` property to the
`ShortcodeWithPage` struct.
@moorereason

This comment has been minimized.

Contributor

moorereason commented Nov 23, 2015

Reworked this PR to change to a boolean IsNamedParams property in ShortcodeWithPage. Tests included. Rebased commits to keep this clean.

@moorereason moorereason changed the title from Add shortcode ParamsType function to Add shortcode IsNamedParams property Nov 23, 2015

@bep bep referenced this pull request Nov 23, 2015

Closed

Document IsNamedParams #1607

@bep

This comment has been minimized.

Member

bep commented Nov 23, 2015

Merged in fde47c5

Would be nice with 1 line in the documentation about this, see #1607

@bep bep closed this Nov 23, 2015

@moorereason moorereason deleted the moorereason:sctype branch Dec 11, 2015

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