API REST Posts

ຄຳອະທິບາຍ

API REST Posts adds two public REST API endpoints for listing recent posts:

  • Latest posts from a specific category.
  • Latest posts from the whole site.

The plugin settings page lets site administrators configure the date format and the number of words returned in each excerpt. Each post response also includes category data.

Privacy

This plugin does not collect or store user data, does not set cookies, and does not connect to third-party services.

ການຕິດຕັ້ງ

  1. Upload the plugin folder to the /wp-content/plugins/ directory, or install it from the WordPress plugins screen.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. Go to Settings > API REST Posts to configure the date format and excerpt word limit.

ຄຳຖາມທີ່ພົບເລື້ອຍ

How do I get latest posts by category?

Use this endpoint and replace 1 with the category ID and 3 with the number of posts to return:

https://example.com/wp-json/last-post/v2/category/1/numberposts/3

How do I get latest posts from the whole site?

Use this endpoint and replace 3 with the number of posts to return:

https://example.com/wp-json/last-post/v2/numberposts/3

Does this plugin collect personal data?

No. The plugin does not collect, store, or send personal data to third parties.

ການຣີວິວ

ບໍ່ມີການຣີວິວສຳລັບປລັກອິນນີ້.

ຜູ້ຮ່ວມພັດທະນາ ແລະ ຜູ້ພັດທະນາ

“API REST Posts” ແມ່ນຊອຟແວໂອເພັນຊອດ (Open Source). ບຸກຄົນຕໍ່ໄປນີ້ໄດ້ມີສ່ວນຮ່ວມໃນການພັດທະນາປລັກອິນນີ້.

ຜູ້ຮ່ວມພັດທະນາ

ແປ “API REST Posts” ເປັນພາສາຂອງເຈົ້າ.

ສົນໃຈຮ່ວມພັດທະນາບໍ່?

ເບິ່ງລະຫັດ, ກວດເບິ່ງ ຄັງເກັບ SVN, ຫຼື ຕິດຕາມ ບັນທຶກການພັດທະນາ ຜ່ານ RSS.

ບັນທຶກການປ່ຽນແປງ

1.2

  • Added category data to each REST API post response.

1.1

  • Added settings sanitization and escaped admin output.
  • Added safe defaults for unsaved settings.
  • Updated REST route registration with explicit public permissions.