Skip to content

Instantly share code, notes, and snippets.

View wzsanders's full-sized avatar

Z wzsanders

  • Texas, United States
View GitHub Profile
@wzsanders
wzsanders / add-missing-width-height.php
Created October 15, 2023 05:37
wordpress code snippets
<?php
add_filter( 'the_content', 'add_image_dimensions' );
add_filter( 'elementor/frontend/the_content', 'add_image_dimensions' );
function add_image_dimensions( $content ) {
if ( is_singular() && is_main_query() ) {
preg_match_all( '/<img[^>]+>/i', $content, $images);
Computer Information:
Manufacturer: Apple
Model: iMac13,2
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Family: 0x6
CPU Model: 0x3c