3ev Core Wordpress library API
  • Namespace
  • Class

Namespaces

  • Tev
    • Application
      • Bootstrap
    • Author
      • Model
    • Contracts
    • Database
      • CustomTables
    • Field
      • Model
      • Util
    • Plugin
      • Action
      • Shortcode
    • Post
      • Model
      • Repository
    • Taxonomy
      • Model
      • Repository
    • Term
      • Model
      • Repository
    • Util
    • View
      • Exception
  • None

Classes

  • Utils

Class Utils

Useful database utility methods.

Namespace: Tev\Database
Located at Tev/Database/Utils.php

Methods summary

public array
# generatePlaceholders( array $data )

Generate Wordpress WPDB placeholders for inserts/updates, based on the types of values in the given array.

Generate Wordpress WPDB placeholders for inserts/updates, based on the types of values in the given array.

See: http://codex.wordpress.org/Class_Reference/wpdb#Placeholders

Parameters

$data
Key/value pairs

Returns

array
Placeholders
public string
# createSlug( string $data, array $unique = array() )

Generate a slug from the given field.

Generate a slug from the given field.

Uses sanitize_title() to create a slug. If $unique is provided, this method will check if the slug already exists in $unique. If it does, it will append '-1', '-2' etc to the slug until a unique value is found.

Parameters

$data
Data to slugify
$unique
Array of values to ensure slug is unique against

Returns

string
Generated slug
3ev Core Wordpress library API API documentation generated by ApiGen