-
Notifications
You must be signed in to change notification settings - Fork 1
Hook
kazunao-anahara edited this page Oct 25, 2018
·
4 revisions
This hook allows you to modify the valid page.
- $screen_ids – the valid page settings array.This can be modified and then returned.
function my_subthree_link_screen_id( $screen_ids ) {
if ( in_array( 'edit-page', $screen_ids ) ) {
$key = array_search( 'edit-page', $screen_ids );
unset( $screen_ids[$key] );
}
$screen_ids[] = 'edit-custom-post-type';
return $screen_ids;
}
add_filter( 'subthree_link_screen_id', 'my_subthree_link_screen_id');This hook allows you to modify the valid query var.
- $keys – the valid query var settings array.This can be modified and then returned.
function my_subthree_link_query_vars( $keys ) {
if ( in_array( 's', $keys ) ) {
$key = array_search( 's', $keys );
unset( $keys[$key] );
}
$keys[] = 'post_parent';
return $keys;
}
add_filter( 'subthree_link_query_vars', 'my_subthree_link_query_vars');This hook allows you to modify the view link.
- $link – the link url string.This can be modified and then returned.
function my_subthree_link_change( $link ) {
$link = $link . '&hoge=huga';
return $link;
}
add_filter( 'subthree_link_change', 'my_subthree_link_change');