export_date_options [ WordPress Function ]
export_date_options ( $post_type = 'post' )
| Defined at: |
|
Benzer Fonksiyonlar: update_option, populate_options, get_site_option, get_alloptions, no_update_actions
No description yet.
Source
<?php
function export_date_options( $post_type = 'post' ) {
global $wpdb, $wp_locale;
$months = $wpdb->get_results( $wpdb->prepare( "
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
FROM $wpdb->posts
WHERE post_type = %s AND post_status != 'auto-draft'
ORDER BY post_date DESC
", $post_type ) );
$month_count = count( $months );
if ( !$month_count || ( 1 == $month_count && 0 == $months[0]->month ) )
return;
foreach ( $months as $date ) {
if ( 0 == $date->year )
continue;
$month = zeroise( $date->month, 2 );
echo '<option value="' . $date->year . '-' . $month . '">' . $wp_locale->get_month( $month ) . ' ' . $date->year . '</option>';
}
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- PHPXRef 0.7 : WordPress : /wp-admin/export.php source
option> 153 <?php export_date_options(); ?> ... option> 157 <?php export_date_options(); ?> ... option> 185 <?php export_date_options( 'page' ); ?> ...
phpxref.ftwr.co.uk - <?php /** * WordPress Export Administration Screen * * @package ...
option> <?php export_date_options(); ?> </select> </li> <li> <label><?php _e( ' Status:' ); ?></label> <select name="post_status"> <option value="0"><?php _e( ...
core.svn.wordpress.org - PHP Cross Reference - WordPress - Source: /wp-admin/export.php
option> 153 <?php export_date_options(); ?> 154 </select> 155 ... option> 157 < ?php export_date_options(); ?> ... option> 185 <?php export_date_options(); ?> ...
phpcrossref.com - populate_options (WordPress Function) - WPSeek.com
Similar Functions: update_option, export_date_options, populate_roles, delete_option, mu_options. Create WordPress options and set the default values.
wpseek.com