globalis/wp-cubi-helpers 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

globalis/wp-cubi-helpers

Composer 安装命令:

composer require globalis/wp-cubi-helpers

包简介

Collection of wp-cubi functions for WordPress

README 文档

README

Build Status Latest Stable Version License

Collection of wp-cubi functions for WordPress

wp-cubi

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(): int
  • get_size_cache_object(): int
  • reset_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): string
  • time_start(string $timer = 'default'): float
  • time_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): string
  • current_url_starts_with(string $search, bool $remove_query_args = false): bool
  • current_url_ends_with(string $search, bool $remove_query_args = false): bool

Utils

  • str_starts_with(string $string, string $search): bool
  • str_ends_with(string $string, string $search): bool
  • trigger_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 我们能提供哪些服务?
定制开发 / 二次开发

基于 globalis/wp-cubi-helpers 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 27.13k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 16
  • 依赖项目数: 7
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 6
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2017-08-10