{"id":24716710,"url":"https://github.com/baylorrae/wp-elements","last_synced_at":"2026-05-19T09:32:07.285Z","repository":{"id":1098067,"uuid":"957780","full_name":"BaylorRae/WP-Elements","owner":"BaylorRae","description":"WP Elements is a series of classes to make building WordPress plugins easy. Whether your creating a meta box or adding navigation menus, it's a breeze.","archived":false,"fork":false,"pushed_at":"2012-08-28T12:16:30.000Z","size":108,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-27T09:13:59.114Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaylorRae.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-10-03T04:46:46.000Z","updated_at":"2015-11-03T13:43:42.000Z","dependencies_parsed_at":"2022-07-18T16:28:43.902Z","dependency_job_id":null,"html_url":"https://github.com/BaylorRae/WP-Elements","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaylorRae%2FWP-Elements","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaylorRae%2FWP-Elements/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaylorRae%2FWP-Elements/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaylorRae%2FWP-Elements/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaylorRae","download_url":"https://codeload.github.com/BaylorRae/WP-Elements/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244932908,"owners_count":20534250,"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":[],"created_at":"2025-01-27T09:14:00.267Z","updated_at":"2026-05-19T09:32:07.257Z","avatar_url":"https://github.com/BaylorRae.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"### About WP Elements\nWP Elements is a series of classes to make building WordPress plugins easy. Whether your creating a meta box or adding navigation menus, it's a breeze.\n\nThe demo pages will show you the structure WP Elements classes use and all of the methods inside each class. The commented lines are the optional parameters with their default value.\n\n### Making a form\n\n```php\n// Goes on the post page and will be a form box\n$form = new metaBox(array(\n\t  'isFormBox' =\u003e true,\n\t  'type' =\u003e 'post',\n\t  'id' =\u003e 'whatDoYaThink',\n\t  'title' =\u003e 'What Do Ya Think?'\n\t));\n\n$form-\u003eaddInput(array(\n    'id' =\u003e 'tellme',\n    'label' =\u003e 'Tell Me',\n    // 'desc' =\u003e null,\n    // 'value' =\u003e null,\n    // 'size' =\u003e 'regular'\n  ));\n\n// Regular textarea\n$form-\u003eaddTextarea(array(\n    'id' =\u003e 'more',\n    'label' =\u003e 'Give Me More',\n    // 'desc' =\u003e null,\n    // 'value' =\u003e null,\n    // 'cols' =\u003e 30,\n    // 'rows' =\u003e 5,\n    // 'width' =\u003e 500\n  ));\n\n// TinyMCE form (still very buggy)\n$form-\u003eaddEditor(array(\n    'id' =\u003e 'evenmore',\n    'label' =\u003e \"Don't Hold Back On Me\",\n    // 'desc' =\u003e null,\n    // 'value' =\u003e null\n  ));\n```\n\n### Just a box\n\n```php\n$box = new metaBox(array(\n\t  'type' = 'post',\n\t  'id' =\u003e 'aBox',\n\t  'title' =\u003e 'A Box',\n\t  'context' =\u003e 'side'\n\t));\n\n$box-\u003ehtml('\u003ch3\u003eThis is my box\u003c/h3\u003e');\n\n$box-\u003eparagraph('Please use it, and click my \u003ca href=\"#\"\u003elink\u003c/a\u003e');\n```\n\t\n### Making a top level navigation menu\nHelps to read the WordPress Codex on [Adding Administration Menus](http://codex.wordpress.org/Adding_Administration_Menus)\n\n```php\n$topPage = new topMenuLink(array(\n    'page_title' =\u003e 'What Up',\n    'menu_title' =\u003e 'Check me out',\n    'capability' =\u003e 'manage_options',\n    'menu_slug' =\u003e 'what-up',\n    'function' =\u003e 'whatUp',\n    'has_separator' =\u003e null // (before, after, both)\n  ));\n\nfunction whatUp() {\n  echo 'Hey';\n}\n\n// This will create a subpage under 'What Up'\n$topPage-\u003eaddSubLink(array(\n    'parent_slug' =\u003e 'what-up',\n    'page_title' =\u003e 'This is useful',\n    'menu_title' =\u003e 'need to know!',\n    'capability' =\u003e 'manage_options',\n    'menu_slug' =\u003e 'what-up-page2',\n    'function' =\u003e 'whatUp2'\n  ));\n\nfunction whatUp2() {\n  echo 'Check this out!';\n}\n```\n\t\n### Adding sub level navigation items\n\n```php\n// This will go under the Dashboard tab\n$subPage = new subMenuLink(array(\n    'parent_slug' =\u003e 'index.php', // slug of dashboard tab\n    'page_title' =\u003e 'Analytics',\n    'menu_title' =\u003e 'Analytics',\n    'capability' =\u003e 'manage_options',\n    'menu_slug' =\u003e 'what-up-page2',\n    'function' =\u003e 'analytics'\n  ));\n\nfunction analytics() {\n  echo '\u003cdiv class=\"wrap\"\u003e\u003ch2\u003eYour Analytics\u003c/h2\u003e\u003c/div\u003e';\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaylorrae%2Fwp-elements","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaylorrae%2Fwp-elements","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaylorrae%2Fwp-elements/lists"}