Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 3.0.8.0
- * @ Author : DeZender
- * @ Release on : 25.09.2017
- * @ Official site : http://DeZender.Net
- *
- */
- function add_style_by_plugin_compare_quick_view_without()
- {
- if (!(defined( 'YITH_WOOCOMPARE' )) && !(defined( 'YITH_WCQV' ))) {
- echo '<style>' . "\r\n\t\t\t" . '.main_button_product{width:170px;}' . "\r\n\t\t\t" . '.main_button_product a.custom_add_to_cart_onliner{width:100%;white-space:nowrap;}' . "\r\n\t\t\t" . '.woocommerce ul.products li.product .custom_add_to_cart_onliner:before{display:inline;margin-left:6px;}' . "\r\n\t\t" . '</style>';
- }
- if (defined( 'YITH_WOOCOMPARE' ) && !(defined( 'YITH_WCQV' ))) {
- echo '<style>' . "\r\n\t\t\t" . '.main_button_product a.custom_add_to_cart_onliner{width:50%;}' . "\r\n\t\t\t" . 'ul.products li a.compare.button{width:50%;}' . "\r\n\t\t" . '</style>'.'<script>jQuery(document).ready(function($){ ' . "\r\n\t\t\t" . 'jQuery(\'ul.products li.product .button.custom_add_to_cart_onliner\').text(\'\');' . "\r\n\t\t" . '});</script>';
- }
- if (!(defined( 'YITH_WOOCOMPARE' )) && defined( 'YITH_WCQV' )) {
- echo '<style>' . "\r\n\t\t\t" . '.main_button_product{width:180px;}' . "\r\n\t\t\t" . '.main_button_product a.custom_add_to_cart_onliner{width:145px;white-space:nowrap;font-size:12px;}' . "\r\n\t\t\t" . '.woocommerce ul.products li.product .custom_add_to_cart_onliner:before{display:inline;}' . "\r\n\t\t" . '</style>'.'<script>jQuery(document).ready(function($){ ' . "\r\n\t\t\t" . 'jQuery(\'ul.products li a.yith-wcqv-button.button\').text(\'\');' . "\r\n\t\t" . '});</script>';
- }
- }
- function custom_internal_css()
- {
- echo '<link rel="stylesheet" type="text/css" href="' . get_bloginfo( 'template_url' ) . '/option-tree/ot-custom-style.css" />';
- }
- function wc_custom_add_custom_fields()
- {
- woocommerce_wp_textarea_input( array(
- 'id' => 'content_slider',
- 'label' => 'متن اسلایدر تخفیفات',
- 'description' => 'چنانچه برای این محصول زمان بندی مشخص کرده اید و میخواهید در اسلایدر تخفیفات زمان دار صفحه اصلی نمایش داده شود متن مختصری در این فیلد درج نمائید',
- 'desc_tip' => 'true',
- 'placeholder' => 'چنانچه برای این محصول زمان بندی مشخص کرده اید و میخواهید در اسلایدر تخفیفات زمان دار صفحه اصلی نمایش داده شود متن مختصری در این فیلد درج نمائید'
- ) );
- }
- function wc_custom_save_custom_fields($post_id)
- {
- update_post_meta( $post_id, 'content_slider', esc_attr( $_POST['content_slider'] ) );
- }
- function register_my_menus()
- {
- register_nav_menus( array( 'main-menu' => 'منو اصلی' ) );
- }
- function get_image_id($image_url)
- {
- global $wpdb;
- $attachment = $wpdb->get_col( $wpdb->prepare( 'SELECT ID FROM ' . $wpdb->posts . ' WHERE guid=\'%s\';', $image_url ) );
- return $attachment[0];
- }
- function __search_by_title_only($search, &$wp_query)
- {
- global $wpdb;
- if (empty( $search )) {
- return $search;
- }
- $q = @$wp_query->query_vars;
- $n = ((!(empty( $q['exact'] )) ? '' : '%'));
- @$search = '';
- @$searchand = '';
- foreach ((array) $q['search_terms'] as $term) {
- $term = esc_sql( $wpdb->esc_like( $term ) );
- $search .= $searchand . '(' . $wpdb->posts . '.post_title LIKE \'' . $n . $term . $n . '\')';
- $searchand = ' AND ';
- }
- if (!(empty( $search ))) {
- $search = ' AND (' . $search . ') ';
- if (!(is_user_logged_in( ))) {
- $search .= ' AND (' . $wpdb->posts . '.post_password = \'\') ';
- }
- }
- return $search;
- }
- function remove_search_widget()
- {
- unregister_widget( 'WP_Widget_Search' );
- }
- function wp_permalink()
- {
- echo '<a href="http://shop.onliner.ir/woocommerce-theme/" title="قالب ووکامرس" class="themework">قالب ووکامرس</a>';
- }
- function remove_page_link_yith_licence()
- {
- echo '<style>#toplevel_page_yit_plugin_panel ul li:nth-last-child(-n+2) { display:none; }</style>';
- }
- function custom_woocommerce_template_loop_product_thumbnail_by_onliner()
- {
- global $product;
- $product_id_person = $product->get_id( );
- ...........................................................................
- ......................................
- ...........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement