Skip to content

Instantly share code, notes, and snippets.

View shameemreza's full-sized avatar
🇧🇩
Problem-Solver | WooCommerce Expert | Customer-First Mindset

Shameem Reza shameemreza

🇧🇩
Problem-Solver | WooCommerce Expert | Customer-First Mindset
View GitHub Profile
/**
* Disable WordPress Update nag
* https://orixlab.net/disable-updates-for-specific-plugin-in-wordpress
* Place at bottom in theme functions.php
*/
add_action('after_setup_theme','remove_core_updates');
function remove_core_updates()
{
if(! current_user_can('update_core')){return;}
/**
* Prevent update notification for plugin
* https://orixlab.net/disable-updates-for-specific-plugin-in-wordpress
* Place at bottom in theme functions.php
*/
function disable_plugin_updates( $value ) {
$pluginsToDisable = [
'plugin-folder/plugin.php',
'plugin-folder2/plugin2.php'
<script>
if(window.outerWidth < 425) {
alert('jQuery(document).ready(function($) {
var delay = 100; setTimeout(function() {
$('.elementor-tab-title').removeClass('elementor-active');
$('.elementor-tab-content').css('display', 'none'); }, delay);
}); ');
}
</script>
<script>
jQuery(document).ready(function($) {
var delay = 100; setTimeout(function() {
$('.elementor-tab-title').removeClass('elementor-active');
$('.elementor-tab-content').css('display', 'none'); }, delay);
});
</script>
<?php
//save theme active time
function my_theme_activation_init() {
// Check if already saved the activation date & time
// to prevent over-writing if user deactive & active theme
// multiple time
if(!get_option('mytheme_activation_time', false)){
#Hotlinking
RewriteEngine on
RewriteCond% {HTTP_REFERER}! ^ $
RewriteCond% {HTTP_REFERER}! ^ Http (s)?: // (www \.)? Your-domain.com [NC]
RewriteCond% {HTTP_REFERER}! ^ Http (s)?: // (www \.)? Google.com [NC]
RewriteRule \. (Jpg | jpeg | png | gif) $ - [NC, F, L]
define( 'WP_POST_REVISIONS', 3 );
define( 'WP_POST_REVISIONS', false );
struct Cars: Identifiable {
var id = UUID()
var name: String
}
struct SomeView: View {
@State var searchText: String = ""
@State var cars: [Cars] = [Cars(name: "Nissan"), Cars(name: "Mercedes"), Cars(name: "BMW")]
var body: some View {
NavigationView {
List($cars) { $car in
struct SomeView: View {
var body: some View {
List {
ForEach(1...10, id: \.self) { item in
Text("Item Number \(item)")
.swipeActions(edge: .leading) {
Button {
//enter button actions here
} label: {
Text("Action Here")