Skip to content

Instantly share code, notes, and snippets.

View pixelmultiplo's full-sized avatar

Marek Maurizio pixelmultiplo

View GitHub Profile
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
@sebdeckers
sebdeckers / boilerplate.html
Created April 14, 2013 06:13
HTML boilerplate
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="styles/app.css" />
<script src="scripts/app.js"></script>
</head>
<body>
@salcode
salcode / .gitignore
Last active February 10, 2024 10:56
See https://salferrarello.com/wordpress-gitignore/ for the latest version of my WordPress .gitignore file
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
@thagxt
thagxt / Magento How to get the customer login, logout, register and checkout urls.php
Created April 23, 2014 12:10
Magento How to get the customer login, logout, register and checkout urls
login url
<?php echo Mage::getUrl('customer/account/login'); ?>
logout url
<?php echo Mage::getUrl('customer/account/logout'); ?>
My Account url
<?php echo Mage::getUrl('customer/account'); ?>
Register url
@DevinWalker
DevinWalker / remove-rev-slider-metabox.php
Created May 14, 2014 20:32
This code removed the Revolution Slider metabox on pages, posts and CTPs
/**
* Remove Rev Slider Metabox
*/
if ( is_admin() ) {
function remove_revolution_slider_meta_boxes() {
remove_meta_box( 'mymetabox_revslider_0', 'page', 'normal' );
remove_meta_box( 'mymetabox_revslider_0', 'post', 'normal' );
remove_meta_box( 'mymetabox_revslider_0', 'YOUR_CUSTOM_POST_TYPE', 'normal' );
}
@yratof
yratof / functions.php
Created April 21, 2016 08:27
Visual Composer and Relevanssi showing shortcodes in search
<?php
// Issue with showing VC shortcodes in search results
// Strip out Visual Composer specific shortcodes
add_filter('relevanssi_pre_excerpt_content', 'rlv_trim_vc_shortcodes');
function rlv_trim_vc_shortcodes($content) {
$content = preg_replace('/\[\/?vc_.*?\]/', '', $content);
return $content;
}
@elbotho
elbotho / functions.php
Last active January 18, 2022 13:02
FacetWP little helper to find active facets from php
<?php
//helper in functions.php
function my_get_facet_vars(){
$vars = [];
foreach ($_GET as $key => $value) {
$pos = strpos($key, 'fwp_');
if ($pos == 0) {
$key = str_replace("fwp_", "", $key);
$vars[$key] = $value;
@CyberPunkCodes
CyberPunkCodes / killadobe.sh
Last active November 21, 2022 16:41
Mac Bash script to kill Adobe Create Cloud and other processes that Adobe forces on us.
#!/bin/bash
echo "\n\n--- Killing Stupid Adobe Auto Load Crap ---\n\n"
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
launchctl unload -w /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist
echo "\n\n--- Done! ---\n\n"
@davepullig
davepullig / gist:efddb9a894e0c4a824b4b61183cfb01c
Last active July 3, 2024 08:19
WP CLI search and replace URLs for WordPress multisite
wp search-replace --network --url=website.dev website.dev website.tld --precise --all-tables
@devinsays
devinsays / estimate-read-time.php
Last active February 11, 2023 20:57
WordPress Estimated Read Time
<?php
/**
* Estimates the reading time for a given piece of $content.
*
* @param string $content Content to calculate read time for.
* @param int $wpm Estimated words per minute of reader.
*
* @returns int $time Esimated reading time.
*/
function prefix_estimated_reading_time( $content = '', $wpm = 300 ) {