//put this code into functions.php
function my_project_updated_write_alert( $post_id ) {
// If this is just a revision, don't send the email.
if ( wp_is_post_revision( $post_id ) )
return;
$post_title = get_the_title( $post_id );
$post_url = get_permalink( $post_id );
$message = "`".Date("Y/m/d H:i:s")."` ";
$message .="`". $post_title . "` `" . $post_url."` \n";
file_put_contents("/tmp/my_project_updated_write_alert.txt", $message, FILE_APPEND | LOCK_EX);
}
add_action( 'save_post', 'my_project_updated_write_alert' );
add_action( 'before_delete_post', 'my_project_updated_write_alert' );
<script src="<?php bloginfo('template_url'); ?>/js/slides.min.jquery.js"></script>
BY: Farid Ahmadian
TAG: php, wordpress
DATE: 2012-01-1 00:00:01
With many thanks and best wishes for dear Pejman Moghadam, someone who taught me alot in linux and life :)