Skip to content

Commit 6ab62c6

Browse files
committed
support, doc url added, language regenerated, readme tweaked
1 parent 8d00737 commit 6ab62c6

File tree

3 files changed

+55
-23
lines changed

3 files changed

+55
-23
lines changed

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if ( defined('CBXPHPSPREADSHEET_PLUGIN_NAME') && file_exists( CBXPHPSPREADSHEET_
3838
//now take instance
3939
$objPHPExcel = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
4040

41-
//do whatever you need todo
41+
//do whatever you need to do
4242
}
4343
`
4444

cbxphpspreadsheet.php

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* @wordpress-plugin
1616
* Plugin Name: CBX PhpSpreadSheet Library
17-
* Plugin URI: https://codeboxr.com/
17+
* Plugin URI: https://codeboxr.com/php-spreadsheet-library-wordpress-plugin/
1818
* Description: A pure PHP library for reading and writing spreadsheet files https://phpspreadsheet.readthedocs.io/
1919
* Version: 1.0.0
2020
* Author: Codeboxr
@@ -46,6 +46,8 @@ class CBXPhpSpreadSheet {
4646
function __construct() {
4747
//load text domain
4848
load_plugin_textdomain('cbxphpspreadsheet', false, dirname(plugin_basename(__FILE__)) . '/languages/');
49+
50+
add_filter( 'plugin_row_meta', array($this, 'plugin_row_meta'), 10, 2 );
4951
}
5052

5153
/**
@@ -155,6 +157,28 @@ public static function php_gd_enabled_check(){
155157
return false;
156158
}//end method php_gd_enabled_check
157159

160+
/**
161+
* Plugin support and doc page url
162+
*
163+
* @param $links
164+
* @param $file
165+
*
166+
* @return array
167+
*/
168+
public function plugin_row_meta( $links, $file ) {
169+
170+
if ( strpos( $file, 'cbxphpspreadsheet.php' ) !== false ) {
171+
$new_links = array(
172+
'support' => '<a href="https://codeboxr.com/php-spreadsheet-library-wordpress-plugin/" target="_blank">'.esc_html__('Support', 'cbxphpspreadsheet').'</a>',
173+
'doc' => '<a href="https://phpspreadsheet.readthedocs.io/en/latest/" target="_blank">'.esc_html__('PHP Spreadsheet Doc', 'cbxphpspreadsheet').'</a>'
174+
);
175+
176+
$links = array_merge( $links, $new_links );
177+
}
178+
179+
return $links;
180+
}
181+
158182
}//end method CBXPhpSpreadSheet
159183

160184

languages/cbxphpspreadsheet.pot

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ msgid ""
33
msgstr ""
44
"Project-Id-Version: CBX PhpSpreadSheet Library\n"
55
"Report-Msgid-Bugs-To: \n"
6-
"POT-Creation-Date: 2019-05-22 20:12+0000\n"
6+
"POT-Creation-Date: 2019-05-26 11:26+0000\n"
77
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
88
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
99
"Language-Team: \n"
@@ -15,40 +15,48 @@ msgstr ""
1515
"X-Generator: Loco https://localise.biz/\n"
1616
"X-Loco-Version: 2.2.2; wp-5.2"
1717

18-
#. Description of the plugin
19-
msgid ""
20-
"A pure PHP library for reading and writing spreadsheet files https:"
21-
"//phpspreadsheet.readthedocs.io/"
18+
#: cbxphpspreadsheet.php:74
19+
msgid "This plugin requires PHP version 5.6 or newer"
2220
msgstr ""
2321

24-
#. Name of the plugin
25-
msgid "CBX PhpSpreadSheet Library"
22+
#: cbxphpspreadsheet.php:85
23+
msgid "This plugin requires PHP php_zip extension installed and enabled"
2624
msgstr ""
2725

28-
#. Author of the plugin
29-
msgid "Codeboxr"
26+
#: cbxphpspreadsheet.php:95
27+
msgid "This plugin requires PHP php_xml extension installed and enabled"
3028
msgstr ""
3129

32-
#. URI of the plugin
33-
msgid "https://codeboxr.com/"
30+
#: cbxphpspreadsheet.php:105
31+
msgid "This plugin requires PHP php_gd2 extension installed and enabled"
3432
msgstr ""
3533

36-
#. Author URI of the plugin
37-
msgid "https://github.com/PHPOffice/PhpSpreadsheet"
34+
#: cbxphpspreadsheet.php:172
35+
msgid "Support"
3836
msgstr ""
3937

40-
#: cbxphpspreadsheet.php:103
41-
msgid "This plugin requires PHP php_gd2 extension installed and enabled"
38+
#: cbxphpspreadsheet.php:173
39+
msgid "PHP Spreadsheet Doc"
4240
msgstr ""
4341

44-
#: cbxphpspreadsheet.php:93
45-
msgid "This plugin requires PHP php_xml extension installed and enabled"
42+
#. Name of the plugin
43+
msgid "CBX PhpSpreadSheet Library"
4644
msgstr ""
4745

48-
#: cbxphpspreadsheet.php:83
49-
msgid "This plugin requires PHP php_zip extension installed and enabled"
46+
#. Description of the plugin
47+
msgid ""
48+
"A pure PHP library for reading and writing spreadsheet files https:"
49+
"//phpspreadsheet.readthedocs.io/"
5050
msgstr ""
5151

52-
#: cbxphpspreadsheet.php:72
53-
msgid "This plugin requires PHP version 5.6 or newer"
52+
#. URI of the plugin
53+
msgid "https://codeboxr.com/php-spreadsheet-library-wordpress-plugin/"
54+
msgstr ""
55+
56+
#. Author of the plugin
57+
msgid "Codeboxr"
58+
msgstr ""
59+
60+
#. Author URI of the plugin
61+
msgid "https://github.com/PHPOffice/PhpSpreadsheet"
5462
msgstr ""

0 commit comments

Comments
 (0)