Last active
August 29, 2015 14:06
-
-
Save polevaultweb/3c88508a3318c690361f to your computer and use it in GitHub Desktop.
This is a plugin that allows you to tweak the functionality of Instagrate Pro plugin. Add it to your wp-content/plugins folder and activate as you would a normal plugin
This file contains hidden or 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: Site Functions | |
Description: Functionality changes to WordPress, plugins, and themes instead of using functions.php. | |
Version: 0.1 | |
License: GPL | |
Author: Your Name | |
Author URI: yoururl | |
*/ | |
add_action( 'publish_post', 'igp_publish_post' ); | |
function igp_publish_post( $post_id ) { | |
if ( ( $type = get_post_meta( $post_id, 'bk_post_video_type', true ) ) ) { | |
add_post_meta( $post_id, '_bk_post_video_type', $type ); | |
delete_post_meta( $post_id, 'bk_post_video_type' ); | |
} | |
if ( ( $link = get_post_meta( $post_id, 'bk_video_post_self_hosted_m4v_link', true ) ) ) { | |
add_post_meta( $post_id, '_bk_video_post_self_hosted_m4v_link', $link ); | |
delete_post_meta( $post_id, 'bk_video_post_self_hosted_m4v_link' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment