GithubHelp home page GithubHelp logo

isabella232 / wp-cubi-helpers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from globalis-ms/wp-cubi-helpers

0.0 0.0 0.0 60 KB

Collection of wp-cubi functions for WordPress

Home Page: https://github.com/globalis-ms/wp-cubi-helpers

License: GNU General Public License v2.0

PHP 100.00%

wp-cubi-helpers's Introduction

wp-cubi-helpers

Build Status Latest Stable Version License

Collection of wp-cubi functions for WordPress

wp-cubi

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')

wp-cubi-helpers's People

Contributors

davddo avatar pierre-dargham avatar sandrafrade avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.