25 октября 2023
Нет комментариев
$(document).ready(function(){ $('.nav .dd ul li').hover(function(){ var mh=0; $('.nav .dd ul').each(function(){mh=Math.max(mh,$(this).outerHeight());}); $('.dd').css('min-height',mh+'px'); }); });
$(document).ready(function(){ $('.nav .dd ul li').hover(function(){ var mh=0; $('.nav .dd ul').each(function(){mh=Math.max(mh,$(this).outerHeight());}); $('.dd').css('min-height',mh+'px'); }); });
RSA-подпись SHA-512 hash от строки $text
Алгоритм создания и проверки подписи: SHA512withRSA
$private_key='<<<EOD -----BEGIN RSA PRIVATE KEY----- '.PRIVATE_KEY.' -----END RSA PRIVATE KEY----- EOD'; $signature=''; openssl_sign($text,$signature,$private_key,'SHA512'); $data=array( 'signature'=>base64_encode($signature), );
использовать get_stylesheet_directory_uri()
вместо get_template_directory_uri()
functions.php
темы
if(function_exists('register_sidebar')){ register_sidebar(array( 'id'=>'header_contacts', 'name'=>'HeaderContacts', 'before_widget'=>'', 'after_widget'=>'', 'before_title'=>'', 'after_title'=>'', )); }
в месте отображения:
<?php dynamic_sidebar( 'header_contacts' ); ?>
Убрать автоматическое добавление тега br
после редактирования html страницы.
Добавить в functions.php
активной темы:
remove_filter('the_content','wpautop');//для контента remove_filter('the_excerpt','wpautop');//для анонсов remove_filter('comment_text','wpautop');//для комментарий
https://wordsmall.ru/sajtostroenie/kak-ubrat-lishnie-tegi-br-i-p-v-wordpress.html
Регулярное выражение для поиска и замены, заменить на «пусто».
((?<=<p)|(?<=<span)|(?<=<div)|(?<=<ul)|(?<=<ol)|(?<=<li)|(?<=<h1)|(?<=<h2)|(?<=<h3)|(?<=<h4)|(?<=<h5)|(?<=<h6)|(?<=<table)|(?<=<tr)|(?<=<th)|(?<=<td))[^>]*(?=>)
public class MainActivity extends AppCompatActivity { private WebView webView; public ValueCallback<Uri[]> uploadMessage; public static final int REQUEST_SELECTED_FILE = 100; @Override public void onActivityResult(int requestCode, int resultCode, Intent intent) { super.onActivityResult(requestCode, resultCode, intent); if (requestCode == REQUEST_SELECTED_FILE) { if (uploadMessage == null) return; uploadMessage.onReceiveValue(WebChromeClient.FileChooserParams.parseResult(resultCode, intent)); uploadMessage = null; } } @Override protected void onCreate(Bundle savedInstanceState) { webView.setWebChromeClient(new WebChromeClient(){ public boolean onShowFileChooser(WebView view, ValueCallback<Uri[]> filePathCallback,WebChromeClient.FileChooserParams fileChooserParams){ if(uploadMessage != null){ uploadMessage.onReceiveValue(null); } uploadMessage = filePathCallback; Intent intent; intent = fileChooserParams.createIntent(); try{ startActivityForResult(intent,REQUEST_SELECTED_FILE); } catch (ActivityNotFoundException e){ uploadMessage = null; return false; } return true; } }); } }
https://xn--90acbu5aj5f.xn--p1ai/?p=5129