Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




_wp_mysql_week [ WordPress Function ]

_wp_mysql_week ( $column )
Parameters:
  • (string) $column
Returns:
  • (string)
Defined at:



Returns a MySQL expression for selecting the week number based on the start_of_week option.

Source


<?php
function _wp_mysql_week$column ) {
    switch ( 
$start_of_week = (int) get_option'start_of_week' ) ) {
    default :
    case 
:
        return 
"WEEK( $column, 0 )";
    case 
:
        return 
"WEEK( $column, 1 )";
    case 
:
    case 
:
    case 
:
    case 
:
    case 
:
        return 
"WEEK( DATE_SUB( $column, INTERVAL $start_of_week DAY ), 0 )";
    }
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics