menu_id = $menu_id; $this->icl_ms = $icl_ms; $this->labels = array( 'del' => array( __ ( 'Remove %s', 'sitepress' ), '' ), 'label_changed' => array( __ ( 'Rename label to %s', 'sitepress' ), '' ), 'url_changed' => array( __ ( 'Update URL to %s', 'sitepress' ), '' ), 'url_missing' => array( __ ( 'Untranslated URL %s', 'sitepress' ), '' ), 'mov' => array( __ ( 'Change menu order for %s', 'sitepress' ), '' ), 'add' => array( __ ( 'Add %s', 'sitepress' ), '' ), 'options_changed' => array( __( 'Update %s menu option to %s', 'sitepress' ), '') ); if ( defined( 'WPML_ST_FOLDER' ) ) { $this->labels['label_missing'] = array( __ ( 'Untranslated string %s', 'sitepress' ), $this->print_label_missing_text ( $icl_ms, $menu_id ) ); } } private function print_label_missing_text( $icl_menus_sync, $menu_id ) { $context_menu_name = $icl_menus_sync->menus[ $menu_id ][ "name" ] . " menu"; $res = ' ' . sprintf ( __ ( 'The selected strings can now be translated using the string translation screen', 'wpml-string-translation' ), ' href="admin.php?page=' . WPML_ST_FOLDER . '/menu/string-translation.php&context=' . $context_menu_name . '"' ); return $res; } function print_sync_field( $index ) { global $sitepress; $icl_menus_sync = $this->icl_ms; $menu_id = $this->menu_id; // items translations / del if ( isset( $icl_menus_sync->sync_data[ $index ][ $menu_id ] ) ) { foreach ( $icl_menus_sync->sync_data[ $index ][ $menu_id ] as $item_id => $languages ) { foreach ( $languages as $lang_code => $name ) { $additional_data = $this->get_additional_data ( $index, $name ); $item_name = $this->get_item_name ( $index, $name ); $lang_details = $sitepress->get_language_details ( $lang_code ); ?>