Skip to content

Instantly share code, notes, and snippets.

View w3guy's full-sized avatar
✍️
Typing...

Collins Agbonghama w3guy

✍️
Typing...
View GitHub Profile
<?php
/*Add this code to your functions.php file of current theme OR plugin file if you're making a plugin*/
//add the button to the tinymce editor
add_action('media_buttons_context','add_my_tinymce_media_button');
function add_my_tinymce_media_button($context){
return $context.=__("
<a href=\"#TB_inline?width=480&inlineId=my_shortcode_popup&width=640&height=513\" class=\"button thickbox\" id=\"my_shortcode_popup_button\" title=\"Add My Shortcode\">Add My Shortcode</a>");
}
<?php
class ContactFormHandler
{
public function __construct(ContactFormTemplate $template, ContactFormValidator $validator, ContactFormMailer $mailer)
{
$this->template = $template;
$this->validator = $validator;
$this->mailer = $mailer;
}
* Downloaded or downloading
=============================
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html
@w3guy
w3guy / Creating WordPress Meta Box the OOP Way
Created April 7, 2014 12:25
A WordPress meta box plugin that add a custom message or notification before the actual post / page content http://w3guy.com/wordpress-meta-box-oop/
<?php
/*
Plugin Name: Custom Message Meta Box
Plugin URI: http://sitepoint.com
Description: Add custom message to each WordPress post
Author: Agbonghama Collins
Version: 1.0
Author URI: http://tech4sky.com/
*/
@w3guy
w3guy / deaFilterClient.php
Created October 7, 2013 09:11
Protecting Your PHP Web App From Disposable Email Users via BDEA api http://w3guy.com/protect-php-app-disposable-email/
<?php
function checkDEAfilter($email)
{
$key = "d619f9ad24052ad785d1edf65bbd33b4"; //replace with your API key
$request = "http://check.block-disposable-email.com/easyapi/json/".$key."/" .$email;
$response = file_get_contents($request);
$dea = json_decode($response, true);
if ($dea['request_status'] == 'success') {
if ($dea['domain_status'] != "ok") {
@w3guy
w3guy / deaFilterClient.php
Created October 7, 2013 09:03
Protecting Your PHP Web App From Disposable Email Users via DEA-filter http://w3guy.com/protect-php-app-disposable-email/
<?php
function checkDEAfilter($deaEmailToCheck)
{
$apiKey = "5a8047b40e57750726618b8146066ef6"; // change to your API key
$curlPost = "mail=" . $deaEmailToCheck."&key=".$apiKey; //address to check
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.deafilter.com/classes/DeaFilter.php"); //must point to the DeaFilter.php class