Skip to content

Instantly share code, notes, and snippets.

View vejin's full-sized avatar

Nikola Vejin vejin

View GitHub Profile
@jmccall75
jmccall75 / functions.php
Last active January 9, 2024 03:15
Locking down Gutenberg...
<?php
/**
* Gutenberg Block customization for this theme.
*/
// gutenberg disable for posts
//add_filter('use_block_editor_for_post', '__return_false', 10);
// gutenberg disable for post types
//add_filter('use_block_editor_for_post_type', '__return_false', 10);
@pbrocks
pbrocks / install-phpcs-with-homebrew.md
Last active June 3, 2024 14:27
Install phpcs with Homebrew

Install phpcs with Homebrew

To set up php linting, you’ll want to install this PHP CodeSniffer repo and configure with this WordPress Coding Standards repo: . There are a number of ways to do this, whether direct download, Composer, Homebrew, Pear, etc. The following is what works for me on MacOS using Homebrew:

In a terminal window on your Mac, start by updating your Homebrew.

brew doctor

Then install the Code Sniffer:

@zacombs
zacombs / WP weather
Last active September 14, 2023 08:53
Display weather on WordPress site using Weather Map API and Wordpress Transients API
/**
* Place these functions in functions.php of your WordPress theme. Then call them anywhere on your site.
*
* Be sure to replace the API Key, you can get this free from: https://openweathermap.org/api
*
* Transients are stored in the DB in the wp_options table. More info about transients: https://codex.wordpress.org/Transients_API
*
*
* Get the current weather conditions for Zip Code 40391 using the Open Weather Map API.
*/