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
/** | |
* 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
/** | |
* 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
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
add_filter('wp_feed_cache_transient_lifetime', 'cws_shorten_rss_feed_timeout'); | |
function cws_shorten_rss_feed_timeout( $interval, $url ) { | |
if( 'https://<example.com>/feed' == $url ) | |
return 3600; | |
return $interval; | |
} |
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 | |
/** | |
* Create Custom Column in the Manage Sites table for Last Secirty Scan date | |
* ref: https://meta.mainwp.com/t/solved-add-second-field-to-dashboard/3015 | |
* ref: https://meta.mainwp.com/t/display-group-s-column-in-the-manage-sites-table/2932 | |
* ref: https://meta.mainwp.com/t/create-custom-column-in-the-manage-sites-table-with-data-from-client-data/2877 | |
*/ | |
add_filter( 'mainwp_sitestable_getcolumns', 'mycustom_mainwp_sitestable_getcolumns', 10, 1 ); |
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
https://gtmetrix.com/ | |
https://gtmetrix.com/blog/how-to-read-a-waterfall-chart-for-beginners/ | |
https://www.webpagetest.org/ | |
https://wordpress.org/plugins/query-monitor/ | |
https://github.com/crstauf/query-monitor-extend | |
https://newrelic.com/products/application-monitoring | |
https://help.nexcess.net/74095-wordpress/configure-new-relic-monitoring | |
https://wordpress.org/plugins/wp-newrelic/ |
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
DELETE FROM wp_commentmeta WHERE comment_id IN ( SELECT ID FROM wp_comments WHERE comment_type = 'order_note' ); | |
DELETE FROM wp_comments WHERE comment_type = 'order_note'; |
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( 'manage_edit-product_columns', 'tax_status_product_column'); | |
function tax_status_product_column($columns){ | |
$new_columns = []; | |
foreach( $columns as $key => $column ){ | |
$new_columns[$key] = $columns[$key]; | |
if( $key == 'is_in_stock' ) { | |
$new_columns['tax_status'] = __( 'Tax status','woocommerce'); | |
} | |
} | |
return $new_columns; |
NewerOlder