GithubHelp home page GithubHelp logo

Comments (6)

toolstack avatar toolstack commented on June 18, 2024

Could there be a reason to keep it for the different filter names?

I'm thinking of GP plugins that could filter GP redirects without having to process ALL WP redirects as well?

from glotpress.

ocean90 avatar ocean90 commented on June 18, 2024

We could do something like this:

add_filter( 'wp_redirect', function( $location, $status ) {
    return add_filter( 'gp_redirect', $location, $status );
}, 10, 2 );

from glotpress.

toolstack avatar toolstack commented on June 18, 2024

That would just call gp_redirect each time wp_redirect was called correct?

No real benefit to that unless we only set it during the router or some other point that only executes when a glotpress page is being displaed.

from glotpress.

ocean90 avatar ocean90 commented on June 18, 2024

@toolstack "like this". ;)

The filter would only be registered in https://github.com/deliciousbrains/GlotPress/blob/wordpress-plugin-dbi/gp-includes/route.php#L119

from glotpress.

toolstack avatar toolstack commented on June 18, 2024

That would do the trick.

from glotpress.

A5hleyRich avatar A5hleyRich commented on June 18, 2024

Not bothering with the filter, as per:

https://wordpress.slack.com/archives/glotpress/p1445520712000314

from glotpress.

Related Issues (20)

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.