<?php
/**
* RSS 0.92 Feed Template for displaying RSS 0.92 Posts feed.
*
* @package WordPress
*/
header( 'Content-Type: ' . feed_content_type( 'rss' ) . '; charset=' . get_option( 'blog_charset' ), true );
$more = 1;
echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>'; ?>
<rss version="0.92">
<channel>
<title><?php wp_title_rss(); ?></title>
<link><?php bloginfo_rss( 'url' ); ?></link>
<description><?php bloginfo_rss( 'description' ); ?></description>
<lastBuildDate><?php echo date( 'D, d M Y H:i:s +0300', strtotime('+3 hours')); ?></lastBuildDate>
<docs>http://backend.userland.com/rss092</docs>
<language><?php bloginfo_rss( 'language' ); ?></language>
<?php
/**
* Fires at the end of the RSS Feed Header.
*
* @since 2.0.0
*/
do_action( 'rss_head' );
?>
<?php
while ( have_posts() ) :
the_post();
?>
<item>
<title><?php the_title_rss(); ?></title>
<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
<link><?php the_permalink_rss(); ?></link>
<?php
/**
* Fires at the end of each RSS feed item.
*
* @since 2.0.0
*/
do_action( 'rss_item' );
?>
<!-- Add the enclosure tag for the image here -->
<enclosure url="<?php echo esc_url( get_the_post_thumbnail_url( null, 'full' ) ); ?>" type="image/jpeg" />
</item>
<?php endwhile; ?>
</channel>
</rss>
<?php
$project_gallery = get_field( "slajder" );
?>
<div class="row">
<?php if( $project_gallery ): ?>
<div class="col-xl-8 col-lg-7 col-12">
<div class="project-slider">
<div class="project-slider__content" id="project-slider">
<?php foreach( $project_gallery as $media ): ?>
<div class="project-slider__slide">
<?php if( $media['mime_type'] === 'image/jpeg' || $media['mime_type'] === 'image/png' ): ?>
<img src="<?php echo $media['url']; ?>" alt="<?php echo $media['alt']; ?>" class="project-slider__image">
<?php elseif( $media['mime_type'] === 'video/mp4' ): ?>
<video controls="" autoplay="" name="media" src="<?php echo $media['url']; ?>" type="video/mp4" class="project-slider__image"></video>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<?php endif; ?>
</div>
add_shortcode( 'customer_products', 'truemisha_products_current_user' );
function truemisha_products_current_user() {
// ничего не делаем, если не авторизован
if ( ! is_user_logged_in() ) {
return;
}
// получаем все оплаченные заказы пользователя
$customer_orders = get_posts( array(
'posts_per_page' => -1,
'meta_key' => '_customer_user',
'meta_value' => get_current_user_id(),
'post_type' => wc_get_order_types(),
'post_status' => array_keys( wc_get_is_paid_statuses() ),
) );
// если заказов не найдено
if ( ! $customer_orders ) {
return;
}
// создаём отдельную переменную для ID товаров и записываем в неё
$ids = array();
foreach ( $customer_orders as $customer_order ) {
$order = wc_get_order( $customer_order->ID );
$items = $order->get_items();
foreach ( $items as $item ) {
$product_id = $item->get_product_id();
if ( ! has_reviewed_product( $product_id, get_current_user_id() ) ) {
$ids[] = $product_id;
}
}
}
// если нет товаров без отзывов
if ( empty( $ids ) ) {
return;
}
// возвращаем шорткод
return do_shortcode( '[products ids="' . join( ",", array_unique( $ids ) ) . '"]' );
}
jQuery(document).ready(function($) {
document.addEventListener('wpcf7mailsent', function(event) {
var id = event.detail.contactFormId;
var popupId = 'pamyatka-popap-<?php echo get_row_index(); ?>';
// Проверяем, находимся ли мы внутри попапа с определенным ID
if ($(event.target).closest('#' + popupId).length) {
if (id == 19124) {
window.open("<?php echo esc_url($m_dobavit_knopku['url']); ?>", '_blank');
}
}
}, false);
});
add_filter( 'woocommerce_product_add_to_cart_text' , 'custom_woocommerce_product_add_to_cart_text' );
function custom_woocommerce_product_add_to_cart_text() {
global $product;
$product_type = $product->product_type;
switch ( $product_type ) {
case 'variable':
return __( 'Options', 'woocommerce' );
break;
}
}
function my_custom_cart_button_text( $text, $product ) {
if( $product->is_type( 'variable' ) ){
$text = __('Buy Now', 'woocommerce');
}
return $text;
}
add_filter( 'woocommerce_product_single_add_to_cart_text', 'my_custom_cart_button_text', 10, 2 );
the_content
и the_title
add_filter('xmlrpc_enabled', '__return_false');
# Block WordPress xmlrpc.php requests
<Files xmlrpc.php>
order deny,allow
deny from all
</Files>
UPDATE wp_options SET option_value = replace(option_value, 'https://vashdomen-1.com', 'https://vashdomen-2.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = REPLACE (post_content, 'https://vashdomen-1.com', 'https://vashdomen-2.com');
UPDATE wp_comments SET comment_content = REPLACE (comment_content, 'https://vashdomen-1.com', 'https://vashdomen-2.com');
UPDATE wp_comments SET comment_author_url = REPLACE (comment_author_url, 'https://vashdomen-1.com', 'https://vashdomen-2.com');
invisible reCAPTCHA позволяет совершать пользователям на сайте какие-либо действия сразу (без ввода капчи). По умолчанию только самые подозрительные действия пользователей не позволят им пройти дальше. В этом случае invisible reCAPTCHA предложит им решить капчу
This plugin effectively works with the Premmerce User Roles plugin that allows you to easily create additional users’ roles directly from the dashboard.
MAJOR FEATURES IN “PREMMERCE WHOLESALE PRICING FOR WOOCOMMERCE”
adding wholesale prices
adding custom prices