Run the following commands in shell:
rm -rf ~/.Trash/
mkdir ~/.Trash/
Then relaunch the Finder to apply permissions: Command + Option + Esc and Relaunch Finder.
| AL : Alabama | |
| AK : Alaska | |
| AS : American Samoa | |
| AZ : Arizona | |
| AR : Arkansas | |
| CA : California | |
| CO : Colorado | |
| CT : Connecticut | |
| DE : Delaware | |
| DC : District of Columbia |
| <?php | |
| add_filter('facetwp_facet_html', function ($output, $params) { | |
| if ('dropdown' == $params['facet']['type']) { | |
| $output = preg_replace("/( \([0-9]+\))/m", '', $output); | |
| } | |
| return $output; | |
| }, 10, 2); |
| <?php | |
| /** | |
| * FacetWP Pager Bootstrap 4 Pagination | |
| * @source https://gist.github.com/MWDelaney/ce9e523b3f1bdf57b3180c9b24b73170 | |
| * @source https://fellowtuts.com/bootstrap/wordpress-pagination-bootstrap-4-style/ | |
| */ | |
| add_filter('facetwp_pager_html', function ($output, $params) { | |
| $range = 2; // +/- pages from the current page | |
| $showitems = ($range * 2) + 1; | |
| $page = $params['page']; |
| <?php | |
| /** | |
| * Build a name | |
| */ | |
| function build_name($prefix, $fname, $lname, $suffix) { | |
| $name = $fname . ' ' . $lname; | |
| if($prefix) $name = $prefix . ' ' . $name; | |
| if($suffix) $name = $name .= $suffix; | |
| return $name; | |
| } |
| <?php | |
| /** | |
| * Build Comma-Separated String | |
| * Won't add a hanging comma if there's only passed value | |
| */ | |
| function comma_separated($array) { | |
| $string = implode(', ', $array); | |
| if (preg_match("/, $/", $string)) { // if it ends in a comma, remove the comma | |
| $string = substr($string, 0, -2); | |
| } |
| #!/bin/bash | |
| # Dependencies: vips | |
| # Homebrew: brew install vips | |
| for file in *.pdf | |
| do | |
| # Run vips pdfload for options | |
| # You could add --page=1 to get the second page (from 0) or --dpi=300, etc. to get different quality images | |
| # The variable gets the filename without the extension | |
| vips pdfload ${file%.*}.pdf ${file%.*}.jpg | |
| done |
| <?php | |
| /** | |
| * Loads media from a remote site when on a local dev environment. | |
| * Eliminates the need to download the uploads directory from the remote site for testing purposes. | |
| * Replace WEBSITE with you domain name. | |
| */ | |
| if ('WEBSITE.local' === $_SERVER['HTTP_HOST']) : | |
| add_filter('upload_dir', function ($uploads) { | |
| $uploads['baseurl'] = 'https:/WEBSITE.com/wp-content/uploads'; |