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 | |
/* | |
Plugin Name: Migrate comment likes | |
Version: 0.1 | |
Description: Migrate comment likes from WP Comment Rating Pro to Ulike | |
Author: Daniel Koskinen / Zeeland Family | |
Author URI: http://wordpress.zeelandfamily.fi/ | |
*/ | |
if ( defined( 'WP_CLI' ) && WP_CLI ) { |
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 support for correct UTF8 orderby for post_title (äöå) | |
* | |
* @param string $orderby ordering clause for query | |
* | |
* @return string ordering clause for query | |
*/ | |
add_filter('posts_orderby', function($orderby) use ($wpdb) { | |
if(strstr($orderby, '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
( function( $ ) { | |
// ****************************** | |
// * facebook.js | |
// * | |
// * @author Digitoimisto Dude Oy | |
// * @version 03.11.2016 | |
// ****************************** | |
$(document).ready(function() { |
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
$ wp post list --format=ids | xargs wp post update --comment_status=closed | |
# Output: | |
# Success: Updated post 2514. | |
# Success: Updated post 2511. | |
# Success: Updated post 2504. | |
# Success: Updated post 2499. | |
# Success: Updated post 2441. | |
# etc... |