Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Date-based Taxonomy Archives
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
WP Plugins
Date-based Taxonomy Archives
Commits
80f105d3
Commit
80f105d3
authored
12 years ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
Make class variables private and provide access via a magic getter.
parent
74e765a5
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
date-based-taxonomy-archives.php
+17
-4
17 additions, 4 deletions
date-based-taxonomy-archives.php
with
17 additions
and
4 deletions
date-based-taxonomy-archives.php
+
17
−
4
View file @
80f105d3
...
@@ -31,7 +31,7 @@ class Date_Based_Taxonomy_Archives {
...
@@ -31,7 +31,7 @@ class Date_Based_Taxonomy_Archives {
/**
/**
* Class variables
* Class variables
*/
*/
var
$defaults
=
array
(
private
$defaults
=
array
(
'taxonomies'
=>
false
,
'taxonomies'
=>
false
,
'show_post_count'
=>
false
,
'show_post_count'
=>
false
,
'limit'
=>
''
,
'limit'
=>
''
,
...
@@ -40,10 +40,10 @@ class Date_Based_Taxonomy_Archives {
...
@@ -40,10 +40,10 @@ class Date_Based_Taxonomy_Archives {
'echo'
=>
true
'echo'
=>
true
);
);
var
$cache_key_incrementor
=
'incrementor'
;
private
$cache_key_incrementor
=
'incrementor'
;
var
$cache_group
=
'date_based_taxonomy_archives'
;
private
$cache_group
=
'date_based_taxonomy_archives'
;
var
$filter_archive_links
=
false
;
private
$filter_archive_links
=
false
;
/**
/**
* Silence is golden!
* Silence is golden!
...
@@ -66,6 +66,19 @@ class Date_Based_Taxonomy_Archives {
...
@@ -66,6 +66,19 @@ class Date_Based_Taxonomy_Archives {
return
self
::
$__instance
;
return
self
::
$__instance
;
}
}
/**
* Magic getter to provide access to class variables that were public prior to v0.3.
*
* @param string $name
* @return mixed
*/
public
function
__get
(
$name
)
{
if
(
property_exists
(
$this
,
$name
)
)
return
$this
->
$name
;
else
return
null
;
}
/**
/**
* Register actions and filters
* Register actions and filters
*
*
...
...
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