File tree 2 files changed +25
-2
lines changed
2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -425,7 +425,8 @@ public function set_template( $template ) {
425
425
$ ancestor = $ this ->get_ancestor ();
426
426
427
427
if ( $ template ) {
428
- if ( $ this == $ ancestor ) {
428
+
429
+ if ( $ this === $ ancestor ) {
429
430
$ this ->template = $ template ;
430
431
}
431
432
else {
@@ -675,6 +676,28 @@ public function run_restricted( $function ) {
675
676
}
676
677
}
677
678
679
+ /**
680
+ * Rename current model's data block. Probably for template changing purposes.
681
+ *
682
+ * @type function
683
+ * @date 14/09/2016
684
+ * @since 1.2.0
685
+ *
686
+ *
687
+ * @param $function (string)
688
+ * @param $args (array)
689
+ * @return mixed
690
+ */
691
+ protected function rename_model ( $ name ) {
692
+ $ original = $ this ->class_name ;
693
+ $ this ->class_name = $ name ;
694
+
695
+ if ( isset ( $ this ->data [ $ original ] ) ) {
696
+ $ this ->data [ $ name ] = $ this ->data [ $ original ];
697
+ unset( $ this ->data [ $ original ] );
698
+ }
699
+ }
700
+
678
701
/**
679
702
* A recursive array search.
680
703
*
Original file line number Diff line number Diff line change 6
6
Author: Miika Arponen & Ville Siltala / Geniem Oy
7
7
Author URI: http://www.geniem.com
8
8
License: GPLv3
9
- Version: 1.1.23
9
+ Version: 1.2.0
10
10
*/
11
11
12
12
final class DustPress {
You can’t perform that action at this time.
0 commit comments