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
#!/bin/bash | |
# Welcome to the WP Core Development Wizard. | |
# | |
# Author: Mehul Gohil | |
# Email: [email protected] | |
# Supports: Local 5.2.8. or later | |
# | |
# PreRequisites: | |
# 1. Install wget, subversion, curl, php5-cli, and git |
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 | |
$source_args = apply_filters( 'give_stripe_get_source_args', array( | |
'type' => 'card', | |
'token' => $token_id, | |
) ); | |
$charge_options = array(); | |
if ( give_is_stripe_connected() ) { // This ensures that stripe is connected using Connect API. | |
$charge_options['stripe_account'] = give_get_option( 'give_stripe_user_id' ); |
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 | |
Stripe\Error\InvalidRequest Object | |
( | |
[message:protected] => Invalid token id: card_1CNHELLyXkL8xusLcSLH59hA | |
[string:Exception:private] => | |
[code:protected] => 0 | |
[file:protected] => /app/public/wp-content/plugins/Give-Stripe/vendor/stripe/stripe-php/lib/ApiRequestor.php | |
[line:protected] => 124 | |
[trace:Exception:private] => Array | |
( |
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 | |
/** | |
* Enqueue Inline Styles in WordPress. | |
* | |
* @author Mehul Gohil | |
* @link https://www.mehulgohil.in/code-snippets/enqueue-inline-styles/ | |
*/ | |
function mg_enqueue_inline_styles() { | |
$css = ''; |
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 | |
/** | |
* This function will add new custom avatar to WordPress. | |
* | |
* @param array $avatars List of avatars in WordPress. | |
* | |
* @author Mehul Gohil | |
* @link https://www.mehulgohil.in/set-default-avatar/ | |
* | |
* @return array |
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
/** | |
* WordPress Blocks | |
* | |
* Default block styling included with WordPress core. | |
* Provides a better starting point for WordPress theme developers, | |
* especially when using Sass. | |
* | |
* @link https://github.com/WordPress/WordPress/blob/master/wp-includes/css/dist/block-library/style.css | |
* | |
* Most styles from the above file are included. |
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
<script type="text/javascript"> | |
jQuery( 'document' ).ready( function ($) { | |
$('#billing_postcode').on( 'focusout', function() { | |
$(this).trigger('update_checkout'); | |
}); | |
}); | |
</script> | |
<?php | |
function mg_update_order_review_on_checkout( $post_data ) { |
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 | |
/** | |
* Register payment method. | |
* | |
* @since 1.0.0 | |
* | |
* @param array $gateways List of registered gateways. | |
* | |
* @return array | |
*/ |
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 selfie_auction_disable_rocket_loader( $tag, $handle, $src ) { | |
if ( | |
'jquery-ui-menu' === $handle || | |
'jquery-ui-position' === $handle || | |
'jquery-ui-core' === $handle || | |
'jquery-ui-widget' === $handle || | |
'jquery' === $handle | |
) { | |
$tag = str_replace( 'src=', 'data-cfasync="false" src=', $tag ); |
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 | |
/** | |
* Pass custom field data to Stripe when payment is processed. | |
* | |
* Retrieves custom form field data from the $_POST variable and merges it into | |
* the array that is passed to Stripe when a payment is made. Custom field data | |
* can be found under Metadata in the Stripe payment details screen. | |
* | |
* @param array $charge_args Arguments passed to Stripe payment gateway. | |
* |