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 | |
WP_Post::__set_state( | |
array( | |
'ID' => 123, | |
'post_author' => '1', | |
'post_date' => '2019-02-08 06:24:07', | |
'post_date_gmt' => '2019-02-08 12:24:07', | |
'post_content' => '', | |
'post_title' => '', |
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
func showNotification() -> Void { | |
var notification = NSUserNotification() | |
notification.title = "Test from Swift" | |
notification.informativeText = "The body of this Swift notification" | |
notification.soundName = NSUserNotificationDefaultSoundName | |
NSUserNotificationCenter.defaultUserNotificationCenter().deliverNotification(notification) | |
} | |
//showNotification() |
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 | |
/** | |
* This adds `post_type` and `post_status` to the query that happens during `post_exists()` so it can utilize the `type_status_date` index on `wp_posts`. | |
* Hooked on `query` during `wp_import_post_data_raw` and removed during `wp_import_existing_post`. | |
* | |
* Modifies a query like this from `post_exists()`: | |
* SELECT ID FROM wp_posts WHERE 1=1 AND post_date = '2020-07-01 09:30:00' AND post_title = 'Some Post Title' | |
* | |
* To this: |
OlderNewer