This file contains 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 | |
/** | |
* Template Name: Google+ Feed | |
*/ | |
/** | |
* A WordPress page template for a Google+ feed. | |
* | |
* @author Dominik Schilling |
This file contains 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 | |
/** | |
* Filename-based cache busting for WordPress scripts/styles. | |
* | |
* Extend your .htaccess file with these lines: | |
* | |
* <IfModule mod_rewrite.c> | |
* RewriteEngine On | |
* RewriteBase / | |
* |
This file contains 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 | |
/** | |
* Is login or register page | |
* @author umbrovskis | |
* @authorlink http://umbrovskis.com | |
*/ | |
function smc_is_login_page() { | |
return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')); | |
} | |
// hope some day WordPress will make is_login_page() or is_register_page() or similar |
This file contains 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_Rewrite endpoints demo | |
Description: A plugin giving example usage of the WP_Rewrite endpoint API | |
Plugin URI: http://make.wordpress.org/plugins/2012/06/07/rewrite-endpoints-api/ | |
Author: Jon Cave | |
Author URI: http://joncave.co.uk/ | |
*/ | |
function makeplugins_endpoints_add_endpoint() { |
This file contains 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
/* | |
via wordpress.org/support/topic/remove-feed-from-wp_head?replies=7#post-1338292 | |
for: http://simplemediacode.com/wordpress/ | |
*/ | |
remove_action( 'wp_head', 'feed_links_extra', 3 ); // Display the links to the extra feeds such as category feeds | |
remove_action( 'wp_head', 'feed_links', 2 ); // Display the links to the general feeds: Post and Comment Feed | |
remove_action( 'wp_head', 'rsd_link' ); // Display the link to the Really Simple Discovery service endpoint, EditURI link | |
remove_action( 'wp_head', 'wlwmanifest_link' ); // Display the link to the Windows Live Writer manifest file. | |
remove_action( 'wp_head', 'index_rel_link' ); // index link | |
remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // prev link |
This file contains 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> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta charset="utf-8"> | |
<link rel="dns-prefetch" href="//s2.me2j.com" /><link rel="dns-prefetch" href="//i2.me2j.com" /> | |
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> | |
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]--> | |
<title>Lapa</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> | |
<!-- | |
All other head parts | |
--> |
This file contains 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 | |
/* | |
info: http://simplemediacode.info/snippets/itemprop-attributes-for-wordpress-serp-results/ | |
as WordPress plugin http://wordpress.org/extend/plugins/itempropwp/ | |
*/ | |
add_filter('post_thumbnail_html','mediaboxlv_image_itemprop',10,3 ); | |
function mediaboxlv_image_itemprop($html, $post_id, $post_image_id){ | |
$html = str_replace('src',' itemprop="image" src',$html); | |
return $html; | |
} |
This file contains 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: Test | |
*/ | |
class My_Like_Button { | |
function __construct() | |
{ | |
$this->hooks(); | |
} |
This file contains 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
$ mkdir /path/to/your/project | |
$ cd /path/to/your/project | |
$ git init | |
$ git remote add origin https://[email protected]/USERNAME/project.git | |
Create a new repository on the command line | |
touch README.md | |
git init |
This file contains 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 | |
/* | |
* @author umbrovskis | |
* @url http://simplemediacode.info/?post_type=snippets&p=920 | |
*/ | |
add_filter('wp_get_attachment_image_attributes', 'ipwp_img_attr', 10, 2); | |
function ipwp_img_attr($attr) { | |
$attr['itemprop'] = 'image'; | |
return $attr; | |
} |
OlderNewer