globalis/wp-cubi-helpers
Composer 安装命令:
composer require globalis/wp-cubi-helpers
包简介
Collection of wp-cubi functions for WordPress
README 文档
README
Collection of wp-cubi functions for WordPress
Requirements
- PHP 8.0, 8.1 or 8.2
Installation
composer require globalis/wp-cubi-helpers
Available functions
Cache
flush_cache_all()flush_cache_wpdb()flush_cache_object()get_size_cache_wpdb(): intget_size_cache_object(): intreset_cache_wpdb(int $size)reset_cache_object(int $size)pop_cache_wpdb()pop_cache_object()savequeries_enabled(): bool
Debug
mysql_enable_nocache_mod()mysql_disable_nocache_mod()query_set_nocache(string $query): stringtime_start(string $timer = 'default'): floattime_elapsed(string $timer = 'default', bool $human = true)memory_get_usage_kb(bool $human = true, bool $real_usage = false)memory_get_usage_mb(bool $human = true, bool $real_usage = false)memory_get_peak_usage_kb(bool $human = true, bool $real_usage = false)memory_get_peak_usage_mb(bool $human = true, bool $real_usage = false)memory_usage_format(float $usage, string $unit, bool $human)
Filters
add_filter(string $tag, callable $function_to_add, int $priority = 10, int $accepted_args = 1)add_action(string $tag, callable $function_to_add, int $priority = 10, int $accepted_args = 1)remove_filter_anonymous_object(string $tag, string $class_name, string $method_name, int $priority = 10): bool
Mails
wp_mail_html($to, string $subject, string $message, $headers = [], $attachments = []): bool
Permalinks
get_permalink_by_template(string $template, $default = false)
Templating
include_template_part($file, $data = [], $return = false)
Urls
get_current_url(bool $remove_query_args = false): stringcurrent_url_starts_with(string $search, bool $remove_query_args = false): boolcurrent_url_ends_with(string $search, bool $remove_query_args = false): bool
Utils
str_starts_with(string $string, string $search): boolstr_ends_with(string $string, string $search): booltrigger_404(\WP_Query $query = null)override_php_limits(int $time_limit = 604800, string $memory_limit = '512M')
Development
Before opening pull requests, please check and apply project coding standards with ./vendor/bin/phpcs . and/or ./vendor/bin/phpcbf .
globalis/wp-cubi-helpers 适用场景与选型建议
globalis/wp-cubi-helpers 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 27.13k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2017 年 08 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「helpers」 「composer」 「wordpress」 「wp」 「functions」 「snippets」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 globalis/wp-cubi-helpers 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 globalis/wp-cubi-helpers 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 globalis/wp-cubi-helpers 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
HTML and form generation
This composer plugin enables installation of GravityForms WordPress plugin and its addons.
Falsy helps you manage half-truths with PHP
Simple ASCII output of array data
Generate a Composer repository from installed WordPress plugins and themes.
统计信息
- 总下载量: 27.13k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 16
- 依赖项目数: 7
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2017-08-10
