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 | |
/** | |
* @link https://developer.yoast.com/features/schema/api/ | |
*/ | |
add_filter( 'wpseo_json_ld_output', '__return_false' ); |
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
<div id="vk_groups"></div> | |
<script type="text/javascript" src="https://vk.com/js/api/openapi.js?159" async="async" onload="VK.Widgets.Group('vk_groups', {no_cover: 0, redesign: 1, mode: 0, width: 'auto', height: '300', color1: 'F5F6F7', color2: '333333', color3: '333333'}, 167885785);"></script> |
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
sudo apt install ruby-sass | |
sass-convert -R assets/src/sass/ --from sass --to scss && find assets/src/sass/ -type f -name '*.sass' -delete |
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( 'pre_option_elementor_maintenance_mode_mode', function ( $option ) { | |
$parameter = 'bypass_maintenance'; // change this to whatever you like | |
if ( isset( $_GET['bypass_maintenance'] ) and $_GET['bypass_maintenance'] ) { | |
return 0; // needs to be falsy but not FALSE | |
} |
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_activation_hook( __FILE__, 'tlap_default_options' ); | |
function tlap_default_options() { | |
$defaults = array( | |
'tlap_add_analytics_option' => | |
array( | |
'tlap_yametrika_id' => '', | |
'tlap_yametrika_webvisor' => '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 | |
/* | |
Plugin Name: Enable/Disable plugins when doing local dev | |
Plugin URL: https://gist.github.com/pbiron/52bb63042cf220256ece89bc07fb57b0 | |
Description: If the WP_LOCAL_DEV constant is true, enables/disables plugins that you specify | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Paul V. Biron/Sparrow Hawk Computing | |
Author URI: https://sparrowhawkcomputing.com | |
*/ |
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 | |
/** | |
* instant.page | |
*/ | |
namespace Mihdan\App; | |
add_action( | |
'wp_enqueue_scripts', | |
function () { |
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 | |
## Заполняем опцию 3 | |
function fill_tlap_field_exlude_page() { | |
$val = get_option('tlap_add_analytics_option'); | |
$val = $val ? $val['tlap_excludepage'] : null; | |
?> | |
<span><input size="80" type="text" name="tlap_add_analytics_option[tlap_excludepage]" value="<?php echo esc_attr($val) ?>" placeholder="Введите id страниц через запятую"/>	<span class="pro">PRO</span></span> | |
<div> Страницы, на которых не нужно загружать коды счётчиков статистики (например страницы закрытые от индексации).</div> | |
<div> Ввести ID страниц через запятую без пробела, например: 345,1145,3778 </div> | |
<?php |
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
<!-- Див в котором будет отображаться виджет --> | |
<div id="vk_community_messages"></div> | |
<script type="text/javascript"> | |
// откладываем по времени | |
setTimeout(function(){ | |
// создаем элемент script и добавляем его асинхронно в DOM | |
var VKO = document.createElement("script"); | |
VKO.src = 'https://vk.com/js/api/openapi.js'; | |
VKO.async = true; |