Description
Dynamically generate the CSS class that is suggested by the class nameWe use PCRE – Perl Compatible Regular Expressions to define the class names that we expect to find Format is: <pre> – single character (w=width/h=height) – Numeric width or height (depth) – single character ( p=padding left and right/l=padding-left/r=padding-right/t=padding-top/b=padding-bottom (h) or padding-both (w) )
- should we support margin as well as padding ?
Usage
oik_rwd_dynamic_css_class( $class );Parameters
- $class
- ( mixed ) optional –
Returns
voidSource
File name: oik-rwd/shortcodes/oik-rwd.phpLines:
1 to 9 of 9
function oik_rwd_dynamic_css_class( $class=null ) { // $pattern = "/(^[who])([0-9]+)([plrtb])([0-9]+)/"; $pattern = "/(^[wh])([0-9]+)([plrtbm])([0-9]+)([plrtbm]*)([0-9]*)/"; $matches = null; $count = preg_match( $pattern, $class, $matches ); //echo $count; //print_r( $matches ); return( $matches ); }View on GitHub
Called by
1 to 1 of 1
Invoked by
Calls
Call hooks
API Letters:
