Skip to content

Instantly share code, notes, and snippets.

View antonlukin's full-sized avatar

Anton Lukin antonlukin

View GitHub Profile
@antonlukin
antonlukin / wordpress-wordcount.php
Last active March 26, 2019 20:47
Posts word count in WordPress admin
<?php
add_action('save_post', function($post_id, $post, $update) {
$word_count = explode(" ", strip_shortcodes($post->post_content));
update_post_meta($post_id, '_wordcount', count($word_count));
}, 10, 3);
add_filter('manage_posts_columns', function($columns){

git remote set-url --add --push origin git://original/repo.git

git remote set-url --add --push origin git://another/repo.git