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
//Get Featured image | |
add_filter( 'manage_posts_columns', 'mts_columns_head' ); | |
add_action( 'manage_posts_custom_column', 'mts_columns_content', 10, 2 ); | |
function mts_get_featured_image( $post_ID ) { | |
$post_thumbnail_id = get_post_thumbnail_id( $post_ID ); | |
if ( $post_thumbnail_id ) { | |
$post_thumbnail_img = wp_get_attachment_image_src( $post_thumbnail_id, 'thumbnail' ); | |
return $post_thumbnail_img[0]; | |
} |
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
define("DEV_DEFAULT", 0); | |
define("ANDROID", 1); | |
define("IOS", 2); | |
function getDeviceType(){ | |
$ua = strtolower($_SERVER['HTTP_USER_AGENT']); | |
if(stripos($ua,'android') !== false) { return ANDROID; } | |
if(stripos($ua,'iPhone') !== false) { return IOS;} | |
if(stripos($ua,'iPad') !== false) { return IOS; } | |
return DEV_DEFAULT; | |
} |
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
{"aiowps_enable_debug":"","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":"[email protected]","aiowps_enable_forced_logout":"","aiowps_logout_time_period":"60","aiowps_enable_invalid_username_lockdown":"","aiowps_instantly_lockout_specific_usernames":[],"aiowps_unlock_request_secret_key":"9boae3otjbi5x7b7q6kf","aiowps_enable_whitelisting":"","aiowps_allowed_ip_addresses":"","aiowps_enable_login_captcha":"","aiowps_enable_custom_login_captcha":"","aiowps_captcha_secret_key":"y9t13745ja38h0dirf5q","aiowps_enable_manual_registration_approval":"","aiowps_enable_registration_page_captcha":"","aiowps_enable_random_prefix":"","aiowps_enable_automated_backups":"1","aiowps_db_backup_frequency":2,"aiowps_db_backup_interval":"2","aiowps_backup_files_s |
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( 'wp_enqueue_scripts', 'artabr_child_theme_enqueue_styles' ); | |
function artabr_child_theme_enqueue_styles() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'parent-style' ), wp_get_theme()->get( 'Version' ) ); | |
} |
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( 'widget_nav_menu_args', 'artabr_widget_menu_category' ); | |
function artabr_widget_menu_category ($arg) { | |
$arg['container'] = 'div'; | |
$arg['container_class'] = 'rubric__list side__menu'; | |
$arg['menu_class'] = ''; | |
return $arg; | |
} |
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_title', 'kld_title_order_received', 10, 2 ); | |
function kld_title_order_received( $title, $id ) { | |
if ( is_order_received_page() && get_the_ID() === $id ) { | |
$order_key = apply_filters( 'woocommerce_thankyou_order_key', empty( $_GET['key'] ) ? '' : wc_clean( $_GET['key'] ) ); | |
$order_id = isset( $_GET ) ? wc_get_order_id_by_order_key( $_GET ) : ''; | |
if ( $order_id > 0 ) { | |
$order = wc_get_order( $order_id ); | |
if ( ! $order || $order->get_order_key() !== $order_key ) { | |
$order = 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
add_shortcode( 'art_related_posts', 'related_posts_function' ); | |
function related_posts_function ($atts){ | |
$atts = shortcode_atts( array( | |
'id' => '', | |
'count' => 3 | |
), $atts ); | |
$args = array( | |
'post_type' => 'post', | |
'post_status' => 'publish', |
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( 'comment_form_after_fields', 'add_consent_personal_data_comment' ); | |
function add_consent_personal_data_comment(){ | |
?> | |
<small style="font-size: 12px;line-height: 1.1;margin: 10px 0;display: block;"> Нажимая на кнопку отправить, я принимаю условия <a href="#" target="_blank">пользовательского соглашения</a> , а также ознакомлен и согласен с <a href="#" target="_blank">политикой конфиденциальности</a> и даю согласие на обработку моих персональных данных</small> | |
<?php | |
} |
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 | |
/** | |
* Checkout terms and conditions checkbox | |
* | |
* @author WooThemes | |
* @package WooCommerce/Templates | |
* @version 3.1.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; |
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( 'wp_head', 'artabr_notice_shop' ); | |
function artabr_notice_shop() { | |
?> | |
<style> | |
.shop-notice { | |
position: fixed; |