Comments (1)
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)
- Adding flexible content HOT 2
- Publish a new release? HOT 1
- Hellonico\Fixtures\Provider\Picsum::imageUrl must be compatible with Faker\Provider\Image::imageUrl
- New release with updated FakerPHP dependencies and fix for method signature matching
- export fixtures HOT 1
- Picsum declaration incompatible HOT 1
- Feature Request: Delete content added to existing posts HOT 1
- Translatable content and fixtures HOT 1
- How to use before value in Yaml file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wp-cli-fixtures.