I hereby claim:
- I am aaroneaton on github.
- I am aaroneaton (https://keybase.io/aaroneaton) on keybase.
- I have a public key whose fingerprint is D1D5 4ACA C40F E038 52C3 4307 F38C 5B43 ED0A E121
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| class MyComponent extends React.Component { | |
| ... | |
| render() { | |
| return ( | |
| <div className="parent"> | |
| <div className="child" ref={el => this.targetEl = el}>Content Here</div> | |
| </div> | |
| ) | |
| } | |
| ... |
| <?php // Remove this line | |
| // Disable comments on all pages | |
| add_action( 'init', function() { | |
| remove_post_type_support( 'page', 'comments' ); | |
| }, 100 ); |
| <?php | |
| class TodoSpec extends ObjectBehavior { | |
| public function let() { | |
| \WP_Mock::setUp(); | |
| } | |
| public function letGo() { | |
| \WP_Mock::tearDown(); | |
| } |
| <?php // Make sure to remove this tag! | |
| // Add this code to your theme's functions.php file. | |
| add_filter( 'optin_monster_api_menu_cap', 'om_allow_editors_in_menu' ); | |
| function om_allow_editors_in_menu( $capability ) { | |
| // The default capability is 'manage_options'. We can switch this out with an editor capability. | |
| return 'publish_pages'; | |
| // Change the column widths to match your site | |
| @media #{$large-up} { | |
| .content-sidebar .content-sidebar-wrap { | |
| main { | |
| @include grid-column(9); | |
| } | |
| aside.sidebar-primary { | |
| @include grid-column(3); | |
| } |
| $(document).on('OptinMonsterOnShow', function(event, props, object) { | |
| object.trackGoogleAnalytics('ga-[your-optin-slug]', 'impression'); | |
| }); | |
| $(document).on('OptinMonsterOptinSuccess', function(event, props, object) { | |
| object.trackGoogleAnalytics('ga-[your-optin-slug]', 'conversion'); | |
| }); |
| <script type="text/javascript"> | |
| // We want to store a global reference to the proper optin object to make use of tracking methods. | |
| var om_ref; | |
| jQuery(document).ready(function($){ | |
| // Gain access once the entire object is loaded. | |
| $(document).on('OptinMonsterLoaded', function(e, props, obj){ | |
| // Replace jshdgfgshf with the unique optin slug you want to target. | |
| if ( 'uv7nlvrd513vds1n' == obj.getProp('optin') ) { | |
| om_ref = obj; | |
| } |
| <?php | |
| add_filter( 'optin_monster_api_output', 'tgm_om_filter_lightbox_by_tag', 10, 4 ); | |
| function tgm_om_filter_lightbox_by_tag( $optins, $optin, $fields, $post_id ) { | |
| // If in a particular tag, remove the lightbox. | |
| $cat_exc = 362; // Replace with the tag ID to target. | |
| $slug = 'sjdfhsjakdkg'; // Replace with the unique slug for the lightbox you want to remove. | |
| $tags = wp_get_object_terms( $post_id, 'post_tag', array( 'fields' => 'ids' ) ); | |
| foreach ( (array) $tags as $tag_id ) { | |
| if ( $tag_id && $tag_id == $cat_exc && in_array( $slug, $optins ) ) { |