Skip to content

Instantly share code, notes, and snippets.

@max-kk
max-kk / css.css
Created November 10, 2016 15:56
Block height animation (show/hide). # CSS animation + keyframes + min-height.
.ZdlmCA__do_show {
font-size: 24px;
color: rgb(251, 249, 240);
background-color: rgb(206, 171, 61);
height: 64px;
text-align: center;
line-height: 64px;
margin: 32px 0;
cursor: pointer;
}
@max-kk
max-kk / ali_orders_list.js
Last active November 12, 2016 09:37
Save aliexpress orders list # Сохранить список заказов Aliexpress
// Add this to Debug Console in Browser on My Orders page
// This will output data (10 records from current page to console)
// Copy them to Excel and split ro rows via ";"
// Example: 80142463919194;https://www.aliexpress.com/item/Fashion-Retro-Exquisite-Indian-Feather-Leaf…-Circle-Dream-Catcher-Bohemia-Lady-Dress-Sweater-Necklace/32245418018.html;Мода ретро изысканный индийский перо листьев кружева круг ловца снов богемия леди платье свитер ожерелье X-363;$ 0.88
var products = document.querySelectorAll(".order-item-wraper");
var product_arr = [];
for (var i = 0; i < products.length; i++) {
product_arr = [];
* {
outline: none;
}
.padding {
padding: 10px;
}
.modal-show {
overflow: hidden !important;
.m1modal-show {
overflow: hidden!important;
position: relative;
right: 8px;
}
.margin-t-b {
margin-top: 10px!important;
margin-bottom: 10px!important;
}
@max-kk
max-kk / wp_remove_meta_boxes.php
Last active November 26, 2016 11:49
Wordpress :: Remove (hide) meta boxes from Post editing from non admin's (Comments, Slug, Categories) + Yoast Seo + Revolution slider
<?php
function wpse605901_remove_metaboxes() {
if ( !current_user_can('manage_options') ) {
remove_meta_box( 'categorydiv' , 'post' , 'normal' );
remove_meta_box( 'formatdiv' , 'post' , 'normal' );
remove_meta_box( 'um-admin-access-settings' );
remove_meta_box( 'tagsdiv-post_tag' , 'post' , 'normal' );
remove_meta_box( 'trackbacksdiv' , 'post' , 'normal' );
@max-kk
max-kk / wp_remove_pages.php
Created November 26, 2016 11:51
Wordpress :: remove admin pages for non admin's
<?php
function remove_menu_pages_424398() {
if ( defined( 'DOING_AJAX' ) )
{
return;
}
if ( !current_user_can( 'manage_options' ) ) {
remove_menu_page('link-manager.php'); // Links
@max-kk
max-kk / wp_modify_menu.php
Last active December 27, 2016 15:43
Wordpress :: Add a login/register link if user not logged in OR Logout if Logged in
<?php
/**
* modify menu
*
* @param string $items The menu items
* @param object $args
*
* @return string (maybe) modified items
*/
function modify_menu56484( $items, $args ) {
@max-kk
max-kk / .htaccess
Created January 25, 2017 15:27
Redirect to BuddyPress profile from WP
# add this (change site URL)
RedirectMatch 301 ^/author/(.+)$ http://SITE.COM/members/$1
@max-kk
max-kk / wp_sape_teaser.php
Last active February 13, 2017 09:30
Добавление тизера Sape в виджеты Wordpress (шорткод)
<?php
/*
Plugin Name: Sape Teaser for WordPress
Plugin URI: #
Description: Шорткод тизера Sape [sape_teaser block_id="564132" _SAPE_USER="13163sdfr4489fjf"]
Version: 1.0
Author: Max K
Author URI: http://maxim-kaminsky.com/ru/
*/
@max-kk
max-kk / woocommerce_orders_bulk_actions.php
Last active December 1, 2017 16:39
Add Bulk actions to Woocommerce products list
<?php
/**
* PHP 5.3 and WP 4.7 is required
*/
//apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions );
// Add our actions to list
add_filter( "bulk_actions-edit-shop_order", function($actions) {