Skip to content

Instantly share code, notes, and snippets.

Ryan Mortier ryanmortier

View GitHub Profile
@ryanmortier
ryanmortier / calendar.sql
Created Jul 18, 2017
MySQL: Generate Calendar Helper Table
View calendar.sql
DROP TABLE IF EXISTS `calendar`;
CREATE TABLE `calendar` (
`id` INTEGER PRIMARY KEY,
`date` DATE NOT NULL,
`year` INTEGER UNSIGNED NOT NULL,
`month` INTEGER UNSIGNED NOT NULL,
`day` INTEGER UNSIGNED NOT NULL,
`quarter` INTEGER UNSIGNED NOT NULL,
`week` INTEGER UNSIGNED NOT NULL,
View Encrypt.php
<?php
function encrypt($string)
{
$string = '<font face=\"Wingdings\">' . $string . '</font>';
return $string;
}
function decrypt($string)
View widget.php
<?php
// widget function
class tp_widget_recent_tweets extends WP_Widget {
public function __construct() {
parent::__construct(
'tp_widget_recent_tweets', // Base ID
'* Recent Tweets', // Name
array( 'description' => __( 'Display recent tweets', 'tp_tweets' ), ) // Args
You can’t perform that action at this time.