is_plugin_activated(); if (!$is_activated) { wp_redirect(admin_url('admin.php?page=presslearn-settings')); exit; } if (isset($_POST['presslearn_toggle_social_share']) && isset($_POST['enable'])) { check_admin_referer('presslearn_toggle_social_share_nonce'); if (current_user_can('manage_options')) { $enable = sanitize_text_field(wp_unslash($_POST['enable'])); if ($enable === 'yes' || $enable === 'no') { update_option('presslearn_social_share_enabled', $enable); $updated = true; } } } if (current_user_can('manage_options') && is_admin() && isset($_GET['action']) && isset($_GET['enable']) && isset($_GET['feature'])) { if (!isset($_GET['_wpnonce']) || !wp_verify_nonce(sanitize_text_field(wp_unslash($_GET['_wpnonce'])), 'presslearn_toggle_social_share_action')) { wp_die('보안 검증에 실패했습니다.'); } $action = sanitize_text_field(wp_unslash($_GET['action'])); $enable = sanitize_text_field(wp_unslash($_GET['enable'])); $feature = sanitize_text_field(wp_unslash($_GET['feature'])); if ($action === 'toggle' && $feature === 'social_share' && ($enable === 'yes' || $enable === 'no')) { update_option('presslearn_social_share_enabled', $enable); $updated = true; } } if (isset($_POST['save_social_share_settings'])) { check_admin_referer('presslearn_save_social_share_settings_nonce'); if (current_user_can('manage_options')) { $social_share_options = array(); if (isset($_POST['social_share_options']) && is_array($_POST['social_share_options'])) { $social_share_options = array_map('sanitize_text_field', array_map('wp_unslash', $_POST['social_share_options'])); } $valid_options = array(); $allowed_options = array('facebook', 'naver', 'line', 'kakaotalk', 'band', 'twitter'); foreach ($social_share_options as $option) { if (in_array($option, $allowed_options)) { $valid_options[] = $option; } } update_option('presslearn_social_share_options', $valid_options); if (isset($_POST['kakao_api_key'])) { $kakao_api_key = sanitize_text_field(wp_unslash($_POST['kakao_api_key'])); update_option('presslearn_kakao_api_key', $kakao_api_key); } if (isset($_POST['social_share_style'])) { $style = sanitize_text_field(wp_unslash($_POST['social_share_style'])); if (in_array($style, array('default', 'popup'))) { update_option('presslearn_social_share_style', $style); } } if (isset($_POST['social_share_alignment'])) { $alignment = sanitize_text_field(wp_unslash($_POST['social_share_alignment'])); if (in_array($alignment, array('left', 'right', 'center', 'full', 'inline'))) { update_option('presslearn_social_share_alignment', $alignment); } } $settings_updated = true; } } $social_share_enabled = get_option('presslearn_social_share_enabled', 'no'); $social_share_options = get_option('presslearn_social_share_options', array('facebook', 'naver', 'line', 'kakaotalk', 'band', 'twitter')); $kakao_api_key = get_option('presslearn_kakao_api_key', ''); $has_kakao_api_key = !empty($kakao_api_key); $social_share_style = get_option('presslearn_social_share_style', 'default'); $social_share_alignment = get_option('presslearn_social_share_alignment', 'left'); ?>

기능이 활성화되었습니다.

기능이 비활성화 상태입니다.

대시보드 / 소셜 공유

설정 정보가 성공적으로 저장되었습니다.

카카오톡 공유 기능을 사용하려면 카카오톡 API KEY를 입력해주세요.
카카오톡 API KEY 발급 받기

소셜 공유

다양한 소셜 미디어 매체에 간편하게 나의 게시물을 공유할 수 있도록 도와줍니다.

플러그인 기능 활성화

활성화할 소셜 미디어

카카오톡 API KEY

소셜 공유 스타일

소셜 공유 버튼 정렬 설정

소셜 공유 숏코드 복사