stranger portrait - what?

Filtering WordPress Titles

As you may have seen here before VA passed a bill saying universities can’t have student email visible without written consent from the student. We had a legacy site that had student emails as part of the title structure for the posts. We had stuff titled stuff like This is twwoodward@ecuniv.edu post or This is twwoodward@mymail.ecuniv.edu. We want to remove a chunk so it’s not an obvious email any longer. The following function cleans up our two different email patterns so that the titles no longer include emails. It does this by tying a custom function to a WordPress filter. The first thing we do is get the post type. In this case we just want a custom post type we named profile. $type = get_post_type( get_the_ID( ) ); should get us that variable. Next, we’re defining the things we’d like to find in the title. $find = array(‘@mymail.vcu.edu’, ‘@vcu.edu’); – this is letting us look for multiple items and it could be many more than two. Now our if loop only runs if the $type equals ‘profile’ otherwise it just passes the $title variable right back unharmed. If it is a profile custom post type, it uses PHP’s built in str_replace function to look for the things we defined in $find, replaces them with our second variable (” in […]

30

KSES Allow Twitter Widget Embed

The two little lines above keep the Twitter tag search widget embed code (below) from getting cleansed in the WordPress Editor. Keeping a chunk of these extra-curricular allowed elements in a plugin allows us to activate them on a per trusted user basis.

Instagram-ish WordPress Filter Shortcode Plugin

That beautiful link-bait title and a picture of a dead leaf! That’s why I’m a social media guru. With that self-promotion out of the way . . . I found this CSS library from Una.1 It lets you apply instagram-like filters to image via CSS. Also got to have a nice interaction with Una via Twitter to clarify the license. @twoodwar :+1: its MIT so go ahead — Una Kravets (@Una) December 6, 2016 It fit a need that a professor was expressing for one of our WordPress installs so I wrapped it in a plugin/shortcode combination. The structure goes like so . . . [ cssgram img=”https://c2.staticflickr.com/6/5745/31413304786_48ab865a34_c.jpg” filter=”_1977″ ] Plain Image A Few Filtered Examples _1977 Inkwell Xpro2 1 Check out her site if you’re into developer stuff at all.