Skip to content

Instantly share code, notes, and snippets.


Timur Kamaev doiftrue

View GitHub Profile
doiftrue / twenty23-theme.json
Created November 18, 2022 19:50
twenty23 teme file as example of supported parameters
View twenty23-theme.json
"$schema": "",
"version": 2,
"customTemplates": [
"name": "blank",
"postTypes": [
doiftrue / WP_CLI_Permalink_Manager_Deletion_Check.php
Last active August 3, 2022 14:28
WP CLI Commands for analize (envistigate) whethe we can delete Permalink Manager plugin
View WP_CLI_Permalink_Manager_Deletion_Check.php
doiftrue / define_wp_debug.php
Last active November 24, 2022 22:09
define_wp_debug: Dynamically enable/disable the display of PHP errors in WordPress.
View define_wp_debug.php
* Dynamically enable/disable the display of PHP errors in WordPress.
* Installation:
* replace line 'define( WP_DEBUG, false );' in 'wp-config.php' file with this code.
* Enabling debug mode:
* NOTE: Strongly recommended to changing the 'debug' word to something more unique!
doiftrue / functions.php
Created May 3, 2016 15:20
Дополнение к плагину KCC: в шаблоне выводиться ссылка из метаполя 'comp_ref', количество кликов по ней по ней дублируются в аналогичное произвольное поле записи 'comp_ref_clicks'
View functions.php
## Добавлет/обновляет количество кликов по ссылке из метаполя 'comp_ref' в метаполе 'comp_ref_clicks'
//do_action('kcc_count_after', $args, $updated, $data );
add_action('kcc_count_after', 'write_postmeta_link_clicks' );
function write_postmeta_link_clicks( $args ){
$post_id = (int) $args['in_post'];
// пост не указан - не наш случай
if( ! $post_id ) return;