This file contains hidden or 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
#!/bin/bash | |
echo $# | |
this_date=`date +"%Y-%m-%d"` | |
this_time=`date +"%H:%M:%S"` | |
if [ $# -eq 1 ] | |
then | |
this_date=`date +"%Y-%m-%d"` | |
this_time=${1} |
This file contains hidden or 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
// always exclude the first story from index pages! | |
if (!function_exists('archive_exclude_first_post')) { | |
function archive_exclude_first_post($query) | |
{ | |
if (is_admin() || !is_archive() || !$query->is_main_query()) { | |
return; | |
} | |
$offset = 1; | |
$posts_per_page = get_option('posts_per_page'); |
This file contains hidden or 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 | |
class EvalFileWithArgs_Command extends WP_CLI_Command { | |
/** | |
* Load and execute a PHP file after loading WordPress. | |
* | |
* ## EXAMPLES | |
* | |
* wp eval-file-with-args my-code.php arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 |
NewerOlder