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 | |
| /** | |
| * Adds a simple WordPress pointer to Settings menu | |
| */ | |
| function thsp_enqueue_pointer_script_style( $hook_suffix ) { | |
| // Assume pointer shouldn't be shown | |
| $enqueue_pointer_script_style = false; |
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 | |
| # License: Public Domain | |
| # I recommend replacing 'my_' with your own prefix. | |
| function my_template_path() { | |
| return My_Wrapping::$main_template; | |
| } |
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 namespace PaintedCloud\WP\Classes; | |
| if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
| class CustomTaxonomy { | |
| protected $textdomain; | |
| protected $taxonomies; | |
| public function __construct ( $textdomain ) |
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 namespace PaintedCloud\WP\Classes; | |
| if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
| class CustomPost { | |
| protected $textdomain; | |
| protected $posts; | |
| public function __construct( $textdomain ) |
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 my_load_meta() { | |
| $script = '/js/script.js'; | |
| wp_enqueue_script( 'my-tools', get_template_directory_uri().$script, null, my_version_hash($script) ); | |
| $stylesheet = '/style.css'; | |
| wp_enqueue_style( 'my-style', get_template_directory_uri().$stylesheet, null, my_version_hash($stylesheet) ); | |
| } | |
| add_action('wp_enqueue_scripts', 'my_load_meta'); | |
| // Create a hash of the file and pass it back for caching purposes | |
| function my_version_hash($file) { |
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 | |
| /** | |
| * Show Mad Mimi subscriber count w/cache. | |
| */ | |
| function jm_madmimi_subscribers() { | |
| $email = ''; | |
| $api = ''; | |
| // check and get cached subscriber count |
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
| $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; | |
| $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; | |
| $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; | |
| $wp_customize->get_control( 'background_color' )->section = 'background_image'; | |
| $wp_customize->get_section( 'background_image' )->title = 'Background Settings'; | |
| $wp_customize->get_section( 'title_tagline' )->title = 'Site Title / Logo'; | |
| $wp_customize->get_section( 'static_front_page' )->title = 'Home Page Settings'; | |
| $wp_customize->get_section( 'static_front_page' )->priority = 29; |
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
| <html> | |
| <head> | |
| <title>Critical Path: Measure</title> | |
| <meta name="viewport" content="width=device-width,initial-scale=1.0"> | |
| <link href="style.css" rel="stylesheet"> | |
| <script> | |
| function measureCRP() { | |
| var t = window.performance.timing, | |
| interactive = t.domInteractive - t.domLoading, |
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
| @-webkit-keyframes float-up { | |
| 0% { opacity: 0; top: 4rem; } | |
| 100% { opacity: 1; top: 0; } | |
| } | |
| .float-up { | |
| opacity: 0; | |
| position: relative; | |
| -webkit-animation-name: float-up; | |
| -webkit-animation-duration: .3s; |
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_action( 'tgmpa_register', 'register_required_plugins' ); | |
| // This function is called from the above hook | |
| function register_required_plugins() | |
| { | |
| // The plugins array allows us to define multiple plugins we want to include. | |
| // The commented out example shows how we can include and activation a bundled | |
| // plugin zip file in our theme. |