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 | |
| add_filter( 'render_block', 'show_the_block_constituents', 10, 2 ); | |
| /** | |
| * [show_the_block_constituents] Debug code for showing the parts of WP Blocks | |
| * | |
| * @param [string] $block_content | |
| * @param [array] $block | |
| * @return [string] | |
| */ |
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
| # The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
| # | |
| # Current known FCC address ranges: | |
| # https://news.ycombinator.com/item?id=7716915 | |
| # | |
| # Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
| # | |
| # In your nginx.conf: | |
| location / { |
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
| //Bread crumbs created | |
| function wordpress_breadcrumbs() { | |
| $delimiter = '|'; | |
| $currentBefore = '<span class="current">'; | |
| $currentAfter = '</span>'; | |
| if ( !is_home() && !is_front_page() || is_paged() ) { | |
| echo '<div id="crumbs">'; | |
| global $post; | |
| if ( is_page() && !$post->post_parent ) { | |
| echo $currentBefore; |
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
| /* ===================================== */ | |
| /* Add This to Wordpress's /wp-content/yourtheme/functions.php file */ | |
| define('MAGENTO_ROOT', '/Volumes/Storage/www/heartandsun/store/'); | |
| define('MAGENTO_LOADER', MAGENTO_ROOT.'app/Mage.php'); | |
| if (!class_exists('Mage')) { | |
| require_once(MAGENTO_LOADER); | |
| umask(0); | |
| Mage::app("default"); | |
| }; | |
| /* ===================================== */ |
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 | |
| /** | |
| * Intelligently replacement for print_r & var_dump. | |
| * | |
| * @param mixed $code | |
| * @param bool $output. (default: true) | |
| * @return $code | |
| */ | |
| function hm( $code, $output = true ) { |
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 | |
| # http://kovshenin.com/2012/the-wordpress-settings-api/ | |
| # http://codex.wordpress.org/Settings_API | |
| add_action( 'admin_menu', 'my_admin_menu' ); | |
| function my_admin_menu() { | |
| add_options_page( __('My Plugin Options', 'textdomain' ), __('My Plugin Options', 'textdomain' ), 'manage_options', 'my-plugin', 'my_options_page' ); | |
| } | |
| add_action( 'admin_init', 'my_admin_init' ); |
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
| # This is a template .gitignore file for git-managed WordPress projects. | |
| # | |
| # Fact: you don't want WordPress core files, or your server-specific | |
| # configuration files etc., in your project's repository. You just don't. | |
| # | |
| # Solution: stick this file up your repository root (which it assumes is | |
| # also the WordPress root directory) and add exceptions for any plugins, | |
| # themes, and other directories that should be under version control. | |
| # | |
| # See the comments below for more info on how to add exceptions for your |