globalis/wp-cubi-helpers

Collection of wp-cubi functions for WordPress

0.2.1 2018-05-09 08:56 UTC

README

Build Status Latest Stable Version License

Collection of wp-cubi functions for WordPress

wp-cubi

Available functions

Filters

  • add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1)
  • add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1)
  • remove_filter_anonymous_object($tag, $class_name, $method_name, $priority = 10)

Mails

  • wp_mail_html($to, $subject, $message, $headers = [], $attachments = [])

Permalinks

  • get_permalink_by_template($template, $default = false)

Templating

  • include_template_part($file, $data = [], $return = false)

Urls

  • get_current_url($remove_query_args = false)
  • current_url_starts_with($search, $remove_query_args = false)
  • current_url_ends_with($search, $remove_query_args = false)

Utils

  • str_starts_with($string, $search)
  • str_ends_with($string, $search)
  • trigger_404($query = null)
  • override_php_limits($time_limit = 604800, $memory_limit = '512M')