Skip to content

Commit dc0596f

Browse files
committed
version 1.0.12
1 parent 5a002c2 commit dc0596f

File tree

3 files changed

+41
-28
lines changed

3 files changed

+41
-28
lines changed

cbxphpspreadsheet.php

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Plugin Name: CBX PhpSpreadSheet Library
1717
* 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/
19-
* Version: 1.0.11
19+
* Version: 1.0.12
2020
* Requires PHP: 8.1.99
2121
* Author: Codeboxr
2222
* Author URI: https://github.com/PHPOffice/PhpSpreadsheet
@@ -33,7 +33,7 @@
3333
}
3434

3535
defined( 'CBXPHPSPREADSHEET_PLUGIN_NAME' ) or define( 'CBXPHPSPREADSHEET_PLUGIN_NAME', 'cbxphpspreadsheet' );
36-
defined( 'CBXPHPSPREADSHEET_PLUGIN_VERSION' ) or define( 'CBXPHPSPREADSHEET_PLUGIN_VERSION', '1.0.11' );
36+
defined( 'CBXPHPSPREADSHEET_PLUGIN_VERSION' ) or define( 'CBXPHPSPREADSHEET_PLUGIN_VERSION', '1.0.12' );
3737
defined( 'CBXPHPSPREADSHEET_BASE_NAME' ) or define( 'CBXPHPSPREADSHEET_BASE_NAME', plugin_basename( __FILE__ ) );
3838
defined( 'CBXPHPSPREADSHEET_ROOT_PATH' ) or define( 'CBXPHPSPREADSHEET_ROOT_PATH', plugin_dir_path( __FILE__ ) );
3939
defined( 'CBXPHPSPREADSHEET_ROOT_URL' ) or define( 'CBXPHPSPREADSHEET_ROOT_URL', plugin_dir_url( __FILE__ ) );
@@ -51,7 +51,7 @@ public function __construct() {
5151
add_action( 'init', [ $this, 'load_plugin_textdomain' ]);
5252

5353
// Add custom row meta links
54-
add_filter( 'plugin_row_meta', [ $this, 'plugin_row_meta' ], 10, 2 );
54+
add_filter( 'plugin_row_meta', [ $this, 'plugin_row_meta' ], 10, 4 );
5555
add_action( 'admin_notices', [ $this, 'activation_error_display' ] );
5656

5757
add_filter( 'pre_set_site_transient_update_plugins', [
@@ -144,27 +144,33 @@ private static function extension_check( $extensions ) {
144144
public static function environment_ready() {
145145
return self::php_version_check() && self::extension_check( [ 'zip', 'xml', 'gd' ]);
146146
}//end method environment_ready
147+
147148

148149
/**
149-
* Add support and documentation links to the plugin row meta
150+
* Filters the array of row meta for each/specific plugin in the Plugins list table.
151+
* Appends additional links below each/specific plugin on the plugins page.
150152
*
151-
* @param array $links
152-
* @param string $file
153+
* @access public
153154
*
154-
* @return array
155+
* @param array $links_array An array of the plugin's metadata
156+
* @param string $plugin_file_name Path to the plugin file
157+
* @param array $plugin_data An array of plugin data
158+
* @param string $status Status of the plugin
159+
*
160+
* @return array $links_array
155161
*/
156-
public function plugin_row_meta( $links, $file ) {
157-
if ( strpos( $file, 'cbxphpspreadsheet.php' ) !== false ) {
158-
$new_links = [
159-
'support' => '<a href="https://codeboxr.com/php-spreadsheet-library-wordpress-plugin/" target="_blank">' . esc_html__( 'Support', 'cbxphpspreadsheet' ) . '</a>',
160-
'doc' => '<a href="https://phpspreadsheet.readthedocs.io/en/latest/" target="_blank">' . esc_html__( 'PHP Spreadsheet Doc', 'cbxphpspreadsheet' ) . '</a>',
161-
];
162+
public function plugin_row_meta( $links_array, $plugin_file_name, $plugin_data, $status ) {
163+
if ( strpos( $plugin_file_name, CBXPHPSPREADSHEET_BASE_NAME ) !== false ) {
164+
if ( ! function_exists( 'is_plugin_active' ) ) {
165+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
166+
}
162167

163-
$links = array_merge( $links, $new_links );
168+
$links_array[] = '<a target="_blank" style="color:#005ae0 !important; font-weight: bold;" href="https://github.com/codeboxrcodehub/cbxphpspreadsheet" aria-label="' . esc_attr__( 'Github Repo', 'cbxphpspreadsheet' ) . '">' . esc_html__( 'Github Repo', 'cbxphpspreadsheet' ) . '</a>';
169+
$links_array[] = '<a target="_blank" style="color:#005ae0 !important; font-weight: bold;" href="https://github.com/codeboxrcodehub/cbxphpspreadsheet/releases" aria-label="' . esc_attr__( 'Download', 'cbxphpspreadsheet' ) . '">' . esc_html__( 'Download Latest', 'cbxphpspreadsheet' ) . '</a>';
164170
}
165171

166-
return $links;
167-
}
172+
return $links_array;
173+
}//end plugin_row_meta
168174

169175
/**
170176
* Load textdomain

languages/cbxphpspreadsheet.pot

Lines changed: 15 additions & 11 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: 2025-01-20 12:00+0000\n"
6+
"POT-Creation-Date: 2025-04-15 17:51+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"
@@ -25,31 +25,35 @@ msgstr ""
2525
msgid "CBX PhpSpreadSheet Library"
2626
msgstr ""
2727

28-
#: cbxphpspreadsheet.php:70
28+
#: cbxphpspreadsheet.php:77
2929
msgid ""
3030
"CBX PhpSpreadSheet Library plugin requires PHP extensions: Zip, XML, and GD2."
3131
msgstr ""
3232

33-
#: cbxphpspreadsheet.php:66
33+
#: cbxphpspreadsheet.php:73
3434
msgid "CBX PhpSpreadSheet Library plugin requires PHP version 8.1.99 or newer."
3535
msgstr ""
3636

3737
#. Author of the plugin
3838
msgid "Codeboxr"
3939
msgstr ""
4040

41-
#. URI of the plugin
42-
msgid "https://codeboxr.com/php-spreadsheet-library-wordpress-plugin/"
41+
#: cbxphpspreadsheet.php:169
42+
msgid "Download"
4343
msgstr ""
4444

45-
#. Author URI of the plugin
46-
msgid "https://github.com/PHPOffice/PhpSpreadsheet"
45+
#: cbxphpspreadsheet.php:169
46+
msgid "Download Latest"
47+
msgstr ""
48+
49+
#: cbxphpspreadsheet.php:168
50+
msgid "Github Repo"
4751
msgstr ""
4852

49-
#: cbxphpspreadsheet.php:154
50-
msgid "PHP Spreadsheet Doc"
53+
#. URI of the plugin
54+
msgid "https://codeboxr.com/php-spreadsheet-library-wordpress-plugin/"
5155
msgstr ""
5256

53-
#: cbxphpspreadsheet.php:153
54-
msgid "Support"
57+
#. Author URI of the plugin
58+
msgid "https://github.com/PHPOffice/PhpSpreadsheet"
5559
msgstr ""

readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Contributors: codeboxr, manchumahara
33
Requires at least: 5.3
44
Tested up to: 6.8
5-
Stable tag: 1.0.11
5+
Stable tag: 1.0.12
66
License: MIT
77
License URI: https://github.com/codeboxrcodehub/cbxphpspreadsheet/blob/master/LICENSE.txt
88

@@ -52,6 +52,9 @@ if ( function_exists( 'cbxphpspreadsheet_loadable' ) && cbxphpspreadsheet_loadab
5252

5353

5454
== Changelog ==
55+
= 1.0.12 =
56+
* [updated] Plugin's important link/help url display improved
57+
5558
= 1.0.11 =
5659
* [updated] Added plugin update checker
5760

0 commit comments

Comments
 (0)