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_filter( 'wp_handle_upload', 'my_pdf_accessibility_check', 20, 2 ); | |
| function my_pdf_accessibility_check( $upload, $context ) { | |
| // $upload has: file, url, type if no error. [web:24] | |
| if ( ! empty( $upload['error'] ) ) { | |
| return $upload; | |
| } | |
| // Only care about Media Library uploads. | |
| if ( $context !== 'upload' ) { |
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
| <x_pos>65.000000000</x_pos> | |
| <y_pos>106.000000000</y_pos> | |
| <width>534.000000000</width> | |
| <height>142.000000000</height> | |
| <name>TRANSFORM</name> | |
| <near_clip>1600</near_clip> | |
| <far_clip>2550</far_clip> | |
| <near_threshold>35000</near_threshold> |
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
| { | |
| "core": "WordPress/WordPress#5.4.2", | |
| "themes": ["bu-ist/responsive-framework"], | |
| "plugins": [ "." ] | |
| } |
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 | |
| DIR='/app/vrt-sites-data/' | |
| DOMAIN='www.bu.edu' | |
| REPORT_SUBDIR='/backstop_data/bitmaps_test/' | |
| for SITEDIR in ${DIR}${DOMAIN}/* | |
| do |
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
| wp post-type list --public=1 | |
| wp shell | |
| wp_count_posts('post')->publish; | |
| wp_count_posts('page')->publish; | |
| wp post list --post_type="page" --field=url | shuf -n 50 >> urls.txt | |
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
| version: '3.2' | |
| services: | |
| memcached: | |
| image: memcached:1.6 | |
| command: | |
| - '-m 2048 -c 1024 -I 3m' | |
| ports: | |
| - target: 11211 | |
| published: 11211 |
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 generate_uid( $post_id, $existing_uid_count ) { | |
| // Generate a random seed. Leverages more cryptogaphic oriented functions for more reliable uniqueness. | |
| $uid_int_seed = $post_id * $existing_uid_count * random_int(100000,1000000); | |
| // Generate a hash to make an alpha numeric string. | |
| $uid_hash = md5($uid_int_seed); | |
| // Return last 6 characters of the random hash. |
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
| var media_taxonomies = new wp.api.collections.Taxonomies(); | |
| var mt_promise = media_taxonomies.fetch( | |
| {'data': {'type':'attachment'} | |
| }); | |
| mt_promise.complete( function() { | |
| var media_tax1 = media_taxonomies.models[0]; | |
| console.log(media_tax1); | |
| }); |