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( 'init', 'mysqlfix', -1 ); | |
function mysqlfix() { | |
global $wpdb; | |
# Removed ONLY_FULL_GROUP_BY | |
$wpdb->set_sql_mode(['TRADITIONAL']); | |
} |
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
echo test1 |
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 | |
/** | |
* Module name: Custom Settings | |
* | |
* @package ACF | |
* @see README.md for details | |
*/ | |
use StoutLogic\AcfBuilder\FieldsBuilder; |
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 meta thumbnail from the Facebook metabox field or from customizer logo field */ | |
if ( ! function_exists( 'wpseo_meta_thumb' ) ) { | |
function wpseo_meta_thumb() { | |
$thumb_url = ''; | |
if ( is_singular() && get_post_meta( get_the_ID(), '_yoast_wpseo_opengraph-image', 1 ) ) { | |
$thumb_url = get_post_meta( get_the_ID(), '_yoast_wpseo_opengraph-image', 1 ); | |
} else { | |
$custom_logo_id = get_theme_mod( 'custom_logo' ); | |
$image = wp_get_attachment_image_src( $custom_logo_id , 'thumbnail' ); | |
$thumb_url = $image[0]; |
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_filter( 'body_class', function ( $classes ) { | |
return array_merge( | |
$classes, | |
array( '"> | |
<iframe src="//www.googletagmanager.com/ns.html?id=XXX-XXXXXX" height="0" width="0" style="display:none;visibility:hidden"></iframe> | |
<input type="hidden' // Important to handle the closing of the body element | |
) | |
); |
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
/** | |
* Plugin Name: CDK GEO Redirect | |
* Description: Detect country via CloudFlare and redirect to same lang website version | |
* Plugin URI: https://cdk.co.il | |
* Author: cdk.co.il | |
* Version: 0.0.1 | |
* Author URI: https://dimaminka.com | |
* | |
* Text Domain: cdk | |
* |
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
#!/bin/bash | |
clear; | |
NOW=$(date +"%Y-%m-%d_%H-%M-%S_%z") | |
SPACE_NAME=global-uploads | |
DIGITAL_OCEAN_REGION=sfo2 | |
AUTH_KEY= | |
AUTH_SECRET= | |
echo "******************************************************************************" | |
echo "BEGIN: $NOW" | |
echo "------------------------------------------------------------------------------" |
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
export COMPOSER_AUTH='{"bitbucket-oauth":{"bitbucket.org":{"consumer-key":"","consumer-secret":""}}}' |
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 | |
/** | |
* Plugin Name: Mihdan: Image Placeholder | |
*/ | |
namespace Mihdan_Image_Placeholder; | |
$images = array( | |
// Обычные | |
'https://placeimg.com/640/480/animals', |
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
/** | |
* cherry_core_base_url fix for Bedrock path | |
*/ | |
add_filter('cherry_core_base_url', function ($url) { | |
return str_replace(WP_CONTENT_DIR, '/../app', $url); | |
}); |