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
/** TABLE OF CONTENTS | |
---------------------------------------------------------------------------/ | |
1.0 - Global Styles | |
1.1 - General | |
1.2 - Selection Highlight | |
1.3 - Buttons | |
1.4 - Typography | |
1.5 - Custom Font Face |
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
<?php | |
/** | |
* Plugin Name: WordPress Export to JSON | |
* Plugin URI: https://jsnelders.com/ | |
* Description: Export all WordPress posts, pages, comments, tags, commments and users to a JSON file. | |
* Author: Jason Snelders | |
* Author URI: http://jsnelders.com | |
* Version: 2020-01-30.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
<?php | |
/** | |
* Allowed Block Types Configuration | |
* Gist Keywords: wordpress, editor, gutenberg, blocks | |
* | |
* @category WordPress | |
* @author Knol Aust | |
* @version 1.0.0 | |
* @description Limit the blocks allowed in Gutenberg for improved content control. |
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 | |
/** | |
* Heavily borrowed from: http://xplus3.net/2010/08/08/filtering-on-a-non-standard-database-field-with-wordpress/ | |
**/ | |
class CoordinatesTable extends DB { | |
protected $db_option = "coordinates_db"; |
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 | |
\add_filter( 'wc_add_to_cart_message', function( $string, $product_id = 0 ) { | |
$start = strpos( $string, '<a href=' ) ?: 0; | |
$end = strpos( $string, '</a>', $start ) ?: 0; | |
return substr( $string, $end ) ?: $string; | |
} ); |
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 jtd_acf_auto_set_license_keys() { | |
if ( !get_option('acf_pro_license') && defined('ACF_5_KEY') ) { | |
$save = array( | |
'key' => ACF_5_KEY, | |
'url' => home_url() | |
); | |
$save = maybe_serialize($save); |
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 | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Remove Yoast SEO columns for all users site wide | |
* Credit: Andrew Norcross http://andrewnorcross.com/ | |
* Last Tested: Sep 17 2024 using Yoast SEO 23.4 on WordPress 6.6.2 | |
* | |
* If you have custom post types, you can add additional lines in this format | |
* add_filter( 'manage_edit-{$post_type}_columns', 'yoast_seo_admin_remove_columns', 10, 1 ); | |
* replacing {$post_type} with the name of the custom post type. |
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
I'm using Ubuntu 12.04 and I'm following the Debian/Ubuntu way of dealing with config files. I presume you know how to work with sudo and such | |
- Install last stable version of WordPress (in my case 3.6) with Subversion into /opt/wordpress/3.6 | |
- create a symlink /opt/wordpress/stable ==> /opt/wordpress/3.6 | |
- create a directory sites in /var/www/sites | |
- create a directory specific for your site using the domain name e.g. /var/www/sites/example.com | |
- create a directory wp-content in /var/www/sites/example.com | |
- create a directory wordpress in /etc | |
- create a directory named as you site's domain name, e.g. in /etc/wordpress | |
- copy from /opt/wordpress/stable/wp-config-sample.php to /etc/wordpress/example.com/wp-config.php |
NewerOlder