Skip to content

Instantly share code, notes, and snippets.

View thebigtine's full-sized avatar
🏠
Working from home

Joseph VanTine thebigtine

🏠
Working from home
View GitHub Profile
<?php
/**
* Filter the upload size limit for non-administrators.
*
* @param string $size Upload size limit (in bytes).
* @return int (maybe) Filtered size limit.
*/
function filter_site_upload_size_limit( $size ) {
$size = 60 * 1024 * 1024;
return $size;
<?php
// add class to admin body tag
function add_body_classes( $classes ) {
$current_user = wp_get_current_user();
// Right: Add a leading space and a trailing space.
$classes .= ' current-user-' . $current_user->ID . ' ';
return $classes;
.flexslider .flex-direction-nav .flex-next {
right: 5px; /* adjust offset to match the hover style */
opacity: .8; /* adjust opacity to match the hover style */
}
.flexslider .flex-direction-nav .flex-prev {
left: 5px; /* adjust offset to match the hover style */
opacity: .8; /* adjust opacity to match the hover style */
}
<?php
function after_buttons() {
echo '<a id="yacht_finanz_calc_button" href="#yacht_finanz_calc" class="btn btn-primary btn-lg btn-block anchor-scroll">Finanzierung</a>';
echo "<script>
jQuery('#yacht_finanz_calc_button').click(function() {
jQuery('.listing-accordion > .listing-details-grid').not( jQuery('#yacht_finanz_calc').next('.listing-details-grid') ).slideUp()
jQuery('#yacht_finanz_calc').next('.listing-details-grid').slideDown()
return false
});
@thebigtine
thebigtine / google-tracking-code.js
Created August 10, 2022 12:57
Shopify Google tracking code
gtag("event", "purchase", {
transaction_id: "{{ order.order_number }}",
affiliation: "Google Merchandise Store",
value: {{ total_price | times: 0.01 }},
tax: {{ tax_price | times: 0.01 }},
shipping: {{ shipping_price | times: 0.01 }},
currency: "{{ order.currency }}",
coupon: "{{ order.discount_application.title }}", // needs testing
items: [
{% for line_item in line_items %}{