Jak modifikovat vzhled a délku anotace

Zdroj: „Improving WordPress’ the_excerpt() template tag“:http://www.aaronrussell.co.uk/blog/improving-wordpress-the_excerpt/

WordPress’ **the_excerpt()** template tag is used in most themes for browsing the archives and categories of a blog. Rather than displaying the full content of the post, the excerpt displays a short snippet of the content. Unless you manually enter in an excerpt when writing each post, WordPress grabs the first 55 words of the post and uses that as the excerpt.

So far so good, but there are problems with the way WordPress does this. These include:

* Word count – 55 words is a good number, but what if you want more or less?
* Formatting – WordPress strips out all HTML tags. This gets rid of images and links, but can also get rid of paragraph formatting, making the entire excerpt one long paragraph without any line breaks.
* JavaScript – Unfortunately JavaScript isn’t stripped out, which can result in some plugins’ messy script appearing in your excepts. Not only does this look rubbish, it can be a vulnerability too.

Stačí z **wp-includes/formatting.php** zkopírovat funkci **wp_trim_excerpt**, přejmenovat ji třeba na **better_excerpt** a vložit ji do **functions.php** (Vzhled > Upravit soubory)

/—code php
function better_excerpt($text) {
global $post;
if ( “ == $text ) {
$text = get_the_content(“);
$text = apply_filters(‚the_content‘, $text);
$text = str_replace(‚]]>‘, ‚]]>‘, $text);
$text = strip_tags($text); // můžu zakázat
$excerpt_length = 55; // můžu změnit délku
$words = explode(‚ ‚, $text, $excerpt_length + 1);
if (count($words)> $excerpt_length) {
array_pop($words);
array_push($words, ‚[…]‘);
$text = implode(‚ ‚, $words);
}
}
return $text;
}
\—

Na závěr je nutno na konec **functions.php** vložit ještě následující 2 řádky, které způsobí, že WP místo vestavěné funkce **wp_trim_excerpt** použije naši vylepšenou **better_excerpt**.

/—code php
remove_filter(‚get_the_excerpt‘, ‚wp_trim_excerpt‘);
add_filter(‚get_the_excerpt‘, ‚better_excerpt‘);
\—

Implementováno na tomto webu.

**Customizing the Read More**
„http://codex.wordpress.org/Customizing_the_Read_More“:http://codex.wordpress.org/Customizing_the_Read_More

změna textu odkazu:

/—code php

\—

„Useful ways to customize and format the WordPress more tag »“:http://digwp.com/2010/01/wordpress-more-tag-tricks/

**Advanced Excerpt Plugin**
„http://wordpress.org/extend/plugins/advanced-excerpt/“:http://wordpress.org/extend/plugins/advanced-excerpt/

This plugin adds several improvements to WordPress‘ default way of creating excerpts.

– Keeps HTML markup in the excerpt (and you get to choose which tags are included)
– Trims the excerpt to a given length using either character count or word count
– Only the ‚real‘ text is counted (HTML is ignored but kept)
– Customizes the excerpt length and the ellipsis character that are used
– Completes the last word or sentence in an excerpt (no weird cuts)
– Adds a read-more link to the text
– Ignores custom excerpts and use the generated one instead
– Theme developers can use the_advanced_excerpt() for even more control (see the „FAQ“:http://wordpress.org/extend/plugins/advanced-excerpt/faq/)

Vytváření uživatelských polí v administračním rozhraní

**Flutter**
„http://wordpress.org/extend/plugins/fresh-page/“:http://wordpress.org/extend/plugins/fresh-page/
„http://flutter.freshout.us/“:http://flutter.freshout.us/

Flutter is a feature rich WordPress CMS plugin that focuses on easy templating for the developer and simplifies content management for the admin by creating custom write panels that can be fully customized (radio buttons, file uploads, image uploads, checkboxes, etc).

Flutter also includes power image manipulation (automatic resizing, cropping, watermarking, etc), edit in place (works instantly!), and modulation of your themes.

Rozšířené nastavení uživatelských práv

**Capability Manager**
„http://wordpress.org/extend/plugins/capsman/“:http://wordpress.org/extend/plugins/capsman/
„http://alkivia.org/wordpress/capsman/“:http://alkivia.org/wordpress/capsman/

The Capability Manager plugin provides a simple way to manage role capabilities. Using it, you will be able to change the capabilities of any role, add new roles, copy existing roles into new ones, and add new capabilities to existing roles. You can also delegate capabilities management to other users. In this case, some restrictions apply to this users, as them can only set/unset the capabilities they have. With the Backup/Restore tool, you can save your Roles and Capabilities before making changes and revert them if something goes wrong.

Použito na soutěžním webu Fujitsu.

**User Role Editor**
„http://wordpress.org/extend/plugins/user-role-editor/“:http://wordpress.org/extend/plugins/user-role-editor/

With User Role Editor WordPress plugin you can change user role (except Administrator) capabilities easy, with a few clicks. Just turn on check boxes of capabilities you wish to add to the selected role and click „Update“ button to save your changes. That’s done. Add new roles and customize its capabilities according to your needs, from scratch of as a copy of other existing role.

**Adminimize**
„http://wordpress.org/extend/plugins/adminimize/“:http://wordpress.org/extend/plugins/adminimize/

Adminimize is a powerful free plugin that lets you control who has power over every aspect of your website. You can deactivate every possible option you can think of and control what admin, editors, authors, contributors and subscribers can do. The plugin automatically recognises any new user groups you have created too. In short, it gives you complete control over what every user on your site can and cannot do. It works well with a number of other popular plugins too and is updated fairly regularly.
Lets you hide ‚unnecessary‘ items from the WordPress backend.

Úprava administračního rozhraní

**CMS Post Control**
„http://wordpress.org/extend/plugins/wp-cms-post-control/“:http://wordpress.org/extend/plugins/wp-cms-post-control/
„http://wp-cms.com/our-wordpress-plugins/wp-cms-post-control-plugin/“:http://wp-cms.com/our-wordpress-plugins/wp-cms-post-control-plugin/

Post Control gives you complete control over your write options for every user level/role in WordPress. It not only allows you to **hides unwanted items like custom fields, trackbacks, revisions etc**. but also gives you a whole lot more control over how WordPress deals with creating content.

Simplify the and customise the write post and page areas of WordPress and just show the controls you need. Great for de-cluttering – do you really need those pingback and trackback options… now you can decide what users can see and use!

You can also disable autosaves, revisions and disable the Flash uploader and **hide different items for each user role** – administrator, editor, author and even contributor.

[* http://s.wordpress.org/extend/plugins/wp-cms-post-control/screenshot-1.png?r=227376 *]

Vylepšená administrace příspěvků

**Admin Management Xtended**
„http://wordpress.org/extend/plugins/admin-management-xtended/“:http://wordpress.org/extend/plugins/admin-management-xtended/
„http://www.schloebe.de/wordpress/admin-management-xtended-plugin/“:http://www.schloebe.de/wordpress/admin-management-xtended-plugin/

When it comes to editing posts or pages quickly without having to open each post or page in a new tab or window, it isn’t a very efficient process. For those who are using WordPress as a CMS, it’s important to be able to manage contents easily and quickly. That’s what this plugin helps to do.

It adds some icons to the posts/pages management panel with AJAX-driven CMS-known functions like toggling post/page visibility, changing publication date and title without having to open the edit screens or reload the page, plus changing page order with drag’n’drop, inline category management and inline tag management, plus much more.

Implementováno na tomto webu.

Odstranění položek v administračním rozhraní

**Admin Trim Interface**
„http://wordpress.org/extend/plugins/admin-trim-interface/“:http://wordpress.org/extend/plugins/admin-trim-interface/
„http://coffee2code.com/wp-plugins/admin-trim-interface“:http://coffee2code.com/wp-plugins/admin-trim-interface

This plugin uses a combination of CSS (when possible) and Javascript to removed specified admin interface elements. These elements may be considered by some to be superfluous interface elements that are undesired for one reason or another, so this plugin aids in their visual removal.

Each admin interface element is individually selected for removal. The elements that can be removed are:

* WordPress logo
* The „Visit site“
* The favorites shortcut dropdown
* The „Howdy,“ greeting before your username
* Your username link to your profile
* The „Turbo“ link
* The Dashboard link
* The page header icon
* The contextual „Help“ link
* The footer links
* The WordPress version in the footer

Skrytí položek menu v administraci

**Trim Admin Menu**
„http://wordpress.org/extend/plugins/trim-admin-menu/“:http://wordpress.org/extend/plugins/trim-admin-menu/

Hide menu items in the admin interface from non-admin users. It’s still possible for them to access the corresponding pages by entering the URL directly.
This plug-in perfectly complements „Admin Trim Interface“:163, a plug-in capable of hiding other elements of the admin interface.

Úprava vzhledu nástěnky

**Clean WP Dashboard**
„http://wordpress.org/extend/plugins/clean-wp-dashboard/“:http://wordpress.org/extend/plugins/clean-wp-dashboard/
„http://github.com/sant0sk1/clean-wp-dashboard“:http://github.com/sant0sk1/clean-wp-dashboard

Adds an options page for an Administrator to choose which default WordPress dashboard widgets are available.

**Alternativy:**

„**Dashboard Pages**“:http://wordpress.org/extend/plugins/dashboard-pages/
This simple plugin is designed for sites that are using WordPress as a content management system rather than a blogging platform. Rather than have a majority of the dashboard widgets focused on new blog posts and comments it puts the sites page listing front and center in the dashboard for easier and quicker content management.

„**Dashboard skip**“:http://kahi.cz/wordpress/dashboard-skip-plugin/
Od Kahiho, zruší nástěnku a umožňuje zobrazit stránku v administraci podle vlastních preferencí.

„**Dashboard Editor**“:http://wordpress.org/extend/plugins/wordpress-dashboard-editor/ (tohle zřejmě už nefunguje ve WP 2.9+)
This plugin allows you to add whatever you want to the WordPress dashboard through PHP and HTML even Sidebar Widgets. You can also wipe the entire dashboard or individually remove some of the more irritating sections.

GD Press Tools

**GD Press Tools**
„http://wordpress.org/extend/plugins/gd-press-tools/“:http://wordpress.org/extend/plugins/gd-press-tools/
„http://info.dev4press.com/gd-press-tools/features.html“:http://info.dev4press.com/gd-press-tools/features.html

GD Press Tools is a collection of various administration, seo, maintenance, backup and security related tools. This tools can be integrated into the various WordPress admin panels, can perform maintenance operations, change some aspects of WordPress, see detailed server settings and information. Plugin can also track posts and pages views for various popularity lists.