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 | |
add_filter('override_load_textdomain', function ($result, $domain, $mofile ) { | |
$url = urldecode($_SERVER["REQUEST_URI"]); | |
if ( | |
(function_exists('is_ajax') && is_ajax()) | |
|| str_contains($url, 'wp-json/') | |
|| str_contains($url, 'ap-api/') | |
) { | |
$result = true; | |
//error_log('отключаем переводы' .' ' . $domain ); |
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 | |
add_theme_support( 'align-wide' ); |
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 | |
//... | |
if( mb_strlen( $text ) > $rg['maxchar'] ){ | |
$text = mb_substr( $text, 0, $rg['maxchar'] ); | |
//$text = preg_replace( '/(.*)\s[^\s]*$/s', '\\1...', $text ); | |
// прибиваем последнее слово | |
$text = preg_replace( "%(.*)\s[^\s]*$%s", '\\1'.$rg['more_text'], $text ); // del last word, it not complate in 99% | |
// если концом строки является обрубанный тег, рубаем его тоже. | |
$text = preg_replace("%(.*)[<][^>]*{$rg['more_text']}$%s", '\\1'. $rg['more_text'], $text ); | |
} |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package GBet365; | |
import java.io.IOException; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; |
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
<!DOCTYPE html> | |
<html data-lt-installed="true" lang="en"><head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Success – ArgoPrep</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Global site tag (gtag.js) - Google Analytics --> | |
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-186074229-1"></script> | |
<script> | |
window.dataLayer = window.dataLayer || []; |
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 | |
error_log(print_r(debug_backtrace(), true)); |
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
// ==UserScript== | |
// @name Get bytes of custom style | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author andxbes | |
// @match https://argoprep.local/* | |
// @match https://argoprep.com/* | |
// @match https://*.argoprep.com/* | |
// @exclude https://argoprep.local/wp-* |
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 | |
add_theme_support('editor-styles'); | |
add_editor_style('style-editor.css'); |
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 | |
add_filter('term_description', 'shortcode_unautop'); | |
add_filter('term_description', 'do_shortcode'); | |
//удаляем автопростановку тегов вордпрессом | |
remove_filter('the_content', 'wpautop'); | |
//Выводим через шорткод гутенберг блоки | |
add_shortcode("get_wp_block", function($atts, $content = null) { | |
extract(shortcode_atts(array( | |
'id' => '', |
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 | |
//свое количество записей в каждом разделе | |
function custom_posts_per_page($query) { | |
if (!is_admin() && $query->is_main_query()) {//чтобы не трогать админку , и генерацию меню . | |
if (is_archive()) { | |
$query->set('posts_per_page', 20); | |
}//endif | |
if (is_category(4)) { | |
// $query->set('order', 'ASC'); |