/** * 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; }
/** * 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; }
/** * Display the post summary. * * @uses Filters\the_excerpt */ function the_summary() { /** * Filter the displayed post summary. * * @uses Filters\get_the_excerpt * @see get_the_summary() * * @param string $post_excerpt The post excerpt. */ echo apply_filters('the_excerpt', get_the_summary()); }
/** * @todo Document */ function the_summary($chars = 150) { echo get_the_summary($chars); }