View twenty23-theme.json
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
{ | |
"$schema": "https://schemas.wp.org/trunk/theme.json", | |
"version": 2, | |
"customTemplates": [ | |
{ | |
"name": "blank", | |
"postTypes": [ | |
"page", | |
"post" | |
], |
View WP_CLI_Permalink_Manager_Deletion_Check.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
<?php | |
class WP_CLI_Permalink_Manager_Deletion_Check extends WP_CLI_Command { | |
public const BASE_COMMAND_NAME = 'permalink_manager_deletion_check'; | |
/** | |
* Removes | |
* | |
* wp permalink_manager_deletion_check enable_ignore_drafts |
View define_wp_debug.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
<?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! |
View functions.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
<?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; |