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
| [rules] => Array ( | |
| [category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?category_name=$matches[1]&feed=$matches[2] | |
| [category/(.+?)/(feed|rdf|rss|rss2|atom)/?$] => index.php?category_name=$matches[1]&feed=$matches[2] | |
| [category/(.+?)/page/?([0-9]{1,})/?$] => index.php?category_name=$matches[1]&paged=$matches[2] | |
| [category/(.+?)/?$] => index.php?category_name=$matches[1] | |
| [tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?tag=$matches[1]&feed=$matches[2] | |
| [tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?tag=$matches[1]&feed=$matches[2] | |
| [tag/([^/]+)/page/?([0-9]{1,})/?$] => index.php?tag=$matches[1]&paged=$matches[2] | |
| [tag/([^/]+)/?$] => index.php?tag=$matches[1] | |
| [type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_format=$matches[1]&feed=$matches[2] |
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 | |
| # | |
| # This script configures WordPress file permissions based on recommendations | |
| # from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
| # | |
| # Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
| # | |
| WP_OWNER=www-data # <-- wordpress owner | |
| WP_GROUP=www-data # <-- wordpress group | |
| WP_ROOT=$1 # <-- wordpress root directory |
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 | |
| /* | |
| * Wordpress postmeta find&replace code | |
| * | |
| * This file should be run on your source database to echo out update statements to run on your migrated database. | |
| * It is to address the issue of when doing a find/replace on an sql file during a wordpress migration, that breaks | |
| * any content changed within wordpress serialized meta values, particularly if you have custom post types etc. | |
| * | |
| * Do your normal find/replace over the exported sql, import it into your new database, then run this code and copy the resulting | |
| * update SQL into your new database to fix it. |
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
| /* Set our Old and New URLS */ | |
| SET @oldurl := "http://www.oldsite.com"; | |
| SET @newurl := "http://www.newsite.com"; | |
| /* Replaces URL in WordPress Home and Site URL in wp_options */ | |
| UPDATE wp_options SET option_value = replace(option_value, @oldurl, @newurl) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
| /* Replaces URL in GUID of all posts/cpt/etc */ | |
| /* https://deliciousbrains.com/wordpress-post-guids-sometimes-update/ */ | |
| UPDATE wp_posts SET guid = replace(guid, @oldurl, @newurl); |
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
| #!/usr/bin/php -q | |
| <?php | |
| /* | |
| Ampp3d - Ampp3d Google Analytics | |
| Version: 0.1 | |
| Author: William Turrell | |
| Author URI: wturrell.co.uk | |
| Description: Use Google Analytics API to retrieve most popular pages and construct an HTML fragment we can use | |
| Adapted from http://www.techpunch.co.uk/development/oauth2-google-analytics-api-service-account-php and | |
| https://github.com/lobsterdore/analytics-api-oauth2-example/blob/master/mostPopularContentExample.php |
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
| <? | |
| /** | |
| * Repeatable Custom Fields in a Metabox | |
| * Author: Helen Hou-Sandi | |
| * | |
| * From a bespoke system, so currently not modular - will fix soon | |
| * Note that this particular metadata is saved as one multidimensional array (serialized) | |
| */ | |
| function hhs_get_sample_options() { |
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 | |
| // source: http://wordpress.stackexchange.com/questions/211703/need-a-simple-but-complete-example-of-adding-metabox-to-taxonomy | |
| // code authored by jgraup - http://wordpress.stackexchange.com/users/84219/jgraup | |
| // REGISTER TERM META | |
| add_action( 'init', '___register_term_meta_text' ); | |
| function ___register_term_meta_text() { |