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
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteRule ^index\.php$ - [L] | |
| RewriteRule (.*) ./index.php?id=$1 [L] | |
| </IfModule> |
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: Eazy Add Analytics | |
| * Plugin URI: http://robjscott.com/wordpress/eazy-add-analytics | |
| * Description: easily add analytics to footer | |
| * Version: 1.0 | |
| * Author: Rob Scott, LLC | |
| * Author URI: http://robjscott.com | |
| * Text Domain: eazy-photography | |
| * License: GPL-2.0+ |
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_filter('pre_get_posts', 'product_line_posts'); | |
| function product_line_posts( $query ) { | |
| if( is_tax( 'product-line' ) ) { | |
| //you can pass query params like this | |
| $query->set('posts_per_page', -1); | |
| $query->set('orderby', 'title'); | |
| $query->set('order', 'ASC'); | |
| } | |
| return $query; | |
| } |
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 the admin options page | |
| add_action('admin_menu', 'plugin_admin_add_page'); | |
| function plugin_admin_add_page() { | |
| add_options_page('Custom Plugin Page', 'Custom Plugin Menu', 'manage_options', 'plugin', 'plugin_options_page'); | |
| } | |
| // display the admin options page | |
| function plugin_options_page() { |
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
| /* | |
| Drop cap first letter of each post. | |
| */ | |
| add_filter('the_content', 'add_drop_caps', 30); | |
| function add_drop_caps($content) { | |
| global $post; | |
| //only on these included post types | |
| $included_post_types = array("eazy-photo", "post" ); |
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_action( 'wp_enqueue_scripts', 'r0bsc0tt_styles_and_scripts', 999 ); | |
| function r0bsc0tt_styles_and_scripts() { | |
| if (!is_admin()) { | |
| // Deregister jQuery, then register it from CDNJS (version will need to be updated) and enqueue it | |
| wp_deregister_script('jquery'); | |
| wp_register_script('jquery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js', array(), '1.12.4', true); | |
| wp_enqueue_script('jquery'); | |
| // Deregister jQuery Migrate, then register it from CDNJS (version will need to be updated) and enqueue it | |
| wp_deregister_script( 'jquery-migrate' ); | |
| wp_register_script( 'jquery-migrate', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-migrate/3.0.0/jquery-migrate.min.js', array( 'jquery' ), '3.0.0', 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
| <= message arrival | |
| => normal message delivery | |
| -> additional address in same delivery | |
| *> delivery suppressed by -N | |
| ** delivery failed; address bounced | |
| == delivery deferred; temporary problem | |
| A authenticator name (and optional id) | |
| C SMTP confirmation on delivery |
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: Eazy Remove WP Emoji | |
| Plugin URI: | |
| Description: Remove WP emoji from header | |
| Version: 1.0.0 | |
| Author: Rob Scott, LLC | |
| Author URI: http://robjscott.com | |
| License: GPL2 or any later version | |
| License URI: https://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 switchHeaderContent() { | |
| //checks if .header-nav display is set to none (changes in media query @ 768px width) | |
| if ($(".header-nav").css("display") == "none" ){ | |
| //execute some code here | |
| } | |
| // else if .header-nav is inline-block (set in default stylesheet) | |
| else if ($(".header-nav").css("display") == "inline-block" ){ | |
| //execute some other code here | |
| } | |
| } |
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
| // replace jQuery with version hosted on CDN | |
| add_action( 'wp_enqueue_scripts', 'register_jquery' ); | |
| function register_jquery() { | |
| if (!is_admin() && $GLOBALS['pagenow'] != 'wp-login.php') { | |
| // comment out the next two lines to load the local copy of jQuery | |
| wp_deregister_script('jquery'); | |
| wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', false, '1.12.4'); | |
| wp_enqueue_script('jquery'); | |
| } | |
| } |
NewerOlder