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 | |
| function mlp_navigation() { | |
| require_once(ABSPATH . 'wp-admin/includes/plugin.php'); | |
| $mlp_fix_active = ''; | |
| if (is_plugin_active('mlp-fix-redirect/mlp-fix-redirect.php') && !isset($_SESSION['mlp_noredirect'])) { | |
| $mlp_fix_active = '?mlp_noredirect=1'; | |
| } | |
| $titles = mlp_get_available_languages_titles(); | |
| $currentBlogId = get_current_blog_id(); |
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
| Добавьте в wp-config.php в самое начало (после <?php ): | |
| $_SERVER['HTTPS'] = 'on'; | |
| define( 'FS_METHOD', 'direct' ); | |
| define('WP_HOME','https://example.com'); | |
| define('WP_SITEURL','https://example.com'); | |
| Плюс пониже после define всяких (до текста "/* Это всё, дальше не редактируем. Успехов! */"): |
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
| carousel.slick(); | |
| var isSliding = false; | |
| carousel.on('beforeChange', function() { | |
| isSliding = true; | |
| }); | |
| carousel.on('afterChange', function() { | |
| isSliding = false; |
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
| $current_page = get_query_var('paged'); | |
| $current_page = max( 1, $current_page ); | |
| $per_page = 12; | |
| $offset_start = 1; | |
| $offset = ( $current_page - 1 ) * $per_page + $offset_start; | |
| $post_list = new WP_Query(array( | |
| 'cat' => -15, | |
| 'posts_per_page' => $per_page, |
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
| ✅ ⛔️ |
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
| $('.element').toggle(0, function() { | |
| if ($(this).is(':visible')) { | |
| $(this).css('display','flex') | |
| } | |
| }) |
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
| $.fancybox.open({ | |
| 'touch': false, | |
| 'autoFocus': false, | |
| 'backFocus': false, | |
| 'type': 'inline', | |
| 'smallBtn': false, | |
| 'toolbar': false, | |
| 'src': '#modalSuccess' | |
| }); |
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
| jQuery(document).ready(function ($) { | |
| $('.sign-in-reg-page__password-icon').on('click', function (e) { | |
| e.preventDefault() | |
| // get the attribute value | |
| var input = $(this).parent().find('.sign-in-reg-page__input--password') | |
| var type = input.attr('type'); | |
| // now test it's value | |
| if (type === 'password') { | |
| input.attr('type', 'text'); |
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
| add_filter( 'the_content', 'img_src_replace', 20 ); | |
| function img_src_replace($content) { | |
| return str_replace('.svg', '.svg?v=2', $content); | |
| } |
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
| Remove directory from git and local | |
| git rm -r one-of-the-directories // This deletes from filesystem | |
| git commit . -m "Remove duplicated directory" | |
| git push origin <your-git-branch> (typically 'master', but not always) | |
| Remove directory from git but NOT local | |
| git rm -r --cached myFolder |