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
// Gutenberg disable for posts | |
add_filter('use_block_editor_for_post', '__return_false', 10); |
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
Variable | |
String | |
Constant | |
Condition [if, else, elseif] | |
Loop | |
Function | |
Array |
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
add_action( 'before_delete_post', 'wps_remove_attachment_with_post', 10 ); | |
function wps_remove_attachment_with_post($post_id) | |
{ | |
if(has_post_thumbnail( $post_id )) | |
{ | |
$attachment_id = get_post_thumbnail_id( $post_id ); | |
wp_delete_attachment($attachment_id, 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
add_action( 'before_delete_post', 'wps_remove_attachment_with_post', 10 ); | |
function wps_remove_attachment_with_post( $post_id ) { | |
/** @var WP_Post[] $images */ | |
$images = get_attached_media( 'image', $post_id ); | |
foreach ( $images as $image ) { | |
wp_delete_attachment( $image->ID, 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
define('EMPTY_TRASH_DAYS', 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
define( 'WP_POST_REVISIONS', 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
<center> | |
<strong>Some Radio Station from Your Country</strong> | |
[geot country="AF"][ess_grid alias="Afghanistan"][/geot] | |
[geot country="AL"][ess_grid alias="Albania"][/geot] | |
[geot country="DZ"][ess_grid alias="Algeria"][/geot] | |
[geot country="AD"][ess_grid alias="Andorra"][/geot] | |
[geot country="AO"][ess_grid alias="Angola"][/geot] | |
[geot country="AG"][ess_grid alias="Antigua and Barbuda"][/geot] | |
[geot country="AR"][ess_grid alias="Argentina"][/geot] | |
[geot country="AM"][ess_grid alias="Armenia"][/geot] |
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
h1 { | |
font-family: 'Open Sans', Helvetica, Arial, Lucida, sans-serif; | |
} | |
p { | |
font-family: 'Open Sans', Helvetica, Arial, Lucida, sans-serif; | |
} | |
b { | |
font-size: 30px; | |
color: #BBB743; | |
font-family: 'Open Sans', Helvetica, Arial, Lucida, sans-serif; |
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 type="text/javascript"> | |
<!-- | |
if (screen.width <= 699) { | |
document.location = "https://mohsinalam.com/mobile/"; | |
} | |
//--> | |
</script> | |
"https://mohsinalam.com/mobile/" would be replaced with the location of wherever your mobile version resides. This technique could be adapted to load an alternate stylesheet as well. |
OlderNewer