Skip to content

Commit 672ea39

Browse files
committed
EFAQ 6.1.2 release
= 6.1.2 = * Fixed wrong admin JS filename issue. * Improved variable naming to `FAQ_`, where was still missing. * Other small naming improvements. * Missing translations added for manuals, demos and FAQ tabs.
1 parent 2d3c950 commit 672ea39

22 files changed

+72
-55
lines changed

Controllers/Admin/FAQ/AddEditFAQ_Controller.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public function __construct(ConfigurationInterface &$paramConf, LanguageInterfac
1919
parent::__construct($paramConf, $paramLang);
2020
}
2121

22-
private function processDelete($paramFAQId)
22+
private function processDelete($paramFAQ_Id)
2323
{
24-
$objFAQ = new FAQ($this->conf, $this->lang, $this->dbSets->getAll(), $paramFAQId);
24+
$objFAQ = new FAQ($this->conf, $this->lang, $this->dbSets->getAll(), $paramFAQ_Id);
2525
$objFAQ->delete();
2626

2727
StaticSession::cacheHTML_Array('admin_debug_html', $objFAQ->getDebugMessages());
@@ -61,8 +61,8 @@ public function printContent()
6161
if(isset($_GET['delete_faq'])) { $this->processDelete($_GET['delete_faq']); }
6262
if(isset($_POST['save_faq'], $_POST['faq_id'])) { $this->processSave($_POST['faq_id']); }
6363

64-
$paramFAQId = isset($_GET['faq_id']) ? $_GET['faq_id'] : 0;
65-
$objFAQ = new FAQ($this->conf, $this->lang, $this->dbSets->getAll(), $paramFAQId);
64+
$paramFAQ_Id = isset($_GET['faq_id']) ? $_GET['faq_id'] : 0;
65+
$objFAQ = new FAQ($this->conf, $this->lang, $this->dbSets->getAll(), $paramFAQ_Id);
6666
$localDetails = $objFAQ->getDetails();
6767

6868
// Set the view variables

Controllers/Admin/NetworkMenuController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function addMenu($paramMenuPosition = 97)
3838

3939
// For admins only - update_plugins are official WordPress role for updates
4040
add_menu_page(
41-
$this->lang->getText('LANG_MENU_ACCORDION_FAQ_TEXT'), $this->lang->getText('LANG_MENU_ACCORDION_FAQ_TEXT'),
41+
$this->lang->getText('LANG_MENU_EXPANDABLE_FAQ_TEXT'), $this->lang->getText('LANG_MENU_EXPANDABLE_FAQ_TEXT'),
4242
"update_plugins", "{$urlPrefix}network-menu", array($this, "printNetworkStatus"), $iconURL, $validMenuPosition
4343
);
4444
add_submenu_page(

Controllers/Admin/SingleMenuController.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function addStatusMenu($paramMenuPosition = 97)
5050

5151
// For those, who have 'update_plugins' rights - update_plugins are official WordPress role for updates
5252
add_menu_page(
53-
$this->lang->getText('LANG_MENU_ACCORDION_FAQ_TEXT'), $this->lang->getText('LANG_MENU_ACCORDION_FAQ_TEXT'),
53+
$this->lang->getText('LANG_MENU_EXPANDABLE_FAQ_TEXT'), $this->lang->getText('LANG_MENU_EXPANDABLE_FAQ_TEXT'),
5454
"update_plugins", "{$urlPrefix}single-menu", array($this, "printSingleStatus"), $iconURL, $validMenuPosition
5555
);
5656
add_submenu_page(
@@ -72,17 +72,17 @@ public function addRegularMenu($paramMenuPosition = 97)
7272

7373
// For those, who have 'view_{$pluginPrefix}partner_earnings' rights
7474
add_menu_page(
75-
$this->lang->getText('LANG_MENU_ACCORDION_FAQ_TEXT'), $this->lang->getText('LANG_MENU_ACCORDION_FAQ_TEXT'),
76-
"view_{$pluginPrefix}all_faqs", "{$urlPrefix}single-menu", array($this, "printFAQManager"), $iconURL, $validMenuPosition
75+
$this->lang->getText('LANG_MENU_EXPANDABLE_FAQ_TEXT'), $this->lang->getText('LANG_MENU_EXPANDABLE_FAQ_TEXT'),
76+
"view_{$pluginPrefix}all_faqs", "{$urlPrefix}single-menu", array($this, "printFAQ_Manager"), $iconURL, $validMenuPosition
7777
);
7878
// For those, who have 'view_{$pluginPrefix}all_faqs' or 'manage_{$pluginPrefix}all_faqs' rights
7979
add_submenu_page(
8080
"{$urlPrefix}single-menu", $this->lang->getText('LANG_FAQ_MANAGER_TEXT'), $this->lang->getText('LANG_FAQ_MANAGER_TEXT'),
81-
"view_{$pluginPrefix}all_faqs", "{$urlPrefix}faq-manager", array($this, "printFAQManager")
81+
"view_{$pluginPrefix}all_faqs", "{$urlPrefix}faq-manager", array($this, "printFAQ_Manager")
8282
);
8383
add_submenu_page(
8484
"{$urlPrefix}faq-manager", $this->lang->getText('LANG_FAQ_ADD_EDIT_TEXT'), $this->lang->getText('LANG_FAQ_ADD_EDIT_TEXT'),
85-
"manage_{$pluginPrefix}all_faqs", "{$urlPrefix}add-edit-faq", array($this, "printFAQAddEdit")
85+
"manage_{$pluginPrefix}all_faqs", "{$urlPrefix}add-edit-faq", array($this, "printFAQ_AddEdit")
8686
);
8787

8888
// For those, who have 'manage_{$pluginPrefix}all_settings' rights
@@ -125,7 +125,7 @@ public function addRegularMenu($paramMenuPosition = 97)
125125
/* ------------------------------------------------------------------------------------- */
126126

127127
// F.A.Q. Manager
128-
public function printFAQManager()
128+
public function printFAQ_Manager()
129129
{
130130
try
131131
{
@@ -138,7 +138,7 @@ public function printFAQManager()
138138
}
139139
}
140140

141-
public function printFAQAddEdit()
141+
public function printFAQ_AddEdit()
142142
{
143143
try
144144
{

ExpandableFAQ.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Expandable FAQ
44
* Plugin URI: https://wordpress.org/plugins/expandable-faq/
55
* Description: It’s a high quality, native and responsive WordPress plugin to create and view F.A.Q.'s
6-
* Version: 6.1.1
6+
* Version: 6.1.2
77
* Author: KestutisIT
88
* Author URI: https://profiles.wordpress.org/KestutisIT
99
* Text Domain: expandable-faq
@@ -43,7 +43,7 @@ final class ExpandableFAQ
4343
const REQUIRED_PHP_VERSION = '5.6.0';
4444
const REQUIRED_WP_VERSION = 4.6;
4545
const OLDEST_COMPATIBLE_PLUGIN_SEMVER = '6.0.0';
46-
const PLUGIN_SEMVER = '6.1.1';
46+
const PLUGIN_SEMVER = '6.1.2';
4747

4848
// Settings
4949
/**

Languages/en_US.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,14 @@
163163
// Manual Element
164164
'LANG_MANUAL_TEXT' => 'Manual',
165165
'LANG_MANUAL_INSTRUCTIONS_TEXT' => 'Instructions',
166+
'LANG_MANUAL_SHORTCODES_TEXT' => 'Shortcodes',
167+
'LANG_MANUAL_SHORTCODE_PARAMETERS_TEXT' => 'Shortcode Parameters',
168+
'LANG_MANUAL_URL_PARAMETERS_AND_HASHTAGS_TEXT' => 'URL Parameters & Hashtags',
169+
'LANG_MANUAL_UI_OVERRIDING_TEXT' => 'UI Overriding',
170+
'LANG_MANUAL_TUTORIAL_HOW_TO_OVERRIDE_UI_TEXT' => 'Tutorial - How to Override User Interface (UI)',
166171

167172
// Menu Element
168-
'LANG_MENU_ACCORDION_FAQ_TEXT' => 'Expandable FAQ',
173+
'LANG_MENU_EXPANDABLE_FAQ_TEXT' => 'Expandable FAQ',
169174
'LANG_MENU_INVENTORY_TEXT' => 'Expandable FAQ Inventory',
170175
'LANG_MENU_INVENTORY_SHORT_TEXT' => 'FAQ Inventory',
171176

Models/FAQ/FAQ.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,24 @@ final class FAQ extends AbstractStack implements StackInterface, ElementInterfac
2222
private $debugMode = 0;
2323
private $faqId = 0;
2424

25-
public function __construct(ConfigurationInterface &$paramConf, LanguageInterface &$paramLang, array $paramSettings, $paramFaqId)
25+
public function __construct(ConfigurationInterface &$paramConf, LanguageInterface &$paramLang, array $paramSettings, $paramFAQ_Id)
2626
{
2727
// Set class settings
2828
$this->conf = $paramConf;
2929
// Already sanitized before in it's constructor. Too much sanitization will kill the system speed
3030
$this->lang = $paramLang;
31-
$this->faqId = StaticValidator::getValidValue($paramFaqId, 'positive_integer', 0);
31+
$this->faqId = StaticValidator::getValidValue($paramFAQ_Id, 'positive_integer', 0);
3232
}
3333

34-
private function getDataFromDatabaseById($paramFaqId, $paramColumns = array('*'))
34+
private function getDataFromDatabaseById($paramFAQ_Id, $paramColumns = array('*'))
3535
{
36-
$validFaqId = StaticValidator::getValidPositiveInteger($paramFaqId, 0);
36+
$validFAQ_Id = StaticValidator::getValidPositiveInteger($paramFAQ_Id, 0);
3737
$validSelect = StaticValidator::getValidSelect($paramColumns);
3838

3939
$sqlQuery = "
4040
SELECT {$validSelect}
4141
FROM {$this->conf->getPrefix()}faqs
42-
WHERE faq_id='{$validFaqId}'
42+
WHERE faq_id='{$validFAQ_Id}'
4343
";
4444
$retData = $this->conf->getInternalWPDB()->get_row($sqlQuery, ARRAY_A);
4545

@@ -185,10 +185,10 @@ public function registerForTranslation()
185185
*/
186186
public function delete()
187187
{
188-
$validFaqId = StaticValidator::getValidPositiveInteger($this->faqId, 0);
188+
$validFAQ_Id = StaticValidator::getValidPositiveInteger($this->faqId, 0);
189189
$deleted = $this->conf->getInternalWPDB()->query("
190190
DELETE FROM {$this->conf->getPrefix()}faqs
191-
WHERE faq_id='{$validFaqId}' AND blog_id='{$this->conf->getBlogId()}'
191+
WHERE faq_id='{$validFAQ_Id}' AND blog_id='{$this->conf->getBlogId()}'
192192
");
193193

194194
if($deleted === FALSE || $deleted === 0)

Models/FAQ/FAQsObserver.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Faqs Observer
3+
* FAQs Observer
44
55
* @package ExpandableFAQ
66
* @author KestutisIT
@@ -35,15 +35,15 @@ public function inDebug()
3535
return ($this->debugMode >= 1 ? TRUE : FALSE);
3636
}
3737

38-
public function getAllIds($paramFaqId = -1)
38+
public function getAllIds($paramFAQ_Id = -1)
3939
{
40-
$validFaqId = StaticValidator::getValidInteger($paramFaqId, -1); // -1 means 'skip'
40+
$validFAQ_Id = StaticValidator::getValidInteger($paramFAQ_Id, -1); // -1 means 'skip'
4141

4242
$sqlAdd = '';
43-
if($validFaqId > 0)
43+
if($validFAQ_Id > 0)
4444
{
4545
// FAQ id
46-
$sqlAdd .= " AND faq_id='{$validFaqId}'";
46+
$sqlAdd .= " AND faq_id='{$validFAQ_Id}'";
4747
}
4848

4949
$searchSQL = "
@@ -61,26 +61,26 @@ public function getAllIds($paramFaqId = -1)
6161
return $searchResult;
6262
}
6363

64-
public function getTranslatedDropdownOptionsHTML($paramSelectedFAQId = -1, $paramDefaultValue = -1, $paramDefaultLabel = "")
64+
public function getTranslatedDropdownOptionsHTML($paramSelectedFAQ_Id = -1, $paramDefaultValue = -1, $paramDefaultLabel = "")
6565
{
66-
return $this->getTrustedDropdownOptionsHTML($paramSelectedFAQId, $paramDefaultValue, $paramDefaultLabel, TRUE);
66+
return $this->getTrustedDropdownOptionsHTML($paramSelectedFAQ_Id, $paramDefaultValue, $paramDefaultLabel, TRUE);
6767
}
6868

6969
/**
70-
* @param int $paramSelectedFAQId
70+
* @param int $paramSelectedFAQ_Id
7171
* @param int $paramDefaultValue
7272
* @param string $paramDefaultLabel
7373
* @param bool $paramTranslated
7474
* @return string
7575
*/
76-
public function getTrustedDropdownOptionsHTML($paramSelectedFAQId = -1, $paramDefaultValue = -1, $paramDefaultLabel = "", $paramTranslated = FALSE)
76+
public function getTrustedDropdownOptionsHTML($paramSelectedFAQ_Id = -1, $paramDefaultValue = -1, $paramDefaultLabel = "", $paramTranslated = FALSE)
7777
{
7878
$validDefaultValue = StaticValidator::getValidInteger($paramDefaultValue, -1);
7979
$sanitizedDefaultLabel = sanitize_text_field($paramDefaultLabel);
8080
$faqIds = $this->getAllIds();
8181

8282
$retHTML = '';
83-
if($paramSelectedFAQId == $validDefaultValue)
83+
if($paramSelectedFAQ_Id == $validDefaultValue)
8484
{
8585
$retHTML .= '<option value="'.esc_attr($validDefaultValue).'" selected="selected">'.esc_html($sanitizedDefaultLabel).'</option>';
8686
} else
@@ -93,7 +93,7 @@ public function getTrustedDropdownOptionsHTML($paramSelectedFAQId = -1, $paramDe
9393
$faqDetails = $objFAQ->getDetails();
9494
$question = $paramTranslated ? $faqDetails['translated_question'] : $faqDetails['question'];
9595

96-
if($faqDetails['faq_id'] == $paramSelectedFAQId)
96+
if($faqDetails['faq_id'] == $paramSelectedFAQ_Id)
9797
{
9898
$retHTML .= '<option value="'.esc_attr($faqDetails['faq_id']).'" selected="selected">'.esc_html($question).'</option>';
9999
} else

Models/Update/NetworkUpdatesObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private function saveAllMessages($paramArrMessages)
6666
}
6767

6868
/**
69-
* For updating across multisite the network-enabled plugin from 5.0.0 to V6.0.0
69+
* For updating across multisite the network-enabled plugin from 6.0.2 to 6.1.0 semantic version
7070
* @note - Works only with WordPress 4.6+
7171
* @return bool
7272
* @throws \Exception

Models/Update/Patches61Z.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class Patches61Z extends AbstractDatabase implements StackInterface, Datab
1717
{
1818
const CURRENT_MAJOR = 6; // Positive integer [X]
1919
const CURRENT_MINOR = 1; // Positive integer [Y]
20-
const LATEST_PATCH = 1; // Positive integer [Z]
20+
const LATEST_PATCH = 2; // Positive integer [Z]
2121
const LATEST_RELEASE = ''; // String
2222
const LATEST_BUILD_METADATA = ''; // String
2323
const PLUGIN_PREFIX = "expandable_faq_";

Models/Update/SingleUpdatesObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private function saveAllMessages($paramArrMessages)
6464
}
6565

6666
/**
67-
* For updating single site plugin from 5.0.0 to V6.0.0
67+
* For updating single site plugin from 6.0.2 to 6.1.0 semantic version
6868
*/
6969
public function do602_UpdateTo610()
7070
{

0 commit comments

Comments
 (0)