| @@ -65,24 +65,9 @@ | ||
| 65 | 65 | default: |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | if ( $is_can_set_default ) { |
| 69 | - $singleton_types = apply_filters( | |
| 70 | - 'rtsb/builder/singleton_types', | |
| 71 | - array_keys( BuilderFns::builder_page_types() ) | |
| 72 | - ); | |
| 73 | - | |
| 74 | - if ( in_array( $page_type, $singleton_types, true ) ) { | |
| 75 | - // Singleton path: one enabled template per type — overwrite the type-wide option. | |
| 76 | - TemplateSettings::instance()->set_option( $option_name, $default_page_id ); | |
| 77 | - } elseif ( $page_id ) { | |
| 78 | - // Pool path: multi-enabled type — flip per-post meta flag, don't touch the type-wide option. | |
| 79 | - if ( ! empty( $default_page_id ) ) { | |
| 80 | - update_post_meta( $page_id, '_rtsb_tb_enabled_in_pool', 'on' ); | |
| 81 | - } else { | |
| 82 | - delete_post_meta( $page_id, '_rtsb_tb_enabled_in_pool' ); | |
| 83 | - } | |
| 84 | - } | |
| 69 | + TemplateSettings::instance()->set_option( $option_name, $default_page_id ); | |
| 85 | 70 | } |
| 86 | 71 | |
| 87 | 72 | do_action( 'rtsb/set/builder/default/template', $_POST, $page_id ); |
| 88 | 73 | |