{"id":21984313,"url":"https://github.com/amireshoon/wpsbuilder","last_synced_at":"2026-05-07T01:39:02.823Z","repository":{"id":114263428,"uuid":"313729287","full_name":"amireshoon/wpsbuilder","owner":"amireshoon","description":"WordPress Settings Page Builder ","archived":false,"fork":false,"pushed_at":"2020-12-12T14:59:54.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-28T05:11:19.928Z","etag":null,"topics":["wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://gitlab.com/amirhwsin/wordpress-settings-page-builder","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amireshoon.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-17T20:02:04.000Z","updated_at":"2024-11-25T11:14:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"8646b55d-354d-4aa0-a790-488e9137c117","html_url":"https://github.com/amireshoon/wpsbuilder","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amireshoon%2Fwpsbuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amireshoon%2Fwpsbuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amireshoon%2Fwpsbuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amireshoon%2Fwpsbuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amireshoon","download_url":"https://codeload.github.com/amireshoon/wpsbuilder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245044493,"owners_count":20551898,"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":["wordpress","wordpress-plugin"],"created_at":"2024-11-29T18:08:32.005Z","updated_at":"2026-05-07T01:39:02.767Z","avatar_url":"https://github.com/amireshoon.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Settings Builder\n\n[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=amireshoon\u0026layout=compact)](https://github.com/anuraghazra/github-readme-stats)\n[![Open Source Love svg3](https://badges.frapsoft.com/os/v3/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/)\n\nWpsBuilder is a tool to create wordpress like setting page or edit page.\n\n  - Can add Menu or submenu\n  - Support most of input types\n  - Support callback response function\n\n# Supported inputs\nAll the inputs uses wordpress classes.\n  - Text Input\n  - Hidden input\n  - Text Area\n  - Select box\n  - Radio Groups\n  - CheckBoxes\n  - Media Selector (Still in development)\n  - Text (p tag)\n\nYou can also:\n  - Set forms method (post,get,put,...)\n  - Set Page and menu Title\n  - Set page description\n\n# Installation\n\nWpsBuilder requires [WordPress](https://wordpress.com/) v4+ and [php](https://php.net) v5.6+ to run.\n\nInstall using composer.\n\n```php\n$ composer require amirhwsin/wpsbuilder\n```\n\nor install manually, first download package.\n\n```php\nrequire_once('wpsBuilder/wpsBuilder.php');\n```\n\n# Usage\n\nWpsBuilder have simple and easy syntax, you can see some examples for menu or submenu cases.\n\n### Create Menu\n\n\n```php\n$builder = new wpsBuilder();\n$builder-\u003eaddMenu('magical_menu')\n        -\u003esetPosition(6)\n        -\u003esetCapability('manage_options')\n        -\u003esetIconUrl('dashicons-editor-code')\n        -\u003esetPageTitle('Magic is real')\n        -\u003esetMenuTitle('See Magic')\n        -\u003esetPageDescription('This page can do some magics for you.')\n        -\u003esetFormMethod('post')\n        -\u003einput('pass', 'Password',  array(['key' =\u003e 'type', 'value' =\u003e 'password']))\n        -\u003etextArea('describe_ys', 'Describe yourself to me')\n        -\u003ehiddenInput('hidden_value','thats_right')\n        -\u003etext('yu','Username', 'amirhwisn *You cant edit this')\n        -\u003echeckbox('cbid', 'Do magic can happen?', 'Shall we play magic?', true)\n        -\u003eradio('radio', array('field_1' =\u003e 'this one', 'field_2' =\u003e 'that one'),'Which you choose?', 'that one')\n        -\u003eselect('selectbox', array('key1'=\u003e 'one', 'key2' =\u003e 'two'), 'title', 'two')\n        -\u003emedia('media_id', 'Choose Profile picture')\n        -\u003ebuild();\n```\n\n### Create Submenu\n```php\n$builder = new wpsBuilder();\n$builder-\u003eattachToMenu('magical_menu')\n         -\u003esetPageTitle('This is a little magic')\n         -\u003esetMenuTitle('Menu Title')\n         -\u003esetCapability('manage_options')\n         -\u003esetMenuSlug('magical_submenu')\n         ...\n         -\u003ebuild();\n```\n\n### Get Response and store data\nYou can call ```response``` function and pass a function as an argument and do your stuff.\nWhen you call ```response``` you get a variable from your declared function can called anything thats your data that collected from form.\nRemember at the end you should pass an array from your ```function``` that first element is response message like unvalid errors or success message and second one should be ```true``` or ```false``` as success or failed; In case of null passed or nothing passed no messages will be shown at the page.\n```php\n$builder-\u003eresponse(function($res) {\n        print_r($res);\n        return array('message', true);\n});\n```\n\n\n# Todos\n\n - Develope media functions\n - Create a usefull document\n - Add more inputs\n\n# License\nGPL2\n\n**Free Software, Hell Yeah!**\n**Feel free to contribute**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famireshoon%2Fwpsbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famireshoon%2Fwpsbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famireshoon%2Fwpsbuilder/lists"}