Skip to content

Instantly share code, notes, and snippets.

View barbareshet's full-sized avatar
🎯
Focusing

ido barnea barbareshet

🎯
Focusing
View GitHub Profile
@barbareshet
barbareshet / wp_remove_header_junk.php
Last active March 14, 2021 08:57 — forked from fostertime/wp_remove_header_junk.php
Remove All Unwanted Meta, Scripts and Styles (including Emoji) from the WordPress Header.
// =========================================================================
// REMOVE JUNK FROM WORDPRESS HEAD
// =========================================================================
// REMOVE WORDPRESS HEADER META:
remove_action('wp_head', 'rsd_link'); // remove really simple discovery link
remove_action('wp_head', 'wp_generator'); // remove wordpress version meta tag
remove_action('wp_head', 'feed_links', 2); // remove rss feed links (make sure you add them in yourself if youre using feedblitz or an rss service)
remove_action('wp_head', 'feed_links_extra', 3); // removes all extra rss feed links
remove_action('wp_head', 'index_rel_link'); // remove link to index page
remove_action('wp_head', 'wlwmanifest_link'); // remove wlwmanifest.xml (needed to support windows live writer)
<div class="row inner-form-wrap">
<div class="form-group col-md-6 col-sm-12">
<label for="fullname">Full Name</label>
[text* fullname id:fullname class:form-control placeholder "Full Name"]
</div>
<div class="form-group col-md-6 col-sm-12">
<label for="phone">Phone</label>
[text* phone id:phone class:form-control placeholder "Phone"]
</div>
<div class="form-group col-sm-12">
@barbareshet
barbareshet / README.md
Created October 19, 2017 18:31 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
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 / 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;
}
}
<?php
/*
* Changing WooCommerce City field to dropdown with predifned cities.
* Based on https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/
*/
function elicohenator_override_checkout_fields( $fields ) {
// Create args for city fields - same for shipping & billing
@barbareshet
barbareshet / Responsive light box
Created October 14, 2020 14:18 — forked from sharjeelmoin/Responsive light box
open a video in bootstrap lightbox responsive.
first: you have to link bootstrap scripts and css style sheets.
second: write this html code
{
<a href="#" class="playVideo play-icon-link" data-toggle="modal" data-target="#myModal"><span class="play-icon-span"><i class="fa fa-play" aria-hidden="true"></i></span></a>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content"><!--
<div class="modal-header">
@barbareshet
barbareshet / acf-inline-svg.php
Created October 20, 2020 07:17 — forked from derekshirk/acf-inline-svg.php
Output Inline SVGs from ACF image field
<?php
/* β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” */
/* ACF Inline SVGs
/* β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” */
$repeater = 'repeater_field_name'
if ( have_rows( $repeater ) ): ?>
<section class="content-main">
<div class="container"> <?php
@barbareshet
barbareshet / locales.json
Created November 30, 2021 05:26 — forked from derdesign/locales.json
locales.json
{
"af": "Afrikaans",
"sq": "Albanian",
"am": "Amharic",
"ar_DZ": "Arabic - Algeria",
"ar_BH": "Arabic - Bahrain",
"ar_EG": "Arabic - Egypt",
"ar_IQ": "Arabic - Iraq",
"ar_JO": "Arabic - Jordan",
"ar_KW": "Arabic - Kuwait",
@barbareshet
barbareshet / PHP Countries Array
Created November 30, 2021 08:17 — forked from DHS/PHP Countries Array
PHP array of all country names
<?php
$countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Island