'', 'id' => '', ), $attr ); $content = preg_replace( '@^

@', '', $content ); $content = preg_replace( '@

$@', '', $content ); ob_start(); // Set a panel ID. We want every panel to have a number, so we'll use an // auto-incremented number if the ID hasn't been specified already. STATIC $i = 0; $i++; if ( $attributes['id'] ) : $panel_id = $attributes['id']; else : $panel_id = 'rivet-panel-' . $i; endif; // Set the background if the attribute is available. if ( $attributes['background'] ) : // Check to see if the background is an image or a colour. // @todo: make sure text will still be legible against these colors! if ( strpos( $attributes['background'], '.jpg' ) || strpos( $attributes['background'], '.jpeg' ) || strpos( $attributes['background'], '.png' ) || strpos( $attributes['background'], '.gif' ) ) { $background_style = 'style="background-image: url('. $attributes['background'] .')"'; $background_class = 'rivet-panel-background-image'; } else { $background_style = 'style="background: '. $attributes['background'] .'"'; $background_class = 'rivet-panel-' . rivet_get_contrast( $attributes['background'] ) . '-text'; } else : $background_style = null; $background_class = null; endif; ?>

>
= 128) ? 'dark' : 'light'; }