Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View middlesister's full-sized avatar

Karin Taliga middlesister

View GitHub Profile

Installation

To install, you need to have the WordPress i18n library on your computer. Check it out using SVN:

sudo svn co http://i18n.svn.wordpress.org/tools/trunk/ /usr/lib/wpi18n

You don't have to put the library in /usr/lib/wpi18n, but if you don't put it there, make sure to set the $WP_I18N_LIB environment variable in your .bashrc or .bash_profile file (with no trailing slash):

export WP_I18N_LIB="/path/to/i18n/lib"

@middlesister
middlesister / vscode-shortcuts-text-editing.md
Created March 8, 2021 21:30
VSCode shortcuts cheat sheet - macOS

VSCode text editing shortcuts cheat sheet

VSCode comes with a gazillion shortcuts. Learning and using them is a true power-up but it's hard to know where to start.

Here's a cheat sheet with some general shortcuts and simple text manipulations.

Nothing code related. No programming language specifics. These are the vanilla defaults that ships with VSCode. I think some are even macOS defaults and not unique to VSCode.

NOTE: Windows users will probably be able to swap command (⌘) for ctrl (^) in most cases, but I don't have access to Windows at the moment so i can't verify that.

Some shortcuts are double, in that you press a first set and then a modifier. Most notably ⌘K works like that, as well as some markdown extensions who uses ^M as their initial key combination.

@middlesister
middlesister / accessible-genesis-menu.php
Last active January 31, 2020 15:42
Accessible and translatable Genesis reponsive menu
<?php
/**
* Enqueue javascript for responsive menus
*
* Pass localized strings to the javascript. Replace "prefix-" with your
* child theme prefix and "textdomain" with your theme textdomain. The strings
* will be available for translation in your pot-file like normal
*
@middlesister
middlesister / test-upgrade.php
Last active January 4, 2016 17:09
set a theme option when upgrading a theme from a specific version
<?php
/**
* @group default
*/
class TestUpgrade extends Thematic_UnitTestCase {
public static function setUpBeforeClass() {
parent::setUpBeforeClass();
<?php
add_action ('admin_init', 'childtheme_opt_init');
/**
* Add childtheme settings to the thematic theme
*
* This will add childtheme options to the thematic theme settings
* in the database, and add to the existing theme options page in Thematic
**/
function childtheme_opt_init() {
@middlesister
middlesister / childtheme_separate_options.php
Last active December 17, 2015 05:49
Add child theme settings to Thematic theme options page
<?php
add_action ('admin_init', 'childtheme_opt_init');
/**
* Add childtheme settings to the thematic theme
*
* This will create a separate setting in the database, but
* add the settings to the existing theme options page in Thematic
**/
function childtheme_opt_init() {
<?php
/**
* Content Extensions
*
* @package ThematicCoreLibrary
* @subpackage ContentExtensions
* @todo revisit docblock desciptions & tags
*/
@middlesister
middlesister / widget-latest-podcasts.php
Last active August 29, 2015 13:56
A widget for displaying latest podcasts, created for the plugin seriously-simple-podcasting.
<?php
/**
* Display recent podcasts widget
*
* Displays a list of recent podcast episodes.
* Based on WP_Recent_Posts widget
*
* @author Karin Taliga
*/