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
add_action ( 'wp_head', 'rp_add_custom_js' ); | |
function rp_add_custom_js() { | |
$ga_code = 'G-xxxxxxxx'; | |
$script = "<!-- Google tag (gtag.js) --> | |
<script async src='https://www.googletagmanager.com/gtag/js?id=".$ga_code."'></script> | |
<script> | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){dataLayer.push(arguments);} | |
gtag('js', new Date()); |
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
URL: | |
https://answers.microsoft.com/en-us/officeinsider/forum/all/macos-another-account-from-your-organisation-is/53e99843-9069-4d54-a269-71d7112458a0?page=5 | |
Answer: | |
Not sure if this has been listed here yet: https://learn.microsoft.com/en-us/office/troubleshoot/activation/another-account-already-signed-in | |
I had tried the Keychain steps as well as using office-reset tool. Completely uninstalling and restarting the machine etc. None of that worked. |
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
/* | |
Uses https://fullcalendar.io/ | |
calendar_events is a multidim array of event info. Eg: | |
[{ | |
title: 'My Event 1', | |
url: 'https://myevent_1.booking.page', | |
start: '2023-05-28T21:30:00' | |
}, |
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
// | |
// Take a string like '{"title":"An event","start":"2023-05-01"},{"title":"Another event","start":"2023-05-15"},{"title":"Yet another event","start":"2023-05-24"}' | |
// and convert it back into a multidim array | |
var string_vers = JSON.stringify(original_array); | |
var reconstructed = reconstruct_multi_dim( string_vers ); | |
console.log( JSON.stringify(reconstructed) ); |
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
// | |
// Filter the WP srcset to ensure the browser isn't given a file it needs to upscale. | |
// | |
add_filter( 'wp_calculate_image_srcset_meta','ingeni_srcset_filter', 4, 10); | |
function ingeni_srcset_filter($image_meta, $size_array, string $image_src, int $attachment_id ) { | |
// We'll allow images within 2% of the required width or height. | |
$min_width = ($size_array[0] * 0.98); | |
$min_height = ($size_array[1] * 0.98); |
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
// Add these settings to force WP to display the 'Enable auto-update' options for plugins and themes. | |
// Thanks to https://wordpress.org/support/topic/automatic-updates-not-visible-in-plugins-screen-options-or-dashboard/ | |
// | |
// Enable plugins auto-update UI elements. | |
add_filter( 'plugins_auto_update_enabled', '__return_true' ); | |
// | |
// Enable themes auto-update UI elements. | |
add_filter( 'themes_auto_update_enabled', '__return_true' ); |
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
// Get the uploaded resume and return it's path to the email handler | |
function ingeni_sjb_get_attachment( $resume_path, $post_id ) { | |
// Get the resume_path assigned to that postID | |
// https://www.presstigers.com/how-can-simple-job-board-settings-help-you/ | |
global $wpdb; | |
$resume_path = ''; | |
$fileAttachment = get_post_meta($post_id, 'resume', TRUE); | |
$path_start = stripos( $fileAttachment, '/uploads/' ); | |
if ($path_start) { |
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
Your git push command is stalling at the end of the process: | |
Delta compression using up to 8 threads | |
Compressing objects: 100% (1312/1312), done. | |
POST git-receive-pack (chunked)) | |
Writing objects: 100% (1320/1320), 352.71 MiB | 3.71 MiB/s, done. | |
Total 1320 (delta 550), reused 1 (delta 0), pack-reused 0 | |
After the 'Total' line, the push command seems to stall. |
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
// | |
// Block high-res JPGs (e.g., direct photos direct from the camera) being uploaded to the Wordpress Media Library | |
// | |
// Add this to the themes functions.php file - If an image is a JPG larger than 500kb then we block it but also alert the | |
// user if the image is higher than 96dpi. | |
// The file may be uploaded regardless if the file size is smaller than 500kb. | |
// | |
function ingeni_media_library_upload_filter( $file ) { | |
$is_allowed = true; |
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
/* Detect touch devices and disable fixed attchment for background images */ | |
@media (hover: none) { | |
background-attachment: scroll; | |
} |