Skip to content

Instantly share code, notes, and snippets.

Ryan Mortier ryanmortier

Block or report user

Report or block ryanmortier

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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
View Encrypt.php
<?php
function encrypt($string)
{
$string = '<font face=\"Wingdings\">' . $string . '</font>';
return $string;
}
function decrypt($string)
@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,
You can’t perform that action at this time.