This file contains 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 | |
add_action( 'restrict_manage_posts', function () { | |
global $wp_filter; | |
$action = 'restrict_manage_posts'; | |
$priority = 11; | |
$method = 'add_seo_filters'; | |
if ( empty( $wp_filter[ $action ]->callbacks[ $priority ] ) ) { |
This file contains 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
{"aiowps_enable_debug":"1","aiowps_remove_wp_generator_meta_info":"1","aiowps_prevent_hotlinking":"1","aiowps_enable_login_lockdown":"1","aiowps_allow_unlock_requests":"","aiowps_max_login_attempts":3,"aiowps_retry_time_period":5,"aiowps_lockout_time_length":60,"aiowps_set_generic_login_msg":"","aiowps_enable_email_notify":"","aiowps_email_address":"info@wp.com","aiowps_enable_forced_logout":"","aiowps_logout_time_period":"60","aiowps_enable_invalid_username_lockdown":"","aiowps_instantly_lockout_specific_usernames":[],"aiowps_unlock_request_secret_key":"jt1dsnktfg9u67hi14b2","aiowps_lockdown_enable_whitelisting":"","aiowps_lockdown_allowed_ip_addresses":"176.99.12.40","aiowps_enable_whitelisting":"","aiowps_allowed_ip_addresses":"","aiowps_enable_login_captcha":"","aiowps_enable_custom_login_captcha":"","aiowps_enable_woo_login_captcha":"","aiowps_enable_woo_register_captcha":"","aiowps_captcha_secret_key":"sc2se0fbuzrcku9ol9bh","aiowps_enable_manual_registration_approval":"","aiowps_enable_registration_page |
This file contains 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
//Woocommerce JS events. Страница оформления заказа | |
$( document.body ).trigger( 'init_checkout' ); | |
$( document.body ).trigger( 'payment_method_selected' ); | |
$( document.body ).trigger( 'update_checkout' ); | |
$( document.body ).trigger( 'updated_checkout' ); | |
$( document.body ).trigger( 'checkout_error' ); | |
//Woocommerce JS events. Страница корзины | |
$( document.body ).trigger( 'wc_cart_emptied' ); | |
$( document.body ).trigger( 'update_checkout' ); |
This file contains 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: Rank Math SEO plugin cleanup | |
* Description: A cached translation override for WordPress. | |
* Author: Artem Abramovich | |
* Plugin URI: https://gist.github.com/artikus11/0d7a52273bd8bdc85f0d3010f156cd5f | |
* | |
* @link https://rankmath.com/kb/filters-hooks-api-developer/ | |
* | |
* @see https://gist.github.com/timbowen/c5c00667c4c48f8ec3f5706b686d6f00 |
This file contains 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
/** | |
* Сортировка атрибутов в админке по алфавиту | |
* | |
* @param $attr | |
* | |
* @return array | |
* | |
* @testedwith WooCommerce 6.0 | |
* @author Artem Abramovich | |
*/ |
This file contains 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
/** | |
* Подключение скриптов и стилей только на страницах WooCommerce | |
* | |
* @testedwith WooCommerce 5.5 | |
* @verphp 7.0 | |
* @author Artem Abramovich | |
*/ | |
function art_connection_css_js_only_woocommerce_pages() { | |
if ( is_woocommerce() || is_cart() || is_checkout() || is_account_page() ) { |
This file contains 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
const path = require( 'path' ); | |
const glob = require( 'glob' ); | |
const defaultConfig = require( "@wordpress/scripts/config/webpack.config" ); | |
const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' ); | |
const CssMinimizerPlugin = require( "css-minimizer-webpack-plugin" ); | |
const { hasBabelConfig } = require( '@wordpress/scripts/utils' ); | |
const TerserPlugin = require( 'terser-webpack-plugin' ); | |
const SpriteLoaderPlugin = require( 'svg-sprite-loader/plugin' ); | |
const UnminifiedWebpackPlugin = require( 'unminified-webpack-plugin' ); | |
const FixStyleOnlyEntriesPlugin = require('webpack-fix-style-only-entries'); |
This file contains 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
const path = require( 'path' ); | |
const defaultConfig = require( "@wordpress/scripts/config/webpack.config" ); | |
const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' ); | |
const CssMinimizerPlugin = require( "css-minimizer-webpack-plugin" ); | |
const { hasBabelConfig } = require( '@wordpress/scripts/utils' ); | |
const TerserPlugin = require( 'terser-webpack-plugin' ); | |
const UnminifiedWebpackPlugin = require( 'unminified-webpack-plugin' ); | |
const FixStyleOnlyEntriesPlugin = require( 'webpack-fix-style-only-entries' ); | |
const isProduction = process.env.NODE_ENV === 'production'; |
This file contains 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
$( 'form.checkout' ).on( 'change', 'input.qty', function( e ) { | |
let maxQtyData = {}; | |
let inputs = $( this ).closest( '.woocommerce-checkout-review-order-list' ).find( 'input.qty' ); | |
inputs.each( function( index, element ) { | |
maxQtyData[$( element ).attr( 'name' )] = $( this ).attr( 'max' ); | |
} ); | |
var data = { |
This file contains 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( $ ) { | |
$( document ).on( 'click', '.plus, .minus', function() { | |
// Get values | |
var $qty = $( this ).closest( '.quantity' ).find( '.qty' ), | |
currentVal = parseFloat( $qty.val() ), | |
max = parseFloat( $qty.attr( 'max' ) ), | |
min = parseFloat( $qty.attr( 'min' ) ), | |
step = $qty.attr( 'step' ); |
NewerOlder