Skip to content

Commit e74165a

Browse files
committed
add readme files and fix widget bug with static class
1 parent 96608d5 commit e74165a

11 files changed

+66
-19
lines changed

README.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
# Sharing Image
22

3-
Create social sharing image for Facebook, VK.com, Telegram and other social networks
3+
Sharing Image is a Wordpress plugin for generating sharing posters in social networks. Allows you to use text, watermarks and various filters. It is possible to create different posters for any posts types, archives and taxonomies. Compatible with various SEO plugins.
4+
5+
## Documentation
6+
7+
Detailed information about the plugin, its configuration and enhancement, is described on the [official website](https://wpget.org/sharing-image/).
8+
Pay attention to the page with available [hooks and filters](https://wpget.org/sharing-image/hooks/).
9+
10+
## Development
11+
12+
1. Fork and clone git repository
13+
2. Install npm modules with `yarn`
14+
3. Add composer packages with `composer update`
15+
4. Use `yarn build` and `yarn serve` to build static files

classes/class-generator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ private function create_poster( $template, $path = null ) {
234234
$settings = $this->settings;
235235

236236
if ( null === $path ) {
237-
return $poster->show( $settings->get_quality(), $settings->get_file_format() );
237+
return $poster->show( $settings->get_file_format(), $settings->get_quality() );
238238
}
239239

240240
$poster->save( $path, $settings->get_quality() );

classes/class-meta.php

+11
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ public function init() {
4343
* Print poster image meta tags.
4444
*/
4545
public function show_header() {
46+
/**
47+
* Easy way to hide poster meta.
48+
*
49+
* @param bool $hide_header Set true to hide poster meta.
50+
*/
51+
$hide_header = apply_filters( 'sharing_image_hide_meta', false );
52+
53+
if ( $hide_settings ) {
54+
return;
55+
}
56+
4657
$poster = $this->get_poster_src();
4758

4859
if ( false === $poster ) {

classes/class-widget.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public function enqueue_taxonomy_assets( $hook_suffix ) {
173173
* @param int $post_id Post ID.
174174
* @param WP_Post $post Post object.
175175
*/
176-
public static function save_metabox( $post_id, $post ) {
176+
public function save_metabox( $post_id, $post ) {
177177
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
178178
return;
179179
}

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
"wp-coding-standards/wpcs": "^2.3"
1313
},
1414
"require": {
15-
"antonlukin/poster-editor": "^3.0"
15+
"antonlukin/poster-editor": "^5.4"
1616
}
1717
}

license.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Rus Package WordPress Plugin, 2021 Anton Lukin
2-
Rus Package is distributed under the terms of the GNU GPL
1+
Sharing Image WordPress Plugin, 2021 Anton Lukin
2+
Sharing Image is distributed under the terms of the GNU GPL
33

44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "sharing-image",
3-
"version": "0.1.0",
3+
"version": "1.0.0",
44
"author": "Anton Lukin",
55
"description": "Sharing Image",
66
"license": "MIT",
77
"scripts": {
8-
"build": "gulp build",
9-
"serve": "gulp serve"
8+
"build": "./node_modules/gulp-cli/bin/gulp.js build",
9+
"serve": "./node_modules/gulp-cli/bin/gulp.js serve"
1010
},
1111
"prettier": {
1212
"printWidth": 120

readme.txt

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
=== Sharing Image ===
2+
Contributors: antonlukin
3+
Donate link: https://wpget.org/about/
4+
Tags: socialnetworks, socialnetwork, social networks, social network, facebook, twitter, telegram, vkontakte, vk.com, ok.ru, api, social image, sharing image, og image, twitter image
5+
Requires at least: 5.3
6+
Tested up to: 5.8
7+
Stable tag: 1.0.0
8+
Requires PHP: 5.5
9+
License: GPLv2 or later
10+
11+
Sharing Image is a Wordpress plugin for generating sharing posters in social networks.
12+
13+
== Description ==
14+
Sharing Image is a Wordpress plugin for generating sharing posters in social networks. Allows you to use text, watermarks and various filters. It is possible to create different posters for any posts types, archives and taxonomies. Compatible with various SEO plugins.
15+
Custom posters draw attention to your social media links and make them stand out from the rest in your feed. You can also place your company logo as a watermark to increase your brand awareness. If you are posting video or audio, it can be a good idea to add a play icon to your poster to help users identify the type of content.
16+
17+
= Get support =
18+
First of all read the [plugin documentation](https://wpget.org/sharing-image/).
19+
If you find a bug or want to add new feature to this plugin, create new [issue](https://github.com/antonlukin/sharing-image/issues) on Github or send a [pull reguest](https://github.com/antonlukin/sharing-image/pulls).
20+
21+
== Screenshots ==
22+
1. Example of a poster in Twitter feed
23+
2. Generate Sharing Image poster for certain post
24+
3. Add new post metabox
25+
26+
== Changelog ==
27+
28+
= 1.0.0 =
29+
* Initial version for WordPress Plugin Directory.

sharing-image.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
33
* Plugin Name: Sharing Image
4-
* Description: Create social sharing image for Facebook, VK.com, Telegram and other social networks
5-
* Version: 0.1
6-
* Requires at least: 5.0
4+
* Description: Create sharing image for Facebook, VK.com, Telegram and other social networks
5+
* Version: 0.1.0
6+
* Requires at least: 5.3
77
* Requires PHP: 5.5
88
* Plugin URI: https://wpget.org/sharing-image/
99
* Author: Anton Lukin

templates/premium.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
</ul>
4343

4444
<p>
45-
<?php esc_html_e( 'To get the Premium version, you need to buy a key on the official website of the plugin.', 'sharing-image' ); ?>
45+
<?php esc_html_e( 'To get the Premium version, you need to receive the license on the official website of the plugin.', 'sharing-image' ); ?>
4646
<?php esc_html_e( 'If you already have the key, activate it in the box below.', 'sharing-image' ); ?>
4747
<?php esc_html_e( 'Each key can be used up to 5 times on different sites.', 'sharing-image' ); ?>
4848
</p>
@@ -81,7 +81,7 @@
8181
?>
8282

8383
<?php esc_html_e( 'Attach the access key, if you have one.', 'sharing-image' ); ?>
84-
<?php esc_html_e( 'We will try to answer as soon as possible, but usually it takes no more than 2 days.', 'sharing-image' ); ?>
84+
<?php esc_html_e( 'We will try to answer as soon as possible, but usually it takes no more than 3 days.', 'sharing-image' ); ?>
8585

8686
<?php
8787
printf(

yarn.lock

-5
Original file line numberDiff line numberDiff line change
@@ -2766,11 +2766,6 @@ caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001181:
27662766
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001257.tgz"
27672767
integrity sha512-JN49KplOgHSXpIsVSF+LUyhD8PUp6xPpAXeRrrcBh4KBeP7W864jHn6RvzJgDlrReyeVjMFJL3PLpPvKIxlIHA==
27682768

2769-
caniuse-lite@^1.0.30001257:
2770-
version "1.0.30001257"
2771-
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001257.tgz#150aaf649a48bee531104cfeda57f92ce587f6e5"
2772-
integrity sha512-JN49KplOgHSXpIsVSF+LUyhD8PUp6xPpAXeRrrcBh4KBeP7W864jHn6RvzJgDlrReyeVjMFJL3PLpPvKIxlIHA==
2773-
27742769
caseless@~0.12.0:
27752770
version "0.12.0"
27762771
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"

0 commit comments

Comments
 (0)