add_filter( 'get_custom_logo', 'wecodeart_com' );
// Filter the output of logo to fix Googles Error about itemprop logo
function wecodeart_com() {
$custom_logo_id = get_theme_mod( 'custom_logo' );
$html = sprintf( '<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>',
esc_url( home_url( '/' ) ),
wp_get_attachment_image( $custom_logo_id, 'full', false, array(
'class' => 'custom-logo',
'title' => 'новый тайтл'
) )
);
return $html;
}
$category_id = get_query_var( 'cat' ); // Get current catgory ID
$category = get_term( $category_id, 'category' ); // Fetch category term object
// get_categories(['']);
// Now, we check if the category has a parent
// If it has, we use that ID
// If it doesn't have a parent, it is a parent category itself and we use its own ID
$parent = $category->parent ? $category->parent : $category_id;
$args = array(
'show_count' => false,
'hide_empty' => false,
'title_li' => '',
'show_option_none' => '',
'echo' => false
);
echo "parent: {$category->parent}";
// echo "category_id: $category_id";
// Show the children of parent category
if ( $category->parent ) {
$args['child_of'] = $category->parent;
$args['exclude'] = $category_id; // Don't display the current category in this list
}
else {
// $args['child_of'] = $category_id;
}
// $args['show_option_all'] = 'Все';
$args['hide_empty'] = true;
// Get the category list
$categories_list = wp_list_categories( $args );
if ( $categories_list ) {
?>
<div class="category-wrapper">
<ul class="child-categories">
<?php echo $categories_list; ?>
</ul>
</div>
<?php
}
$category_id = get_query_var( 'cat' ); // Get current catgory ID
$category = get_term( $category_id, 'category' ); // Fetch category term object
// get_categories(['']);
// Now, we check if the category has a parent
// If it has, we use that ID
// If it doesn't have a parent, it is a parent category itself and we use its own ID
$parent = $category->parent ? $category->parent : $category_id;
$args = array(
'show_count' => false,
'hide_empty' => false,
'title_li' => '',
'show_option_none' => '',
'echo' => false
);
echo "parent: {$category->parent}";
// echo "category_id: $category_id";
// Show the children of parent category
if ( $category->parent ) {
$args['child_of'] = $category->parent;
$args['exclude'] = $category_id; // Don't display the current category in this list
}
else {
// $args['child_of'] = $category_id;
}
// $args['show_option_all'] = 'Все';
$args['hide_empty'] = true;
// Get the category list
$categories_list = wp_list_categories( $args );
if ( $categories_list ) {
?>
<div class="category-wrapper">
<ul class="child-categories">
<?php echo $categories_list; ?>
</ul>
</div>
<?php
}
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
$this->model_extension_event->addEvent('mymodule', 'post.customer.add', 'module/mymodule/on_customer_add');
public function on_customer_add($customer_id) {
$this->load->model('account/customer');
$customer_info = $this->model_account_customer->getCustomer($customer_id);
$admin_mail = $this->config->get('config_email');
// тут curlом отправляешь запрос на ВП
}
if(isset($_POST['new_register']))
register_new_user( $user_login, $user_email );