Using the Social fields in the SEO Plugin, we don't have to enter this data into the theme too:
/**
* Use Yoast SEO Plugin to create these constants
* http://wordpress.org/plugins/wordpress-seo/
* https://gist.github.com/germanny/6222479
*/| /* ABSOLUTE ANCESTOR | |
| Returns the absolute ancestor (parent, grandparent, great-grandparent if there is, etc.) of a post. The absolute ancestor is defined as a page that doesnt have further parents, that is, its post parent is '0' | |
| ****************************************************************************************************************************************/ | |
| function get_absolute_ancestor($post_id){ | |
| global $wpdb; | |
| $parent = $wpdb->get_var("SELECT `post_parent` FROM $wpdb->posts WHERE `ID`= $post_id"); | |
| if($parent == 0) //Return from the recursion with the title of the absolute ancestor post. | |
| return $wpdb->get_var("SELECT `post_name` FROM $wpdb->posts WHERE `ID`= $post_id"); | |
| return get_absolute_ancestor($parent); |
| <?php // SHORTCODE - Featured School | |
| function jg_featured_school( $atts ) { | |
| extract(shortcode_atts(array( | |
| "school" => 'Kaplan University', | |
| "boxtitle" => 'Featured College', | |
| "boxclass" => 'inset featured-school-inset fs-shortcode', | |
| 'description' => 'This is a test description.' | |
| ), $atts)); | |
| return | |
| '<div class="'.$boxclass.'"> |
Using the Social fields in the SEO Plugin, we don't have to enter this data into the theme too:
/**
* Use Yoast SEO Plugin to create these constants
* http://wordpress.org/plugins/wordpress-seo/
* https://gist.github.com/germanny/6222479
*/| <?php | |
| // NEED TO UPDATE LNS 138, 152 WITH "POST" OR "PAGE" | |
| // IF CMB ONLY NEEDED FOR CERTAIN PAGES, YOU CAN LIMIT WHICH PAGES THIS SHOW ON: // https://gist.github.com/3310364 | |
| $featured_schools_fields = // inc-featured-schools.php | |
| array( | |
| "featured_school1" => array( | |
| "name" => "featured_school1"), | |
| "featured_url1" => array( |
Revised date: 07/11/2012
Between us [company name] and you [customer name]
We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.
Works pretty well in capturing the full URL when using this in a search (like in Sublime Text 2).
(https?|ftps?)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/?
The following will capture the URL in a SQL dump including escaped quotation marks.
About once a year, my machine gets pretty sluggish and it's time to start fresh. Here's the process I use to update it with everything I need.
TODO: Add info about dotfiles set up and zsh (possible settings file?)
| <?php | |
| /** | |
| * Add new classes to the $classes array | |
| * http://codex.wordpress.org/Function_Reference/body_class#Add_Classes_By_Filters | |
| */ | |
| add_filter('body_class','my_class_names'); | |
| function my_class_names($classes) { | |
| global $post; | |
| if ( is_front_page() ) : |
| <?php | |
| /** | |
| * Delayed loading of typekit scripts vs Flicker-free loading | |
| * Source: https://www.farbeyondcode.com/Delayed-loading-of-typekit-scripts-vs-Flicker-free-loading-5-2304.html | |
| * Avg. Load Time: 66ms; 91ms; 113ms | |
| */ | |
| ?> | |
| <script type="text/javascript"> | |
| /* <![CDATA[ */ | |
| TypekitConfig = { |
| @mixin retina($ratio: 1.5) { | |
| $dpi: $ratio * 96; | |
| $opera-ratio: $ratio * 100; | |
| @media only screen and (-webkit-min-device-pixel-ratio: #{$ratio}), | |
| only screen and ( -o-min-device-pixel-ratio: '#{$opera-ratio}/100'), | |
| only screen and ( min-resolution: #{$dpi}dpi), | |
| only screen and ( min-resolution: #{$ratio}dppx) { | |
| @content; | |
| } |