| title | date |
|---|---|
Подключение к Cloud.mail.ru с помощью WebDAV эмулятора в Убунту 18.04 |
2019-02-06 |
Инструкцию для Убунту 20.04 см. здесь.
| function delete_all_attachments_by_post_type() { | |
| global $wpdb; | |
| $attachments = $wpdb->get_results( | |
| "SELECT meta_value as att_id | |
| FROM $wpdb->postmeta | |
| INNER JOIN $wpdb->posts | |
| ON ($wpdb->posts.ID = $wpdb->postmeta.post_id AND $wpdb->posts.post_type = 'courses') | |
| WHERE meta_key = '_thumbnail_id'" |
| add_filter( | |
| 'sanitize_taxonomy_name', | |
| function ( $urldecode ) { | |
| return mb_substr( $urldecode, 0, 26, 'utf-8' ); | |
| }, | |
| 10, | |
| 2 | |
| ); |
| /** | |
| * Возвращает примерное время чтение поста, в зависимости от количества знаков | |
| * | |
| * @param int $post_id ID поств, для которого надо расчитать время | |
| * | |
| * @return string | |
| * | |
| * @author Artem Abramovich | |
| * @verphp 7.0 | |
| */ |
| /** | |
| * Прогресс бар при скроле страницы | |
| * | |
| * @author Artem Abramovich | |
| * @verphp 7.0 | |
| */ | |
| function art_progress_bar() { | |
| ?> | |
| <style> |
| <?php | |
| class Mysql | |
| { | |
| private $link = null; | |
| private $info = array( | |
| 'last_query' => null, | |
| 'num_rows' => null, | |
| 'insert_id' => null | |
| ); |
| sudo apt install texlive-xetex | |
| sudo apt-get install texlive-lang-all | |
| pandoc test.md -s -o test.pdf --latex-engine=xelatex | |
| --- | |
| title: Title text | |
| geometry: margin=2cm | |
| lang: ru | |
| header-includes: | |
| <?php | |
| class MySQL { | |
| private $link = null; | |
| private $info = array( | |
| 'last_query' => null, | |
| 'num_rows' => null, | |
| 'insert_id' => null | |
| ); | |
| private $connection_info = array(); |
| title | date |
|---|---|
Подключение к Cloud.mail.ru с помощью WebDAV эмулятора в Убунту 18.04 |
2019-02-06 |
Инструкцию для Убунту 20.04 см. здесь.
| <?php | |
| /** | |
| * Plugin Name: CF7 Modal Invalid Answer | |
| * Plugin URI: https://gist.github.com/campusboy87/a056c288c99feee70058ed24cee805ad | |
| * Author: Campusboy (wp-plus) | |
| * Author URI: https://www.youtube.com/wp-plus | |
| */ | |
| add_action( 'wp_enqueue_scripts', 'wpcf7_modal_invalid_js' ); | |
| add_action( 'wp_footer', 'wpcf7_modal_invalid_js_inline', 999 ); |
| #Вариант 1 | |
| RewriteCond %{HTTP:X-HTTPS} !1 | |
| RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] | |
| #Вариант 2 | |
| RewriteEngine On | |
| RewriteCond %{HTTPS} off | |
| RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
| RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |