add_filter( 'wp_editor_set_quality', function( $arg ) { return 100; });
Uncategorized
Basic pseudo element setup
.class:before{ content: ''; position: absolute; display:block; height: 100%; width: 100%; background: white; opacity: 1; top: 0; left: 0; }
Quick CSS Reset
/* Begin CSS Reset */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0; } html, body { height: 100%; width: 100vw; font-size: 20px; line-height: 1.25; -webkit-font-smoothing: antialiased; max-width: clamp(320px, 90%, 1000px); margin: auto; } img, picture, video, canvas, svg { display: block; max-width: 100%; } input, button, textarea, select { font: inherit; } p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; text-wrap: balance; } ul, ol { list-style: none; } p { /* these two need to be set to taste and are only good for text column content, really */ /* max-width: 65ch; */ /* max-width: clamp(320px, 90%, 1000px); */ }
Run wpcli command on multiple output users
The following gets the meta “genesis_author_box_archive” and sets it to a value of “1” for the user with user id 2
wp user meta update 2 genesis_author_box_archive 1
The following outputs all of the user id values, and then runs the above command on all of them in sequence.
for USER_ID in $(wp user list –field=ID); do wp user meta update $USER_ID genesis_author_box_archive 1; done
reference for the looping: https://www.billerickson.net/code/mass-update-user-roles-using-wp-cli/
LESS Setup Reference
<div>asdf</div>
Search Replace Command Line
https://superuser.com/questions/428493/how-can-i-do-a-recursive-find-and-replace-from-the-command-line#answer-428494
Disable comments with wpcli
Source:
https://gist.github.com/jplhomer/646927e569548bca4f4e
wp option update default_pingback_flag “”
wp option update default_ping_status “”
wp option update default_comment_status “”
wp post list –post_type=page –format=ids | xargs wp post update –ping_status=closed
wp post list –post_type=page –format=ids | xargs wp post update –post_status=closed
Horizontal Centering Without Flexbox
.my-div{ position: absolute; margin-left: auto; margin-right: auto; left: 0; right: 0; text-align: center; }
Prepare mp4 for web
- Open mp4 in QuickTime
- Export at desired quality (output will be .mov)
- File > Export As > 480p
- To convert .mov to mp4 via terminal
-
ffmpeg -i example.mov -vcodec h264 example.mp4
- Visually open the export and view it at a large size, checking for sufficient quality
-
- To convert .mp4 to .m3u8
-
ffmpeg -i source.mp4 -g 60 -hls_time 2 -hls_list_size 0 -hls_segment_size 500000 destination.m3u8
-
Hamburger CSS
div.hamburger{ content: ""; position: absolute; left: 0; display: block; width: 16px; top: 0; height: 0; box-shadow: 0 10px 0 1px #69737d,0 16px 0 1px #69737d,0 22px 0 1px #69737d; }Application: