This file contains hidden or 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: Optimizatron | |
Description: Оптимизатрон Фронтэнд - оптимизирует фронтэнд, отключая лишние плагины, снижает нагрузку, ускоряет TTFB | |
Version: 1.0 | |
*/ | |
class Optimizatron | |
{ |
This file contains hidden or 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 | |
namespace SB; | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
class AutoBotChangeSubjectsNames { |
This file contains hidden or 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
FormAjax('#loginform', 'sb/v1/user/signin'); |
This file contains hidden or 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 | |
namespace SB; | |
defined('ABSPATH') || exit; | |
/** | |
* Event type taxonomy | |
*/ | |
class EventTypeTaxonomy { |
This file contains hidden or 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 | |
namespace SB\Models; | |
/** | |
* Class Event model for map data | |
* | |
* @package SB | |
*/ | |
class Event { | |
/** |
This file contains hidden or 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('u/log', function($msg, $data = []){ | |
error_log( PHP_EOL . $msg); | |
if(!empty($data)){ | |
ob_start(); | |
echo PHP_EOL; | |
var_dump($data); | |
error_log(ob_get_clean()); |
This file contains hidden or 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
-- delete comments 1 year ago | |
DELETE c | |
FROM wp_comments as c | |
WHERE c.comment_date_gmt < DATE_SUB(NOW(),INTERVAL 1 YEAR) |
This file contains hidden or 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
-- WordPress - Comments 1 year ago | |
SELECT * | |
FROM wp_comments as c | |
WHERE c.comment_date_gmt < DATE_SUB(NOW(),INTERVAL 1 YEAR) | |
ORDER BY c.comment_date_gmt DESC | |
LIMIT 50 |
This file contains hidden or 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
DELETE cm | |
FROM wp_commentmeta as cm | |
LEFT JOIN wp_comments as c ON c.comment_ID = cm.comment_id | |
WHERE c.comment_ID is null |