Linux 软件免费装
Banner图

GP Social Share

开发者 WestCoastDigital
更新时间 2021年5月24日 08:19
PHP版本: 7.2.0 及以上
WordPress版本: 5.7.2
版权: GPLv2 or later
版权网址: 版权信息

标签

social share svg

下载

详情介绍:

This plugin uses hooks append social share icons to your content. It uses the if_single() WordPress hook to ensure only fires on all single posts or the included WooCommerce hooks. Configured shared content: Image = post featured Image - full url Title = post title Content = the first 40 words of the content URL = the post permalink

安装:

Ensure GeneratePress is your current active theme
  1. Upload the plugin files to the /wp-content/plugins/plugin-name directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the 'Plugins' screen in WordPress
  3. Use the Appearance->GP Social Share screen to add your own SVG code for the icons and choose your hook placement

屏幕截图:

  • Icon SVG code options
  • Colour options
  • Settings

升级注意事项:

1.1.3 Fixed bug where not pulling images when used in hook outside the loop 1.1.2 Fixed missing file 1.1.1 Added ability to choose WooCommerce hooks if WooCommerce is active 1.1.0 Added ability to change default links 1.0.9 Accidently left a var_dump output 1.0.8 Added switch to disable hooks so can use own and/or shortcode functions 1.0.7 Upgrade to be able to prefix text 1.0.6 Upgrade to be able to easily remove unwanted social share icons 1.0.3 Upgrade in enable shortcode support 1.0.2 Upgrade in order to be able to customise your email body text 1.0 Upgrade in order to use your own SVG icon code

常见问题:

Can I use outside of hooks

You can use the following shortcode [gp-social]

Nothing happens when I activate the plugin

Ensure you have the GeneratePress Theme active.

Do I have to use the premium version of the GeneratePress Theme?

No. This plugin works with the theme and does not require the premium plugin.

What if the hook I want to use isnt in the option, want it in multiple locations or want to apply some condtional logic?

You can use the following action to display the social share options whenever/wherever you like, just change out the_hook_you_require for the one you want to use add_action( 'the_hook_you_require','add_social_icons' );

Can I display the amount of times my post has been shared?

No. This plugin does not use any API's or receive any data from the shared content. It is intentionally built to be light weight.

Can I change the default links?

Yes. All the social media links are customisable with their own function.

  • Facebook = gp_social_facebook_link
  • Twitter = gp_social_twitter_link
  • Google+ = gp_social_google_link
  • Pinterest = gp_social_pinterest_link
  • LinkedIn = gp_social_linkedin_link
  • WhatsApp = gp_social_whatsapp_link an example would look like this
function gp_social_twitter_link() { $title = get_the_title(); $url = urlencode( get_permalink() ); $icon = ''; $link = '' . $icon . ''; return $link; }

Can I change the email body?

Yes. Just add a function called gp_social_email_body which returns your body content.

Can I use the media uploader to upload SVG icons?

No. WordPress has SVG disabled by default due to potential security issues, the decision was made to support this and stick to inline SVG code.

更新日志:

2.2 Fixed bug with excerpt breaking the twitter link by changeing get_the_excerpt to trimming html and removing readmore 2.0.1 Added support to customise on a post by post basis Bug Fix Shortcode 2.0 Rebuilt backend to remove relying on third party plugins 1.3 Added Settings link to main plugin screen Updated Meta Box Removed Google+ Support Added textarea to add custom email body Added switch to disable post author in emailUpdate Meta Box Added add_shortcode to the content share in Twitter to pull the content after the shortcodes have been parsed. Hopefully this fixed a bug with Toolset. 1.2 Updated settings page extensions fixed wp_debug error 1.1.4 Fixed bug for incorrect twitter Fixed deprecated get_the_author function Fixed bug with undefined index when debug is active Fixed potential bug with is_plugin_active('woocommerce/woocommerce.php') check and changed to class_exists( 'WooCommerce' ) 1.1.3 Fixed bug where not pulling images when used in hook outside the loop 1.1.2 Fixed missing file 1.1.1 Added ability to choose WooCommerce hooks if WooCommerce is active 1.1.0 Added ability to change default links 1.0.9 Accidently left a var_dump output 1.0.8 Added switch to disable hooks so can use own and/or shortcode functions 1.0.7 Add prefix text support 1.0.6 Can now remove svg code from backend to remove from frontend rather than using css to hide unwanted social profiles 1.0.5 Fixed folders not uploaded for 1.0.4 1.0.4 Fixed bug with shortcode Added colour styling support Improved backend UI 1.0.3 Added shortcode support 1.0.2 Added support for custom email body 1.0.1 Wrapped functions in class for conflict support Updated readme Added WhatsApp support Added hook option to display icons Converted jQuery to vanilla JS 1.0 This version allows you to paste in your own SVG icon code 0.5