Skip to content

Instantly share code, notes, and snippets.

View shaharhesse's full-sized avatar

Steven shaharhesse

View GitHub Profile
@shaharhesse
shaharhesse / WordPress Comment Styling SCSS
Last active July 19, 2018 19:40 — forked from jeffgolenski/WordPress Comment Styling SCSS
SCSS WordPress Comment Styles. Based on the WordPress threaded comments CSS over at css-tricks.com, I created this nested SCSS. It's basic, simple, and clean. Quickly copy, paste, and style away! Original CSS located at: http://css-tricks.com/snippets/wordpress/base-threaded-comments-styling/
/* =========================================================
* Comments
* ========================================================= */
ol.comment-list{
margin: 0 0 1em;
padding: 0;
list-style-type: none;
text-indent: 0;
li{}
@shaharhesse
shaharhesse / minor_edit.php
Last active February 18, 2016 15:12
Add a 'minor edit' checkbox to Wordpress posts, pages and custom posts to save without updating the modified date
<?php
/*
* Add a 'minor edit' checkbox to Wordpress posts, pages and custom posts
* to save without updating the 'modified' date of the post.
* Saved as postmeta for each post
*/
/* add checkbox to Publish box
--------------------------------------------------------------------------*/
@shaharhesse
shaharhesse / latest-facebook-post.php
Created January 18, 2016 22:10
Show latest post from Facebook page
<?php
/*
* After finding the Facebook API docs to be inaccurate,
* and being forced to use the API to get a single latest post dynamically.
* API v5
*/
// Using Composer for Facebook PHP SDK
require_once( ABSPATH . '/vendor/autoload.php' );
@shaharhesse
shaharhesse / gist:dc7c75979dfc1dd11e55
Last active January 22, 2019 19:38
@extend Compass sprites in @media queries
/*
* A simple way to extend Compass sprite classes within media queries.
* Based on the knowledge gained here: http://www.sitepoint.com/cross-media-query-extend-sass/
* I admit it's nowhere near as clever, but it does work :)
*/
/*
* Set-up sprites for each media size
*/
// convert px value to em
// second variable $current is optional
// set $base-font-size to the base font-size of your doc
$base-font-size: 16
// mixin
@mixin px-to-em( $target, $current: $base-font-size )
font-size: $target/$current + em