vsko
8/30/2013 - 7:55 PM

Тестовый плагин "Added Title"

Тестовый плагин "Added Title"

<?php
/*
Plugin Name: Added Title (example)
Plugin URI: http://zoom.net.ua/wp/example.zip
Author: vsko
Author URI: http://zoom.net.ua/
*/

$string = "This is a string from plugin `example`";

function example_added_title($title)
{
    global $string;
    return $title . ' -> ' . $string;
}

function my_uninstall_hook()
{
    delete_option('my_option');
}

add_filter('the_title', 'example_added_title');
register_deactivation_hook(__FILE__, 'my_uninstall_hook');