can_edit_network

過濾鉤子
apply_filters( 'can_edit_network', $result, $network_id )
引數
  • (bool) $result Whether the network can be edited from this page.
    Required:
  • (int) $network_id The network ID to check.
    Required:
定義位置
相關勾子
get_networkthe_networksclean_network_cachepre_get_networksparse_network_query
相關方法
can_edit_networkget_networkwp_get_networkget_networksupgrade_networkinstall_network
引入
3.1.0
棄用
-

can_edit_network: 這是WordPress中的一個過濾器鉤子,允許開發者修改使用者是否可以編輯網路設定的決定。can_edit_network鉤子將預設的決定作為一個引數傳遞,鉤子函式可以返回一個修改過的決定來代替使用。這對於為編輯網路設定新增自定義限制或許可權很有用。

過濾這個網路是否可以從這個頁面進行編輯。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'can_edit_network', $result, $network_id );
return apply_filters( 'can_edit_network', $result, $network_id );
return apply_filters( 'can_edit_network', $result, $network_id );

常見問題

FAQs
檢視更多 >