WordPress.org

Ready to get started?Download WordPress

Forums

pagebar
Plugin Suggestion - Additional Class Names (3 posts)

  1. Wee Beastie
    Member
    Posted 2 years ago #

    Great plugin! I found it particularly useful for paginated single posts, where the default WordPress options leave something to be desired. Thank you!

    I have one minor suggestion:

    Add class names to next and previous page links. Let's use previous page link as an example:

    <a class="prev-page" href="#">Previous Page</a>
    <span class="inactive prev-page">Previous Page</a>

    I think doing this for both the previous and next page links would add a nice bit of flexibility to your plugin, with minimal changes to the plugin itself. I edited the plugin to do this like so:

    function previousPage($paged) {
    
    	if ($this->pbOptions ["pdisplay"] == "never")
    		return;
    
    	if (($this->paged == 1) && ($this->pbOptions ["pdisplay"] == "auto"))
    		return;
    
    	$text = $this->tagReplace($this->pbOptions ["prev"], $this->paged);
    	echo ($this->paged == 1) ? '<span class="inactive prev-page">' . $text . "</span>\n" : '<a class="prev-page" href="' .
    				$this->create_link ( $this->paged - 1 ) . '"' . $this->tooltip ($this->paged - 1 ) . '>' .
    				$text . "</a>\n";
    }

    Pretty simple, but you may want to handle it differently (if at all). Feel free to take or leave this suggestion -- just putting it out there in case it seems sensible to you. Thanks again for a great plugin!

  2. Lutz Schröer
    Member
    Plugin Author

    Posted 2 years ago #

    Your suggestion sounds very reasonable. I will implement them in the next version of pagebar.

  3. Wee Beastie
    Member
    Posted 2 years ago #

    Glad to hear it. Thanks again!

    Ps. Do you accept PayPal donations?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags