admin
11 years ago
plugins
11 years ago
widget
11 years ago
fixes-archive.php
11 years ago
fixes-dates.php
11 years ago
fixes-get_archives.php
11 years ago
fixes-get_calendar.php
11 years ago
fixes-misc.php
11 years ago
fixes-permalinks.php
11 years ago
general.php
11 years ago
install.php
11 years ago
parsidate.php
11 years ago
settings.php
11 years ago
install.php
31 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Plugin installer helper |
| 4 | * |
| 5 | * @author Mobin Ghasempoor |
| 6 | * @package WP-Parsidate |
| 7 | * @subpackage Core/Install |
| 8 | */ |
| 9 | |
| 10 | register_activation_hook( WP_PARSI_ROOT, 'wpp_install' ); |
| 11 | |
| 12 | /** |
| 13 | * Copys files from plugin languages folder to global languages folder |
| 14 | * |
| 15 | * @since 1.0 |
| 16 | * @return void |
| 17 | */ |
| 18 | function wpp_install() { |
| 19 | |
| 20 | /*if ( ! is_dir( WP_CONTENT_DIR . '/languages' ) ) |
| 21 | mkdir( WP_CONTENT_DIR . '/languages/' ); |
| 22 | |
| 23 | $source = WP_PARSI_DIR . 'languages/*'; |
| 24 | $destination = WP_CONTENT_DIR . '/languages/'; |
| 25 | $files = glob( $source ); |
| 26 | |
| 27 | foreach( $files as $file ) |
| 28 | @ copy( $file, $destination . basename( $file ) );*/ |
| 29 | |
| 30 | update_option( 'wpp_settings', array() ); |
| 31 | } |