Skip to content

Instantly share code, notes, and snippets.

View tribulant's full-sized avatar

Tribulant tribulant

View GitHub Profile
@tribulant
tribulant / subscribers.php
Created October 26, 2016 09:55
List All Subscribers
<?php
global $wpcoDb, $Subscriber;
$wpcoDb -> model = $Subscriber -> model;
$conditions = false;
$fields = false;
$order = false;
$subscribers = $wpcoDb -> find_all($conditions, $fields, $order);
?>
@tribulant
tribulant / style.css
Created October 21, 2016 11:45
Override Bootstrap Styles
/*
Put this CSS in a file that loads after the bootstrap.css
Eg. Inside wp-checkout/views/bootstrap/style.css
Start each Bootstrap class you want to override with .checkout ...
This example will remove the rounded corners from the button.
It will make the button pink with black text.
And on hover, active or focus the button will be red with white text
*/
<?php
global $Queue, $wpdb;
$query = "TRUNCATE TABLE " . $wpdb -> prefix . $Queue -> table;
$wpdb -> query($query);
?>
@tribulant
tribulant / charset.php
Created September 27, 2016 13:34
DB_CHARSET
define('DB_CHARSET', 'utf8');
@tribulant
tribulant / meta.html
Created September 27, 2016 13:32
UTF-8 meta tag
<meta http-equiv="Content-Type" content="text/html charset=UTF-8" />
.newsletters_readmore {
font-size: 16px; font-family: Open Sans, Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; border-radius: 26px; background-color: #29266F; padding: 14px 26px; display: block;
}
DELETE FROM `wp_wpmlhistorieslists` WHERE `history_id` NOT IN (SELECT `id` FROM `wp_wpmlhistory`);
DELETE FROM `wp_wpmlautoresponders` WHERE `history_id` NOT IN (SELECT `id` FROM `wp_wpmlhistory`);
DELETE FROM `wp_wpmlqueue` WHERE `history_id` NOT IN (SELECT `id` FROM `wp_wpmlhistory`);
DELETE FROM `wp_wpmlclicks` WHERE `history_id` NOT IN (SELECT `id` FROM `wp_wpmlhistory`);
DELETE FROM `wp_wpmlemails` WHERE `history_id` NOT IN (SELECT `id` FROM `wp_wpmlhistory`);
@tribulant
tribulant / read_date
Created September 23, 2016 12:05
Update read_date
UPDATE wp_wpmlemails SET read_date = modified WHERE read_date IS NULL;
@tribulant
tribulant / center.css
Last active September 6, 2016 20:04
Center Slideshow Gallery plugin title and description
h3.slideshow-info-heading,
p.slideshow-info-content {
text-align: center;
}
@tribulant
tribulant / loggedin.php
Created September 6, 2016 10:00
Subscriber Logged In
<?php
global $Auth;
if ($subscriber = $Auth -> logged_in()) {
// subscriber is logged in
}
?>