Gone are the days of simple text-based comments in Github!


/** | |
* Example: | |
* import useBreakpoint from './useBreakpoint' | |
* | |
* const MyComponent = () => { | |
* const breakpoint = useBreakpoint(); | |
* | |
* {breakpoint.isMdUp && <AnotherComponent />} | |
* {breakpoint.xl && <AnotherComponent />} | |
* }; |
// Get The Page ID You Need | |
get_option( 'woocommerce_shop_page_id' ); | |
get_option( 'woocommerce_cart_page_id' ); | |
get_option( 'woocommerce_checkout_page_id' ); | |
get_option( 'woocommerce_pay_page_id' ); | |
get_option( 'woocommerce_thanks_page_id' ); | |
get_option( 'woocommerce_myaccount_page_id' ); | |
get_option( 'woocommerce_edit_address_page_id' ); | |
get_option( 'woocommerce_view_order_page_id' ); | |
get_option( 'woocommerce_terms_page_id' ); |
if (!("classList" in SVGElement.prototype)) { | |
Object.defineProperty(SVGElement.prototype, "classList", { | |
get() { | |
return { | |
contains: className => { | |
return this.className.baseVal.split(" ").indexOf(className) !== -1; | |
}, | |
add: className => { | |
return this.setAttribute('class', this.getAttribute('class') + ' ' + className); | |
}, |
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
<?php | |
/* | |
Plugin Name: Pug Bomb API Endpoint | |
Description: Adds an API endpoint at /api/pugs/$n_pugs | |
Version: 0.1 | |
Author: Brian Fegter | |
Author URL: http://coderrr.com | |
*/ | |
class Pugs_API_Endpoint{ |
This is an example of how to scaffold API endpoints to list / get / create / update / delete Posts in a Keystone website.
It's a modification of the default project created with the yo keystone
generator (see https://github.com/JedWatson/generator-keystone)
Gists don't let you specify full paths, so in the project structure the files would be:
routes-index.js --> /routes/index.js // modified to add the api endpoints
routes-api-posts.js --> /routes/api/posts.js // new file containing the Post API route controllers
<?php | |
/** | |
* Send an alert to HipChat when a test fails | |
* | |
* @AfterStep | |
*/ | |
public function notifyHipchat(Behat\Behat\Event\StepEvent $event) | |
{ | |
if ($event->getResult() === Behat\Behat\Event\StepEvent::FAILED) { |
Feature: Content Type Tests | |
As an Administrator | |
I should be able to create nodes of all Content Types | |
@api | |
Background: | |
Given I am logged in as a user with the "administrator" role | |
@api @Env::Backend @Creator::EvanAgee | |
Scenario Outline: Make sure we can create nodes of type <node-type> |
Feature: Views Tests | |
As an unauthenticated user | |
I should see various views throughout the site | |
@api @Env::Frontend @Creator::EvanAgee | |
Scenario: Check Home Page Views | |
Given I am not logged in | |
Then the element "#views_slideshow_cycle_main_sliding_banners-sliding_banner" should exist | |
Then the element ".view-id-ministry_partner" should exist | |
Then the element ".view-id-speaker" should exist |