Example #1
0
/**
 * Display a notice to the users why the styles are disabled
 */
function pressit_button($actions)
{
    global $wp_url;
    $press_url = sprintf($wp_url, urlencode(get_the_link()), urlencode(get_the_title()), urlencode(get_the_summary()));
    $actions[] = '<a href="' . $press_url . '" class="pressit_button">Press It</a>';
    return $actions;
}
Example #2
0
/**
 * Add the link to the item actions
 *
 * @param array $actions Previous actions
 * @return array Array with Press It added.
 */
function pressit_button($actions)
{
    $wp_url = get_option('pressit_wpurl', '');
    if (empty($wp_url)) {
        return $actions;
    }
    $wp_url .= 'wp-admin/press-this.php?u=%1$s&t=%2$s&s=%3$s';
    $press_url = sprintf($wp_url, urlencode(get_the_link()), urlencode(get_the_title()), urlencode(get_the_summary()));
    $actions[] = '<a href="' . $press_url . '" class="pressit_button">Press It</a>';
    return $actions;
}
Example #3
0
/**
 * @todo Document
 */
function the_link()
{
    echo get_the_link();
}