Skip to content

Commit 0f830b0

Browse files
committed
Update method access in export class
1 parent 2ac0721 commit 0f830b0

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

includes/class-export.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Code_Snippets_Export {
2525
* The IDs
2626
* @var array
2727
*/
28-
public $snippet_ids = array();
28+
protected $snippet_ids = array();
2929

3030
/**
3131
* The name of the table to fetch snippets from
@@ -38,29 +38,29 @@ class Code_Snippets_Export {
3838
* Either 'xml' or 'php'
3939
* @var object
4040
*/
41-
public $format;
41+
protected $format;
4242

4343
/**
4444
* The DOM document.
4545
* Only used in XML exports
4646
* @var object
4747
*/
48-
public $dom;
48+
protected $dom;
4949

5050
/**
5151
* The DOM document root element
5252
* Only used in XML exports
5353
* @var object
5454
*/
55-
public $root;
55+
protected $root;
5656

5757
/**
5858
* Constructor function
5959
* @param array $ids The IDs of the snippets to export
6060
* @param string $table The name of the table to fetch snippets from
6161
* @param string $format The format of the export file
6262
*/
63-
function __construct( $ids, $table, $format = 'xml' ) {
63+
public function __construct( $ids, $table, $format = 'xml' ) {
6464
$this->snippet_ids = (array) $ids;
6565
$this->table_name = $table;
6666
$this->format = 'php' === $format ? 'php' : 'xml';
@@ -71,7 +71,7 @@ function __construct( $ids, $table, $format = 'xml' ) {
7171
* Build the export file name
7272
* @return string
7373
*/
74-
function get_filename() {
74+
public function get_filename() {
7575

7676
if ( 1 == count( $this->snippet_ids ) ) {
7777
/* If there is only snippet to export, use its name instead of the site name */
@@ -133,8 +133,6 @@ protected function do_header_comments() {
133133
$this->dom->appendChild( $gen );
134134
}
135135

136-
137-
138136
/**
139137
* Process all snippet items
140138
*/

0 commit comments

Comments
 (0)