- http://make.wordpress.org/core/
- http://make.wordpress.org/core/handbook/
- http://core.trac.wordpress.org/
Git mirror:
git clone https://github.com/WordPress/WordPress.git
Creating a patch:
git diff --no-prefix > ~/12345.patch
<?php | |
add_filter('wpseo_sitemap_index', 'add_subdomains_to_sitemap' ); // add link to custom sitemap | |
/** | |
* Add the link to the main sitemap index | |
* @param string $content Existing sitemap content. | |
* @return string Sitemap with extra content. | |
*/ | |
function add_subdomains_to_sitemap( $content = '' ) { |
<?php | |
class Yoast_GlotPress_SEO { | |
function __construct() { | |
add_filter( 'gp_title', array( $this, 'modify_title' ) ); | |
add_action( 'gp_head', array( $this, 'meta_desc' ), 9 ); | |
add_filter( 'gp_redirect_status', array( $this, 'modify_redirect_status' ), 10, 2 ); | |
} | |
module.exports = function( grunt ) { | |
'use strict'; | |
require( 'matchdep' ).filterDev( 'grunt-*' ).forEach( grunt.loadNpmTasks ); | |
grunt.initConfig({ | |
makepot: { | |
plugin1: { | |
options: { |
<?php | |
/** | |
* Estimated Reading Time | |
* | |
* Use by adding it to a hook like add_action( 'genesis_after_entry', 'fm_estimated_reading_time' ); | |
* | |
* @link http://briancray.com/posts/estimated-reading-time-web-design/ | |
* @return void | |
*/ |
<?php | |
/** | |
* Display best author posts as last widget in the sidebar | |
* @uses bap_get_user_posts | |
* @uses bap_get_single_post_user_id | |
* @return all the output | |
*/ | |
function lh_best_author_posts() { |
Git mirror:
git clone https://github.com/WordPress/WordPress.git
Creating a patch:
git diff --no-prefix > ~/12345.patch
<?php | |
*/ | |
* Clear APC cache with a single click | |
* @link http://kaspars.net/blog/wordpress/clear-apc-cache-button-for-wordpress | |
*/ | |
if (function_exists('apc_clear_cache')) { | |
// Clear cache if something is edited | |
if (!empty($_POST) && is_admin()) | |
apc_clear_cache(); |
<?php | |
add_filter( 'get_header', 'bp_guest_redirect', 1 ); | |
/** | |
* Redirect BuddyPress guests to register page | |
* @return [type] [description] | |
*/ | |
function bp_guest_redirect() { | |
global $bp; | |
if ( bp_is_activity_component() || bp_is_user_profile() || bp_is_groups_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) { |
<?php | |
/** | |
* For more information, as always, check the codex | |
* @link: http://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants | |
**/ | |
define( 'FTP_USER', 'username' ); | |
define( 'FTP_PASS', 'password' ); | |
define( 'FTP_HOST', 'ftp.example.org' ); // this usually can be 127.0.0.1 |