Title: Basic Plugin Question
Last modified: August 18, 2016

---

# Basic Plugin Question

 *  [fncll](https://wordpress.org/support/users/fncll/)
 * (@fncll)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/basic-plugin-question/)
 * OK, so I know I can write a plugin that has the code:
 * add_filter(‘bloginfo’, ‘strtoupper’);
 * and all the bloginfo content will be set to uppercase (blog title, description,
   etc).
 * But how do I change something specific, for instance what if I wanted *only* 
   the description from bloginfo to be uppercase?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Joshua Sigar](https://wordpress.org/support/users/alphaoide/)
 * (@alphaoide)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/basic-plugin-question/#post-313900)
 * `function toUpperBlogDescription($info, $show) {
    if ($show == 'blogdescription'){
   $info = strtoupper($info);  } return $info; }
 * `add_filter('bloginfo', 'toUpperBlogDescription')`
 * Off the top of my head, something like that minus the error if any.
 *  Thread Starter [fncll](https://wordpress.org/support/users/fncll/)
 * (@fncll)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/basic-plugin-question/#post-313902)
 * This gives an error looking for the second argument for toUpperBlogDescription…
 * I’m not sure if this code actually is doing what I am wanting to do, which is
   change the specific call to bloginfo(‘description’) rather than every instance
   of the bloginfo() function (which is built-in to PHP)
 *  [Joshua Sigar](https://wordpress.org/support/users/alphaoide/)
 * (@alphaoide)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/basic-plugin-question/#post-313904)
 * `function toUpperBlogDescription($info, $show) {
    if ($show == 'description'){
   $info = strtoupper($info); } return $info; }
 * `//add_filter('filter_name', 'filter_func', priority, number of arguments)
    add_filter('
   bloginfo', 'toUpperBlogDescription', 10, 2);
 * The filter function **toUpperBlogDescription** is indeed invoked for every call
   to **bloginfo**; however, only if you retrieve the **description** then the output
   is converted to uppercase.
 *  Thread Starter [fncll](https://wordpress.org/support/users/fncll/)
 * (@fncll)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/basic-plugin-question/#post-313969)
 * Thanks! That did it. That last parameter when you call add_filter (the number
   of arguments) wasn’t shown on the wiki pages I was using… and it of course makes
   all the difference 🙂
 * I’m going to fix/update the wiki pages when I go back.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Basic Plugin Question’ is closed to new replies.

## Tags

 * [description](https://wordpress.org/support/topic-tag/description/)
 * [developing](https://wordpress.org/support/topic-tag/developing/)

 * 4 replies
 * 2 participants
 * Last reply from: [fncll](https://wordpress.org/support/users/fncll/)
 * Last activity: [20 years, 4 months ago](https://wordpress.org/support/topic/basic-plugin-question/#post-313969)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
