_linuxpro

HTACCCESS

Jul 6th, 2020
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.06 KB | None | 0 0
  1. <?php
  2. /**
  3. * Techmarket Child
  4. *
  5. * @package techmarket-child
  6. */
  7.  
  8. /**
  9. * Include all your custom code here
  10. */
  11.  
  12. add_filter( 'woocommerce_product_tabs', 'tm_child_rename_single_product_tabs', 20 );
  13.  
  14. function tm_child_rename_single_product_tabs( $tabs ) {
  15.  
  16. if ( isset( $tabs['accessories'] ) ) {
  17. $tabs['accessories']['title'] = esc_html__( 'Frequently Bought Together', 'techmarket' );
  18. }
  19. return $tabs;
  20. }
  21.  
  22. add_filter( 'woocommerce_get_related_product_tag_terms', function( $term_ids, $product_id ){
  23. return array();
  24. }, 10, 2 );
  25.  
  26. add_action( 'wp_footer', 'safe_for_later_script', 99 );
  27.  
  28. function safe_for_later_script() {
  29. ?>
  30. <script type="text/javascript">
  31. jQuery(document).on('added_to_savelist', function () {
  32. if( jQuery('.shop_table.cart tr.cart_item').size()== 1 ){
  33.  
  34. jQuery('.cart-collaterals').parent().hide();
  35. setTimeout("location.reload(true);",1400) } });
  36.  
  37.  
  38. </script>
  39. <?php
  40. }
  41.  
  42.  
  43. add_filter('wp_mail_from', 'new_mail_from');
  44. add_filter('wp_mail_from_name', 'new_mail_from_name');
  45.  
  46. function new_mail_from($old)
  47. {
  48.  
  49. return 'info@southernindustrial.ca';
  50.  
  51. }
  52. function new_mail_from_name($old)
  53.  
  54. {
  55.  
  56. return 'Southern Industrial Store';
  57.  
  58. }
  59.  
  60. // define the woocommerce_cart_is_empty callback
  61. function action_woocommerce_cart_is_empty( ) {
  62. ?>
  63. <style type="text/css">#ywsfl_general_content{display: none;}</style>
  64. <?php
  65. };
  66.  
  67. // add the action
  68. add_action( 'woocommerce_cart_is_empty', 'action_woocommerce_cart_is_empty', 10, 0 );
  69.  
  70.  
  71. // Display the product thumbnail in order view pages
  72. add_filter( 'woocommerce_order_item_name', 'display_product_image_in_order_item', 20, 3 );
  73. function display_product_image_in_order_item( $item_name, $item, $is_visible ) {
  74. // Targeting view order pages only
  75. if( is_wc_endpoint_url( 'view-order' ) ) {
  76. $product = $item->get_product(); // Get the WC_Product object (from order item)
  77. $thumbnail = $product->get_image(array( 300, 300)); // Get the product thumbnail (from product object)
  78. if( $product->get_image_id() > 0 )
  79. $item_name = '<div class="item-thumbnail">' . $thumbnail . '</div>' . $item_name;
  80. }
  81. return $item_name;
  82. }
  83.  
  84. add_action( 'woocommerce_before_single_product', 'tm_child_use_wc_tabs_in_extended_view', 20 );
  85.  
  86. function tm_child_use_wc_tabs_in_extended_view() {
  87. $style = techmarket_get_single_product_style();
  88.  
  89. if ( 'extended' === $style ) {
  90. remove_action( 'woocommerce_after_single_product_summary', 'techmarket_output_product_data_tabs', 10 );
  91. add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
  92. }
  93. }
  94.  
  95. // show inout qty when stock are low
  96. add_filter( 'woocommerce_quantity_input_args', 'custom_quantity_input_args', 20, 2 );
  97. function custom_quantity_input_args( $args, $product ) {
  98. if( $product->get_stock_quantity() == 1 && is_product() ){
  99. $args['min_value'] = 0;
  100. }
  101. return $args;
  102. }
  103.  
  104.  
  105.  
  106. add_action( 'load-profile.php', function() {
  107. if( ! current_user_can( 'manage_options' ) )
  108. exit( wp_safe_redirect( admin_url() ) );
  109. } );
  110.  
  111.  
  112. add_action ('init' , 'wpse_redirect_profile_access');
  113.  
  114. function wpse_redirect_profile_access(){
  115. //admin won't be affected
  116. if (current_user_can('manage_options')) return '';
  117.  
  118. //if we're at admin profile.php page
  119. if (strpos ($_SERVER ['REQUEST_URI'] , 'wp-admin/profile.php' )) {
  120. wp_redirect ( home_url( 'https://southernindustrial.ca/en-ca/store/wp-admin/edit.php?post_type=shop_order' )); // to page like: example.com/my-profile/
  121. exit();
  122. }
  123. }
  124.  
  125.  
  126. add_filter('admin_title', 'my_admin_title', 10, 2);
  127.  
  128. function my_admin_title($admin_title, $title)
  129. {
  130. return get_bloginfo('name').' &bull; '.$title;
  131. }
  132.  
  133. // Title Removal from image
  134. add_filter( 'wp_get_attachment_image_attributes', 'remove_image_text');
  135. function remove_image_text( $attr ) {
  136. unset($attr['title']);
  137. return $attr;
  138. }
  139.  
  140.  
  141.  
  142.  
  143. function disable_shipping_calc_on_cart( $show_shipping ) {
  144. if( is_cart() ) {
  145. return false;
  146. }
  147. return $show_shipping;
  148. }
  149. add_filter( 'woocommerce_cart_ready_to_calc_shipping', 'disable_shipping_calc_on_cart', 99 );
  150.  
  151.  
  152.  
  153.  
  154. // Product thumbnail in checkout
  155. add_filter( 'woocommerce_cart_item_name', 'product_thumbnail_in_checkout', 20, 3 );
  156. function product_thumbnail_in_checkout( $product_name, $cart_item, $cart_item_key ){
  157. if ( is_checkout() ) {
  158.  
  159. $thumbnail = $cart_item['data']->get_image(array( 70, 70));
  160. $image_html = '<div class="product-item-thumbnail">'.$thumbnail.'</div> ';
  161.  
  162. $product_name = $image_html . $product_name;
  163. }
  164. return $product_name;
  165. }
  166.  
  167.  
  168. // redirect shop manager
  169.  
  170. add_action( 'admin_menu', 'remove_dashboard', 99 );
  171. function remove_dashboard(){
  172. remove_menu_page( 'index.php' ); //dashboard
  173. }
  174.  
  175.  
  176.  
  177.  
  178. // remove notices
  179. add_action('admin_enqueue_scripts', 'ds_admin_theme_style');
  180. add_action('login_enqueue_scripts', 'ds_admin_theme_style');
  181. function ds_admin_theme_style() {
  182. if (!current_user_can( 'manage_options' )) {
  183. echo '<style>.update-nag, .updated, .notice, .error, .is-dismissible { display: none !important; }</style>';
  184. }
  185. }
  186.  
  187.  
  188.  
  189.  
  190. //bypass logout confirm
  191. function wc_bypass_logout_confirmation() {
  192. global $wp;
  193.  
  194. if ( isset( $wp->query_vars['customer-logout'] ) ) {
  195. wp_redirect( str_replace( '&amp;', '&', wp_logout_url( wc_get_page_permalink( 'myaccount' ) ) ) );
  196. exit;
  197. }
  198. }
  199.  
  200. add_action( 'template_redirect', 'wc_bypass_logout_confirmation' );
  201.  
  202.  
  203.  
  204.  
  205. //remove adminbar for non-admin
  206. add_action('after_setup_theme', 'remove_admin_bar');
  207.  
  208. function remove_admin_bar() {
  209. if (!current_user_can('administrator') && !is_admin()) {
  210. show_admin_bar(false);
  211. }
  212. }
  213.  
  214.  
  215.  
  216.  
  217. /*REMOVE IMAGE LINK */
  218. function myprefix_redirect_attachment_page() {
  219. if ( is_attachment() ) {
  220. global $post;
  221. if ( $post && $post->post_parent ) {
  222. wp_redirect( esc_url( get_permalink( $post->post_parent ) ), 301 );
  223. exit;
  224. } else {
  225. wp_redirect( esc_url( home_url( '/' ) ), 301 );
  226. exit;
  227. }
  228. }
  229. }
  230. add_action( 'template_redirect', 'myprefix_redirect_attachment_page' );
  231.  
  232.  
  233. /* CHANGE ADD-TO-CART-TEXT-ON-CLICK */
  234.  
  235. add_action( 'wp_footer', 'single_add_to_cart_event_text_replacement' );
  236. function single_add_to_cart_event_text_replacement() {
  237. global $product;
  238.  
  239. if( ! is_product() ) return; // Only single product pages
  240. if( $product->is_type('variable') ) return; // Not variable products
  241. ?>
  242. <script type="text/javascript">
  243. (function($){
  244. $('button.single_add_to_cart_button').click( function(){
  245. $(this).text('<?php _e( "Adding...", "woocommerce" ); ?>');
  246. $(this).addClass("atc_active");
  247. return true
  248. });
  249. })(jQuery);
  250.  
  251.  
  252.  
  253. </script>
  254. <?php
  255. }
  256.  
  257.  
  258.  
  259.  
  260. /*CLEAR SHIPPING RATE CACHE*/
  261. add_filter('woocommerce_checkout_update_order_review', 'clear_wc_shipping_rates_cache');
  262.  
  263. function clear_wc_shipping_rates_cache(){
  264. $packages = WC()->cart->get_shipping_packages();
  265.  
  266. foreach ($packages as $key => $value) {
  267. $shipping_session = "shipping_for_package_$key";
  268.  
  269. unset(WC()->session->$shipping_session);
  270. }
  271. }
  272.  
  273.  
  274. /* Prevent update notification for plugin */
  275. function disable_plugin_updates( $value ) {
  276. $pluginsToDisable = [
  277. 'yith-woocommerce-one-click-checkout-premium/init.php',
  278. 'yith-woocommerce-order-tracking-premium/init.php',
  279. 'woocommerce-bulk-order-form/wc-bulk-order-form.php',
  280. 'perfmatters/perfmatters.php',
  281. 'yith-woocommerce-wishlist-premium/init.php',
  282. 'yith-woocommerce-sms-notifications-premium/init.php',
  283. 'yith-woocommerce-compare/init.php',
  284. 'yith-live-chat-premium/init.php',
  285. 'kingcomposer/kingcomposer.php',
  286. 'admin-menu-editor-pro/menu-editor.php',
  287. 'dokan-lite/dokan.php',
  288. 'woocommerce-email-control/ec-email-control.php',
  289. 'contact-form-7/wp-contact-form-7.php',
  290. 'regenerate-thumbnails/regenerate-thumbnails.php',
  291. 'booster-plus-for-woocommerce/booster-plus-for-woocommerce.php',
  292. 'yith-woocommerce-bulk-product-editing-premium/init.php',
  293. 'igniteup/igniteup.php',
  294. 'yith-woocommerce-save-for-later-premium/init.php'
  295.  
  296.  
  297. ];
  298. if ( isset($value) && is_object($value) ) {
  299. foreach ($pluginsToDisable as $plugin) {
  300. if ( isset( $value->response[$plugin] ) ) {
  301. unset( $value->response[$plugin] );
  302. }
  303. }
  304. }
  305. return $value;
  306. }
  307. add_filter( 'site_transient_update_plugins', 'disable_plugin_updates' );
  308.  
  309.  
  310.  
  311.  
  312. function my_custom_css() {
  313. if (function_exists('is_shop') && is_shop()) {
  314. echo "<style type='text/css'>span.gamma.widget-title {border-bottom: 1px solid #ebebeb !important;padding-bottom: .25em !important;}#content.active-hh-sidebar::before {display:none !important;}.star-rating {width: 6.2em;}.select2-dropdown {z-index: 1000000000 !important;}#secondary .widget.widget_price_filter .price_slider_amount button {font-size: 1.068em !important;}header.section-header h1 {color: #fff !important;} @media (max-width: 1589px) and (min-width: 1025px){.jumbotron{margin-bottom: 0px;} }.woocommerce-info {background-color:transparent;color:#333;border-left:0;}@media (max-width: 767px){.jumbotron{display:none;}.products .product .techmarket-product-rating {display:block !important;} } .woocommerce-product-details__short-description p {display: none;} select.techmarket-wc-wppp-select.c-select option:nth-child(n+4) {display: none;} } .logged-in .yith-wcwl-add-to-wishlist .add_to_wishlist::before, .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse a::before, .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse a::before {display: block;} .user-not-logged-in .yith-wcwl-add-to-wishlist a:before {display: none;} .yith-wcwl-add-button.show a:before,.yith-wcwl-wishlistexistsbrowse.show a:before {top: -2px;right: 4px;} @media (max-width: 480px) and (min-width: 320px) { .yith-wcwl-add-button.show a:before, .yith-wcwl-wishlistexistsbrowse.show a:before {top: -10px; left: 140px; } } #grid-extended .products .product .star-rating, .products .list-view-large.product .star-rating, .products .list-view-small.product .star-rating, .products .list-view.product .star-rating {margin-top: 4px !important;} a.button.product_type_simple {display:none!important;} .current-cat ul.children {margin-bottom:10px!important;margin-top:10px!important;}.current-cat ul.children li {border-bottom:none!important;} .current-cat {padding-top:10px;padding-bottom:10px;} #content.active-hh-sidebar .content-area::after {z-index: 9999999;} .current-cat .children li a {padding-top: 0px !important;} @media only screen and (min-width : 1200px) and (max-width : 1399px) { .slick-track{width: 100% !important} .slick-slide {width: 100% !important;} } .slick-track{display:flex;} .woocommerce-product-details__short-description ul:nth-child(2) { color: #404040!important; opacity: 1!important } @media (max-width: 1024px) and (min-width: 768px) {.jumbotron .jumbotron-caption { padding: 55px 29% 55px 25px; } } #loftloader-wrapper {z-index: 999999999;} span.review-count { margin-top: 2px; display: inline-block; } h2.woocommerce-loop-product__title {height:38px;} #grid-extended .products .product { margin-bottom:20px;} .woocommerce-product-details__short-description {margin-bottom: .314em !important;} #grid-extended .availability { font-size: 11px; color: #b3b2b2; margin-bottom: 10px; letter-spacing: .3px; border-bottom: 0; } .star-rating { margin-bottom: .534em !important } span.techmarket-stock-availability .stock {margin-right:0px;} #secondary li.wc-layered-nav-rating .star-rating { margin-bottom: -2px !important;} #content { animation: 1s fadeIn; animation-fill-mode: forwards; visibility: hidden; } @keyframes fadeIn { 99% { visibility: hidden; } 100% { visibility: visible; } }
  315.  
  316. </style>";
  317. }
  318. }
  319. add_action('wp_head', 'my_custom_css' );
  320.  
  321.  
  322. function my_custom_css_2() {
  323. if (function_exists('is_product') && is_product()) {
  324. echo "<style type='text/css'>@media (max-width: 1699px) and (min-width: 1200px) { .full-width.extended.single-product .single-product-wrapper .product-actions-wrapper { padding-right:0px !important;} } nav.woocommerce-breadcrumb a:nth-child(9),nav.woocommerce-breadcrumb span:nth-child(10),nav.woocommerce-breadcrumb span:nth-child(8), nav.woocommerce-breadcrumb a:nth-child(7), nav.woocommerce-breadcrumb a:nth-child(11), nav.woocommerce-breadcrumb span:nth-child(12) {display:none !important;} span.posted_in.categories a:nth-child(2) {display: none;} .single-product .single-product-meta .cat-and-sku span.categories {color: #fff;}.single-product .single-product-meta .cat-and-sku span.categories a:hover {color: #444;}.woocommerce-product-details__short-description ul:nth-child(2) {font-family: sfpro;font-size:14px;line-height:18px;font-weight:400;color:#202020!important;opacity: 1!important; } .woocommerce-noreviews{display:none;}.single-product .accessories .flex-columns .products {display:grid;}.single-product .accessories .accessories-wrapper {display:inline-flex;}.accessories .accessories-wrapper a img {width: 82% !important;}.single-product .accessories .flex-columns .products .product {padding: 0;}label[for=wcj_product_per_product_addons_1] span {color: #006699 !important;font-weight: 500;}input#wcj_product_per_product_addons_1 {width:15px; height:15px;font-size:11px;-webkit-appearance: none;border:none;} .single-product .single-product-meta .cat-and-sku span.categories a:focus {color:#444;} .single-product .rating-and-sharing-wrapper>div+div {margin-left:0px;} input[type=checkbox], input[type=radio]:focus {outline: none;} div#tab-local_1 {padding: 62px 40px;} div#tab-local_1 h2 {font-size:20px;} div#tab-local_1 table td, table th {padding: 0;font-family:roboto;font-weight:300;} div#tab-local_1 table th {font-weight:400;} .single-product-meta.product_meta,div#cuzzy-edd-2,div#cuzzy-edd-1 {display:none !important;}.woocommerce-breadcrumb {font-size: 12px!important;margin-bottom: 42px;margin-left: 14px;margin-top: 3px; font-family: roboto; text-transform: uppercase}.woocommerce-breadcrumb a {font-size: 14.5px;text-transform: none; font-family: Rubik, Roboto, sans-serif, Arial;} .woocommerce-breadcrumb span.delimiter+a {padding: .45em 1.055em; display:inline-block;} .user-not-logged-in .related .yith-wcwl-add-to-wishlist a:before {display: none;} .logged-in .related .yith-wcwl-add-to-wishlist a:before {display: block;top: inherit !important;} .single-product .single-product-wrapper .entry-summary .yith-wcwl-add-to-wishlist .add_to_wishlist::before, .single-product .single-product-wrapper .entry-summary .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse a::before, .single-product .single-product-wrapper .entry-summary .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse a::before {top: -14px !important;left:inherit;} .woocommerce-breadcrumb:after {content: '#';} @media (max-width: 480px) and (min-width: 320px) { table.shop_attributes th {width:100% !important;} .yith-wcwl-add-to-wishlist .add_to_wishlist::before, .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse a::before, .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse a::before {left: inherit; right:0px; top: -10px;} .full-width.extended.single-product .single-product-wrapper .product-actions-wrapper {padding-right:15px; } } div#tab-global_1 h2 {color: #1f1f1f;font-weight: 500;font-size: 19px;} .atc_active {pointer-events: none;} .yith-wcwl-add-to-wishlist a:before {top:-14px !important;left:inherit;} @media (max-width: 1600px) { .woocommerce-breadcrumb a {font-size:12.5px;}.woocommerce-breadcrumb .delimiter {margin: 0 .5em;}.woocommerce-breadcrumb span.delimiter+a {padding: .45em .755em;} .single-product .single-product-wrapper .entry-summary .yith-wcwl-add-to-wishlist .add_to_wishlist::before, .single-product .single-product-wrapper .entry-summary .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse a::before, .single-product .single-product-wrapper .entry-summary .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse a::before {right: 0;} } .additional-info {border-radius: 2px;background-color: transparent;font-size: 13px;text-align: left;padding: 7px 0px;border-bottom: 3px solid #ccc;}.tm-best-brands:before {font-size:25px;} #reviews #comments .commentlist li {padding-top:20px;} #respond.comment-respond .comment-form .comment-form-author {padding-right: 0px;} #respond.comment-respond .comment-form .comment-form-email {padding-left: 0px; margin-right: 1px;} .star-rating span:before {color: #ffb900;} #reviews .rating-histogram .rating-bar {margin-bottom: 0.1em;} .single-product .woocommerce-tabs .wc-tab p {font-weight:400;} img.zoomImg {background:#fff;} .geo3 {display: none;} #reviews .advanced-review .advanced-review-rating h2.based-title {border-bottom:1px solid #DDD;} @media (max-width: 1199px) and (min-width: 768px) { .features-list .features .feature { flex: 0 0 100%; max-width: 100%; } } .full-width.extended.single-product .single-product-wrapper .product-actions-wrapper .product-actions form.cart .single_add_to_cart_button {display:block !important;white-space: nowrap;width:100%;} @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) { .single-product .single-product-wrapper .product-images-wrapper .techmarket-single-product-gallery .techmarket-single-product-gallery-images .slick-slide img {width: 70%;} } .full-width.extended.single-product .single-product-wrapper .product-actions-wrapper {border-left: none;} .social-icon {display: flex;margin: 0 auto;padding-top: 20px;padding-bottom: 20px;} .social-icon-img {width: 21px; height: 21px; margin-right: 6px; opacity: .8;} #tab-specification .tm-shop-attributes-detail h2 { border-bottom: 1px solid #ebebeb; font-size: 19px; } #respond.comment-respond .comment-form>p .input-text, #respond.comment-respond .comment-form>p input[type=email], #respond.comment-respond .comment-form>p input[type=password], #respond.comment-respond .comment-form>p input[type=search], #respond.comment-respond .comment-form>p input[type=text], #respond.comment-respond .comment-form>p input[type=url], #respond.comment-respond .comment-form>p textarea {width: 100%;max-width: 675px;border-radius: 0px;border: 1px solid #dcd6d6;} .full-width.extended.single-product .quantity {margin-bottom: 27px;display: flex;} .single-product .single-product-wrapper .product-actions-wrapper .product-actions label {font-size: 14px; } .quantity .qty {width: 3.235801032em;padding-left: 18px;margin-left: 4px;height: 30px;-moz-appearance: textfield; padding-top:3px; padding-bottom:3px;} button.single_add_to_cart_button.button.alt {border-radius: 3px;} .full-width.extended.single-product .single_add_to_cart_button {padding: 12px 4px;} .single-product .product-actions .price {font-size:1.6em;font-weight: 400;} .full-width.extended.single-product .single-product-wrapper .product-actions-wrapper .product-actions .price {margin-bottom: 1.4em } .advanced-review-comment {padding-top:3px !important;} li.seller-name .details a {pointer-events:none;} .product-actions {border:3px solid #e0e0e0;padding: 18px 18px 30px 18px;} .yith-wocc-wrapper {margin-top:6px; width:100%;} button.single_add_to_cart_button.button.alt:before {font-family: 'simple-line-icons';content: '\e04e';display:inline-block;vertical-align:baseline;padding-right:8px;} button.single_add_to_cart_button.button.alt{ border: 1px solid #bfbcbc; background: linear-gradient(to right,#ebf1f5,#f9f9f9); } .pswp__bg {background:#fff;} .pswp__ui--idle .pswp__top-bar {opacity:1;} .pswp__ui--fit .pswp__top-bar {background-color:#000;} .site-header {z-index: 999;} .pswp__counter {display: block !important;} .pswp__top-bar, .pswp__caption {background-color: #000;} .pswp--touch .pswp__button--arrow--left, .pswp--touch .pswp__button--arrow--right {visibility:visible !important; } .pswp__button--fs, .pswp__button--zoom {display:block !important;} @media (max-width: 1199px) { .site-header {z-index:999999!important;} } .pswp {z-index: 999999999999;} .yith-wocc-button-container {display: none;} .yith-wocc-divider {margin-bottom: 0px;margin-top: 10px;} button.single_add_to_cart_button.button.alt:hover {color: #0063d1; border: 1px solid #4D90FE; -webkit-box-shadow: 0px 0px 5px #4D90FE !important; box-shadow: 0px 0px 5px #4D90FE !important; } div#tab-reviews, div#tab-global_1 {border:1px solid #a1a1a1;padding:62px 40px;} #respond.comment-respond .comment-reply-title, #reviews .advanced-review .advanced-review-rating h2.based-title {font-size: 19px;} .woocommerce-notices-wrapper .woocommerce-message a {color:#006699;} div#tab-global_1 .payment-icon-image {width:50px; margin-left: -6px;}span.csc { font-size: 15px; color: #444; font-weight: 500; }span.csc2 { font-weight: 300; font-size: 15px; font-family: roboto; } a.sdet { text-decoration: underline; font-size: 11px; letter-spacing: .8px; margin-left: 4px; vertical-align: middle; } .single-product .rating-and-sharing-wrapper {DISPLAY: block;} .features-list .features {border-radius: 3px;} .tm-free-delivery:before, .tm-free-return:before, .tm-safe-payments:before {color: #969fa6;} .features-list .features {border: none;display: table-row-group;} .features-list .features .feature+.feature {border-left: none;} .features-list .features .feature .media {justify-content: left;} .features-list .features .feature .media .media-body {text-align: left;} .features-list {margin-bottom: 0;} a.button.product_type_simple.add_to_cart_button.ajax_add_to_cart { display: none; } button.pswp__button.pswp__button--arrow--right,button.pswp__button.pswp__button--arrow--left { background: #ddd !important; opacity: 1 !important; border: 1px solid #ddd; width: 30px; } .pswp__button--arrow--right:before {right: -1px;} .pswp__button--arrow--left:before {left: -1px;} .pswp__img--placeholder--blank { background: #fff !important;} .accessories-product.flex-columns h2 { width: 170px; } @media (max-width: 767px) { .single-product .accessories .products .product+.product::after { top: 64px; left: -8px; } .accessories-product.flex-columns h2 { width: 100px; } } .woocommerce-notices-wrapper {display:none;} #loftloader-wrapper {z-index: 9999999;} div#wcj_product_addons p {display: inline-flex;margin-top: 20px;}div#wcj_product_addons p label {padding-left: 6px; font-weight:300; font-family:Roboto; color:#111;} div#wcj_product_addons p label {padding-left:13px;margin-top: -1px;} .product_cat-uncategorized section.related { display: none; } button.pswp__button {background-color: #666!important;} .pswp__counter {color: #333; opacity: 1;font-weight: 500;font-size:15px;}.pswp__top-bar {background-color:#FFF !important;} .pswp__button {opacity:.3;border:1px solid #fff;border-radius:0px;} button.pswp__button:hover {background-color:#666 !important;} h1.product_title.entry-title { font-family: roboto; }
  325. </style>";
  326. }
  327. }
  328. add_action('wp_head', 'my_custom_css_2' );
  329.  
  330.  
  331. function my_custom_css_3() {
  332. if (function_exists('is_archive') && is_archive()) {
  333. echo "<style type='text/css'>.slick-track{margin-top: 20px;margin-bottom: 36px;}.product-categories-carousel .products .product-category:nth-child(odd) {background-color: #f9f9f9;}.products .product-category img {width: 63%;filter: drop-shadow(1.5px 1.5px 1.5px #999);}.products .product-category,.products .product-category:hover {border-right: 15px solid #fff;min-height: 136px; }.products.slick-initialized.slick-slider {margin-left: 5px;margin-right: 0px;}@media (max-width: 767px) { .products .product .techmarket-product-rating {display:block !important;} .products .product-category.slick-slide {min-height:154px;}.shop-archive-header{display:block;}.shop-control-bar-bottom form .techmarket-wc-wppp-select {whites-pace:normal;overflow:hidden;word-wrap: normal !important;}.jumbotron{display:none;}.products .product-category{padding:8px;}.products .product-category img {width:100%;} }@media (max-width: 1023px) {#content.active-hh-sidebar::before {display:none;}.shop-control-bar form select.orderby {background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAVCAMAAAB8FU7dAAAARVBMVEUAAAAzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzP1DjgGAAAAF3RSTlMAwEAQMP7wsHDk4NvQomQgzLaUkIBgUGyLyyAAAABgSURBVBjT1c1HDsAgDARAXCihpv//qQHJB8MP4oO1Gllr04cvI7MVCQgSgrU8E9v9jKSJYgD0XtPrDSDlNnV16utXxIMaaXIPAuWgCV2FAnPXnZKjpd7Zun48NpbE4/oDqKACG5jjiloAAAAASUVORK5CYII='); } }#showMe {animation: cssAnimation 0s .5s forwards;visibility: hidden;}@keyframes cssAnimation { to { visibility: visible; } } select.techmarket-wc-wppp-select.c-select option:nth-child(n+3) {display: none;} .logged-in .yith-wcwl-add-to-wishlist .add_to_wishlist::before, .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse a::before, .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse a::before {display: block;} .user-not-logged-in .yith-wcwl-add-to-wishlist a:before {display: none;} .yith-wcwl-add-button.show a:before,.yith-wcwl-wishlistexistsbrowse.show a:before {top: -2px;right: 4px;} @media (max-width: 480px) and (min-width: 320px) {.yith-wcwl-add-button.show a:before, .yith-wcwl-wishlistexistsbrowse.show a:before {top: -10px; left: 140px; } } #grid-extended .products .product .star-rating, .products .list-view-large.product .star-rating, .products .list-view-small.product .star-rating, .products .list-view.product .star-rating {margin-top: 4px !important;}.iceg,.mfp-bg,.mfp-bg ,.mfp-content {display:none !important;} .product-loop-categories .product-category.product:nth-child(n+6) {display:none;} a.button.product_type_simple {display:none!important;} .current-cat ul.children {margin-bottom:10px!important;margin-top:10px!important;}.current-cat ul.children li {border-bottom:none!important;} .current-cat {padding-top:10px;padding-bottom:10px;} #content.active-hh-sidebar .content-area::after {z-index: 9999999;} .current-cat .children li a {padding-top: 0px !important;} .shop-control-bar {padding-bottom:1.1em;margin-top:14px;} @media only screen and (min-width : 1200px) and (max-width : 1399px) { .slick-track{width: 100% !important} .slick-slide {width: 100% !important;} } .slick-track{display:flex;} @media (max-width: 1024px) and (min-width: 768px) {.jumbotron .jumbotron-caption { padding: 55px 29% 55px 25px; } } #loftloader-wrapper {z-index: 999999999;} span.review-count { margin-top: 2px; display: inline-block; } #grid-extended .availability { font-size: 11px; color: #b3b2b2; margin-bottom: 10px; letter-spacing: .3px; border-bottom: 0; } h2.woocommerce-loop-product__title {height:38px;} span.techmarket-stock-availability .stock {margin-right:0px;} #secondary li.wc-layered-nav-rating .star-rating { margin-bottom: -2px !important;} #content { animation: 1s fadeIn; animation-fill-mode: forwards; visibility: hidden; } @keyframes fadeIn { 99% { visibility: hidden; } 100% { visibility: visible; } }</style>";
  334. }
  335. }
  336. add_action('wp_head', 'my_custom_css_3' );
  337.  
  338.  
  339. function my_custom_css_4() {
  340. if (function_exists('is_404') && is_404()) {
  341. echo "<style type='text/css'>form.woocommerce-product-search button,h2.widgettitle {display:none;} .products .product img {width:90%;} @media (max-width: 767px) { header.page-header h1 { font-size: 1.7em !important; } } .error404 .fourohfour-columns-2 {border:0px;} </style>";
  342. }
  343. }
  344. add_action('wp_head', 'my_custom_css_4' );
  345.  
  346.  
  347. function techmarket_cart_link() {
  348. ?>
  349. <a class="cart-contents" href="<?php echo esc_url( wc_get_cart_url() ); ?>" title="<?php esc_attr_e( 'View your shopping cart', 'techmarket' ); ?>">
  350. <i class="header-cart-icon <?php echo esc_attr( apply_filters( 'techmarket_header_cart_icon', 'tm tm-shopping-bag' ) ); ?>"></i>
  351. <span class="count"><?php echo wp_kses_data( WC()->cart->get_cart_contents_count() ); ?></span>
  352. <span class="amount"><span class="price-label"><?php echo apply_filters( 'techmarket_header_cart_link_label', esc_html__( 'Your Cart', 'techmarket' ) ); ?></span><?php echo wp_kses_data( WC()->cart->get_cart_subtotal() ); ?></span>
  353. </a>
  354. <?php
  355. }
  356.  
  357.  
  358.  
  359. add_filter( 'woocommerce_product_description_heading', '__return_false', 20 );
  360.  
  361.  
  362. add_filter( 'woocommerce_billing_fields', 'bbloomer_move_checkout_email_field', 10, 1 );
  363.  
  364. function bbloomer_move_checkout_email_field( $address_fields ) {
  365. $address_fields['billing_country']['priority'] = 5;
  366. return $address_fields;
  367. }
  368.  
  369.  
  370.  
  371. // always display rating stars
  372. function my_display_zero_rating_html( $rating_html, $rating ) {
  373. if ( $rating_html == '' ) {
  374. $rating_html = '<div class="star-rating">';
  375. $rating_html .= wc_get_star_rating_html( $rating, 0 );
  376. $rating_html .= '</div>';
  377. }
  378.  
  379. return $rating_html;
  380. }
  381. add_filter( 'woocommerce_product_get_rating_html', 'my_display_zero_rating_html' , 10, 2 );
  382.  
  383.  
  384. remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );
  385.  
  386. add_action('init', 'add_new_star_rating');
  387. function add_new_star_rating()
  388. {
  389. add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 6 );
  390. }
  391.  
  392.  
  393. function reduce_stock_processing($order_id) {
  394. wc_reduce_stock_levels($order_id);
  395. }
  396. add_action('woocommerce_order_status_processing', 'reduce_stock_processing');
  397.  
  398.  
  399. add_filter( 'woocommerce_get_breadcrumb', 'ed_change_breadcrumb' );
  400.  
  401. function ed_change_breadcrumb( $breadcrumb ) {
  402. if (function_exists('is_product') && is_product()) {
  403. if(is_singular()){
  404. array_pop($breadcrumb);
  405. }
  406. }
  407.  
  408. return $breadcrumb;
  409. }
  410.  
  411.  
  412. add_action( 'woocommerce_account_dashboard', 'ec_customer_orders' );
  413. function ec_customer_orders() {
  414. $current_page = empty( $current_page ) ? 1 : absint( $current_page );
  415. $customer_orders = wc_get_orders( apply_filters( 'woocommerce_my_account_my_orders_query', array( 'customer' => get_current_user_id(), 'page' => $current_page, 'paginate' => true ) ) );
  416.  
  417. wc_get_template(
  418. 'myaccount/orders.php',
  419. array(
  420. 'current_page' => absint( $current_page ),
  421. 'customer_orders' => $customer_orders,
  422. 'has_orders' => 0 < $customer_orders->total,
  423. )
  424. );
  425. }
  426.  
  427.  
  428. add_shortcode( 'recently_viewed_products', 'tm_child_recently_viewed_shortcode' );
  429.  
  430. function tm_child_recently_viewed_shortcode() {
  431. $viewed_products = techmarket_get_viewed_products();
  432.  
  433. if ( empty( $viewed_products ) ) {
  434. echo '<div class="no-product">No product found</div> </ br> <p class="no-prd-c"><a class="button wc-backward no-prd" href="https://southernindustrial.ca/en-ca/store/shop/?orderby=date">Start Browsing</a></p>';
  435. return;
  436. }
  437.  
  438. $title = '<h3>Recently Viewed Products</h3>';
  439. $product_ids = implode( ",", $viewed_products );
  440.  
  441. return '<div class="recently-viewed-products">' . $title . do_shortcode("[products ids='$product_ids' limit=18]") . '</div>';
  442.  
  443. }
  444.  
  445. function get_subcategory_terms( $terms, $taxonomies, $args ) {
  446.  
  447. $new_terms = array();
  448. $hide_category = array( 906,534,15,1232 );
  449.  
  450. if ( in_array( 'product_cat', $taxonomies ) && !is_admin() && is_product() | is_shop() | is_archive() ) {
  451. foreach ( $terms as $key => $term ) {
  452. if ( ! in_array( $term->term_id, $hide_category ) ) {
  453. $new_terms[] = $term;
  454. }
  455. }
  456. $terms = $new_terms;
  457. }
  458. return $terms;
  459. }
  460. add_filter( 'get_terms', 'get_subcategory_terms', 10, 3 );
  461.  
  462.  
  463.  
  464. /** Disable Ajax Call from WooCommerce on front page and posts*/
  465. add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_cart_fragments', 11);
  466. function dequeue_woocommerce_cart_fragments() {
  467. if (is_front_page() || is_single() ) wp_dequeue_script('wc-cart-fragments');
  468. }
  469.  
  470. add_filter( 'techmarket_search_categories_filter_args', 'tm_show_only_root_categories_in_search', 20 );
  471.  
  472. function tm_show_only_root_categories_in_search( $args ) {
  473. $args[ 'hierarchical' ] = 1;
  474. $args[ 'depth' ] = 2;
  475. return $args;
  476. }
  477.  
  478.  
  479. add_action( 'after_setup_theme', 'ec_child_remove_product_gallery_zoom_support', 20 );
  480.  
  481. function ec_child_remove_product_gallery_zoom_support() {
  482. remove_theme_support( 'wc-product-gallery-zoom' );
  483. }
  484.  
  485.  
  486. function backorder_text($availability) {
  487. foreach($availability as $i) {
  488. $availability = str_replace('Available on backorder', 'Backordered', $availability);
  489. $availability = str_replace('(can be backordered)', '', $availability);
  490. }
  491. return $availability;
  492. }
  493. add_filter('woocommerce_get_availability', 'backorder_text');
  494.  
  495. add_filter('woocommerce_email_order_items_args','remove_order_note',12);
  496. function remove_order_note($args){
  497. $args['show_purchase_note']= false;
  498. return $args;
  499. }
  500.  
  501.  
  502.  
  503. add_filter( 'woocommerce_email_order_items_args', 'iconic_email_order_items_args', 10, 1 );
  504.  
  505. function iconic_email_order_items_args( $args ) {
  506.  
  507. $args['show_image'] = true;
  508. $args['image_size'] = array( 70, 70 );
  509.  
  510. return $args;
  511.  
  512. }
  513.  
  514. function add_file_types_to_uploads($file_types){
  515. $new_filetypes = array();
  516. $new_filetypes['svg'] = 'image/svg+xml';
  517. $file_types = array_merge($file_types, $new_filetypes );
  518. return $file_types;
  519. }
  520. add_filter('upload_mimes', 'add_file_types_to_uploads');
  521.  
  522.  
  523. add_filter('woocommerce_login_redirect', 'pro_login_redirect');
  524. function pro_login_redirect( $redirect_to ) {
  525. $redirect_to = home_url();
  526. return $redirect_to;
  527. }
  528.  
  529.  
  530. add_action('admin_head', 'my_custom_fonts');
  531.  
  532. function my_custom_fonts() {
  533. echo '<style>
  534. p.form-field.form-field-wide.wc-customer-user label[for=customer_user] a, .post-locked-message p a:first-child,div#page-links-to,.misc-pub-section.misc-pub-response-to { display: none; } .energyplus-title--menu ul li:nth-child(3), .energyplus-title--menu ul li:nth-child(5), .energyplus-title--menu ul li:nth-child(6), .energyplus-title--menu ul li:nth-child(9),.energyplus-title--menu ul li:nth-child(11) {display:none;} .col-md-12.col-md-offset-2.text-center { margin-bottom: 50px; } #mymetabox_revslider_0,#postcustom,#woocommerce-order-downloads,.js-wc-plugin-framework-admin-notice.is-dismissible,.updated.woocommerce-message p,.updated.wps-rating,.woocommerce-BlankState a:last-child,.yith-live-chat-console .console-footer span,a.button.tips.edit,a.button.tips.wf-print-label,button.button.wc-reload,button.toggle-sub-orders.button,li#wp-admin-bar-clientside-notification-center{display:none!important}.clientside-theme #poststuff #woocommerce-order-notes .add_note .button.add_note{margin-bottom:60px}.tablenav.bottom{margin-bottom:45px!important}.wp-pointer-right{display:inline-table}.chat-content .chat-cnv-reply{margin-bottom:60px}.select2-container .select2-selection--single{height:41px!important;border-radius:2px!important;border:1px solid #e8e8e8!important}.select2-container--default .select2-selection--single .select2-selection__placeholder{vertical-align:sub}select#dropdown_shop_order_pip_print_status{max-width:210px!important}#order_data .order_data_column .form-field .date-picker{width:40%!important}select#shipping_service_canadapost{margin-bottom:30px!important}select#order_note_type{max-width:80%}textarea#ups_shipment_ids{width:100%;height:65px}.order_actions li#actions select{width:300px!important}li#actions strong{display:inline-grid}@media (min-width:1880px){.wrap{padding:0 28px!important}}.wrap{padding:36px 22px} .woocommerce-layout__header, li#wp-admin-bar-wp-logo, div#screen-meta-links {display:none !important;} #adminmenuback {background-color: #dfe0e3 !important;} #wpbody {background: #f4f5f6} #adminmenu .wp-menu-arrow {background: #f4f5f6!important; color: #000!important;} #adminmenu .wp-has-current-submenu .wp-submenu {background-color: #d2d5dd!important;margin-top:-2px!important;} #adminmenu .wp-submenu a,#adminmenu div.wp-menu-name,#adminmenu .wp-submenu li.current a {color: #000!important;} #adminmenu .wp-has-current-submenu div.wp-menu-image:before,#adminmenu div.wp-menu-image:before {color:#222!important;} #adminmenu {margin-top: 0!important;} a.ab-item:before, #wpfooter,li#wp-admin-bar-eos-dp-menu,ul#wp-admin-bar-site-name-default,.woocommerce-layout{display:none!important;} #wpadminbar #wp-admin-bar-site-name a.ab-item {margin-right: 3px!important;background: #000!important;font-size:12.5px;text-align:center;width:145px;pointer-events: none;}#adminmenu .wp-submenu a:hover, #adminmenu a:hover,#adminmenu li.menu-top:hover {background: #1eabf1!important;color: #000!important;}#adminmenuwrap {background-color: #dfe0e3;} li#collapse-menu { background: #dfe0e3; }.wp-menu-name { background:#d2d5dd; }#adminmenu li.wp-menu-separator {height:0;margin:0;} a.current { background: #f1f1f1; } #adminmenu li>a.menu-top:focus {background-color: #fff;}.folded #adminmenu a.menu-top{background:white;}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu {background: #dfe0e3;}select#bulk-action-selector-top option:nth-child(n+6),select#bulk-action-selector-bottom option:nth-child(n+6){display:none;} .post-type-shop_order .tablenav .select2-selection--single { height: 31px !important; border: 1px solid #7e8993 !important; margin-top: -1px; }.tablenav span.select2-selection__placeholder { vertical-align: baseline !important; color: #32373c !important; } @media (max-width: 768px) { li#wp-admin-bar-site-name,.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-primary~td:not(.check-column) { display: none !important; }.auto-fold #adminmenu a.menu-top {background: #d2d5dd !important;} } div#coupon_options span.description a {pointer-events: none; color: #555; text-decoration: none;} #wpbody-content {background:#f1f1f1;} li#wp-admin-bar-new-content { display: none; }
  535. </style>';
  536. }
  537.  
  538.  
  539. if ( ! function_exists( 'techmarket_wc_products_per_page' ) ) {
  540. /**
  541. * Outputs a dropdown for user to select how many products to show per page
  542. */
  543. function techmarket_wc_products_per_page() {
  544.  
  545. global $wp_query, $techmarket_options;
  546.  
  547. $action = '';
  548. $cat = '';
  549. $cat = $wp_query->get_queried_object();
  550. $method = apply_filters( 'techmarket_wc_ppp_method', 'post' );
  551. $return_to_first = apply_filters( 'techmarket_wc_ppp_return_to_first', false );
  552. $total = $wp_query->found_posts;
  553. $per_page = $wp_query->get( 'posts_per_page' );
  554. $_per_page = isset( $techmarket_options['products_per_page'] ) ? $techmarket_options['products_per_page'] :techmarket_set_loop_shop_columns() * 4;
  555.  
  556. // Generate per page options
  557. $products_per_page_options = array();
  558. while( $_per_page < $total ) {
  559. $products_per_page_options[] = $_per_page;
  560. $_per_page = $_per_page * 2;
  561. }
  562.  
  563. if ( empty( $products_per_page_options ) ) {
  564. return;
  565. }
  566.  
  567. $products_per_page_options[] = -1;
  568.  
  569. // Set action url if option behaviour is true
  570. // Paste QUERY string after for filter and orderby support
  571. $query_string = ! empty( $_SERVER['QUERY_STRING'] ) ? '?' . add_query_arg( array( 'ppp' => false ), $_SERVER['QUERY_STRING'] ) : null;
  572.  
  573. if ( isset( $cat->term_id ) && isset( $cat->taxonomy ) && $return_to_first ) :
  574. $action = get_term_link( $cat->term_id, $cat->taxonomy ) . $query_string;
  575. elseif ( $return_to_first ) :
  576. $action = get_permalink( wc_get_page_id( 'shop' ) ) . $query_string;
  577. endif;
  578.  
  579. // Only show on product categories
  580. if ( ! woocommerce_products_will_display() ) :
  581. return;
  582. endif;
  583.  
  584. do_action( 'techmarket_wc_ppp_before_dropdown_form' );
  585.  
  586. ?><form method="POST" action="<?php echo esc_url( $action ); ?>" class="form-techmarket-wc-ppp"><?php
  587.  
  588. do_action( 'techmarket_wc_ppp_before_dropdown' );
  589.  
  590. ?><select name="ppp" onchange="this.form.submit()" class="techmarket-wc-wppp-select c-select"><?php
  591.  
  592. foreach( $products_per_page_options as $key => $value ) :
  593.  
  594. ?><option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, $per_page ); ?>><?php
  595. $ppp_text = apply_filters( 'techmarket_wc_ppp_text', esc_html__( 'Show %s', 'techmarket' ), $value );
  596. esc_html( printf( $ppp_text, $value == -1 ? esc_html__( 'All', 'techmarket' ) : $value ) ); // Set to 'All' when value is -1
  597. ?></option><?php
  598.  
  599. endforeach;
  600.  
  601. ?></select><?php
  602.  
  603. // Keep query string vars intact
  604. foreach ( $_GET as $key => $val ) :
  605.  
  606. if ( 'ppp' === $key || 'submit' === $key ) :
  607. continue;
  608. endif;
  609. if ( is_array( $val ) ) :
  610. foreach( $val as $inner_val ) :
  611. ?><input type="hidden" name="<?php echo esc_attr( $key ); ?>[]" value="<?php echo esc_attr( $inner_val ); ?>" /><?php
  612. endforeach;
  613. else :
  614. ?><input type="hidden" name="<?php echo esc_attr( $key ); ?>" value="<?php echo esc_attr( $val ); ?>" /><?php
  615. endif;
  616. endforeach;
  617.  
  618. do_action( 'techmarket_wc_ppp_after_dropdown' );
  619.  
  620. ?></form><?php
  621.  
  622. do_action( 'techmarket_wc_ppp_after_dropdown_form' );
  623. }
  624. }
  625.  
  626.  
  627. if ( ! function_exists( 'tm_child_replace_sku_additional_info' ) ) {
  628. function tm_child_replace_sku_additional_info() {
  629. remove_action( 'woocommerce_after_grid_extended_item_title', 'techmarket_single_product_sku', 16 );
  630. add_action( 'woocommerce_after_grid_extended_item_title', 'techmarket_single_product_availability', 16 );
  631. }
  632. }
  633.  
  634. add_action( 'init', 'tm_child_replace_sku_additional_info' );
  635.  
  636.  
  637. // Disable REST API link tag
  638. remove_action('wp_head', 'rest_output_link_wp_head', 10);
  639.  
  640. // Disable oEmbed Discovery Links
  641. remove_action('wp_head', 'wp_oembed_add_discovery_links', 10);
  642.  
  643. // Disable REST API link in HTTP headers
  644. remove_action('template_redirect', 'rest_output_link_header', 11, 0);
  645.  
  646.  
  647.  
  648. function my_login_logo() { ?>
  649. <style type="text/css">
  650. #login h1 a, .login h1 a {display: none !important;} #login {width: 420px !important;}.login form {background: transparent !important;border: 0!important;box-shadow: none!important;padding-bottom: 150px!important; }.login form .input, .login input[type=password], .login input[type=text] {border-radius: 0 !important; border-color: #222!important;} .wp-core-ui .button-group.button-large .button, .wp-core-ui .button.button-large {width: 100%!important;margin-top: 20px!important;border-radius: 16px!important;} .wp-core-ui .button-primary { background: #9ea1a9 !important; border-color: #fff !important; } form#loginform:before { content: "Log In To SAP CRM"; font-size: 20px; display: block; margin-bottom: 20px; }
  651. </style>
  652. <?php }
  653. add_action( 'login_enqueue_scripts', 'my_login_logo' );
  654.  
  655. function hide_update_noticee_to_all_but_admin_users()
  656. {
  657. if (!is_super_admin()) {
  658. remove_all_actions( 'admin_notices' );
  659. }
  660. }
  661. add_action( 'admin_head', 'hide_update_noticee_to_all_but_admin_users', 1 );
Add Comment
Please, Sign In to add comment