Skip to content

Widget cc org#22

Merged
hugosolar merged 3 commits intomasterfrom
widget-cc-org
Aug 26, 2020
Merged

Widget cc org#22
hugosolar merged 3 commits intomasterfrom
widget-cc-org

Conversation

@hugosolar
Copy link
Copy Markdown
Contributor

Description

This PR adds a widget to obtain news from a certain category directly from creativecommons.org using WP-API.
Also, the simple entry component was updated to work with external data

phpcbf was used to fix format issues following the WordPress standards

Technical details

  • The requested data is attached to 1-hour transient to avoid too many requests to the API.
  • Each widget has its own transient data
  • The transients are deleted when save button is clicked on the widget configuration

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main or master).
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no
    visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@hugosolar hugosolar requested review from a team as code owners August 26, 2020 18:22
@hugosolar hugosolar self-assigned this Aug 26, 2020
Copy link
Copy Markdown
Member

@zackkrida zackkrida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool widget and the formatting fixes look good.

Comment thread inc/widgets/cc-org-news.php Outdated
function __construct() {
$widget_ops = array(
'classname' => 'widget-org-news',
'description' => 'Show the last categorized news from the main CC website',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor correction: last latest.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh you're right! thank you!

@hugosolar hugosolar merged commit 9748640 into master Aug 26, 2020
@hugosolar hugosolar deleted the widget-cc-org branch August 26, 2020 19:57
@JackieBinya JackieBinya mentioned this pull request Sep 16, 2020
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants