{"id":20094297,"url":"https://github.com/walisc/wpoow","last_synced_at":"2026-01-18T03:23:09.844Z","repository":{"id":65218674,"uuid":"66137443","full_name":"walisc/WPooW","owner":"walisc","description":"WordPress Object Oriented Wrapper - rapid development of plugins and themes","archived":false,"fork":false,"pushed_at":"2023-11-30T20:14:49.000Z","size":38073,"stargazers_count":4,"open_issues_count":15,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-18T16:48:59.218Z","etag":null,"topics":["plugins","theme","wordpress"],"latest_commit_sha":null,"homepage":"https://wpoow.centridsol.tech","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/walisc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-08-20T08:48:18.000Z","updated_at":"2023-01-31T16:44:39.000Z","dependencies_parsed_at":"2023-11-30T21:26:04.802Z","dependency_job_id":"0f212502-bab6-4f87-9aa9-b7e146d5b287","html_url":"https://github.com/walisc/WPooW","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"206c3733b21db915fc8c1e64f6756b36899fe461"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walisc%2FWPooW","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walisc%2FWPooW/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walisc%2FWPooW/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walisc%2FWPooW/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/walisc","download_url":"https://codeload.github.com/walisc/WPooW/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224490614,"owners_count":17319972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["plugins","theme","wordpress"],"created_at":"2024-11-13T16:50:04.234Z","updated_at":"2026-01-18T03:23:09.820Z","avatar_url":"https://github.com/walisc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wordpress Object Oriented Wrapper\n#### An OOP Wordpress wrapper for rapid development\n\nIf you have had to create a custom theme/plugin in WordPress (which requires quite a bit of configuration), you know this can be quite cumbersome. \nThis wrapper aims to simplify this process by providing an object-oriented library which abstracts most of the tasks associated with this.\nBelow is a simple example showing you how you can easily create a Custom [PostType](https://codex.wordpress.org/Post_Types) using this wrapper.\n\n```php\n//functions.php\n\ninclude 'wpAPI/wpAPI.php';\n\n$WPooW = new wpAPI();\n$bookReviewPostType = $WPooW-\u003eCreatePostType(\"_bookReview\", \"Book Review\", true);\n\n$bookReviewPostType-\u003eAddField(new Text(\"_bookTitle\", \"Book Title\"));\n$bookReviewPostType-\u003eAddField(new Text(\"_bookAuthor\", \"Book Author\"));\n$bookReviewPostType-\u003eAddField(new Uploader(\"_bookImage\", \"Book Image\"));\n$bookReviewPostType-\u003eAddField(new MultiSelect(\"_bookCategories\", \"Categories\", [\"Philosophy\" =\u003e \"Philosophy\", \"Auto-Biography\" =\u003e \"Auto-Biography\", \"Fiction\" =\u003e \"Fiction\"]));\n$bookReviewPostType-\u003eAddField(new RichTextArea(\"_mySummary\", \"My Summary\"));\n$bookReviewPostType-\u003eAddField(new Text(\"_myRating\", \"My Rating\"));\n\n$bookReviewPostType-\u003eRender();\n\n\n```\n\nThis will create a custom page (available via wp-admin). See below:-\n\n![intro_images](http://wpoow.devchid.com/images/intro_output_image_input.png)\n\n*Fig1: Grid Layout of new custom type*\n\n\n![intro_images_expanded](http://wpoow.devchid.com/images/intro_main_image_expanded.png)\n\n*Fig2: Adding new custom type*\n\nTo access the data added through the custom PostType, you can use a traditional WordPress query ([`WP_QUERY`](https://codex.wordpress.org/Class_Reference/WP_Query) ) by referencing your declared PostType id  (in the case above, it will be `_bookReview`). WPooW  however, provides a wrapper class which makes it easier to access this data. An example of how you would fetch this data using the WPooW library is below:-\n\n```php+HTML\n\u003cstyle\u003e\n\t.book_block{\n\t\tdisplay: inline-block;\n\t}\n\t.book_img{\n\t\tfloat: left;\n\t\twidth: 50%;\n\t}\n\t.book_img  img{\n\t\theight: 200px;\n\t\twidth: auto;\n\t}\n\n\t.book_details {\n\t\tfloat: right;\n\t\twidth: 45%;\n\t\tpadding-left: 2%;\n\t}\n\n\t.book_details p {\n\t\tfont-size: 14px;\n\t\tmargin-bottom: 2px;\n\t\tmargin-top: 2px;\n\t\tcolor: white;\n\t}\n\u003c/style\u003e\n\n\u003cdiv class=\"wrap\"\u003e\n   \u003c?php\n      $bookReviews = wpAPIObjects::GetInstance()-\u003eGetObject(\"_bookReview\");\n      foreach ($bookReviews-\u003eQuery()-\u003eSelect()-\u003eFetch() as $book)\n      {\n\n         echo '\u003cdiv class=\"book_block\"\u003e';\n         echo ' \u003cdiv class=\"book_img\"\u003e';\n         echo '     \u003cimg src=\"'.json_decode( $book[\"_bookImage\"])-\u003eurl.'\" alt=\"'.$book[\"_bookTitle\"].'\"  \u003e';\n         echo '     \u003c/div\u003e';\n         echo '     \u003cdiv  class=\"book_details\"\u003e';\n         echo \"    \u003cp\u003e\".$book[\"_bookTitle\"].\"\u003c/p\u003e\";\n         echo \"    \u003cp\u003e\".$book[\"_bookAuthor\"].\"\u003c/p\u003e\";\n         echo \"    \u003cp\u003e\". (is_array($book[\"_bookCategories\"]) ? implode(',', $book[\"_bookCategories\"]) : '').\"\u003c/p\u003e\";\n         echo \"    \u003cp\u003e\".$book[\"_myRating\"].\"\u003c/p\u003e\";\n         echo ' \u003c/div\u003e';\n         echo '\u003c/div\u003e';\n\n      }\n   ?\u003e\n\n\u003c/div\u003eResult\n```\n\n\nModifying the WordPress TwentySeventeen theme template our web page could look like:- \n\n![1529530425830](http://wpoow.devchid.com/images/intro_output_image.png)\n\n## Documentation\n\nThe WPooW library is fully documented at [http://wpoow.devchid.com](http://wpoow.devchid.com/). If you think of anything else that should be documented that's not there, please do give a shout. \n\n## Contributing\n\nWPooW is an opensource project and contributions are valued. \n\nIf you are contributing a bug fix, please create a pull request with the following details\n* The problem/bug you are addressing \n* The version of WPooW the fix is for \n* How you tested the fix \n\nIf it's a new feature, please add it as a issue with the label enhancement, detailing the new feature and why you think it's needed. Will discuss it there and once it's agreed upon you can create a pull request with the details highlighted above. \n\n## Authors\n\n* **Chido Warambwa** - *Initial Work* - [devchid.com](http://devchid.com) \n  \n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n## Notes\n\nThis library is designed to be used by developers for creating WordPress themes and plugins. It is not a plugin or a theme in and off itself. \n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalisc%2Fwpoow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwalisc%2Fwpoow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalisc%2Fwpoow/lists"}