Add Bluesky share button

Also reorder buttons and add nofollow.
This commit is contained in:
Tetrakern 2024-10-20 12:59:26 +02:00
parent df6e4853dd
commit fc2a1eaae4
3 changed files with 29 additions and 7 deletions

View File

@ -366,6 +366,12 @@ define( 'FICTIONEER_OPTIONS', array(
'sanitize_callback' => 'fictioneer_sanitize_checkbox',
'default' => 0
),
'fictioneer_disable_bluesky_share' => array(
'name' => 'fictioneer_disable_bluesky_share',
'group' => 'fictioneer-settings-general-group',
'sanitize_callback' => 'fictioneer_sanitize_checkbox',
'default' => 0
),
'fictioneer_delete_theme_options_on_deactivation' => array(
'name' => 'fictioneer_delete_theme_options_on_deactivation',
'group' => 'fictioneer-settings-general-group',
@ -1089,6 +1095,7 @@ function fictioneer_get_option_label( $option ) {
'fictioneer_disable_tumblr_share' => __( 'Disable Tumblr share button', 'fictioneer' ),
'fictioneer_disable_reddit_share' => __( 'Disable Reddit share button', 'fictioneer' ),
'fictioneer_disable_mastodon_share' => __( 'Disable Mastodon share button', 'fictioneer' ),
'fictioneer_disable_bluesky_share' => __( 'Disable Bluesky share button', 'fictioneer' ),
'fictioneer_delete_theme_options_on_deactivation' => __( 'Delete all settings and theme mods on deactivation', 'fictioneer' ),
'fictioneer_enable_jquery_migrate' => __( 'Enable jQuery migrate script', 'fictioneer' ),
'fictioneer_disable_properties' => __( 'Disable Fictioneer CSS properties', 'fictioneer' ),

View File

@ -1018,6 +1018,15 @@ $images = get_template_directory_uri() . '/img/documentation/';
?>
</div>
<div class="fictioneer-card__row">
<?php
fictioneer_settings_label_checkbox(
'fictioneer_disable_bluesky_share',
__( 'Disable Bluesky share button', 'fictioneer' )
);
?>
</div>
<div class="fictioneer-card__row">
<?php
fictioneer_settings_label_checkbox(

View File

@ -26,35 +26,41 @@ $story_link = get_post_meta( get_the_ID(), 'fictioneer_story_redirect_link', tru
<div class="modal__header drag-anchor"><?php _ex( 'Share', 'Share modal heading.', 'fictioneer' ); ?></div>
<div class="modal__row media-buttons _modal">
<?php if ( ! get_option( 'fictioneer_disable_facebook_share' ) ) : ?>
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $story_link; ?>" target="_blank" rel="noopener" class="media-buttons__item facebook">
<i class="fab fa-facebook"></i>
<?php if ( ! get_option( 'fictioneer_disable_bluesky_share' ) ) : ?>
<a href="https://bsky.app/intent/compose?text=<?php echo $story_link; ?>" target="_blank" rel="noopener nofollow" class="media-buttons__item bluesky">
<i class="fab fa-bluesky"></i>
</a>
<?php endif; ?>
<?php if ( ! get_option( 'fictioneer_disable_twitter_share' ) ) : ?>
<a href="https://twitter.com/intent/tweet/?text=<?php the_title(); ?>&url=<?php echo $story_link; ?>" target="_blank" rel="noopener" class="media-buttons__item twitter">
<a href="https://twitter.com/intent/tweet/?text=<?php the_title(); ?>&url=<?php echo $story_link; ?>" target="_blank" rel="noopener nofollow" class="media-buttons__item twitter">
<i class="fab fa-twitter"></i>
</a>
<?php endif; ?>
<?php if ( ! get_option( 'fictioneer_disable_tumblr_share' ) ) : ?>
<a href="http://tumblr.com/widgets/share/tool?canonicalUrl=<?php echo $story_link; ?>" target="_blank" rel="noopener" class="media-buttons__item tumblr">
<a href="http://tumblr.com/widgets/share/tool?canonicalUrl=<?php echo $story_link; ?>" target="_blank" rel="noopener nofollow" class="media-buttons__item tumblr">
<i class="fa-brands fa-tumblr-square"></i>
</a>
<?php endif; ?>
<?php if ( ! get_option( 'fictioneer_disable_reddit_share' ) ) : ?>
<a href="http://www.reddit.com/submit?url=<?php echo $story_link; ?>&title=<?php echo urlencode( get_the_title() ); ?>" target="_blank" rel="noopener" class="media-buttons__item reddit">
<a href="http://www.reddit.com/submit?url=<?php echo $story_link; ?>&title=<?php echo urlencode( get_the_title() ); ?>" target="_blank" rel="noopener nofollow" class="media-buttons__item reddit">
<i class="fa-brands fa-reddit"></i>
</a>
<?php endif; ?>
<?php if ( ! get_option( 'fictioneer_disable_mastodon_share' ) ) : ?>
<a href="https://toot.kytta.dev/?text=Check%20out%20<?php echo $story_link; ?>" target="_blank" rel="noopener" class="media-buttons__item mastodon">
<a href="https://toot.kytta.dev/?text=Check%20out%20<?php echo $story_link; ?>" target="_blank" rel="noopener nofollow" class="media-buttons__item mastodon">
<i class="fa-brands fa-mastodon"></i>
</a>
<?php endif; ?>
<?php if ( ! get_option( 'fictioneer_disable_facebook_share' ) ) : ?>
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $story_link; ?>" target="_blank" rel="noopener nofollow" class="media-buttons__item facebook">
<i class="fab fa-facebook"></i>
</a>
<?php endif; ?>
</div>
<div class="modal__row">