Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:
sysctl -a | grep machdep.cpu.features | grep VMX
If there's output, you're good!
| You nerd <3 | |
| object(WP_Styles)[749] | |
| public 'base_url' => string 'http://fse.local' (length=21) | |
| public 'content_url' => string 'http://fse.local/wp-content' (length=32) | |
| public 'default_version' => string '5.9.2' (length=5) | |
| public 'text_direction' => string 'ltr' (length=3) | |
| public 'concat' => string '' (length=0) | |
| public 'concat_version' => string '' (length=0) | |
| public 'do_concat' => boolean false |
| const FrontendTracker = ( props ) => { | |
| // Add the following in place of the `return` statement from Part 1, step 2.1. | |
| const saveUpdates = async () => { | |
| setLoading( true ); | |
| setNotice( null ); | |
| const response = await apiFetch( { | |
| path: `${initTracker.route}/${ dataAttributes.post_id }`, | |
| method: 'POST', |
| const FrontendTracker = ( props ) => { | |
| // Add the following before the `return()` block from Part 1, step 2.1. | |
| const [ isLoading, setLoading ] = useState( false ); | |
| const [ notice, setNotice ] = useState( null ); | |
| useEffect( () => { | |
| if ( null === notice ) { | |
| return; | |
| } |
| <?php | |
| function localize_route() { | |
| wp_localize_script( 'initiative-tracker-frontend-script', 'initTracker', [ | |
| 'route' => 'rave-initiative/v1/initiative', | |
| ] ); | |
| } | |
| add_action( 'wp_enqueue_scripts', 'localize_route' ); |
| const trackerClass = '.wp-block-rave-initiative-tracker', | |
| trackers = document.querySelectorAll( trackerClass ); | |
| trackers.forEach( ( tracker ) => { | |
| const attributes = { | |
| block_id: tracker.dataset.id, | |
| post_id: parseInt( tracker.dataset.post_id, 10 ), | |
| }; | |
| render( |
| #!/bin/bash | |
| # IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it! | |
| # IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS. | |
| # This script needs to be run from the volume you wish to use. | |
| # E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh | |
| # WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars. | |
| # Get active services: launchctl list | grep -v "\-\t0" | |
| # Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents |
| Allow ALL cross origin requests to WordPress REST API | |
| https://github.com/Shelob9/rest-all-cors | |
| WordPress theme using Rest API and Vue.js | |
| https://github.com/rtCamp/VueTheme | |
| WordPress Post from Front End using REST API and Vue.js | |
| http://jimfrenette.com/2017/01/post-from-front-end-wp-api-vuejs/ | |
| An offline-first SPA using Vue.js, the WordPress REST API and Progressive Web Apps |
| <?php | |
| /** | |
| * Filters wp_remote_get() to: | |
| * 1. Return a value from the cache when it's available. | |
| * 2. Write a value to the cache when it's been fetched. | |
| * | |
| * Requires the WP_IMPORT_CACHE constant to be set to a writable directory. | |
| */ | |
| if ( defined( 'WP_CLI' ) && WP_CLI ) { |
| <?php | |
| require_once __DIR__.'/relative/path/to/PrettierPHPFixer/File'; | |
| return PhpCsFixer\Config::create() | |
| ->registerCustomFixers([ | |
| (new PrettierPHPFixer()), | |
| ]) | |
| ->setRules([ | |
| 'Prettier/php' => true, |