Giter Site home page Giter Site logo

Feature request about wp-cli-fixtures HOT 1 CLOSED

nlemoine avatar nlemoine commented on June 14, 2024
Feature request

from wp-cli-fixtures.

Comments (1)

nlemoine avatar nlemoine commented on June 14, 2024

Hi @reegodev,

Option entity

I already thought about adding options but they can't really be considered as an entity. There's no "model", no metadata table. It makes then harder to handle them in a package like this. You can't flag them as "fake". add_option/update_option doesn't return even the option ID as it's a key/value model.

However, most of your content is supposed to be stored out of the options table. Any reason/use case why you would need to generate fake data in the options table? This package isn't intended to set options, It's focused on content. Maybe Dictator is what you're looking for?

Ability to keep pages when deleting posts

IMHO, this is a very specific feature request of your specific workflow. Someone could ask to keep some specific post type, some specific terms from a custom taxonomy, etc.

You can easily delete the _fake meta of pages by running this query:

wp db query "DELETE wp_postmeta FROM wp_postmeta INNER JOIN wp_posts ON wp_posts.ID = wp_postmeta.post_id WHERE wp_postmeta.meta_key = '_fake' AND wp_posts.post_type = 'page'"

Pages won't then deleted when running wp fixtures delete.

This package is about generating fake content, I'd like to keep it that way for now. I may reconsider this if others users ask for it.

from wp-cli-fixtures.

Related Issues (10)

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.