remove_filter( $filter, 'wp_filter_kses' );
}
foreach ( array( 'term_description' ) as $filter ) {
remove_filter( $filter, 'wp_kses_data' );
}
function login_session_expired() {
// we only care to add scripts and styles if the user is logged in.
if ( is_user_logged_in() ) {
// add javascript file
wp_register_script( 'wp_auth_check', '/wp-includes/js/wp-auth-check.js' , array('heartbeat'), false, 1);
wp_localize_script( 'wp_auth_check', 'authcheckL10n', array(
'beforeunload' => __('Your session has expired. You can log in again from this page or go to the login page.'),
'interval' => apply_filters( 'wp_auth_check_interval', 1 * MINUTE_IN_SECONDS ), // default interval is 3 minutes
) );
wp_enqueue_script ('wp_auth_check');
// add css file
wp_enqueue_style( 'wp_auth_check','/wp-includes/css/wp-auth-check.css', array( 'dashicons' ), NULL, 'all' );
// add the login html to the page
add_action( 'wp_print_footer_scripts', 'wp_auth_check_html', 5 );
}
}
add_action( 'wp_enqueue_scripts', 'login_session_expired' );
// make sure the stylesheet appears on the lightboxed login iframe
function login_session_expired_styles() {
wp_enqueue_style( 'wp_auth_check','/wp-includes/css/wp-auth-check.css', array( 'dashicons' ), NULL, 'all' );
}
add_action( 'login_enqueue_scripts', 'login_session_expired_styles' );
Copy the following snippet code in functions.php
// WordPress Preloader by https://webcodeaddict.blogspot.com/
add_action( 'init', 'webcodeaddict_Preloader' );
function webcodeaddict_Preloader() { if(!is_admin() && $GLOBALS["pagenow"] !== "wp-login.php" ) {
$delay = 1; //seconds
$loader = 'https://lh3.googleusercontent.com/drive-viewer/AEYmBYSOBFwcTqY5wcd0fQwWh9mOILRr9y6ximWsEzs72TKa3kxK3BIxm9wFtcpaSqJfiHOTTkD2EjsNKipAId8105QKAawYjQ=s1600';
$overlayColor = '#ffffff';
echo '<div class="Preloader"><img src="'.$loader.'" alt="" style="height: 150px;"></div>
<style>
.Preloader {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: '.$overlayColor.';
z-index: 100000;
display: flex;
align-items: center;
justify-content: space-around;
}
</style>
<script>
document.body.style.overflow = "hidden";
document.addEventListener("DOMContentLoaded", () => setTimeout( function() { document.querySelector("div.Preloader").remove(); document.body.style.overflow = "visible"; } , '.$delay.' * 1000));
</script>
'; }}
<script>
$(document).ready(function() {
$('.team-filters ul li a').click(function() {
$('.team-filters ul li a').removeClass('active');
$(this).addClass('active');
});
// var selector = $(this).attr('data-filter');
var $container = $('.isotope').isotope({
filter: $container,
itemSelector: '.element-item',
});
$('#filters').on('click', 'a', function() {
var filterValue = $(this).attr('data-filter');
// use filterFn if matches value
// filterValue = filterFns[filterValue] || filterValue;
$container.isotope({
filter: filterValue
});
});
$container.imagesLoaded(function() {
$container.isotope('layout');
});
// return false;
var initShow = 6;
var counter = initShow;
var iso = $container.data('isotope');
loadMore(initShow); //execute function onload
function loadMore(toShow) {
$container.find(".hidden").removeClass("hidden");
var hiddenElems = iso.filteredItems.slice(toShow, iso.filteredItems.length).map(function(item) {
return item.element;
});
$(hiddenElems).addClass('hidden');
$container.isotope('layout');
//when no more to load, hide show more button
if (hiddenElems.length == 0) {
jQuery("#load-more").hide();
} else {
jQuery("#load-more").show();
};
}
//append load more button
// $container.after('<button id="load-more"> Load More</button>');
//when load more button clicked
$("#load-more").click(function(event) {
event.preventDefault();
if ($('#filters').data('clicked')) {
//when filter button clicked, set initial value for counter
counter = initShow;
$('#filters').data('clicked', false);
} else {
counter = counter;
};
counter = counter + initShow;
loadMore(counter);
});
//when filter button clicked
$("#filters").click(function() {
// alert("sd;lk");
$(this).data('clicked', true);
loadMore(initShow);
});
});
</script>
In WordPress, "Users" refer to individuals who have access to your WordPress website's admin area. Each user account can have different roles and permissions, which determine their level of access and what they can do on the website. Managing user accounts is essential for controlling who can make changes to your site's content and settings. Here's an overview of WordPress users and user roles:
User Roles:
Managing Users:
User Registration:
Multisite:
User Profile:
User Plugins:
User management is crucial for ensuring the security and integrity of your WordPress website. By assigning appropriate roles and permissions to users, you can maintain control over who can create, edit, and manage content while keeping your site protected from unauthorized changes.
In WordPress, the "Tools" section encompasses various tools and features that aid in managing and maintaining your website's content, data, and overall performance. These tools are designed to make your experience as a website owner or administrator more efficient and streamlined. Here's an overview of some of the key tools available in WordPress:
To access the Tools section, log in to your WordPress Dashboard and navigate to "Tools" on the left-hand menu.
Available Tools:
Press This (Deprecated):
Categories and Tags Converter:
Import and Export:
Site Health:
Export Personal Data and Erase Personal Data:
Block Editor:
Database Optimization and Cleanup (via Plugins):
Remember that the availability and functionality of these tools might vary based on your WordPress version, theme, and installed plugins. The "Tools" section is designed to make various administrative tasks more accessible, whether you're migrating content, maintaining data privacy, or optimizing your website's performance.
In WordPress, the "Settings" section refers to the part of the WordPress Dashboard where you can configure various global settings that affect the overall behavior, appearance, and functionality of your website. These settings control how your site operates, displays content, interacts with users, and more. Here's an overview of the different settings you can adjust in WordPress:
To access the Settings section, log in to your WordPress Dashboard and navigate to "Settings" on the left-hand menu.
General Settings:
Writing Settings:
Reading Settings:
Discussion Settings:
Media Settings:
Permalinks Settings:
Privacy Settings:
These settings provide control over essential aspects of your WordPress website. It's important to review and configure these settings according to your website's goals and requirements. However, be cautious when making changes to settings that you're not familiar with, as they can impact how your website operates.
Keep in mind that the exact settings available to you might vary depending on your WordPress version, theme, and any plugins you have installed. Always remember to save your changes after making adjustments to settings.
View this post on Instagram A post shared by WebCodeAddict (@webcodeaddicted)