ID}" ] = [ get_field( 'jupiterx_header_type', $post->ID ), get_field( 'jupiterx_header_behavior', $post->ID ), ]; } return $columns; } /** * Modify coupon list table columns. * * @since 1.1.0 * @param array $columns Columns. * @param array $posts Posts. */ public function modify_coupon_list_table_columns( $columns, $posts ) { $columns['labels'] = [ esc_html__( 'Author', 'sellkit' ), esc_html__( 'Created at', 'sellkit' ), ]; foreach ( $posts as $post ) { $author_id = get_post_field( 'post_author', $post->ID ); $columns['values'][ "post_{$post->ID}" ] = [ [ 'name' => get_the_author_meta( 'display_name', $author_id ), 'param' => 'author__in', 'type' => 'search', 'value' => $author_id, ], get_the_date( 'Y/m/d h:i A', $post->ID ), ]; } return $columns; } /** * Modify discount list table columns. * * @since 1.1.0 * @param array $columns Columns. * @param array $posts Posts. */ public function modify_discount_list_table_columns( $columns, $posts ) { $columns['labels'] = [ __( 'Author', 'sellkit' ), __( 'Created at', 'sellkit' ), ]; foreach ( $posts as $post ) { $author_id = get_post_field( 'post_author', $post->ID ); $columns['values'][ "post_{$post->ID}" ] = [ [ 'name' => get_the_author_meta( 'display_name', $author_id ), 'param' => 'author__in', 'type' => 'search', 'value' => $author_id, ], get_the_date( 'Y/m/d h:i A', $post->ID ), ]; } return $columns; } /** * Modify alert list table columns. * * @since 1.1.0 * @param array $columns Columns. * @param array $posts Posts. */ public function modify_alert_list_table_columns( $columns, $posts ) { $columns['labels'] = [ esc_html__( 'Author', 'sellkit' ), esc_html__( 'Created at', 'sellkit' ), ]; foreach ( $posts as $post ) { $author_id = get_post_field( 'post_author', $post->ID ); $columns['values'][ "post_{$post->ID}" ] = [ [ 'name' => get_the_author_meta( 'display_name', $author_id ), 'param' => 'author__in', 'type' => 'search', 'value' => $author_id, ], get_the_date( 'Y/m/d h:i A', $post->ID ), ]; } return $columns; } /** * Modify discount list table columns. * * @since 1.1.0 * @param array $columns Columns. * @param array $posts Posts. */ public function modify_funnel_list_table_columns( $columns, $posts ) { $columns['labels'] = [ __( 'Author', 'sellkit' ), __( 'Created at', 'sellkit' ), ]; foreach ( $posts as $post ) { $author_id = get_post_field( 'post_author', $post->ID ); $columns['values'][ "post_{$post->ID}" ] = [ [ 'name' => get_the_author_meta( 'display_name', $author_id ), 'param' => 'author__in', 'type' => 'search', 'value' => $author_id, ], get_the_date( 'Y/m/d h:i A', $post->ID ), ]; } return $columns; } } Sellkit_Admin_Components::get_instance();