| @@ -73,10 +73,10 @@ | ||
| 73 | 73 | 'text_link_color' => isset( $updated_data['text_link_color'] ) ? $updated_data['text_link_color'] : '', |
| 74 | 74 | ]; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - public function get_by_template( $template_name ) { | |
| 78 | - $template_data = TemplateModel::find_by_name( $template_name ); | |
| 77 | + public function get_by_template( $template_name, $variant = '' ) { | |
| 78 | + $template_data = TemplateModel::find_by_name( $template_name, '', $variant ); | |
| 79 | 79 | if ( empty( $template_data['id'] ) ) { |
| 80 | 80 | return []; |
| 81 | 81 | } |
| 82 | 82 | $revisions = wp_get_post_revisions( $template_data['id'] ); |
| @@ -102,10 +102,10 @@ | ||
| 102 | 102 | $result['text_link_color'] = get_post_meta( $revision_id, $this->meta_keys['text_link_color'], true ); |
| 103 | 103 | return $result; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - public function delete_by_template( $template_name ) { | |
| 107 | - $template_data = TemplateModel::find_by_name( $template_name ); | |
| 106 | + public function delete_by_template( $template_name, $variant = '' ) { | |
| 107 | + $template_data = TemplateModel::find_by_name( $template_name, '', $variant ); | |
| 108 | 108 | if ( empty( $template_data['id'] ) ) { |
| 109 | 109 | return [ |
| 110 | 110 | 'success' => false, |
| 111 | 111 | ]; |