Autosave: 20260320-143356

This commit is contained in:
Flatlogic Bot 2026-03-20 14:34:37 +00:00
parent bce8684070
commit 4e69e0290c
12 changed files with 36 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

View File

@ -5,6 +5,35 @@
* Version: 1.0.0
*/
function fl_get_homepage_social_image_url() {
$front_page_id = (int) get_option('page_on_front');
if ($front_page_id > 0) {
if (has_post_thumbnail($front_page_id)) {
$thumb = wp_get_attachment_image_url(get_post_thumbnail_id($front_page_id), 'full');
if (!empty($thumb)) {
return $thumb;
}
}
$front = get_post($front_page_id);
if ($front instanceof WP_Post && !empty($front->post_content)) {
if (preg_match('/<img[^>]+src=["\\\']([^"\\\']+)["\\\']/i', $front->post_content, $m)) {
return $m[1];
}
}
}
$custom_logo_id = (int) get_theme_mod('custom_logo');
if ($custom_logo_id) {
$logo = wp_get_attachment_image_url($custom_logo_id, 'full');
if (!empty($logo)) {
return $logo;
}
}
return get_site_icon_url(512) ?: '';
}
function fl_seo_metadata_head() {
if (is_admin()) return;
@ -14,6 +43,13 @@ function fl_seo_metadata_head() {
$siteName = get_bloginfo('name');
$siteDescription = get_bloginfo('description');
if (is_front_page()) {
$homepageImage = fl_get_homepage_social_image_url();
if (!empty($homepageImage)) {
$projectImageUrl = $homepageImage;
}
}
$metaDescription = !empty($projectDescription) ? $projectDescription : $siteDescription;
$metaTitle = is_front_page() ? $siteName : get_the_title() . ' | ' . $siteName;

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 KiB