Skip to content

Commit

Permalink
v 0.32.0
Browse files Browse the repository at this point in the history
- Fix some notices for PHP 8.2.
- Add missing update URI.
- Translate description in french.
- Protect some directories.
  • Loading branch information
Darklg committed Feb 13, 2023
1 parent 26bbce1 commit c1e50e7
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 24 deletions.
1 change: 1 addition & 0 deletions inc/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deny from all
7 changes: 5 additions & 2 deletions inc/WPUBaseUpdate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ Update your Github WordPress plugin from the plugins page admin.
## Insert in the INIT hook

```php
$this->settings_update = new \wpupopin\WPUBaseUpdate(
include dirname( __FILE__ ) . '/inc/WPUBaseUpdate/WPUBaseUpdate.php';
$this->settings_update = new \PLUGINID\WPUBaseUpdate(
'WordPressUtilities',
'wpupopin',
'PLUGINID',
$this->plugin_version);
```

Please ensure that this code is available before when !is_admin() ( for API purposes )
8 changes: 5 additions & 3 deletions inc/WPUBaseUpdate/WPUBaseUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
/*
Class Name: WPU Base Update
Description: A class to handle plugin update from github
Version: 0.4.2
Version: 0.4.3
Class URI: https://github.com/WordPressUtilities/wpubaseplugin
Author: Darklg
Author URI: http://darklg.me/
Author URI: https://darklg.me/
License: MIT License
License URI: http://opensource.org/licenses/MIT
License URI: https://opensource.org/licenses/MIT
Thanks: https://gist.github.com/danielbachhuber/7684646
*/

Expand All @@ -17,6 +18,7 @@ class WPUBaseUpdate {
public $current_version;
private $github_username;
private $github_project;
private $github_path;
private $transient_name;
private $transient_expiration;
private $plugin_id;
Expand Down
1 change: 1 addition & 0 deletions inc/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php /* Silence */
1 change: 1 addition & 0 deletions lang/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deny from all
1 change: 1 addition & 0 deletions lang/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php /* Silence */
Binary file modified lang/wpupostmetas-fr_FR.mo
Binary file not shown.
36 changes: 20 additions & 16 deletions lang/wpupostmetas-fr_FR.po
Original file line number Diff line number Diff line change
@@ -1,70 +1,74 @@
msgid ""
msgstr ""
"Project-Id-Version: WPU Post Metas\n"
"POT-Creation-Date: 2019-10-03 18:20+0200\n"
"POT-Creation-Date: 2023-02-13 11:43+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Darklg <[email protected]>\n"
"Language-Team: \n"
"Language: fr_FR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.3\n"
"X-Generator: Poedit 3.2.2\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-SearchPath-0: ../.\n"

#: .././wpupostmetas.php:86
#: .././wpupostmetas.php:83
msgid "Simple admin for post metas"
msgstr "Administration simple pour les post metas"

#: .././wpupostmetas.php:95
msgid "Delete this line?"
msgstr "Supprimer cette ligne ?"

#: .././wpupostmetas.php:509
#: .././wpupostmetas.php:518
msgid "Remove image"
msgstr "Retirer l’image"

#: .././wpupostmetas.php:510
#: .././wpupostmetas.php:519
msgid "Choose an image"
msgstr "Choisir une image"

#: .././wpupostmetas.php:511
#: .././wpupostmetas.php:520
msgid "Change image"
msgstr "Changer l’image"

#: .././wpupostmetas.php:513
#: .././wpupostmetas.php:522
msgid "Remove file"
msgstr "Retirer le fichier"

#: .././wpupostmetas.php:514
#: .././wpupostmetas.php:523
msgid "Choose a file"
msgstr "Choisir un fichier"

#: .././wpupostmetas.php:515
#: .././wpupostmetas.php:524
msgid "Change file"
msgstr "Changer de fichier"

#: .././wpupostmetas.php:531 .././wpupostmetas.php:567
#: .././wpupostmetas.php:540 .././wpupostmetas.php:576
msgid "Select a value"
msgstr "Sélectionnez une valeur"

#: .././wpupostmetas.php:552 .././wpupostmetas.php:568
#: .././wpupostmetas.php:713
#: .././wpupostmetas.php:561 .././wpupostmetas.php:577
#: .././wpupostmetas.php:723
msgid "None"
msgstr "Aucun"

#: .././wpupostmetas.php:605
#: .././wpupostmetas.php:614
msgid "Add a new line"
msgstr "Nouvelle ligne"

#: .././wpupostmetas.php:606
#: .././wpupostmetas.php:615
msgid "Copy last line"
msgstr "Copier la dernière ligne"

#: .././wpupostmetas.php:840
#: .././wpupostmetas.php:850
msgid "No"
msgstr "Non"

#: .././wpupostmetas.php:841
#: .././wpupostmetas.php:851
msgid "Yes"
msgstr "Oui"

Expand Down
16 changes: 13 additions & 3 deletions wpupostmetas.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
/*
Plugin Name: WPU Post Metas
Plugin URI: https://github.com/WordPressUtilities/wpupostmetas
Update URI: https://github.com/WordPressUtilities/wpupostmetas
Description: Simple admin for post metas
Version: 0.31.8
Version: 0.32.0
Author: Darklg
Author URI: http://darklg.me/
License: MIT License
Expand All @@ -15,9 +16,14 @@

class WPUPostMetas {

public $version = '0.32.0';
public $boxes = array();
public $fields = array();
public $version = '0.31.8';
public $settings_update;
public $plugin_description;
public $admin_columns;
public $admin_columns_sortable;
public $admin_columns_filterable;

/**
* Initialize class
Expand Down Expand Up @@ -71,7 +77,11 @@ public function init() {
}

public function load_plugin_textdomain() {
load_plugin_textdomain('wpupostmetas', false, dirname(plugin_basename(__FILE__)) . '/lang/');
$lang_dir = dirname(plugin_basename(__FILE__)) . '/lang/';
if (!load_plugin_textdomain('wpupostmetas', false, $lang_dir)) {
load_muplugin_textdomain('wpupostmetas', $lang_dir);
}
$this->plugin_description = __('Simple admin for post metas', 'wpupostmetas');
}

public function load_assets() {
Expand Down

0 comments on commit c1e50e7

Please sign in to comment.