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 | |
| $term = get_term_by('name', 'Достижения', 'info'); | |
| $id = $term->term_id; | |
| // параметры по умолчанию | |
| $posts = get_posts( array( | |
| 'numberposts' => -1, | |
| 'orderby' => 'date', | |
| 'order' => 'ASC', | |
| 'post_type' => 'about-items', | |
| 'suppress_filters' => true, |
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 | |
| // параметры по умолчанию | |
| $posts = get_posts( array( | |
| 'numberposts' => -1, | |
| 'orderby' => 'date', | |
| 'order' => 'ASC', | |
| 'post_type' => 'news', | |
| 'suppress_filters' => true, | |
| // подавление работы фильтров изменения SQL запроса | |
| ) ); |
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
| html: | |
| <div class="video-relation"> | |
| <div class="video-relation-ration"></div> | |
| <iframe class="video-relation-content" src="https://www.youtube.com/embed/By_Cn5ixYLg" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> | |
| </div> | |
| sass: | |
| .video-relation | |
| position: relative | |
| &-content | |
| width: 100% |
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
| $('.toggle-mnu').on('click', function() { | |
| $('.hidden-mnu').slideToggle(function(){ | |
| if($(this).css('display') == 'none'){ | |
| $(this).removeAttr('style'); | |
| } | |
| }); | |
| }); |
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
| $('.button-link').click(function(){ | |
| yaCounterXXXXXXXX.reachGoal('click'); | |
| gtag('event', 'click'); | |
| }); |
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
| function isHighDensity(){ | |
| return ((window.matchMedia && (window.matchMedia('only screen and (min-resolution: 124dpi), only screen and (min-resolution: 1.3dppx), only screen and (min-resolution: 48.8dpcm)').matches || window.matchMedia('only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3)').matches)) || (window.devicePixelRatio && window.devicePixelRatio > 1.3)); | |
| } | |
| if(isHighDensity()){ | |
| var oldSrc, | |
| newSrc; | |
| $('.lazy').each(function(){ | |
| oldSrc = $(this).data('src'); | |
| newSrc = oldSrc.replace('@1x', '@2x'); |
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
| $('.some-item-button-popup').each(function(e){ | |
| var ths = $(this); | |
| ths.attr('href', '#popup-' + e); | |
| ths.parent().find('.some-item-popup').attr('id', 'popup-' + e); | |
| }); |
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
| {"field":"is", "caption":"Условие?", "inputTVtype":"checkbox", "inputOptionValues":"Да==something"} |
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
| HTML код: | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Document</title> | |
| <link rel="stylesheet" href="main.css"> | |
| </head> |
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
| example.php: | |
| <?php | |
| /** | |
| * Plugin Name: Плагин с БД | |
| * Description: Работа с БД | |
| * Author: Влад | |
| * Version: 1.0 | |
| * | |
| * | |
| * License: GPL2 |