I hereby claim:
- I am davebonds on github.
- I am davebonds (https://keybase.io/davebonds) on keybase.
- I have a public key ASCuBkpYqJIi3yU3LUR_XCySAuGtrHAAS5RFDdMqvjPK1go
To claim this, I am signing this object:
| add_action( 'wp_loaded', 'gsandf_update_event_timezones' ); | |
| function gsandf_update_event_timezones() { | |
| $args = array( | |
| 'posts_per_page' => -1, | |
| ); | |
| $events = tribe_get_events( $args ); | |
| foreach ( $events as $event ) { | |
| update_post_meta( $event->ID, '_EventTimezone', 'America/New_York'); | |
| update_post_meta( $event->ID, '_EventTimezoneAbbr', 'EDT'); |
| <?php | |
| /* | |
| Template Name: Page Template Usage | |
| Description: A page template to identify what page templates are being used where. BRAAAM | |
| */ | |
| get_header(); | |
| // Array of page template name => template filename | |
| $templates = array( |
| /** | |
| * Gets all users, if username is my_username, updates password with the provided. | |
| */ | |
| function get_users_and_update_info() { | |
| // Build our args for get_users, search for my_username. | |
| $args = array( | |
| 'search' => 'my_username', | |
| ); | |
| // If multisite, search in the current blog ID (which should be the primary site). |
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| /** | |
| * Adds IDX sitemap URLs to Yoast's sitemap_index.xml | |
| * Get your individual sitemap URLs by viewing the source of your primary sitemap URL. | |
| * To manually refresh your sitemaps, deactivate sitemaps and reactivate. | |
| * From: https://kb.yoast.com/kb/add-external-sitemap-to-index/ | |
| */ | |
| add_filter( 'wpseo_sitemap_index', 'add_idx_sitemap' ); | |
| function add_idx_sitemap() { | |
| $idx_sitemap = ' |
| <?php | |
| add_action( 'equity_pings', 'equity_do_webmention' ); | |
| /** | |
| * Echo Equity default webmention structure. | |
| * | |
| * Does the `equity_list_args` action. | |
| * | |
| * Applies the `equity_no_webmention_text` filter. | |
| * | |
| * @global WP_Query $wp_query Query object. |
| <?php | |
| /** | |
| * Add line item for monthly ad budget set by customer. | |
| * Added as $0 - will be adjusted in subscription later based on actual spend. | |
| * | |
| * @param obj $item Passed by reference. | |
| * @param str $cart_item_key Cart key. | |
| * @param arr $values Cart values. | |
| * @param obj $order Order object. | |
| */ |
| <?php | |
| add_filter( 'woocommerce_add_cart_item_data', 'add_cart_item_data', 10, 2 ); | |
| /** | |
| * Add sem-ad-budget field value to the cart item data. | |
| * | |
| * @param array $cart_item_data Data for cart item. | |
| * @param int $product_id The product ID. | |
| */ | |
| public function add_cart_item_data( $cart_item_data, $product_id ) { | |
| global $woocommerce; |
| jQuery( function() { | |
| jQuery( "#sem-slider-range" ).slider({ | |
| range: "max", | |
| min: 0, | |
| max: 1001, | |
| value: 325, | |
| step: 5, | |
| slide: function( event, ui ) { | |
| jQuery( "#sem-ad-budget" ).val( ui.value ); | |
| }, |
| <?php | |
| add_action( 'woocommerce_before_add_to_cart_button', 'add_ad_budget_input_field' ); | |
| /** | |
| * Output the text input field for #sem_ad_budget - hooked to woocommerce_before_add_to_cart_button(). | |
| * | |
| * @return void | |
| */ | |
| public function add_ad_budget_input_field() { | |
| // Bail if not SEM product ID. | |
| if ( !is_single(1234) ) |