This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No need of changing any thing in the .conf file just follow the following steps | |
Step 1: First check whether redis-server is working or not | |
$ redis-cli | |
127.0.0.1:6379> ping | |
PONG | |
if the reply is PONG then your server is working absolutely fine. | |
Step 2: To get the current max memory run the following commands: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Check and Delete Media | |
Description: Check all media items and delete entries if the images are not in the uploads folder. Display the total number of missing files and delete on button click. | |
Version: 1.2 | |
Author: Joy Chetry | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define('WP_REDIS_CONFIG', [ | |
'token' => 'your_token_key', | |
'host' => '127.0.0.1', | |
'port' => 6379, | |
'database' => 0, // change for each site | |
'maxttl' => 3600 * 24 * 7, // 7 days | |
'timeout' => 1.0, | |
'read_timeout' => 1.0, | |
'prefetch' => true, | |
'split_alloptions' => true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before we explain the detailed way, there is a quick solution to get rid of WooCommerce data completely. | |
Open your site’s wp-config.php file through FTP or File Manager. | |
Scroll towards the bottom, add this line: | |
define(‘WC_REMOVE_ALL_DATA’, true); | |
Make sure to use straight quotation marks and add the code on its own line above the / That’s all, stop editing! Happy blogging. / line in the file, around line 76 of the file. | |
Save the file to the server. | |
Press “Deactivate” > “Delete” to remove the plugin from your admin panel. | |
You can again go back and remove the above code from the wp-config file. Then when you deactivate and delete WooCommerce it will remove all of its data from your WordPress database. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::-webkit-scrollbar{ | |
width: 4px; | |
border-radius: 4px; | |
margin-left: 4px; | |
} | |
::-webkit-scrollbar-track{ | |
background: rgba(0, 0, 0, 0.1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
document.addEventListener('DOMContentLoaded', function() { | |
// Click event listener for images with class 'shareLink' | |
const images = document.querySelectorAll('.shareLink'); | |
images.forEach(function(image) { | |
image.addEventListener('click', function() { | |
const link = document.URL; | |
// Check if Web Share API is supported | |
if (navigator.share) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
document.addEventListener('DOMContentLoaded', function() { | |
// Click event listener for images with class 'shareLink' | |
const images = document.querySelectorAll('.shareLink'); | |
images.forEach(function(image) { | |
image.addEventListener('click', function() { | |
const link = this.getAttribute('data-link'); | |
const postTitle = this.getAttribute('data-title'); // Assuming 'data-title' attribute contains the post title | |
// Check if Web Share API is supported |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Add new query type controls to query options */ | |
add_filter( 'bricks/setup/control_options', 'bl_setup_query_controls'); | |
function bl_setup_query_controls( $control_options ) { | |
/* Adding new options in the dropdown */ | |
$control_options['queryTypes']['goodmonks_crp_query'] = esc_html__( 'GoodMonks: CRP' ); | |
return $control_options; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'comment_form_fields', 'c_customize_bricks_comment_form_fields' ); | |
function c_customize_bricks_comment_form_fields($fields) { | |
if(isset($fields['url'])){ | |
unset( $fields['url'] ); // remove Comment Author URL field | |
} | |
return $fields; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Your code wrapped inside this condition | |
if( !bricks_is_builder() && !current_user_can('administrator') ){ | |
//Your code here | |
} |
NewerOlder