Skip to content

Instantly share code, notes, and snippets.

View vegasgeek's full-sized avatar

John Hawkins vegasgeek

View GitHub Profile
@jb510
jb510 / snippet.php
Created February 29, 2024 05:48
Add "Manage Patterns" menu item under Pages
<?php
/**
* Adds a menu item to the admin menu for managing patterns
*/
function s9_add_manage_patterns_menu() {
// Check if the current user has the capability to edit pages
if (!current_user_can('edit_pages')) {
return;
}
@ihorvorotnov
ihorvorotnov / wp-get-content
Created February 21, 2014 11:20
WordPress: get post content by ID
/**
* You often need to get the content or title from a specific post.
* Sometimes, using a custom loop is the better option, but when you only need
* to get information from a specific post, there’s a better option
*/
echo get_post_field('post_content', $post_id);
@boogah
boogah / Favorite Alfred Workflows.md
Last active December 29, 2017 19:41
My Favorite Alfred Searches & Workflows
@aaronjorbin
aaronjorbin / expectations.md
Created October 25, 2012 21:32
Expectations for speakers and organizers of WordCamps

Purpose

The purpose of this document is to start a discussion that leads to better expectations between speakers and organizers of WordCamps. It is based on Open Conference Expectations by @rmurphey @divya and @paul_irish. It is based on my experience speaking at many WordCamps and seeing some great things and not great things. I would love your comments and feedback.

What I ask for as a speaker

  1. A complimentary ticket to the event.
  2. A code of conduct for every attendee, including speakers and sponsors. Everyone should be able to have a good time in a safe, harassment-free environment. See the The Ada Initiative for more information on how to create such a policy.
  3. Adequate amount of time to prepare. This means the call for speakers should occur at least sixty days before the camp and invitations at least thirty days before the
@jakebellacera
jakebellacera / ICS.php
Last active June 2, 2024 02:20
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*