Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View afragen's full-sized avatar

Andy Fragen afragen

View GitHub Profile
@cfoellmann
cfoellmann / tribe-events-activation-connector-oop.php
Last active August 29, 2015 14:00
Auto-(De-)Activate 'The Events Calendar' with 'The Events Calendar Pro' + hide 'The Events Calendar' from plugins.php listing
<?php
class EventsConnector {
var $events_calendar;
public function __construct() {
$this->events_calendar = 'the-events-calendar/the-events-calendar.php';
$events_calendar_pro = WP_PLUGIN_DIR . '/events-calendar-pro/events-calendar-pro.php';
@afragen
afragen / deploy.sh
Created May 11, 2012 02:34
Git -> Subversion one-step deployment script
#! /bin/bash
# A modification of Dean Clatworthy's deploy script as found here: https://github.com/deanc/wordpress-plugin-git-svn
# The difference is that this script lives in the plugin's git repo & doesn't require an existing SVN repo.
# main config
PLUGINSLUG="the-events-calendar-pro-alarm"
CURRENTDIR=`pwd`
MAINFILE="the-events-calendar-pro-alarm.php" # this should be the name of your main php file in the wordpress plugin
# git config
@jo-snips
jo-snips / filter-ical-event-item.php
Created October 8, 2012 18:22
The Events Calendar: Filter iCal Event Item
function filter_ical_description($item, $eventPost) {
$description = preg_replace( "/[\n\t\r]/", ' ', strip_tags( strip_shortcodes( $eventPost->post_content ) ) );
$item[] = 'DESCRIPTION:' . str_replace( ',','\,', $description );
return $item;
}
add_filter('tribe_ical_feed_item','filter_ical_description', 10, 2);
@trepmal
trepmal / extra-registration-fields.php
Created December 22, 2012 05:45
Extra registration fields
<?php
add_action( 'register_form', 'additional_profile_fields' );
add_action( 'signup_extra_fields', 'additional_profile_fields' );
function additional_profile_fields() { ?>
<p>
<label><?php _e('First Name') ?><br />
<input type="text" name="first_name" id="first_name" class="input" size="25" /></label>
</p>
<p>
@bonny
bonny / plugin-stats.php
Last active December 16, 2015 07:59
WordPress Plugin Download Stats for Panic Status Board Original blog post: http://simple-fields.com/2013/status-board-panel-to-show-wordpress-plugin-downloads/
<?php
// Read the original blog post here to understand what this is:
// http://simple-fields.com/2013/status-board-panel-to-show-wordpress-plugin-downloads/
define('WP_USE_THEMES', false);
define("WP_CACHE", false); // i get 404 if enabled
require('../wordpress/wp-blog-header.php');
class panic_dashboard_wp_plugin_stats {
anonymous
anonymous / Event Calendar Pro Responsive Solution
Created May 21, 2013 18:18
Event Calendar Pro Responsive Solution
@media only screen and (min-width : 320px) and (max-width : 480px) {
#tribe-events-event-meta .column {
float:left;
width:90%!important;
padding:0 4% 0 0;
text-align:left;
margin:0;
}
@codearachnid
codearachnid / customize_event_meta.php
Last active December 19, 2015 20:48
customize your tribe event calendar meta displays with a variety of methods
<?php
/**
* Customize your tribe event calendar meta displays with a variety of methods.
* Place this in your functions.php file within your theme
*/
add_action( 'wp_head', 'custom_event_meta' );
function custom_event_meta(){
// customize just the label
@sc0ttkclark
sc0ttkclark / .htaccess
Last active May 3, 2016 17:57
Add these lines to your .htaccess file if you can't get cPanel Let's Encrypt installation or renewal working properly (tested on SiteGround). They MUST go above any WordPress rewrites but below the "RewriteEngine On RewriteBase /" portion.
# Stop processing any rewrites for /.well-known/ files
RewriteCond %{REQUEST_URI} ^/\.well-known/.*$ [NC]
RewriteRule ^ - [L]
@GaryJones
GaryJones / PluginTest.php
Last active August 2, 2016 18:12
Test that plugin called `load_plugin_textdomain()` correctly.
<?php
namespace GAA\CorpManager;
use WP_UnitTestCase;
class PluginTest extends WP_UnitTestCase {
private $domain;
private $mofile;
@thefuxia
thefuxia / t5-silent-flush.php
Last active August 11, 2016 11:03
T5 Silent Flush - Flushes rewrite rules whenever a custom post type or taxonomy is registered and not already part of these rules. This is a soft flush, the .htaccess will not be rewritten.
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: T5 Silent Flush
* Description: Flushes rewrite rules whenever a custom post type or taxonomy is registered and not already part of these rules. This is a soft flush, the .htaccess will not be rewritten.
* Version: 2013.05.04
* Author: Thomas Scholz <info@toscho.de>
* Author URI: http://toscho.de
* License: MIT
* License URI: http://www.opensource.org/licenses/mit-license.php
*/