This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a repository archive | |
# Format: git archive {branchname} --format={compression} --output={filename} | |
git archive master --format=tar --output=kuma.tar | |
git archive some-feature-branch --format=tar --output=kuma.tar | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'jpeg_quality', create_function( '', 'return 100;' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mergetool] | |
prompt = false | |
keepBackup = false | |
keepTemporaries = false | |
[merge] | |
tool = winmerge | |
[mergetool "winmerge"] | |
name = WinMerge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<body> | |
<header role="banner"> | |
<a href="/" rel="home">My company</a> | |
<nav role="navigation"> | |
<a href="/about">About</a> | |
<a href="/contact">Contact</a> | |
</nav> | |
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get post thumbnail url | |
*/ | |
function get_image_url(){ | |
$image_id = get_post_thumbnail_id(); | |
$image_url = wp_get_attachment_image_src( $image_id, 'full', false ); | |
$image_url = $image_url[0]; | |
echo $image_url; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('gform_after_submission', 'gfToAcfListToRepeater', 10, 2); | |
function gfToAcfListToRepeater($entry, $form) | |
{ | |
foreach ($form['fields'] as $field) { | |
if (!($field['type'] == 'post_custom_field' && $field['inputType'] == 'list' && $field['enableColumns'] == true)) { | |
continue; | |
} | |
$id = $field['id']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Register custom post types on the 'init' hook. */ | |
add_action( 'init', 'my_register_post_types' ); | |
/** | |
* Registers post types needed by the plugin. | |
* | |
* @since 0.1.0 | |
* @access public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is for unifying the coding style for different editors and IDEs | |
# editorconfig.org | |
# WordPress Coding Standards | |
# https://make.wordpress.org/core/handbook/coding-standards/ | |
root = true | |
[*] | |
charset = utf-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php # -*- coding: utf-8 -*- | |
declare( encoding = 'UTF-8' ); | |
/** | |
* Plugin Name: Defer Contact Form 7 Scripts | |
* Description: Adds <code>defer='defer'</code> to enqueued javascripts. | |
* Version: 1.0 | |
* Required: 3.3 | |
* Author: Thomas Scholz | |
* Author URI: http://toscho.de | |
* License: GPL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* It's just an example, proof of concept. | |
* You should modify it to include more tablets, not only iPad. | |
*/ | |
function my_wp_is_mobile() { | |
static $is_mobile; | |
if ( isset($is_mobile) ) |