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 | |
| add_action('admin_init', function () { | |
| // Redirect any user trying to access comments page | |
| global $pagenow; | |
| if ($pagenow === 'edit-comments.php') { | |
| wp_redirect(admin_url()); | |
| exit; | |
| } |
Options included below:
- Using Docker
docker-compose - Using Homebrew
brew
This gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew any longer. Instead consider adding a barebones docker-compose.yml for each project and run docker-compose up to start each project's mysql service.
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 ajax_enquiry_init(){ | |
| wp_register_script('jquery', 'https://code.jquery.com/jquery-1.11.2.min.js' ); | |
| wp_enqueue_script('jquery'); | |
| wp_register_script('main', get_template_directory_uri() . '/js/main.js', array('jquery') ); | |
| wp_enqueue_script('main'); | |
| wp_localize_script( 'main', 'ajax_auth_object', array( | |
| 'ajaxurl' => admin_url( 'admin-ajax.php' ), |
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 | |
| /** | |
| * Pressjitsu Remote HTTP Cache | |
| * | |
| * Many plugins like to perform remote HTTP requests for front-end visits, | |
| * sometimes without even employing transient caching. We think that *all* HTTP | |
| * requests should run in the background, and thus be always served from cache, | |
| * even if the cache is stale. | |
| * | |
| * Configure cachable hosts via the pj_http_cache_hosts filter. |
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
| /* eslint-disable no-console */ | |
| /*** | |
| * This is a little server that emulates the protocol used by cloudflare's browser rendering API. In | |
| * local development, you can run this server, and connect to it instead of cloudflare's (strictly | |
| * limited) API. e.g. in your worker you might use a function like this: | |
| * | |
| * ```ts | |
| * import { Browser, launch as launchPuppeteer } from '@cloudflare/puppeteer' | |
| * function launchBrowser(env: Environment) { | |
| * if (env.LOCAL_BROWSER_ORIGIN) { |
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 | |
| /** | |
| * == Psudo == | |
| * | |
| * Plugin Name: Psudo | |
| * Version: 1.0 | |
| * Author: Dan Knauss | |
| * Contributors: | |
| * Donate link: https://example.com/ | |
| * Tags: security, user management |
OlderNewer