This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add_thumbnail_column( $columns ) { | |
$columns['thumbnail'] = __( 'Featured Images' ); | |
return $columns; | |
} | |
function display_thumbnail_column( $column_name, $post_id ) { | |
if ( $column_name == 'thumbnail' ) { | |
if ( has_post_thumbnail( $post_id ) ) { | |
echo get_the_post_thumbnail( $post_id, array( 50, 50 ) ); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add_thumbnail_column( $columns ) { | |
$post_type = isset( $_REQUEST['post_type'] ) ? $_REQUEST['post_type'] : 'post'; | |
if ( post_type_supports( $post_type, 'thumbnail' ) ) { | |
$columns['thumbnail'] = __( 'Featured Images' ); | |
} | |
return $columns; | |
} | |
function display_thumbnail_column( $column_name, $post_id ) { | |
if ( $column_name == 'thumbnail' ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo '======= Start script ' . date( 'Y-m-d H:i:s' ) . ' ======' . "\n"; | |
require_once( dirname( __FILE__ ) . '/path-to/wp-load.php' ); | |
$current_time = current_time( 'mysql' ); | |
$published_ids = array(); | |
$sql = " | |
SELECT ID | |
FROM $wpdb->posts | |
WHERE post_status = 'future' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: StaticPress for Mobile | |
Plugin URI: | |
Description: | |
Author: Hitoshi Omagari | |
Version: 1.0 | |
Author URI: | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Files ~ "^\.ht"> | |
Deny from all | |
</Files> | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_URI} !\.(gif|css|js|swf|jpeg|jpg|jpe|png|ico|swd|pdf|svg|eot|ttf|woff)$ | |
RewriteCond %{REQUEST_FILENAME} !-f |