/*
Theme Name: Hub
Theme URI: https://hub.liquid-themes.com/
Author: Liquid Themes
Author URI: https://themeforest.net/user/liquidthemes
Description: Smart, Powerful and Unlimited Customizable WordPress Theme.
Version: 4.4.1
License: GNU General Public License
License URI: license.txt
Text Domain: hub
Tags: responsive, retina, rtl-language-support, blog, portfolio, custom-colors, live-editor
*/

/*--------------------------------------------------------------
Accessibility
--------------------------------------------------------------*/
/* Text meant only for screen readers. */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

.screen-reader-text:hover,
.screen-reader-text:active,
.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	color: #21759b;
	display: block;
	font-size: 14px;
	font-size: 0.875rem;
	font-weight: bold;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
	/* Above WP toolbar. */
}

/*--------------------------------------------------------------
Alignments
--------------------------------------------------------------*/
.alignleft {
	display: inline;
	float: left;
	margin-right: 1.5em;
}

.alignright {
	display: inline;
	float: right;
	margin-left: 1.5em;
}

.aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

/*--------------------------------------------------------------
Captions
--------------------------------------------------------------*/
.wp-caption {
	margin-bottom: 1.5em;
	max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
	display: block;
	margin: 0 auto;
}

.wp-caption .wp-caption-text {
	margin: 0.8075em 0;
}

/*--------------------------------------------------------------
Galleries
--------------------------------------------------------------*/
.gallery {
	margin-bottom: 1.5em;
}

.gallery-item {
	display: inline-block;
	vertical-align: top;
	width: 100%;
	padding-left: 5px;
	padding-right: 5px;
}

.gallery-columns-2 .gallery-item {
	max-width: 50%;
}

.gallery-columns-3 .gallery-item {
	max-width: 33.33%;
}

.gallery-columns-4 .gallery-item {
	max-width: 25%;
}

.gallery-columns-5 .gallery-item {
	max-width: 20%;
}

.gallery-columns-6 .gallery-item {
	max-width: 16.66%;
}

.gallery-columns-7 .gallery-item {
	max-width: 14.28%;
}

.gallery-columns-8 .gallery-item {
	max-width: 12.5%;
}

.gallery-columns-9 .gallery-item {
	max-width: 11.11%;
}

.gallery-caption {
	display: block;
}

.wp-block-gallery {
	margin-bottom: 1em;
}

.blocks-gallery-caption {
	margin-top: 0;
}

/*--------------------------------------------------------------
Button
--------------------------------------------------------------*/
.wp-block-button__link {
	--wp-btn-border-radius: 1.5em;
	border-radius: var(--wp-btn-border-radius);
	line-height: 1.35em;
}

.wp-block-button.is-style-squared .wp-block-button__link {
	--wp-btn-border-radius: 0;
}

/*--------------------------------------------------------------
Cover
--------------------------------------------------------------*/
.wp-block-cover.has-background-dim {
	color: #fff;
}

.wp-block-cover.has-background-dim a {
	color: inherit;
}

.wp-block-group.has-background,
.has-background {
	margin-bottom: 1.5em;
}

/*--------------------------------------------------------------
Blockquote
--------------------------------------------------------------*/
.wp-block-pullquote blockquote {
	border: none;
}


// Sertifika Uzmanı - Yorum Bildirim Kodları

add_filter( 'comment_moderation_text', 'sertifikauzmani_yorum_onay_bildirim_metni', 10, 2 );

function sertifikauzmani_yorum_onay_bildirim_metni( $notify_message, $comment_id ) {
    $comment = get_comment( $comment_id );
    $post = get_post( $comment->comment_post_ID );
    
    $new_message = "📝 Yeni bir yorum onay bekliyor:\n\n";
    $new_message .= "📌 Yazı Başlığı: {$post->post_title}\n";
    $new_message .= "🔗 Yazı Linki: " . get_permalink( $post ) . "\n\n";
    $new_message .= "👤 Yorum Yapan: {$comment->comment_author} ({$comment->comment_author_email})\n";
    $new_message .= "💬 Yorum:\n{$comment->comment_content}\n\n";
    $new_message .= "✅ Onayla: " . admin_url("comment.php?action=approve&c={$comment_id}") . "\n";
    $new_message .= "🗑️ Çöpe At: " . admin_url("comment.php?action=trash&c={$comment_id}") . "\n";
    $new_message .= "🚫 Spam Olarak İşaretle: " . admin_url("comment.php?action=spam&c={$comment_id}") . "\n";
    
    return $new_message;
}

add_filter( 'comment_moderation_subject', 'sertifikauzmani_yorum_eposta_basligi', 10, 2 );

function sertifikauzmani_yorum_eposta_basligi( $subject, $comment_id ) {
    $comment = get_comment( $comment_id );
    $post = get_post( $comment->comment_post_ID );

    return sprintf( 'Yeni yorum onay bekliyor: "%s"', $post->post_title );
}

// Gönderen adı ve e-posta adresi ayarı - Sertifika Uzmanı
add_filter( 'wp_mail_from_name', 'sertifikauzmani_gonderen_adi' );
function sertifikauzmani_gonderen_adi( $name ) {
    return 'Sertifika Uzmanı'; // Gönderen adı
}

add_filter( 'wp_mail_from', 'sertifikauzmani_gonderen_mail_adresi' );
function sertifikauzmani_gonderen_mail_adresi( $email ) {
    return 'info@sertifikauzmani.com'; // Gönderen mail adresi (doğrulanmış olmalı)
}
