Skip to content

Instantly share code, notes, and snippets.

@kopepasah
Last active August 29, 2015 14:01
Show Gist options
  • Save kopepasah/c94d11dcdcd93df06bda to your computer and use it in GitHub Desktop.
Save kopepasah/c94d11dcdcd93df06bda to your computer and use it in GitHub Desktop.
Filter WordPress Link Query Args to Show Scheduled Items

Filter WordPress Link Query Args to Show Scheduled Items

Full tutorial can be found on kopepasah.com.

License

GNU General Public License v2 or later.

This code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Learn, use, share and enjoy!

<?php
/**
* Filter WP Link Query Arguments
*
* @param $query Current link query.
*/
function koop_wp_link_query_args( $query ) {
$query['post_status'] = array( 'publish', 'future' );
return $query;
}
add_filter( 'wp_link_query_args', 'koop_wp_link_query_args' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment