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( 'edit_form_after_title', 'artabr_add_post_field_title' ); | |
| function artabr_add_post_field_title() { | |
| global $post; | |
| if ( get_post_type( $post ) != 'artabr-service' ) { | |
| return false; | |
| } | |
| $value = get_post_meta( $post->ID, 'service_title', true ); | |
| ?> | |
| <style> | |
| #service_title { |
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"> | |
| jQuery(document).ready(function($) { | |
| $('#modal1, #modal-1').magnificPopup({ | |
| type: 'inline', | |
| preloader: false, | |
| callbacks: { | |
| beforeOpen: function() { | |
| if($(window).width() < 700) { | |
| this.st.focus = false; | |
| } else { |
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
| User-agent: Yandex | |
| Crawl-delay: 10 # | |
| User-agent: * | |
| Disallow: /search Crawl-delay: 10 # |
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":"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 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
| /** | |
| * Optimize WooCommerce Scripts | |
| * Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
| */ | |
| add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
| function child_manage_woocommerce_styles() { | |
| //remove generator meta tag | |
| remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
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
| $cat_product_wer = get_the_terms ($product->get_id(), 'product_cat'); | |
| if ( $cat_product_wer ) { | |
| $res = ''; | |
| $child_id = ''; | |
| $author = ''; | |
| $authorLink = '#'; | |
| $series = []; | |
| foreach ( $cat_product_wer as $term ) { |
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
| /* ========================================================================== * | |
| * Настройка формы комментирования | |
| * ========================================================================== */ | |
| // Убираем поле Url | |
| add_filter( 'basic_comment_form_defaults', 'artabr_comment_form', 10 ); | |
| function artabr_comment_form( $fields ) { | |
| unset( $fields['url'] ); | |
| return $fields; |