Skip to content

Instantly share code, notes, and snippets.

View barbareshet's full-sized avatar
🎯
Focusing

ido barnea barbareshet

🎯
Focusing
View GitHub Profile
//load font awesome if not loaded with the theme files
function check_font_awesome() {
global $wp_styles;
$srcs = array_map('basename', (array) wp_list_pluck($wp_styles->registered, 'src') );
if ( in_array('font-awesome.css', $srcs) || in_array('font-awesome.min.css', $srcs) ) {
/* echo 'font-awesome.css registered'; */
} else {
wp_enqueue_style( 'local-business-schema-fonts', PLUGIN_FOLDER . '/assets/fonts/font-awesome/css/font-awesome.min.css', array(), '', 'screen' );
}
}
@barbareshet
barbareshet / README.md
Created October 19, 2017 18:31 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@barbareshet
barbareshet / font-size control
Last active December 5, 2017 09:12
JS font size controller (for accessibility)
<!-- text size menu-->
<div class="container">
<div class="row">
<ul class="pagination">
<li>
<a href="#" aria-label="bigger" id="bigger">
<i class="fa fa-expand" aria-hidden="true"></i>
<span>א</span>
</a>
</li>
add_filter( 'manage_media_columns', 'sk_media_columns_filesize' );
/**
* Filter the Media list table columns to add a File Size column.
*
* @param array $posts_columns Existing array of columns displayed in the Media list table.
* @return array Amended array of columns to be displayed in the Media list table.
*/
function sk_media_columns_filesize( $posts_columns ) {
$posts_columns['filesize'] = __( 'File Size', 'my-theme-text-domain' );
@barbareshet
barbareshet / _base_colors.css
Created June 3, 2019 12:10
base colors css vars
:root{
//social colors
--facebook :#3b5998;
--twitter :#55acee;
--youtube :#bb0000;
--linkedin :#007bb5;
--instagram-y :#FCCC63;
--instagram-p :#8a3ab9;
--whatsapp :#4dc247;
:root{
--facebook :#3b5998;
--twitter :#55acee;
--youtube :#bb0000;
--linkedin :#007bb5;
--instagram-y :#FCCC63;
--instagram-p :#8a3ab9;
--whatsapp :#4dc247;
--pinterest :#cb2027;
@barbareshet
barbareshet / 1. Example.scss
Created June 14, 2019 16:28 — forked from Integralist/1. Example.scss
Sass Mixin for CSS3 Animations
@include keyframe(fadeout) {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@barbareshet
barbareshet / CPT &Taxonomy Class
Created July 31, 2019 04:08
WordPress New Custom Post Type & Taxonomy Class
class Custom_Post_Type{
function __construct() {
add_action( 'init', array( &$this, 'init' ) );
}
function init() {
$this->custom_post_type();
@barbareshet
barbareshet / The WP_Query( $args )
Created September 3, 2019 04:07
All WP Query args, based on gist from https://wpsmith.net/wp_query-2/
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/