Compare commits
No commits in common. "70e53fc72128fdf0333cbc2fa3cba7f21fd80c9d" and "f1572798a8c88de9cb8d3fe95cbe23c450956555" have entirely different histories.
70e53fc721
...
f1572798a8
2 changed files with 14 additions and 13 deletions
|
@ -133,8 +133,8 @@ class Event_Source extends Actor {
|
||||||
$object->set_id( $post->guid );
|
$object->set_id( $post->guid );
|
||||||
$object->set_name( $post->post_title );
|
$object->set_name( $post->post_title );
|
||||||
$object->set_summary( $post->post_excerpt );
|
$object->set_summary( $post->post_excerpt );
|
||||||
$object->set_published( gmdate( 'Y-m-d H:i:s', strtotime( $post->post_date ) ) );
|
$object->set_published( gmdate( 'Y-m-d H:i:s', strtotime( $post->post_date_gmt ) ) );
|
||||||
$object->set_updated( gmdate( 'Y-m-d H:i:s', strtotime( $post->post_modified ) ) );
|
$object->set_updated( gmdate( 'Y-m-d H:i:s', strtotime( $post->post_modified_gmt ) ) );
|
||||||
$thumbnail_id = get_post_thumbnail_id( $post );
|
$thumbnail_id = get_post_thumbnail_id( $post );
|
||||||
if ( $thumbnail_id ) {
|
if ( $thumbnail_id ) {
|
||||||
$object->set_icon(
|
$object->set_icon(
|
||||||
|
|
|
@ -101,26 +101,27 @@ class Event_Sources extends WP_List_Table {
|
||||||
// phpcs:enable WordPress.Security.NonceVerification.Recommended
|
// phpcs:enable WordPress.Security.NonceVerification.Recommended
|
||||||
|
|
||||||
$event_sources = Event_Sources_Collection::get_event_sources_with_count( $per_page, $page_num, $args );
|
$event_sources = Event_Sources_Collection::get_event_sources_with_count( $per_page, $page_num, $args );
|
||||||
$total_count = $event_sources['total'];
|
$actors = $event_sources['actors'];
|
||||||
|
$counter = $event_sources['total'];
|
||||||
|
|
||||||
$this->items = array();
|
$this->items = array();
|
||||||
$this->set_pagination_args(
|
$this->set_pagination_args(
|
||||||
array(
|
array(
|
||||||
'total_items' => $total_count,
|
'total_items' => $counter,
|
||||||
'total_pages' => ceil( $total_count / $per_page ),
|
'total_pages' => ceil( $counter / $per_page ),
|
||||||
'per_page' => $per_page,
|
'per_page' => $per_page,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ( $event_sources['actors'] as $event_source ) {
|
foreach ( $actors as $actor ) {
|
||||||
$item = array(
|
$item = array(
|
||||||
'icon' => esc_attr( $event_source->get_icon_url() ),
|
'icon' => esc_attr( $actor->get_icon_url() ),
|
||||||
'name' => esc_attr( $event_source->get_name() ),
|
'name' => esc_attr( $actor->get_name() ),
|
||||||
'url' => esc_attr( object_to_uri( $event_source->get_id() ) ),
|
'url' => esc_attr( object_to_uri( $actor->get_id() ) ),
|
||||||
'accepted' => esc_attr( get_post_meta( $event_source->get__id(), '_event_bridge_for_activitypub_accept_of_follow', true ) ),
|
'accepted' => esc_attr( get_post_meta( $actor->get__id(), '_event_bridge_for_activitypub_accept_of_follow', true ) ),
|
||||||
'identifier' => esc_attr( $event_source->get_id() ),
|
'identifier' => esc_attr( $actor->get_id() ),
|
||||||
'published' => esc_attr( $event_source->get_published() ),
|
'published' => esc_attr( $actor->get_published() ),
|
||||||
'modified' => esc_attr( $event_source->get_updated() ),
|
'modified' => esc_attr( $actor->get_updated() ),
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->items[] = $item;
|
$this->items[] = $item;
|
||||||
|
|
Reference in a new issue