Administrative Notes

The following administrative notes:

1. Website Boilerplate Content

Copyright

©  2017-2019 HarryHobbes.com  All Rights Reserved. Reproduction without permission prohibited.

 


 

 

*** End of Content ***

Last Update: 02/06/2020


10. reCAPTCHA V3

Site Key: 6LcPg80UAAAAAKntsndpA6ds48CQsNLV16Plf7gO

Secret Key: 6LcPg80UAAAAAEeKESVnM1hMohiDxihVGoiNQoek

https://www.google.com/recaptcha/admin/site/349012751/settings

 

*** End of Content ***

Last Update: 02/06/2020


2. Add File Types to Media Library

File Types Allowed for Upload in WordPress

https://www.wpbeginner.com/wp-tutorials/how-to-add-additional-file-types-to-be-uploaded-in-wordpress/

WordPress allows you to upload most common image files, audio/ video, PDF, Microsoft office and OpenOffice documents. WordPress codex has a full list of allowed file types and extensions.

Adding Exceptions for Additional File Types

Security is the main reason behind the limitation on file types that users can upload. However, this does not mean that users cannot change this. Using a tiny bit of code, you can add a new file type and extension to the WordPress.

For example, add this code in your theme’s functions.php file or a site-specific plugin to allow SVG file type to be uploaded:

1
2
3
4
5
function my_myme_types($mime_types){
    $mime_types['svg'] = 'image/svg+xml'; //Adding svg extension
    return $mime_types;
}
add_filter('upload_mimes', 'my_myme_types', 1, 1);

Notice that the file extension goes as the key in $mime_types associated array and the mime type goes as its value.

In this example, svg file extension represents files with the mime type image/svg+xml. You can find out mime types of several common file extensions on this page.

https://www.freeformatter.com/mime-types-list.html

You can also add multiple file types in one code snippet, like this:

1
2
3
4
5
6
function my_myme_types($mime_types){
    $mime_types['svg'] = 'image/svg+xml'; //Adding svg extension
    $mime_types['psd'] = 'image/vnd.adobe.photoshop'; //Adding photoshop files
    return $mime_types;
}
add_filter('upload_mimes', 'my_myme_types', 1, 1);

*** End of Content ***

Last Update: 02/06/2020


3. "Big Image" Upload Fix

Reference: https://make.wordpress.org/core/2019/10/11/updates-to-image-processing-in-wordpress-5-3/

Install Plug-in:

https://wordpress.org/plugins/disable-big-image-threshold/

*** End of Content ***

Last Update: 02/06/2020


4. All In One WordPress Security and Firewall

https://www.tipsandtricks-hq.com/wordpress-security-and-firewall-plugin#advanced_features_note

*** End of Content ***

Last Update: 02/06/2020


5. Amazon CloudFront CDN

Amazon CloudFront *.larrymanchester.com:

Original CNAME: d9pysaasqueeo.cloudfront.net

New CNAME (2020-01-31): cdn5.larrymanchester.com

Distribution ID E2D7DRX05PT0LJ
ARN arn:aws:cloudfront::555731510275:distribution/E2D7DRX05PT0LJ
Log Prefix
Delivery Method Web
Cookie Logging Off
Distribution Status InProgress
Comment
Price Class Use All Edge Locations (Best Performance)
AWS WAF Web ACL
State Enabled
Alternate Domain Names (CNAME) cdn5.larrymanchester.com
SSL Certificate
Domain Name d9pysaasqueeo.cloudfront.net
Custom SSL Client Support Clients that Support Server Name Indication (SNI) – (Recommended)
Security Policy TLSv1.1_2016
Supported HTTP Versions HTTP/2, HTTP/1.1, HTTP/1.0
IPv6 Enabled
Default Root Object
Last Modified 2020-01-31 20:43 UTC-7
Log Bucket

Amazon CloudFront *.harryhobbes.info/com:

CNAME (2020-01-22): cnd4.harryhobbes.info

CNAME (2020-01-22): cnd3.harryhobbes.com

Distribution ID E1TP2RAZGLU33N
ARN arn:aws:cloudfront::555731510275:distribution/E1TP2RAZGLU33N
Log Prefix
Delivery Method Web
Cookie Logging Off
Distribution Status InProgress
Comment
Price Class Use All Edge Locations (Best Performance)
AWS WAF Web ACL
State Enabled
Alternate Domain Names (CNAME) cnd4.harryhobbes.info
cnd3.harryhobbes.com
SSL Certificate *.harryhobbes.com (cba36f3a-f99a-475d-9247-a0153f6fed9c)
Domain Name d3kh0wv9ownpb4.cloudfront.net
Custom SSL Client Support Clients that Support Server Name Indication (SNI) – (Recommended)
Security Policy TLSv1.1_2016
Supported HTTP Versions HTTP/2, HTTP/1.1, HTTP/1.0
IPv6 Enabled
Default Root Object
Last Modified 2020-01-23 16:08 UTC-7
Log Bucket

Amazon CloudFront *.harrymanchester.com:

Original CNAME: d2mfrxz043v1fq.cloudfront.net

New CNAME (2020-01-22): cdn2.harrymanchester.com

Distribution ID E347NYWXU9MM04
ARN arn:aws:cloudfront::555731510275:distribution/E347NYWXU9MM04
Log Prefix
Delivery Method Web
Cookie Logging Off
Distribution Status InProgress
Comment
Price Class Use All Edge Locations (Best Performance)
AWS WAF Web ACL
State Enabled
Alternate Domain Names (CNAME) cdn2.harrymanchester.com
SSL Certificate *.harrymanchester.com (2b5ca166-2c9a-4c93-8dc3-8d3d1c0a39e1)
Domain Name d2mfrxz043v1fq.cloudfront.net
Custom SSL Client Support Clients that Support Server Name Indication (SNI) – (Recommended)
Security Policy TLSv1.1_2016
Supported HTTP Versions HTTP/2, HTTP/1.1, HTTP/1.0
IPv6 Enabled
Default Root Object
Last Modified 2020-01-22 18:34 UTC-7
Log Bucket

*** End of Content ***

Last Update: 02/06/2020


6. DuplicatorPro Permissions

Duplicator Pro FAILS with encrypted buckets!

2020 License: Duplicator Pro – Personal: 339988ad729898d2ba4901a8175507ef


2019 License: 339988ad729898d2ba4901a8175507ef

As of 2018-10-14:  DuplicatorPro_Dreams

Current Amazon Policy: “AmazonS3FullAccessRestricted”

Deprecated as of 2018-02-22: Aquila-3_TNTDrive

Note: New S3 user names must have the “AdministratorAccess” policy to work. Prior S3 user names seem to work with the “AmazonS3FullAccess” policy.

Group: Nestor

From Duplicator Pro website: (https://snapcreek.com/duplicator/docs/amazon-s3-policy-setup/)

{
“Version”: “2012-10-17”,
“Statement”: [
{
“Effect”: “Allow”,
“Action”: [
“s3:ListBucket”,
“s3:GetBucketLocation”,
“s3:ListBucketMultipartUploads”
],
“Resource”: “arn:aws:s3:::lsm-west-websites”,
“Condition”: {}
},
{
“Effect”: “Allow”,
“Action”: [
“s3:AbortMultipartUpload”,
“s3:DeleteObject”,
“s3:DeleteObjectVersion”,
“s3:GetObject”,
“s3:GetObjectAcl”,
“s3:GetObjectVersion”,
“s3:GetObjectVersionAcl”,
“s3:PutObject”,
“s3:PutObjectAcl”,
“s3:PutObjectVersionAcl”
],
“Resource”: “arn:aws:s3:::lsm-west-websites/*”,
“Condition”: {}
},
{
“Effect”: “Allow”,
“Action”: “s3:ListAllMyBuckets”,
“Resource”: “*”,
“Condition”: {}
}
]
}

*** End of Content ***

Last Update: 02/06/2020


7. How a Child Theme Works

HOW A CHILD THEME WORKS

A child theme uses a series of various .php functions and WordPress optimized commands and hooks to call on the full functionality of the parent theme. This process is called enqueueing the parent theme. This basically means that the child inherits its functionality from the parent theme, and essentially “piggybacks” off of it.

When WordPress runs, it first looks to the files present in the child theme and executes the code it finds. If the files are not present in the child theme, it executes the commands found in the parent theme.

If you’ve created a header.php or footer.php file within a child theme, WordPress would execute the code found in the child theme. The only file that WordPress doesn’t prioritize child over parent for, is the functions.php file. In this regard, WordPress executes the code found in both files.

Although the child theme is given the space to take on a life of its own, it still only exists because of the parent theme, and only works if the relationship is set up correctly. This is why enqueueing the relevant functions must be done so with care.

https://divi.space/the-divi-css-and-child-theme-guide/

 


Child Theme Configurator Tutorial Videos

http://www.childthemeconfigurator.com/tutorial-videos/

 

*** End of Content ***

Last Update: 02/06/2020


8. PODS Reference

https://pods.io/docs/learn/shortcodes/pods/

https://pods.io/docs/learn/field-types/


Use a template to display fields.

By specifying a Pods Template in the “template” argument you can display one or more items with that template.

The first example displays a specific post item (id=5); the second example shows a list of 5 items.


[pods name="pod_name" template="template_name" id="5"]
[pods name=”pod_name” template=”template_name” limit=”5″]

PODS Template – Artifact

<p>{@entry-name}<br />
{@date-created}<br />
{@date-modified}<br />
{@entry-author}<br />
{@permalink}</p>

<h4>Artifact Heading</h4>
<p>{@artifact-id}<br />
{@artifact-title}<br />
{@artifact-brief-description}<br />
{@artifact-type}</p>

<h4>Location Data</h4>

<p>{@artifact-origination-locale}<br />
{@artifact-origination-address}<br />
{@artifact-origination-postmark}<br />
{@artifact-destination-address}<br />
{@artifact-destination-postmark}</p>

<h4>Content</h4>

<p>{@artifact-editors-commentary}<br />
{@artifact-content-transcribed}

<h4>Reference Categories</h4>

{@artifact-ancillary-markings}<br />
{@artifact-content-reference}<br />
{@artifact-tags-reference}<br />
{@location-reference}<br />
{@facility-reference}<br />
{@event-reference}<br />
{@people-reference}<br />
{@organizations-reference}<br />
{@personal-relationship-reference}</p>

<h4>Component List</h4>

<p>{@artifact-list-of-components}<br />
{@artifact-description-file}<br />
{@artifact-image-1._src}<br />
{@artifact-image-2._src}<br />
{@artifact-image-3._src}<br />
{@artifact-image-4._src}<br />
{@artifact-image-5._src}<br />
{@artifact-image-6._src}<br />
{@artifact-image-7._src}<br />
{@artifact-image-8._src}<br />
{@artifact-image-9._src}<br />
{@associated-artifacts}</p>

<h4>Production Data</h4>

<p>{@artifact-creation-date}<br />
{@product-publication-date}<br />
{@product-version-date}<br />
{@product-version-number}<br />
{@product-author}<br />
{@product-owner}<br />
{@product-publisher}</p>


PODS Entry Heading

PODS Entry Name: {@entry-name}
Date PODS Created: {@date-created}
Date PODS Last Modified: {@date-modified}
PODS Artifact Author {@entry-author}
Permalink: {@permalink}

Artifact Heading

Artifact ID: {@artifact-id}
Artifact Title: {@artifact-title}
Brief Description: {@artifact-brief-description}
Artifact Type: {@artifact-type}

Artifact Location Data

Artifact Origination Locale: {@artifact-origination-locale}
Origination Address: {@artifact-origination-address}
Origination Postmark: {@artifact-origination-postmark}
Destination Address: {@artifact-destination-address}
Destination Postmark: {@artifact-destination-postmark}

Content

Editor’s Commentary:
{@artifact-editors-commentary}
Transcribed Content:
{@artifact-content-transcribed}

Reference Categories

Ancillary Markings: {@artifact-ancillary-markings}
References in Content: {@artifact-content-reference}
Tags Reference: {@artifact-tags-reference}
Location Reference: {@location-reference}
Facilities Reference: {@facility-reference}
Event Reference: {@event-reference}
People Reference: {@people-reference}
Organization Reference: {@organizations-reference}
Relationships Reference: {@personal-relationship-reference}

Component List

PODS Entry Name: {@artifact-list-of-components}
Date PODS Created: {@artifact-description-file}
Artifact Image Number 1: {@artifact-image-1._src}
Artifact Image Number 2: {@artifact-image-2._src}
Artifact Image Number 3: {@artifact-image-3._src}
Artifact Image Number 4: {@artifact-image-4._src}
Artifact Image Number 5: {@artifact-image-5._src}
Artifact Image Number 6: {@artifact-image-6._src}
Artifact Image Number 7: {@artifact-image-7._src}
Artifact Image Number 8: {@artifact-image-8._src}
Artifact Image Number 9: {@artifact-image-9._src}

Production Data

Artifact Creation Date: {@artifact-creation-date}
Artifact Publication Date: {@product-publication-date}
Artifact Version Date: {@product-version-date}
Artifact Version Number: {@product-version-number}
Artifact Product Author: {@product-author}
Artifact Product Owner: {@product-owner}
Artifact Product Publisher: {@product-publisher}

*** End of Content ***

Last Update: 02/06/2020


9. Offload Media Pro Issues

Thumbnail “Greyed Out”

Ian at DeliciousBrains support:

Hi Larry,

So, your example URLs return a “No such key” error, but … tada!:- https://cdn5.larrymanchester.com/2020/02/03144248/www-Img-2015-04-21_1-200×300.jpg

It looks like you’re using a CloudFront distribution that uses an offset prefix into the bucket as its source, e.g. the “cdn5.larrymanchester.com” distribution is using an origin that has an “Origin Path” of “LSM”.

You can tell WP Offload Media about this offset by using the “as3cf_cloudfront_path_parts” filter:-

https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront-tweaks/blob/96d9fc03ffcfdc1d2e77b0a1a53891e6e1a76e30/amazon-s3-and-cloudfront-tweaks.php#L830

If you download, install, and edit the Tweaks plugin, and then change that linked example function to look for “cdn5.larrymanchester.com” and “LSM” instead of “cdn.example.com” and “media” respectively, you should be good to go. Please remember to uncomment the associated “add_filter” line in the __construct function too.

Please get in touch if there is anything else I can help you with.

Cheers,
Ian


https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront-tweaks

/**
* This filter allows you to adjust the path of a CDN (such as CloudFront) URL.
* Useful when using a CDN distribution which uses a subdirectory of a bucket as its source.
*
* @handles `as3cf_cloudfront_path_parts`
*
* @param array $path_parts
* @param string $domain
*
* @return array
*
* Note: Filter uses ‘cloudfront’ in name for historical reasons, can be used with any CDN that
* supports the ability to use a path prefix with bucket as source.
*/
function cloudfront_path_parts( $path_parts = array(), $domain = ” ) {
// Example would allow a CDN distribution of cdn.example.com/media/ to serve files as cdn.example.com.
// Its important to remember that the CDN distribution must have been set up accordingly.
if ( ‘cdn.example.com’ === $domain && 1 < count( $path_parts ) && ‘media’ === $path_parts[0] ) {
unset( $path_parts[0] );
}

return $path_parts;
}


 

*** End of Content ***

Last Update: 02/06/2020


98. License Keys

Child Theme Configurator Pro – 2020-01-20

License: HWnzicZIDQc9R_7904

Child Theme Configurator Pro

Never Expires, child-theme-configurator-pro-2.3.2.zip
[Order #7942] (January 26, 2020)
Product Quantity Price
Child Theme Configurator Pro 1 $19.95
Update Key: i7BGuSQ07brTE_7942
Subtotal: $19.95
Payment method: Credit Card
Total: $19.95
Billing address
Lawrence Manchester
purchase-account@harryhobbes.com



Askimet Spam Filtering Service

Askimet Key (2018-01-16): 95da3b4850a7
Askimet Key 2 (2020-01-08): 95da3b4850a7

Askimet/Wordpress.com Username: LarryManch
Email address: Service-Account@LarryManchester.com

Donation: $36/year

Askimet Key:

b434987e652c
Askimet/Wordpress.com Username: larrymanchester
Email address: MiddleMark@MT.net
2018-01-16:
95da3b4850a7
Askimet/Wordpress.com Username: LarryManch
Email address: Service-Account@LarryManchester.com
Donation: $36/year


Folders Pro – 2020-01-20

Purchase date: January 20, 2020
Folders – Basic – 1 website (3 Years)
folders-pro-2.4.2

Total Price: $49.00
Your license keys (if any): Folders – Basic – 1 website (3 Years): cffc5c4bd364937f636027d90f9b0635


WordFence Key – 2018-01-06

DreamsOfThingsThatWere.local

9028f6a9a99f394f0739fdd76ef992c1d1422beb5f1ad29c852e4f1b05d02bfb769fc24b0a0e68d9b31501cfbecdfe6b2d80f3241e294e677f20ee52e42f1859ae36e5e504edf69358d62ca37d1a2eeb


Duplicator Pro – 2020-01-20

339988ad729898d2ba4901a8175507ef

Duplicator Pro

339988ad729898d2ba4901a8175507ef



WP Offload Media (formerly WP Offload S3) – Bronze

c5e751d8-70ef-4e71-98ad-77db03ae2d11

 

 

*** End of Content ***

Last Update: 02/06/2020


99. Installation Notes

2020-01-19

“Last Update” PHP Code

Installed “Display the Last Updated Date of Your Posts in WordPress”

https://www.wpbeginner.com/wp-tutorials/display-the-last-updated-date-of-your-posts-in-wordpress/

function wpb_last_updated_date( $content ) {
$u_time = get_the_time('U');
$u_modified_time = get_the_modified_time('U');
if ($u_modified_time >= $u_time + 86400) {
$updated_date = get_the_modified_time('F jS, Y');
$updated_time = get_the_modified_time('h:i a');
$custom_content .= '<p class="last-updated">Last updated on '. $updated_date . ' at '. $updated_time .'</p>'
}
    $custom_content .= $content;
    return $custom_content;
}
add_filter( 'the_content', 'wpb_last_updated_date' );

 

*** End of Content ***

Last Update: 02/06/2020