control-ports.sh
Manages and updates port-related data in a WordPress-based CMS, including multilingual support and post creation.
Usage
./control-ports.sh
Description
- Sets up the script environment and sources required functions.
- Logs the start and end of the process.
- Executes
control-tables.shto manage database tables. - Handles multilingual data if WPML is enabled.
- Processes XML files for cruises and loads data into the
ff_traveltek_portstable. - Deletes outdated data if corresponding XML files are missing.
- Updates the
ff_traveltek_portstable with metadata from WordPress. - Identifies ports missing associated WordPress posts and creates new posts with metadata.
- Handles translations for multilingual setups.
- Logs detailed information about the process.
- Optionally sends email notifications (commented out).
Dependencies
functions.sh: Utility functions.mysql: MySQL commands.wp: WP-CLI for WordPress operations.
Notes
- Ensure proper permissions and configurations for MySQL, WordPress CLI, and file paths before running.
- Intended for use by developers or system administrators familiar with WordPress and server scripting.
For further details, refer to the comments in the script or contact the development team.