This file contains hidden or 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
/** | |
* 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;} |
This file contains hidden or 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
/** | |
* 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' |
This file contains hidden or 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> | |
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> |
This file contains hidden or 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> | |
jQuery(document).ready(function($) { | |
var delay = 100; setTimeout(function() { | |
$('.elementor-tab-title').removeClass('elementor-active'); | |
$('.elementor-tab-content').css('display', 'none'); }, delay); | |
}); | |
</script> |
This file contains hidden or 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 | |
//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)){ |
This file contains hidden or 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
#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] |
This file contains hidden or 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_POST_REVISIONS', 3 ); |
This file contains hidden or 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_POST_REVISIONS', false ); |
This file contains hidden or 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
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 |
This file contains hidden or 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
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") |