correct php 8.2
This commit is contained in:
@@ -43,17 +43,13 @@ function disable_wp_emojis_in_tinymce( $plugins ) {
|
||||
|
||||
|
||||
|
||||
|
||||
require get_template_directory().'/src/calend-block.php';
|
||||
require get_template_directory().'/src/calendar.php';
|
||||
require get_template_directory().'/src/perevod.php';
|
||||
require get_template_directory().'/lang.php';
|
||||
require get_template_directory().'/blocks/card_post_id.php';
|
||||
|
||||
|
||||
|
||||
|
||||
require get_template_directory().'/lang.php'; // функции перевода
|
||||
//require get_template_directory().'/blocks/card_post_id.php';
|
||||
|
||||
add_post_type_support('post', 'page-attributes');
|
||||
|
||||
//require ABSPATH.'vendor/masterforweb/db_lite/db_lite.php';
|
||||
|
||||
@@ -173,6 +169,10 @@ add_filter( 'single_template', function ( $single_template ) {
|
||||
#search
|
||||
function my_search_order( $query ) {
|
||||
|
||||
if (!isset( $_GET['s'] )){
|
||||
return '';
|
||||
}
|
||||
|
||||
$s = trim($_GET['s']);
|
||||
|
||||
if ($query->is_search) {
|
||||
@@ -809,9 +809,6 @@ function find_youtube($str) {
|
||||
add_filter('the_content', 'add_div_youtube');
|
||||
|
||||
|
||||
//preview
|
||||
ini_set('display_errors', 'off');
|
||||
|
||||
add_filter( 'posts_results', 'set_query_to_draft', null, 2 );
|
||||
function set_query_to_draft( $posts, &$query ) {
|
||||
|
||||
@@ -823,7 +820,7 @@ $post_status_obj = get_post_status_object(get_post_status( $posts[0]));
|
||||
if ( !$post_status_obj->name == 'draft' )
|
||||
return $posts;
|
||||
|
||||
if ( $_GET['key'] != 'guest' )
|
||||
if ( !isset($_GET['key']) or $_GET['key'] != 'guest' )
|
||||
return $posts;
|
||||
|
||||
$query->_draft_post = $posts;
|
||||
|
||||
Reference in New Issue
Block a user