Code Monkey home page Code Monkey logo

wp-hummingbird's Introduction

wp-hummingbird's People

Contributors

lisandi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

wp-hummingbird's Issues

Invalid Sitemap XML

Beginning XML files with a comment technically isn't valid XML and will fail when parsed through many XML parsing packages (such as PHP's SimpleXMLElement object). Having the preg_replace comment prior to parsing XML files as a workaround.

$content = '<!-- This page is cached by the Hummingbird Performance plugin v' . WPHB_VERSION . ' - https://wordpress.org/plugins/hummingbird-performance/. -->';

Allow cookie value for page cache hash to be customizable

First of all, thank you for the excellent performance plugin. It is my favorite.

Hummingbird currently has the ability to take into consideration the cookies when generating cached pages in the get_cookies() function.

I would like to add my own cookie into the list used to generate the hash. I think it would be a great addition the list of cookies could be updated/customizable from the admin interface similar to the Exclusion section.

foreach ( (array) $_COOKIE as $key => $value ) { // Input var ok.
	// Check password protected post, comment author, logged in user.
	if ( preg_match( '/^wp-postpass_|^comment_author_|^wordpress_logged_in_/', $key ) ) {
	      self::log_msg( 'Found cookie: ' . $key );
	      $cookie_value .= $_COOKIE[ $key ] . ','; // Input var ok.
        }
}

This can be be customizable '/^wp-postpass_|^comment_author_|^wordpress_logged_in_/'

This would be useful when running special campaigns and would like to provide alternate information on the same page using a campaign tracking cookie.

Thanks again

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.