-
Install the React Developer Tools Chrome Extension.
-
Go to the egghead website, i.e. Getting Started with Redux
-
Click
View -> Developer -> Javascript Console
, then theReact
tab, then the<NextUpLessonList ...>
tag. -
Click back to the
Console
tab, then run:
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( 'the_content', 'remove_fontawesome', 99 ); | |
function remove_fontawesome($content) { | |
wp_dequeue_style( 'tt-font-awesome' ); | |
wp_dequeue_style('dhvc-woo-font-awesome'); | |
wp_dequeue_style('dhvc-woocommerce-page-awesome'); | |
return $content; | |
} |
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 | |
function lh_fwp_index_coming_soon_facet( $return, $params ) { | |
$facet_params = $params['defaults']; | |
if ( 'cf/edd_coming_soon' == $facet_params['facet_source'] ) { | |
$value = get_post_meta( $facet_params['post_id'], 'edd_coming_soon', true ); | |
$value = empty( $value ) ? 'Available' : 'Coming Soon'; | |
$facet_params['facet_value'] = $value; | |
$facet_params['facet_display_value'] = $value; | |
FWP()->indexer->index_row( $facet_params ); |
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 | |
function fwp_index_coming_soon( $params, $class ) { | |
if ( 'cf/edd_coming_soon' == $params['facet_source'] ) { | |
$params['facet_display_value'] = 'Availability'; | |
} | |
return $params; | |
} | |
add_filter( 'facetwp_index_row', 'fwp_index_coming_soon', 10, 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
<?php | |
add_action( 'wp_enqueue_scripts', 'debug_theme_enqueue_styles' ); | |
function debug_theme_enqueue_styles() { | |
if (WP_DEBUG == true) : | |
$random = mt_rand(); | |
wp_enqueue_style( 'main-css-unminified', get_template_directory_uri() . '/assets/styles/build/main.css', '', $random ); | |
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
module['exports'] = function bot (hook) { | |
var request = require('request'); | |
var TOKEN = hook.env.bot_scheduler_token; | |
var ENDPOINT = 'https://api.telegram.org/bot' + TOKEN; | |
console.log(hook.params); | |
// generic handler to log api call responses | |
var handler = function (err, httpResponse, body) { | |
var response = JSON.stringify({ |
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 | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
/** | |
* Sample instance based method. | |
*/ | |
class WC_Shipping_Test_Method extends WC_Shipping_Method { |
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 | |
// Create a facet named "on_sale" with the Data Source of "Post Type" | |
// Add this to functions.php | |
function fwp_is_sale( $params, $class ) { | |
if ( 'is_sale' == $params['facet_name'] ) { | |
$post_id = (int) $params['post_id']; | |
$variable_sale_price = get_post_meta( $post_id, '_min_variation_sale_price', true ); | |
$sale_price = get_post_meta( $post_id, '_sale_price', 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
1. cmd+shift+p | |
2. Type phpcs and install it | |
3. Preferences > Package Settings > Php Code Sniffer > User settings |
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: Endo Stock Report Exporter | |
* Plugin URI: http://www.endocreative.com | |
* Description: A custom stock report exporter plugin for WooCommerce | |
* Version: 1.0.0 | |
* Author: Endo Creative | |
* Author URI: http://www.endocreative.com | |
* License: GPL2 | |
*/ |