PluginProbe ʕ •ᴥ•ʔ
Wp Social Login and Register Social Counter / trunk
Wp Social Login and Register Social Counter vtrunk
3.2.1 trunk 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.10 1.3.11 1.3.2 1.3.3 1.3.4 1.3.6 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.4 1.4.5 1.4.6 1.4.8 1.4.9 1.5.0 1.6.0 1.6.1 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.8.0 1.8.1 1.8.2 1.8.3 1.8.5 1.8.6 1.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.8 2.2.9 3.0.0 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0
wp-social / app / share.php
wp-social / app Last commit date
api-routes.php 8 months ago avatar.php 5 years ago counter-settings.php 5 years ago legacy.php 5 years ago login-settings.php 4 months ago providers.php 2 weeks ago route.php 2 weeks ago settings.php 5 years ago share-settings.php 2 weeks ago share.php 3 years ago
share.php
56 lines
1 <?php
2
3 namespace WP_Social\App;
4
5
6 class Share {
7
8 public function get_share_primary_content($wanted_providers, $config = []) {
9
10 global $post;
11
12 $postId = isset($post->ID) ? $post->ID : 0;
13
14 $thumbnail_src = wp_get_attachment_image_src(get_post_thumbnail_id($postId), 'full');
15 $custom_logo_id = get_theme_mod('custom_logo');
16 $image = wp_get_attachment_image_src($custom_logo_id, 'full');
17 $customLogo = isset($image[0]) ? $image[0] : '';
18 $media = isset($thumbnail_src[0]) ? $thumbnail_src[0] : $customLogo;
19 $app_id = '';
20 $details = '';
21 $author = 'xpeedstudio';
22 $title = get_the_title($postId);
23 $source = get_bloginfo();
24
25 $current_url = (isset($_SERVER['HTTPS']) && sanitize_text_field($_SERVER['HTTPS']) === 'on' ? 'https' : 'http') . '://' . sanitize_text_field($_SERVER['HTTP_HOST']) . sanitize_url($_SERVER['REQUEST_URI']);
26
27 $config['conf_type'] = empty($config['conf_type']) ? 'content_body' : $config['conf_type'];
28
29 $themeFontClass = Share_Settings::instance()->is_theme_font_enabled() ? 'wslu-theme-font-yes' : 'wslu-theme-font-no';
30 $customClass = empty($config['class']) ? '' : $config['class'];
31
32 $styles = \WP_Social\Inc\Admin_Settings::share_styles();
33 $saved_settings = \WP_Social\App\Share_Settings::instance()->get_style_settings();
34 $share_settings = \WP_Social\App\Settings::instance()->get_providers_settings_share();
35 $hover_styles = \WP_Social\App\Share_Settings::instance()->get_hover_styles();
36 $share_style_key = \WP_Social\App\Share_Settings::instance()->get_selected_style_keys();
37 $selected_share_style = \WP_Social\App\Share_Settings::instance()->get_selected_style();
38
39 $widget_style = \WP_Social\App\Share_Settings::instance()->prepare_widget_class($styles);
40 $extra_data_cls = \WP_Social\App\Share_Settings::instance()->get_extra_data_class($selected_share_style, $styles);
41
42 $show_count_markup = false;
43 $total_share_count = 0;
44 $share_counting = \WP_Social\App\Share_Settings::instance()->get_share_count($post, $wanted_providers);
45 $core_provider = Providers::get_core_providers_share();
46
47
48 ob_start();
49 require(WSLU_LOGIN_PLUGIN . '/template/share/primary_content.php');
50 $counter = ob_get_contents();
51 ob_end_clean();
52
53 return $counter;
54 }
55 }
56