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 | |
/** | |
* Disables the connection of the specified plugins at the front and ajax requests. | |
* | |
* @version 2.0 | |
* @author Kama (wp-kama.ru) | |
*/ | |
class Kama_Hard_Disable_Plugins_On_Front { |
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 | |
new Same_Prefix_Post_Taxes_Rewrite(); | |
/** | |
* How it works. | |
* | |
* We have: | |
* - ``company`` — Flat post type. | |
* - ``catalog`` — Hierarchical taxonomy. |
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" | |
], |
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 |
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! |
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( | |
// пост не указан - не наш случай |
NewerOlder