Skip to content
kazunao-anahara edited this page Oct 25, 2018 · 4 revisions

subthree_link_screen_id

Overview

This hook allows you to modify the valid page.

Parameters

  • $screen_ids – the valid page settings array.This can be modified and then returned.

Usage

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');

subthree_link_query_vars

Overview

This hook allows you to modify the valid query var.

Parameters

  • $keys – the valid query var settings array.This can be modified and then returned.

Usage

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');

subthree_link_change

Overview

This hook allows you to modify the view link.

Parameters

  • $link – the link url string.This can be modified and then returned.

Usage

function my_subthree_link_change( $link ) {
	$link = $link . '&hoge=huga';
	return $link;
}

add_filter( 'subthree_link_change', 'my_subthree_link_change');

Clone this wiki locally