This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Contact Form 7 Post Title shortcode | |
Plugin URI: | |
Description: Use in form: [post_title thetitle] - use in email (to get value): [thetitle] | |
Version: 2014.04.07 | |
Author: khromov | |
Author URI: http://profiles.wordpress.org/khromov/ | |
License: GPL2 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: WP Users Media | |
* Plugin URI: http://www.wknet.com/wp-users-media/ | |
* Description: WP Users Media is a WordPress plugin that displays only the current users media files and attachments in WP Admin. | |
* Version: 1.0.3 | |
* Author: Damir Calusic | |
* Author URI: http://www.damircalusic.com/ | |
* License: GPLv2 | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Function for responsive featured images. | |
* Create a <picture> element and populate it with appropriate image sizes for different screen widths. | |
* Works in place of the_post_thumbnail(); | |
*/ | |
function simone_the_responsive_thumbnail($post_id) { | |
// Check to see if there is a transient available. If there is, use it. | |
if ( false === ( $thumb_data = get_transient( 'featured_image_' . $post_id ) ) ) { | |
simone_set_image_transient($post_id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Adds WordPress zipped up: | |
wget http://wordpress.org/latest.tar.gz | |
# Unzip WordPress: | |
tar xfz latest.tar.gz | |
# Move the contents of WordPress back a folder: | |
mv wordpress/* ./ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<script src="//code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
// Small script to detect mobile browsers and toggle the visibility of specified elements. | |
(function($){ | |
var isMobile = function(_, ua){ | |
_.Android = ua.match(/Android/i); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* Grid portion of Bootstrap under sc- namespace. | |
* Classes: | |
* sc-container-fluid, sc-row, sc-col-X-Y (like regular B3) | |
* | |
* For more info, see: | |
* http://snippets.khromov.se/decoupled-bootstrap-3-grid/ | |
* | |
* Bootstrap v3.2.0 (http://getbootstrap.com) | |
* Copyright 2011-2014 Twitter, Inc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
1. Create a page called "Coming Soon" with the slug "coming-soon". | |
If you use something different, be sure to update the code below. | |
2. Copy just one of the blocks of code below to a custom plugin or your active theme's functions.php. | |
*/ | |
//redirect non-users to the coming soon page | |
function coming_soon_redirect() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Adding custom class to posts is easy with the post_class filter | |
add_filter('post_class', 'custom_content_class'); | |
function custom_content_class($classes) { | |
$classes[] = 'custom_class'; | |
return $classes; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Helper function to get sanitized field | |
* and also normalize values. | |
* | |
* @param $field_key | |
* @param bool $post_id | |
* @param bool $format_value | |
* @param string $sanitization_method esc_html / esc_attr or NULL for none | |
* @return array|bool|string |