This file contains 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
# | |
# This script is executed from a terminal prompt at the root of your MainWP WordPress website. | |
# It uses the same services as WP CLI, so if WP CLI runs, this should also. | |
# | |
# Execute MainWP CLI command to generate a list of all configured sites in MainWP | |
# Pipe output through filter to remove columns 3 and 4 of output. These columns hold the 2 digit site number. Adjust if more than 99 sites. | |
# Pipe that output to get rid of the comment lines in the site listing. | |
# Pipe that output through the SED editor inserting the security scan command at the beginning of the line | |
# Send everything to a shell script to be executed. | |
cd /var/www/capwebwpcare.com/htdocs |
This file contains 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
# ----------------------------------------------------------------- | |
# .gitignore for WordPress plugins | |
# ver 20240417 | |
# | |
# To ignore uncommitted changes in a file that is already tracked, use | |
# git update-index --assume-unchanged | |
# | |
# To stop tracking a file that is currently tracked, use | |
# git rm --cached | |
# |
This file contains 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
# ----------------------------------------------------------------- | |
# .gitignore for WordPress @CapWebSolutions forked from @salcode | |
# ver 20211109 | |
# | |
# From the root of your project run | |
# curl -O https://gist.github.com/CapWebSolutions/f22e8df8567070412dbcc5284218dcd5/raw/.gitignore | |
# to download this file | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the repo. |
This file contains 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
/** | |
* WordPress URL rewriting rules for Screaming Frog Spider | |
* @author Matt Ryan - https://capwebsolutions.com | |
* @date 2022-03-15 | |
*/ | |
// Nav: Configuration | URL Rewriting | |
// Replacing: | |
// https://example/com/blog/page/2/ |
This file contains 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
/** | |
* WordPress URL Exclude List for Screaming Frog Spider | |
* @author Matt Ryan - https://capwebsolutions.com | |
* @date 2022-03-15 | |
*/ | |
// Nav: Configuration | Exclude | |
// Gets rid of: | |
// wp-content plugins, themes, mu-plugins, uploads, etc. |
This file contains 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('admin_menu','dump_timezone_choice'); | |
function dump_timezone_choice($my_data) { | |
$my_data = wp_timezone_string(); | |
var_dump($my_data); | |
return($my_data); | |
} |
This file contains 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
function cws_elementor_shortcode( $atts ) { | |
return 'Copyright' . ' © ' . date("Y"); | |
} | |
add_shortcode( 'the_copyright_year', 'cws_elementor_shortcode'); |
This file contains 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 | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DEBUG_DISPLAY', true ); | |
@ini_set( 'display_errors', 1 ); | |
define( 'SCRIPT_DEBUG', true ); | |
define( 'SAVEQUERIES', true ); |
This file contains 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
<script>document.write( new Date().getFullYear() );</script> |
This file contains 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
/* | |
* Usage | |
* Use [year] in your posts. | |
*/ | |
function year_shortcode() { | |
$year = date('Y'); | |
return $year; | |
} | |
add_shortcode('year', 'year_shortcode'); |
NewerOlder