Add shortcode IsNamedParams property #1597

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@moorereason
Member

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.

Show comment
Hide comment
@bep

bep Nov 21, 2015

Member

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.

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.

Show comment
Hide comment
@moorereason

moorereason Nov 23, 2015

Member

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

Member

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.

Show comment
Hide comment
@bep

bep Nov 23, 2015

Member

Merged in fde47c5

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

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