Opis
Za każdym razem, gdy tworzysz motyw lub wtyczkę, zawsze trzeba utworzyć własne dane, aby przetestować, czy wtyczka działa, a jako programiści sami mieliśmy ten problem dość często.
Naszym celem jest wypełnienie tej luki, w której masz problem z dobrym rozwiązaniem zarówno dla programistów, jak i użytkowników WordPressa.
Uwaga: wtyczka wymaga PHP 7.4 lub nowszego.
Sprawdź nasze repozytorium GitHub.
Obsługiwane komponenty
- Wpisy
- Własne typy treści
- Metadane
- Obrazek wyróżniający
- Użytkownicy
- Tagi
- Kategorie
- Komentarze
- Własne typy treści
Tworzenie fikcyjnej zawartości
Zwykle programista WordPressa musi wykonać zadanie wypełnienia pustego motywu fikcyjną zawartością, a robienie tego ręcznie może być naprawdę czasochłonne, a głównym powodem stworzenia wtyczki było przyspieszenie tego procesu.
Losowe obrazki wyróżniające
Twórz losowo generowane załączniki jako wyróżnione obrazki dla fikcyjnych treści w WordPressie.
Twórz losowe informacje dodatkowe
WordPress ma pola meta dla użytkowników, wpisów, terminów i komentarzy, FakerPress pozwoli wygenerować własne fikcyjne pola meta dla wszystkich czterech, używając z 20 typów danych.
Usuń wygenerowaną zawartość
Po zakończeniu testów powinno być łatwo usunąć całą zawartość utworzoną za pomocą FakerPressa, więc teraz będzie można to zrobić.
Generuj losowy kod HTML
Tworząc fikcyjne wpisy, tak naprawdę chcesz, aby HTML był naprawdę losowy, aby można było zobaczyć błędy, których import XML by nie wykrył.
Generuj obrazki w swoim HTMLu
Podczas testowania witryny obrazy są ważne, więc FakerPress pozwoli na wyprowadzanie obrazków do testów HTML.
Dane przeglądarki dotyczące komentarzy użytkowników
W przypadku komentarzy nasza wtyczka jest przygotowana do generowania prawdziwych danych przeglądarki zamiast pozostawiania pustego pola.
Generowanie losowych terminów
Do tworzenia i przypisywania terminów będziesz mieć znacznie lepsze narzędzie, które pozwoli wybrać rodzaj taksonomii, którą chcesz przypisać do swoich wpisów, a losowość przypisania zapewni wtyczka.
Losowe profile użytkowników
Jeśli wypełnisz swojego WordPressa dowolnymi danymi dla profili użytkowników, możesz nie złapać przypadku brzegowego, a wtyczka wypełni pola danymi, które będą naprawdę ważne w testach.
Rodzaje uwzględnionych metadanych
- Załącznik
- WP_Query
- Liczba
- Elementy
- List
- Słowa
- Tekst
- HTML
- Lexify
- Asciify
- Regexify
- Osoba
- Informacje geolokalizacji
- Firma
- Data
- Strefa czasowa
- Domena
- IP
- User Agent przeglądarki
Języki
Porzuciliśmy Transifex ze względu na GlotPress na WordPress.org, więc jeśli chcesz przetłumaczyć FakerPress na swój język, postępuj zgodnie z tymi wytycznymi.
Widzisz pole do poprawy?
Świetnie! Istnieje kilka sposobów, w jakie możesz zaangażować się w ulepszanie FakerPressa:
- Zgłoś błędy: Jeśli znajdziesz błąd lub inny problem, zgłoś go! Możesz to zrobić poprzez tworzenie nowego tematu na forum wtyczek. Gdy programista będzie w stanie zweryfikować błąd poprzez jego odtworzenie, utworzy oficjalny raport o błędzie w GitHub, gdzie błąd zostanie rozpatrzony.
- Sugeruj nowe funkcje: Masz świetny pomysł? Podziel się nim! Po prostu utwórz nowy temat na forum wtyczek, aby wyrazić swoje przemyślenia na temat tego, dlaczego funkcja powinna zostać włączona i rozpocząć dyskusję wokół swojego pomysłu.
- Wysyłanie pull requestów: Jeśli jesteś programistą, najłatwiejszym sposobem na zaangażowanie się jest pomoc w sprawach już zgłoszonych w GitHub. Koniecznie zapoznaj się z poradnikiem dla deweloperów.
Dziękujemy, że chcesz uczynić FakerPress lepszym dla wszystkich! Pozdrawiamy Cię.
Recenzje
Kontrybutorzy i deweloperzy
„FakerPress” jest oprogramowaniem open source. Poniższe osoby miały wkład w rozwój wtyczki.
ZaangażowaniWtyczka „FakerPress” została przetłumaczona na 113 języków. Podziękuj tłumaczom za ich wkład.
Przetłumacz wtyczkę “FakerPress” na swój język.
Interesuje cię rozwój wtyczki?
Przeglądaj kod, sprawdź repozytorium SVN lub czytaj dziennik rozwoju przez RSS.
Rejestr zmian
0.6.1 — 04 of April 2023
- Requirement – PHP Version 7.4 required for usage of FakerPress, important step to allow further improvements and tests.
- Version – Updated composer dependency
lucatume/di52
to version3.3.1
. - Version – Updated composer dependency
fakerphp/faker
to version1.21
. - Version – Updated composer dependency
nesbot/carbon to version
2.66`.2 - Fix – Resolve some errors happening with Carbon and version 8.2 of PHP.
0.6.0 — 30 of March 2022
- Requirement – PHP Version 7.1 required for usage of FakerPress, important step to allow further improvements and tests.
- Feature – Modifications to the internal Modules of FakerPress to enable future work around WP-CLI.
- Feature – Include a new way to handle Administration Pages, included here to enable future work.
- Enhancement – Modifications to Select2 Styles for better accessibility usage.
- Tweak – Faker version dependency updated from
fzaninotto/Faker
tofakerphp/Faker/
. - Tweak – Move everything into the FakerPress namespace.
- Tweak – Autoload using Composer properly.
0.5.3 — 04 of March 2022
- Fix – Ensure Select2 usage of AJAX search properly encodes on all usages props @TheMMMdev
- Fix – Ensure Select2 usage of AJAX properly checks for nonces and permissions props @TheMMMdev
0.5.2 — 27 of January 2022
- Feature: Proper changelog page for users trying to figure out what has changed in the latest version of FakerPress.
- Feature: Excerpt size field added to ensure better control over Post generation prop @gtsantos
- Tweak: jQuery 3.5.X compatibility
- Fix: Prevent warning around post_excerpt usage introduced earlier on in the year. props @pattisahusiwa
- Fix: One more PHP 8 compatibility problem related to the generation of passwords props @DumahX
- Fix: Prevent PHP 8 from throwing a warning because of unnecessary
unlink()
call for attachments props @wpuzman - Fix: Resolve problems around failed inline images that were unavailable which would cause a PHP Warning.
0.5.1 — 05 of January 2021
- Feature: Completely change folder structure to comply with PSR-4 autoloading with namespaces.
- Feature: Included a Fields API to more easily generate Fields for controlling fields used in the admin pages.
- Feature: Included a Template class to allow better separation of HTML and PHP files.
- Tweak: Include compatibility with PHP 8+
- Tweak: More well structured
composer.json
and using it’s autoloader. - Tweak: All PHP files now live inside of
src
folder. - Tweak: Moved all files to use the
[]
array syntax. - Tweak: GitHub repository no longer tracks the
vendor
folder. - Fix: Correctly order the
fp_array_get
params with it’s usage props @henrikwirth. - Fix: Make sure WordPress 5.6+ administration proper display fields.
- Fix: Menu icon is properly displayed on version of WordPress 5.5 or higher
0.5.0 — 09 of November, 2019
- Feature: Removed 500px as a image provider as that source was deprecated a while ago.
- Fix: Properly handle downloading of images into WordPress, which makes this a lot safer and faster.
- Fix: Resolved the problem where images from the Meta Attachment were been generated with 0x0 size and breaking the attachment.
- Fix: Removed 500px as a image provider as that source was deprecated a while ago.
- Fix: Moved from Unplash.it to their new name as Lorem Picsum.
- Tweak: Started adding proper docblocks to the new methods. Note it will take a couple versions to have all methods with proper docblocks.
- Tweak: Control timeout of image download with filter
fakerpress.module.attachment.download_url_timeout
defaulting to 10 seconds per attachment. - Tweak: Update required version of PHP to 5.6 to be more along the requirements of WordPress.
- Tweak: Test and update the version of WordPress FakerPress was tested up to, now on 5.3.
- Tweak: Updated the version of fzaninotto/faker (v1.6.0 => v1.8.0)
- Tweak: Updated the version of nesbot/carbon (1.21.0 => 1.39.1)
0.4.11 — 25 of February, 2018
- Fix: Prevent fatals from oversight with Namespace and Classnames for User and Post generation — Thanks @radgh & @johny-dotpad
- Fix: Rollback change to
file_get_contents
it was making peoples servers hang to long — Thanks @bilimokur
0.4.10 — 11 of February, 2018
- Feature: Added size control to Post Content, Comment Content and User Description
- Fix: On image and attachment download we try one more time using
file_get_contents
— Thanks @lazlo-toth - Fix: Resolve Quantity Min and Max fields weird interaction — Thanks @rahmantanvir
0.4.9 — 07 of August, 2017
- Feature: Allow Attachments to be generated with a given Width and Height range — Thanks @COLABORATI
- Feature: Generate
post_excerpt
for Posts (how I forgot that is beyond me) — Thanks @njbarrett - Fix: Meta field rules were not respecting Configurations due to a JavaScript bug on indexing the fields — Thanks @ckpicker
- Fix: Resolve problems where attachments wouldn’t get setup correctly and throw an Empty Message — Thanks @r083r7 and @oyvind_skjelstad
- Fix: Allow Term Meta to generate the fields correctly again — Thanks @stratboy
- Tweak: Prevent
_encloseme
and_pingme
for FakerPress generated Posts
0.4.8 — 18 of July, 2017
- Feature: Now Comments can be generated with different types, allowing for WooCommerce Notes for example – Thanks @dibbyo456
- Feature: Comments for Custom Post Types – Thanks @jasondevine
- Tweak: Added two new filters to Filter Meta Value
fakerpress.module.meta.value
andfakerpress.module.meta.{$key}.value
– Thanks @Mte90 - Fix: Resolve problems on failed Meta generation – Thanks @Mte90
- Fix: Typo on Provider text for Attachment Meta – Thanks @codiceovvio
0.4.7 — 2 of October, 2016
- Feature: Image Attachment Meta Field to allow more Flexibility all around the plugin
0.4.6 — 14 of June, 2016
- Fix: Post Meta and taxonomy is finally working again — Thanks @peachey_a and @zoeitsolutions
- Fix: Allow Meta Number generation using any type of range, doesn’t limit from 0 to 9
0.4.5 — 11 of June, 2016
- Fix: Users Module was using Post Meta methods on flag related methods, preventing the users to be deleted when „Let it Go!” — Thanks @derpixler
- Fix: Taxonomy and Meta Modules had a compatibility problem with Faker, preveting users to use Meta and Taxonomy Properly — Thanks @rayrutjes
- Tweak: Add a better description for a few fields
- Tweak: Include latest code from Faker version > 1.6.0
0.4.4 — 1 of April, 2016
- Feature: Address Meta templating now allows you to fetch Country ABBR and Code — Thanks @kirilisa
- Tweak: Include latest code from Faker version > 1.5.0
- Tweak: WP_Query Meta for attachments is a little bit easier now, prediction of forgotten
post_status
- Tweak: Make the Post Parent selection easier to know which posts by showing more information on the items — Thanks @fxbernard
- Fix: Get some missing Text Domains working — Thanks @ginsterbusch
0.4.3 — 1 of March, 2016
- Feature: No more Hot-linking external sites on Content Images — Thanks b0rg + mvaneijgen + okvee
- Tweak: Use
wp_remote_get
to fetch external images — Thanks revaxarts - Tweak: Improve how we handle the Deletes to make sure it doesn’t delete all your site — Thanks Paul Mckay
- Fix: Prevent Notices from happening when no Image providers were selected
0.4.2 — 9 of November, 2015
- Feature: Include meta for Terms for WordPress 4.4 and Up
- Tweak: Include a more granular control over Taxonomy selector for Posts
- Fix: CSS changes for WordPress 4.4
0.4.1 — 24 of September, 2015
- Tweak: Improve Modules code in general, if you have custom code based on Modules please check (#71)
- Fix: Generate button was locking after a warning for trying a bad request
- Fix: Improved Modules JavaScript to prevent duplicated arguments on AJAX requests — Thanks Jonathan Brinley
0.4.0 — 21 of September, 2015
- Feature: Now Modules use AJAX to fake, AKA no more timeouts for big dummy creation
- Fix: handle WP_Error on term creation, avoids fatal errors if the term already exists — Thanks Jonathan Brinley
0.3.3 — 10 of June, 2015
- Tweak: Our menus and submenus no longer require JavaScript to work
- Tweak: Featured Images now are linked to the post using the
post_parent
column — Reported by Bruno DC - Fix: Dates on Meta fields are fully working again — Thanks Ethan Clevenger
0.3.2 — 25 of May, 2015
- New: Including LoremPixel as a Image Provider — Thanks examinedliving
- Fix: A few JavaScript/jQuery tweeks for better Select2 Handling on Dates
- Fix: Intervals now have a better Handling for non-timed Strings — Thanks alfiemx_
- Fix: Better verification of Carbon inclusion — Thanks Frankie Jarrett
- Fix: Closures now using self variables better, prevents Fatal Error — Thanks fccoelho7
0.3.1 — 02 of May, 2015
- Fix: Date Meta Field is now working as expected
- Fix: Empty meta fields don’t throw Fatal Errors anymore — Thanks Jeffrey Carandang
0.3.0 — 01 of May, 2015
- New: Now you will be able to generate Custom dummy Meta for your Posts, Users and Comments
0.2.2 — 15 of April, 2015
- New: 500px as a Image provider ( You will need a Customer App Key )
- Tweak: New formula for Taxonomy randomization for Posts ( with new filters )
0.2.1 — 02 of April, 2015
- Fix: User generator now working again (sorry about that)
0.2.0 — 01 of April, 2015
- New: Featured Images is now an Option on our Plugin
- New: Handling of Post Meta, still under the hood but preparation for the next versions
0.1.6 — 07 of March, 2015
- Fix: Prevent Carbon to Fatal error if trying to be included twice (#50)
- Tweak: Better checking for the content flag when deleting
0.1.5 — 03 September, 2014
- New: Allow post Parent to be chosen on the Admin Form (#35)
- New: Now allow Image to be used in HTML, with Placehold.it (#38)
- Tweak: Allow users to choose which HTML tags will be used (#37)
- Tweak: User Select2 now uses AJAX to prevent bugs on bigger databases (#43)
- Tweak: Now you can select a range of items to be randomized, instead of always having to input a single number (#44)
0.1.4 — 15 of August, 2014
- New: Delete all content created by Fakerpress (#26)
- New: Allow users to control
comment_status
on Posts (#26) - New: Predefined interval set of dates (#21)
- Tweak: Prevent the user from selecting a bad combination of date fields (#20)
0.1.3 — 25 of June, 2014
- Fixing a problem where the UI folder was not included in the final version
0.1.2 — 24 of June, 2014
- New: Admin messages for all pages (#10)
- New: Select Date range for Comments and Posts (#11)
- New: Select Author sampling group for Posts (#11)
- New: Roles sampling group for Users (#13)
- New: Taxonomies sampling group for Terms (#13)
- New: Selection of Post Type for Posts (#13)
- New: Selection of Terms sampling group for Posts (#13)
- Tweak: Select2 usage to improve fields (#13)
- Fix:
admin_title
been overwritten (#14)
0.1.1 — 17 of June, 2014
- Fatal Error generate by a missing file Carbon related fixed
0.1.0 — 17 of June, 2014
- First initial concept of using Faker to generate data on WordPress