use title instead of titlelink

This commit is contained in:
Matthias Pfefferle 2020-02-11 10:03:59 +01:00
parent d7a2b9a237
commit 9b894a7d14
3 changed files with 3 additions and 3 deletions

View file

@ -59,7 +59,7 @@ class Admin {
'description' => \__( 'Use title and link, summary or full content', 'activitypub' ),
'show_in_rest' => array(
'schema' => array(
'enum' => array( 'titlelink', 'excerpt', 'content' ),
'enum' => array( 'title', 'excerpt', 'content' ),
),
),
'default' => 'content',

View file

@ -204,7 +204,7 @@ class Post {
return $this->get_the_post_summary();
}
if ( 'titlelink' === \get_option( 'activitypub_post_content_type', 'content' ) ) {
if ( 'title' === \get_option( 'activitypub_post_content_type', 'content' ) ) {
return $this->get_the_title();
}

View file

@ -18,7 +18,7 @@
</th>
<td>
<p>
<label><input type="radio" name="activitypub_post_content_type" id="activitypub_post_content_type_title_link" value="titlelink" <?php echo \checked( 'titlelink', \get_option( 'activitypub_post_content_type', 'content' ) ); ?> /> <?php \esc_html_e( 'Title and link', 'activitypub' ); ?></label> - <span class="description"><?php \esc_html_e( 'Only the title and a link.', 'activitypub' ); ?></span>
<label><input type="radio" name="activitypub_post_content_type" id="activitypub_post_content_type_title_link" value="title" <?php echo \checked( 'title', \get_option( 'activitypub_post_content_type', 'content' ) ); ?> /> <?php \esc_html_e( 'Title and link', 'activitypub' ); ?></label> - <span class="description"><?php \esc_html_e( 'Only the title and a link.', 'activitypub' ); ?></span>
</p>
<p>
<label><input type="radio" name="activitypub_post_content_type" id="activitypub_post_content_type_excerpt" value="excerpt" <?php echo \checked( 'excerpt', \get_option( 'activitypub_post_content_type', 'content' ) ); ?> /> <?php \esc_html_e( 'Excerpt', 'activitypub' ); ?></label> - <span class="description"><?php \esc_html_e( 'A content summary, shortened to 400 characters and without markup.', 'activitypub' ); ?></span>