WordPress.org

Plugin Directory

Changeset 597397


Ignore:
Timestamp:
09/11/12 08:53:07 (19 months ago)
Author:
Latz
Message:

Added filter.

Location:
linklist
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • linklist/trunk/linklist.php

    r397029 r597397  
    33Plugin Name: Linklist 
    44Description: Adds a list of mentioned links at the end of the post, page or feed. 
    5 Plugin URI: http://www.elektroelch.de/hacks/wp/pagebar 
    6 Version: 0.1 
     5Plugin URI: http://wordpress.org/extend/plugins/linklist/ 
     6Version: 0.2 
     7Requires at least: 2.9 
     8Tested up to: 3.5 
     9Stable tag: trunk 
    710Author: Lutz Schröer 
    811Author URI: http://elektroelch.de/blog 
    912*/ 
     13 
    1014 
    1115/*  This program is free software; you can redistribute it and/or modify 
     
    5862        } 
    5963        /* ------------------------------------------------------------------------ */ 
    60     function createLinkList() { 
     64        function createLinkList() { 
    6165 
    6266            if ($this->stopCreate()) 
    6367              return $this->content; 
    6468 
    65       $this->linklist = $this->linkExtractor($this->content); 
     69            $this->linklist = $this->linkExtractor($this->content); 
    6670            if (! $this->linklist) 
    6771              return $this->content; 
     
    7175                return $this->content; 
    7276 
    73       if ($this->options[$this->prefix . 'sort']) 
     77            if ($this->options[$this->prefix . 'sort']) 
    7478                usort($this->linklist, array('LinkList', 'linklist_sorter')); 
    7579 
     
    103107 
    104108          $list .= $end . "</div>"; 
     109          $list = apply_filters('linklist', $list); 
    105110          $this->content .= $list; 
    106111 
  • linklist/trunk/readme.txt

    r397029 r597397  
    157157</div> 
    158158 
     159= Filter = 
     160You can programmatically change the content of the linklist by adding a filter: 
     161 
     162<?php 
     163  add_filter('linklist', 'my_linklist'); 
     164 
     165  function my_linklist($list) { 
     166    [...] 
     167  } 
     168 
    159169 
    160170== Credits == 
     
    163173       
    164174== Changelog == 
     175= v0.2 = 
     176+ Added: filter for link list (11 SEP 2012) 
    165177 
    166178= v0.1 = 
Note: See TracChangeset for help on using the changeset viewer.