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
/* ========================================================================== | |
Slider Images | |
========================================================================== */ | |
.repeat_block .dashicons.dashicons-no-alt:hover{ | |
color: red; | |
} | |
.repeatable { | |
margin-bottom: 7px; | |
counter-reset: items; |
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] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; PHP's initialization file, generally called php.ini, is responsible for | |
; configuring many of the aspects of PHP's behavior. | |
; PHP attempts to find and load this configuration from a number of locations. | |
; The following is a summary of its search order: |
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
<script type="text/javascript"> | |
var paged = 1; | |
var procent = <?php echo wp_count_posts('product')->publish; ?>; | |
jQuery(function($) { | |
$('#check_generate').click(function(){ | |
if ($(this).is(':checked')){ | |
console.log("Включено"); |
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 | |
/** | |
* Main Class file for `WP_OSA` | |
* | |
* Main class that deals with all other classes. | |
* | |
* @since 1.0.0 | |
* @package WPOSA | |
*/ |
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 | |
/** | |
* Plugin Name: AIR VK Import XML | |
* Plugin URI: https://example.com/plugins/air-vk-import-xml/ | |
* Description: A plugin for importing XML data from VKontakte. | |
* Version: 1.0.0 | |
* Author: Your Name | |
* Author URI: https://example.com/ | |
* Text Domain: air-vk-import-xml | |
* Domain Path: /languages/ |
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
// Объявляем переменную для сохранения ссылки на кнопку "Добавить в список желаний" | |
var ajaxTrigger; | |
// Назначаем обработчик события "click" на кнопку "Добавить в список желаний" | |
$('.jvm_add_to_wishlist').click(function (event) { | |
// Сохраняем ссылку на кнопку "Добавить в список желаний" | |
ajaxTrigger = $(this); | |
// Получаем ID товара, который был нажат | |
var productId = ajaxTrigger.data('product-id'); | |
// Выполняем ajax-запрос |
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_get_global_styles_custom_css() возвращает пользовательский CSS-код для глобальных стилей WordPress, который определен в файле theme.json. Этот файл может содержать настройки, которые применяются к различным элементам сайта, таким как цвета, шрифты и другие свойства стилей. | |
Когда глобальные стили WordPress загружаются, функция wp_get_global_styles_custom_css() проверяет, есть ли пользовательский CSS-код, определенный в theme.json. Если есть, то он возвращает этот код, который затем можно использовать для добавления к стилям сайта. | |
Пример использования wp_get_global_styles_custom_css(): | |
/** | |
* Adds custom CSS to global styles. | |
*/ | |
function add_custom_css_to_global_styles() { |
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_action('enqueue_block_editor_assets', function () { | |
ob_start(); | |
?> | |
<script> | |
window.onload = function () { | |
const el = wp.element.createElement; | |
const { registerPlugin } = wp.plugins; | |
const { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost; |
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 All Import. | |
* | |
* @param int $post_id Идентификатор поста. | |
* @param object $xml_node Узел XML. | |
* @param bool $is_update Определяет, обновляется ли пост. | |
*/ | |
function air_saved_post($post_id, $xml_node, $is_update) { | |
$import_id = wp_all_import_get_import_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
add_filter('rank_math/frontend/breadcrumb/items', function ($crumbs, $Breadcrumb) { | |
$shop_page_id = wc_get_page_id('shop'); //Get the shop page ID | |
if (is_product_category() || is_product() || is_cart() || is_checkout()) { | |
$new_breadcrumb = [ | |
_x('Каталог товаров', 'breadcrumb', 'woocommerce'), //Title | |
get_permalink(wc_get_page_id('shop')) // URL | |
]; | |
array_splice($crumbs, 1, 0, [$new_breadcrumb]); //Insert a new breadcrumb after the 'Home' crumb | |
} | |
return $crumbs; |
OlderNewer