| @@ -1,19 +1,25 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | |
| 4 | 4 | function deepl_install_plugin() { |
| 5 | - if( !get_option( 'deepl_plugin_installed') ) { | |
| 5 | + if ( !get_option( 'deepl_plugin_installed') ) { | |
| 6 | 6 | update_option( 'deepl_plugin_installed', 0 ); |
| 7 | 7 | } |
| 8 | - if( !get_option( 'wpdeepl_metabox_post_types') ) { | |
| 8 | + if ( !get_option( 'wpdeepl_metabox_post_types') ) { | |
| 9 | 9 | update_option( 'wpdeepl_metabox_post_types', array( 'post', 'page' )); |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | - if( !get_option( 'wpdeepl_metabox_context') ) { | |
| 12 | + if ( !get_option( 'wpdeepl_metabox_context') ) { | |
| 13 | 13 | update_option('wpdeepl_metabox_context','side'); |
| 14 | 14 | } |
| 15 | - if( !get_option( 'wpdeepl_metabox_priority' ) ) { | |
| 15 | + if ( !get_option( 'wpdeepl_metabox_priority' ) ) { | |
| 16 | 16 | update_option('wpdeepl_metabox_priority','high'); |
| 17 | 17 | } |
| 18 | - | |
| 18 | + foreach( array( 'wpdeepl_tpost_title', 'wpdeepl_tpost_content', 'wpdeepl_tpost_excerpt' ) as $key ) { | |
| 19 | + if( !get_option( $key ) ) { | |
| 20 | + update_option( $key, 1 ); | |
| 21 | + } | |
| 22 | + } | |
| 23 | + | |
| 24 | + update_option('wpdeepl_plugin_installed', 1 ); | |
| 19 | 25 | } |