Giter Site home page Giter Site logo

Comments (4)

billerickson avatar billerickson commented on June 28, 2024

My opinion:

The purpose of this plugin is to query posts. It's not limited to a certain kind of query or a specific use-case. I personally think all query arguments should be available so it can satisfy all uses of the plugin.

If your specific use-case requires limiting certain query arguments, I think that limit should be implemented through code. You can add this to your theme or core functionality plugin ( http://www.billerickson.net/code/display-posts-lockdown/ ).

from display-posts-shortcode.

danielbachhuber avatar danielbachhuber commented on June 28, 2024

My personal opinion is to keep the argument. I know of at least one WordPress.com user who is keeping pages unpublished so they don't appear elsewhere, but then using the post status argument to dynamically pull in content.

However, in 'untrusted' environments (where editors really don't want contributors to see other posts), the ability to query arbitrary statuses is problematic.

The best option is probably to limit use of post statuses for 'edit_others_posts' and higher caps.

from display-posts-shortcode.

wpsmith avatar wpsmith commented on June 28, 2024

What about just adding a filter for that so users/developers can lock this down tighter if they feel the need?

from display-posts-shortcode.

billerickson avatar billerickson commented on June 28, 2024

@wpsmith a filter is in place. display_posts_shortcode_args lets you control what's included in the WP Query.

Closing this question. Thanks guys for confirming what I thought

from display-posts-shortcode.

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.