{"id":23146635,"url":"https://github.com/zeekinteractive/wp-utils","last_synced_at":"2025-07-23T08:05:48.910Z","repository":{"id":57089692,"uuid":"90153789","full_name":"ZeekInteractive/wp-utils","owner":"ZeekInteractive","description":"Re-usable functionality to make development faster and easier","archived":false,"fork":false,"pushed_at":"2024-04-09T19:58:38.000Z","size":417,"stargazers_count":3,"open_issues_count":3,"forks_count":3,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-07-23T08:04:41.582Z","etag":null,"topics":["package"],"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/ZeekInteractive.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-05-03T13:45:53.000Z","updated_at":"2023-02-27T18:50:27.000Z","dependencies_parsed_at":"2022-08-20T16:50:07.434Z","dependency_job_id":"1d9a87a3-138a-402b-98c1-f116a8a5449c","html_url":"https://github.com/ZeekInteractive/wp-utils","commit_stats":{"total_commits":123,"total_committers":5,"mean_commits":24.6,"dds":0.5691056910569106,"last_synced_commit":"176a5d64a3b94cbd3673f65cd44aca24d1f8cbda"},"previous_names":[],"tags_count":85,"template":false,"template_full_name":null,"purl":"pkg:github/ZeekInteractive/wp-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeekInteractive%2Fwp-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeekInteractive%2Fwp-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeekInteractive%2Fwp-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeekInteractive%2Fwp-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZeekInteractive","download_url":"https://codeload.github.com/ZeekInteractive/wp-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeekInteractive%2Fwp-utils/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266640830,"owners_count":23960809,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["package"],"created_at":"2024-12-17T16:33:50.663Z","updated_at":"2025-07-23T08:05:48.884Z","avatar_url":"https://github.com/ZeekInteractive.png","language":"PHP","readme":"# WordPress Utils\n[![Build Status](https://travis-ci.com/ZeekInteractive/wp-utils.svg?token=G7VpgBxZppY89CGiy3Pn\u0026branch=develop)](https://travis-ci.com/ZeekInteractive/wp-utils)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/0cea33cc3eb4454ab05b31bf87a721d8)](https://www.codacy.com?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=ZeekInteractive/wp-utils\u0026amp;utm_campaign=Badge_Grade)\n[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/0cea33cc3eb4454ab05b31bf87a721d8)](https://www.codacy.com?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=ZeekInteractive/wp-utils\u0026utm_campaign=Badge_Coverage)\n\nUtility functions that make life just a little bit easier.\n\n## Database\n\n### `db_transaction( $callable, $args = [] )`\nRun the given callback within a database transaction, rolling back the transaction if an error occurs.\n\n### `get_raw_option_value( $key )`\nPerforms a very direct, simple query to the WordPress Options table that bypasses normal WP caching.\n\n### `get_id_from_slug( $slug, $post_type = 'post', $force = false )`\nPerforms a lookup for a post given a slug.\n\n### `get_meta_key_from_meta_value()`\nPerform a reverse lookup for a meta key based on a meta value.\n\n## ACF\n\n### `get_acf_meta_value_by_acf_key()`\nUse this when you know an ACF field key and a post ID, but the field is within a group.\n\n### `is_acf_loadable()` (Deprecated)\nCheck to see if ACF is loadable and if ACF_LITE is true.\n\n## Users\n\n### `generate_unique_username( $username )`\nAppends a counter to the given username which is incremented until there is no user with that username.\n\n## Misc\n\n### `get_current_url()`\nReturns the current URL.\n\n### `get_current_url_clean()`\nReturns the current URL, but without query args.\n\n### `get_user_display_name( $user_id )`\nEasily get the user display name by the user ID.\n\n### `get_env_value( $key, $filter = null )`\nHelper function to check for an environmental variable in a variety of places: $_ENV (for setting via .env.php files), Constant (for setting via a define() call), Filter, utilizing a passed in filter\n\n### `remove_filters_for_anonymous_class( $hook_name = '', $class_name = '', $method_name = '', $priority = 10 )`\nRemove a filter/action from an anonymous class\n\n### `add_inline_svg()`\nChecks if SVG file exists before grabbing its contents\n\n### `get_current_datetime()`\nGets a DateTime object set to WordPress's local timezone\n\n### `get_site_timezone()`\nGet a DateTimeZone object that is set to the site's local timezone.\n\n### `init_term( $slug, $taxonomy )`\nChecks for and returns a term by the slug. Initializes the term if it does not yet exist.\n\n## Behaviors / Filters\n\nThese must be initiated by creating the `\\Zeek\\WP_Util\\Behaviors()` class.\n\n### `file_mod_allowed`\nBy default, disable file modifications (plugin adding, deleting, theme file editing, etc). Override with an `env` constant: `FILE_MOD_ALLOWED`.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeekinteractive%2Fwp-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeekinteractive%2Fwp-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeekinteractive%2Fwp-utils/lists"}