This file contains hidden or 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
| #!/bin/sh | |
| # ---------------------------------------------------------------------------------------- | |
| # Title: Remove "ms-files.php" dependency. | |
| # Description: Removes the "ms-files.php" dependency from a WordPress Multi-Network install. | |
| # This script will also work on a single WordPress Multisite instance because | |
| # in that case there will only be one record in the `wp_sites` table. | |
| # Author: Christian Wach <[email protected]> | |
| # Props: Austin Ginder <https://anchor.host/removing-legacy-ms-files-php-from-multisite/> | |
| # Version: 1.0.0 | |
| # Gist URL: https://gist.github.com/christianwach/1adc33da22515471c749f5ba55e8726a |
This file contains hidden or 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 | |
| /** | |
| * ACFE Fix AJAX selectors | |
| * | |
| * Plugin Name: ACFE Fix AJAX selectors | |
| * Description: Fixes AJAX selectors with ACF 6.3.10. Do not deacticate or delete. | |
| * Plugin URI: https://haystack.co.uk | |
| * Version: 1.0.0 | |
| * Author: Christian Wach | |
| * Author URI: https://haystack.co.uk |
This file contains hidden or 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 | |
| /** | |
| * BP Hide Name Field | |
| * | |
| * Plugin Name: BP Hide Name Field | |
| * Description: Hides the default Name field on BuddyPress Registration form and Profile Edit screens. | |
| * Plugin URI: https://gist.github.com/christianwach/06d878edc277ce1ca8a7e59a82052744 | |
| * Version: 1.1.1 | |
| * Author: Christian Wach | |
| * Author URI: https://github.com/christianwach |
This file contains hidden or 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 | |
| /** | |
| * Suppress Admin Notices | |
| * | |
| * Plugin Name: Suppress Admin Notices | |
| * Description: Stop that damn nagging! | |
| * Version: 1.0.2 | |
| * Plugin URI: https://gist.github.com/christianwach/c30d2972d1807ad9a04dff1db971b7cd | |
| * Author: Christian Wach | |
| * Author URI: https://haystack.co.uk |
This file contains hidden or 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 | |
| /** | |
| * This recipe restricts all content of a Custom Post Type (CPT) | |
| * to members only. | |
| * | |
| * This recipe assumes your CPT name is "recipes". | |
| * You should replace this with your CPT name for the filter name | |
| * and the $my_cpt variable's value in the hook name on line 71, | |
| * e.g. pmpro_has_membership_access_filter_cpt-name, | |
| * and 74, e.g. $my_cpt = 'cpt-name'. |
This file contains hidden or 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 | |
| /** | |
| * CiviCRM Multisite Domain functionality. | |
| * | |
| * @see https://gist.github.com/christianwach/5ca120670152df3dbfb8d3ca42079a96 | |
| */ | |
| /** | |
| * Define CiviCRM Multisite Domain constants and settings. | |
| * |
This file contains hidden or 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
| /** | |
| * Register hero block | |
| */ | |
| add_action('acf/init', 'hero'); | |
| function hero() { | |
| // check function exists | |
| if( function_exists('acf_register_block') ) { | |
| // register a hero block |
This file contains hidden or 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
| # Start Bad Bot Prevention | |
| <IfModule mod_setenvif.c> | |
| # SetEnvIfNoCase User-Agent ^$ bad_bot | |
| SetEnvIfNoCase User-Agent "^12soso.*" bad_bot | |
| SetEnvIfNoCase User-Agent "^192.comAgent.*" bad_bot | |
| SetEnvIfNoCase User-Agent "^1Noonbot.*" bad_bot | |
| SetEnvIfNoCase User-Agent "^1on1searchBot.*" bad_bot | |
| SetEnvIfNoCase User-Agent "^3D_SEARCH.*" bad_bot | |
| SetEnvIfNoCase User-Agent "^3DE_SEARCH2.*" bad_bot | |
| SetEnvIfNoCase User-Agent "^3GSE.*" bad_bot |
This file contains hidden or 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
| perl -pi -e 's#\/\*\!5001[7|3].*?`[^\*]*\*\/##g' dumpfile.sql |
This file contains hidden or 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
| #!/bin/bash | |
| # start at top directory if we're not already there | |
| pushd "$(git rev-parse --show-toplevel)" > /dev/null | |
| # run style checker | |
| civilint | |
| if [[ $? == 1 ]] | |
| then | |
| echo "PR aborted" |
NewerOlder