Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wp-builder
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
wp-builder
Commits
b0075eec
Commit
b0075eec
authored
7 years ago
by
dyszczo
Browse files
Options
Downloads
Patches
Plain Diff
translation
parent
7ca50698
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!3
Merge of devel to master
,
!2
translation
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Builder/InfoBuilder.php
+1
-1
1 addition, 1 deletion
src/Builder/InfoBuilder.php
src/Plugin/AbstractPlugin.php
+5
-5
5 additions, 5 deletions
src/Plugin/AbstractPlugin.php
with
6 additions
and
6 deletions
src/Builder/InfoBuilder.php
+
1
−
1
View file @
b0075eec
...
@@ -17,7 +17,7 @@ class InfoBuilder extends AbstractBuilder {
...
@@ -17,7 +17,7 @@ class InfoBuilder extends AbstractBuilder {
*
*
* @return AbstractPlugin
* @return AbstractPlugin
*/
*/
public
function
build_from_info
(
\WPDesk_
Plugin_Info
$info
)
{
public
function
build_from_info
(
\WPDesk_
Buildable
$info
)
{
$class_name
=
apply_filters
(
self
::
FILTER_PLUGIN_CLASS
,
$info
->
get_class_name
()
);
$class_name
=
apply_filters
(
self
::
FILTER_PLUGIN_CLASS
,
$info
->
get_class_name
()
);
/** @var AbstractPlugin $plugin */
/** @var AbstractPlugin $plugin */
...
...
This diff is collapsed.
Click to expand it.
src/Plugin/AbstractPlugin.php
+
5
−
5
View file @
b0075eec
...
@@ -8,7 +8,7 @@ namespace WPDesk\PluginBuilder\Plugin;
...
@@ -8,7 +8,7 @@ namespace WPDesk\PluginBuilder\Plugin;
* @author Grzegorz
* @author Grzegorz
*
*
*/
*/
abstract
class
AbstractPlugin
{
abstract
class
AbstractPlugin
implements
\WPDesk_Translable
{
/** @var \WPDesk_Plugin_Info */
/** @var \WPDesk_Plugin_Info */
protected
$plugin_info
;
protected
$plugin_info
;
...
@@ -52,7 +52,7 @@ abstract class AbstractPlugin {
...
@@ -52,7 +52,7 @@ abstract class AbstractPlugin {
* @return string
* @return string
*/
*/
public
function
get_text_domain
()
{
public
function
get_text_domain
()
{
return
$this
->
get_namespace
();
return
$this
->
plugin_info
->
get_text_domain
();
}
}
/**
/**
...
@@ -127,20 +127,20 @@ abstract class AbstractPlugin {
...
@@ -127,20 +127,20 @@ abstract class AbstractPlugin {
$support_link
=
get_locale
()
===
'pl_PL'
?
'https://www.wpdesk.pl/support/'
:
'https://www.wpdesk.net/support'
;
$support_link
=
get_locale
()
===
'pl_PL'
?
'https://www.wpdesk.pl/support/'
:
'https://www.wpdesk.net/support'
;
$plugin_links
=
array
(
$plugin_links
=
array
(
'<a href="'
.
$support_link
.
'">'
.
__
(
'Support'
,
'wpdesk-plugin'
)
.
'</a>'
,
'<a href="'
.
$support_link
.
'">'
.
__
(
'Support'
,
$this
->
get_text_domain
()
)
.
'</a>'
,
);
);
$links
=
array_merge
(
$plugin_links
,
$links
);
$links
=
array_merge
(
$plugin_links
,
$links
);
if
(
$this
->
docs_url
)
{
if
(
$this
->
docs_url
)
{
$plugin_links
=
array
(
$plugin_links
=
array
(
'<a href="'
.
$this
->
docs_url
.
'">'
.
__
(
'Docs'
,
'wpdesk-plugin'
)
.
'</a>'
,
'<a href="'
.
$this
->
docs_url
.
'">'
.
__
(
'Docs'
,
$this
->
get_text_domain
()
)
.
'</a>'
,
);
);
$links
=
array_merge
(
$plugin_links
,
$links
);
$links
=
array_merge
(
$plugin_links
,
$links
);
}
}
if
(
$this
->
settings_url
)
{
if
(
$this
->
settings_url
)
{
$plugin_links
=
array
(
$plugin_links
=
array
(
'<a href="'
.
$this
->
settings_url
.
'">'
.
__
(
'Settings'
,
'wpdesk-plugin'
)
.
'</a>'
,
'<a href="'
.
$this
->
settings_url
.
'">'
.
__
(
'Settings'
,
$this
->
get_text_domain
()
)
.
'</a>'
,
);
);
$links
=
array_merge
(
$plugin_links
,
$links
);
$links
=
array_merge
(
$plugin_links
,
$links
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment