芝麻web文件管理V1.00
编辑当前文件:/www/wwwroot/shphe-en.com/wp-content/plugins/admin-columns-pro/classes/columns/post/child-pages.php
properties['type'] = 'column-child-pages'; $this->properties['label'] = __( 'Child Pages', 'codepress-admin-columns' ); } public function get_value( $post_id ) { $titles = array(); // display title with link if ( $ids = $this->get_raw_value( $post_id ) ) { foreach ( $ids as $id ) { $link = get_edit_post_link( $id ); if ( $title = get_the_title( $id ) ){ $title = $link ? "
{$title}
" : $title; $titles[] = $title . "
"; } } } return implode( $titles ); } public function get_raw_value( $post_id ) { $ids = get_posts( array( 'post_type' => $this->storage_model->post_type, 'post_parent' => $post_id, 'fields' => 'ids' , 'posts_per_page' => -1 ) ); return $ids; } public function apply_conditional() { return is_post_type_hierarchical( $this->storage_model->post_type ) || post_type_supports( $this->storage_model->post_type, 'page-attributes' ); } }