WPML Coding API
http://wpml.org/documentation/support/wpml-coding-api/
| SNIPPET | COMMENTS |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
sass: { | |
build: { | |
files: { | |
'css/app.min.css': 'css/src/main.scss' | |
} | |
}, |
@mixin FontAwesome($content: '') { | |
display: inline-block; | |
font: normal normal normal 14px/1 FontAwesome; | |
font-size: inherit; | |
text-rendering: auto; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
@if $content != '' { | |
&:before { |
<?php | |
/** | |
* Using Loggly | |
* https://www.loggly.com/ | |
*/ | |
define('LOGGLY_ENDPOINT', 'http://logs-00.loggly.com/inputs/s59tg6b3-sd59-85de-d5d4-f5s96ty36caa'); | |
function loggly_log($tag, $log) | |
{ |
<?php | |
################################################# | |
# Disable emojis | |
################################################# | |
/** | |
* Disable the emoji's | |
*/ | |
function disable_emojis() { |
WPML Coding API
http://wpml.org/documentation/support/wpml-coding-api/
| SNIPPET | COMMENTS |
<?php | |
$query = new WP_Query([ | |
'post_type' => 'post', | |
'posts_per_page' => 4, | |
'no_found_rows' => true, // useful when pagination is not needed | |
'update_post_meta_cache' => false, // useful when post meta will not be utilized | |
'update_post_term_cache' => false, // useful when taxonomy terms will not be utilized | |
'fields' => 'ids', // useful when only the post IDs are needed | |
]); |
<?php | |
/** | |
* cacheman | |
* | |
* @author JoseRobinson.com | |
* @link https://gist.github.com/jrobinsonc/832f287b69fa3bfdd6f475fa33122edf | |
* @version 1.2.0 | |
* @param string $key | |
* @param callable $callback |
<?php | |
/** | |
* Set body as HTML. | |
*/ | |
function set_html_content_type() | |
{ | |
return 'text/html'; | |
} |