How to add a dynamic class shortcode in wordpress

admin

Administrator
Staff member
How do I add a shortcode in wordpress where you can dynamically assign any class name which a user would enter from the admin. for example

Code:
[border-dashed]

where [border-] would always be defined but the user can put the second bit which would be the class name defined in the css, depending on what border they want to show on the front end.

Code:
[border-dashed]
[border-double]
[border-single]

I'm sure you get the point.

Thanks.