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
| #!/usr/bin/env bash | |
| # =============================================================================== | |
| # Script to install PHPUnit in the Local by Flywheel Mac app | |
| # These packages are installed | |
| # | |
| # PHPUnit, curl wget, rsync, git, subversion and composer. | |
| # | |
| # WordPress is installed in the `/tmp/wordpress` directory for use by PHPUnit. | |
| # The WordPress test suite is installed in the `/tmp/wordpress-tests-lib` directory. |
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 | |
| function language_detector_admin_notices() { | |
| // Get the current language locale | |
| $language = get_locale(); | |
| // Check if the nag screen has been disabled for this language | |
| if ( false === get_option( 'plugin_slug_language_detector_' . $language, false ) ) { | |
| // Check if a translation file already exists for this language | |
| if ( $loaded = load_plugin_textdomain( 'text_domain', false, plugin_dir_path( __FILE__ ) . '/languages/' ) ) { |
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 | |
| /** | |
| * Create a new custom yoast seo sitemap | |
| */ | |
| add_filter( 'wpseo_sitemap_index', 'ex_add_sitemap_custom_items' ); | |
| add_action( 'init', 'init_wpseo_do_sitemap_actions' ); | |
| // Add custom index |
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 | |
| /* | |
| * 1. Go to Settings > Permalinks and select any page as home page | |
| * Then use the following code | |
| * | |
| * You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. | |
| * Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. | |
| * If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, | |
| * give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, | |
| * so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code. |