Get the Intro: PHP Paragraph Regular Expression
Recently I was playing around with WordPress' wp_posts table. I wanted to grab the basic information about my posts (ID, title, content, slug) and build a quick summary list of them. One problem I ran into was creating a content "intro." Luckily a quick regular expression allowed me to create the intro.
$intro = strip_tags($matches); //removes anchors and other tags from the intro
The above code extracts the first paragraph in a string. Since all of my posts begin with an introductory paragraph, this type of system will work.
David asked me if I'd be up for a guest post picking out some of my favorite Pens from CodePen. A daunting task! There are so many! I managed to pick a few though that have blown me away over the past few months. If you...
CSS filter support recently landed within WebKit nightlies. CSS filters provide a method for modifying the rendering of a basic DOM element, image, or video. CSS filters allow for blurring, warping, and modifying the color intensity of elements. Let's have...
CSS class name structure and consistency is really important; some developers camelcase classnames, others use dashes, and others use underscores. One thing I've learned when toying around by HTML and CSS class names is that you can actually use unicode symbols and icons as classnames.