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
SELECT * FROM `tbllog_register` WHERE created_at < '2023-01-01'; |
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
user | |
+----+-----------+----------+-------+ | |
| id | firstname | lastname | email | | |
+----+-----------+----------+-------+ | |
| 1 | Peter | Jones | email | | |
| 2 | Bob | Smith | email | | |
| 3 | Sarah | Peters | email | | |
| 4 | Christine | Hall | email | | |
+----+-----------+----------+-------+ |
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
dir | rename-item -NewName {$_.name -replace " ","-"} |
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 Javascript to select default options in Product Add on | |
function digitalessence_new_scripts(){ | |
wp_enqueue_script( 'product-addon-default-values', get_stylesheet_directory_uri() . '/js/product-addon-default-value.js', array(), true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'digitalessence_new_scripts' ); |
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
// Detect if post is in the past and if so add a custom Class "oldpost" | |
if (strtotime(get_the_date( "Y-m-d", $the_id )) < strtotime(date("Y-m-d"))) { | |
$post_class = "post-entry post-entry-{$the_id} oldpost slide-entry-overview slide-loop-{$post_loop_count} slide-parity-{$parity} {$last}"; | |
} | |
else { | |
$post_class = "post-entry post-entry-{$the_id} slide-entry-overview slide-loop-{$post_loop_count} slide-parity-{$parity} {$last}"; | |
} |
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
//Display Future Posts | |
function de_prevent_future_type( $post_data ) { | |
if ( $post_data['post_status'] == 'future' && $post_data['post_type'] == 'post' ) | |
/*Here I am checking post_type='post' , you may use different post type and if you want it | |
for all post type then remove "&& $post_data['post_type'] == 'post'" | |
*/ | |
{ | |
$post_data['post_status'] = 'publish'; | |
} | |
return $post_data; |
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 Open Graph | |
add_action('wp_head', 'fb_opengraph'); | |
function fb_opengraph() { | |
if( is_single() || is_page() ) { | |
echo ' | |
<meta property="og:title" content="Osso Restaurant - Peebles" /> | |
<meta property="og:description" content="Osso Restaurant Peebles - Michelin Bib Gourmand Winner 2011 to 2018" /> | |
<meta property="og:image" content="https://www.ossorestaurant.com/wp-content/uploads/2019/03/facebook-og-image.jpg" />'; | |
} | |
} |
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
DELETE FROM wp_posts WHERE post_type = "revision"; |
NewerOlder