'.esc_html__( 'Here you can make settings for the mobile.de API. Once the correct API credentials are set your vehicles are getting imported automatically.', 'ad-integration-for-mobile-de-api' ).'

'; echo '

'.esc_html__( 'Please include a note in your website\'s privacy policy, depending on applicable law, that you use data, content, and images from mobile.de.', 'ad-integration-for-mobile-de-api' ).'

'; }, 'mobile_api' ); register_setting( 'mobile_api', 'mobile_api_username', 'sanitize_text_field' ); add_settings_field( 'mobile_api_username', __( 'Username', 'ad-integration-for-mobile-de-api' ), function() { ?>

'array', 'sanitize_callback' => 'mobile_api_sanitize_filter', 'default' => array( 'category' ) ) ); add_settings_field( 'mobile_api_filter', // translators: %s is a placeholder for a filter sprintf( __( 'Filter by %s', 'ad-integration-for-mobile-de-api' ), '' ), function() { $filters = get_option( 'mobile_api_filter', array( 'category' ) ); $checkboxes = array( 'category' => __( 'Model', 'ad-integration-for-mobile-de-api' ), 'fuel' => __( 'Fuel', 'ad-integration-for-mobile-de-api' ), 'gearbox' => __( 'Gear', 'ad-integration-for-mobile-de-api' ), 'firstRegistration' => __( 'First Registration', 'ad-integration-for-mobile-de-api' ), 'mileage' => __( 'Mileage', 'ad-integration-for-mobile-de-api' ) ); foreach ( $checkboxes as $key => $label ) { $checked = in_array( $key, (array) $filters, true ); printf( ' %s
', esc_attr( $key ), checked( $checked, true, false ), // translators: %s is the filter attribute sprintf( esc_html__( 'Filter by %s', 'ad-integration-for-mobile-de-api' ), esc_html( $label ) ), ); } }, 'mobile_api', 'mobile_api_general_section' ); register_setting( 'mobile_api', 'mobile_api_last_sync', 'sanitize_text_field' ); add_settings_field( 'mobile_api_last_sync', __( 'Last sync', 'ad-integration-for-mobile-de-api' ), function() { $username = get_option( 'mobile_api_username' ); $password = get_option( 'mobile_api_password' ); $orderby = get_option( 'mobile_api_orderby' ); $last_sync = get_option( 'mobile_api_last_sync' ); ?>

ads ) ) : $total = $json->total; $limit = $json->maxPages; endif; ?>
Spinner /

'.esc_html__( 'With a custom permalink structure, the URL of a single vehicle can be customized. Please note: Any changes will result in all URLs being recreated. This means that the vehicles may no longer be accessible via the previous links. Therefore, please be careful.', 'ad-integration-for-mobile-de-api' ).'

'; }, 'mobile_api' ); add_option( 'mobile_api_custom_slug', 'vehicle/%mobile_api_vehicle_category%' ); register_setting( 'mobile_api', 'mobile_api_custom_slug', array( 'sanitize_callback' => 'mobile_api_sanitize_slug_field' ) ); add_settings_field( 'mobile_api_custom_slug', __( 'Custom slug for single pages', 'ad-integration-for-mobile-de-api' ), function() { $custom_slug = get_option( 'mobile_api_custom_slug' ); ?>

'.site_url().'/'.str_replace( '%mobile_api_vehicle_category%', 'limousine', $custom_slug ).'/model/' ) ); ?>

'.site_url().'/'.$custom_term.'/audi/' ) ); ?>

'.__( 'Settings', 'ad-integration-for-mobile-de-api' ).'' ); // Add link as first element in array return $links; } add_filter( 'plugin_action_links_ad-integration-for-mobile-de-api/mobile-api.php', 'mobile_api_add_settings_link_plugin_page' ); function mobile_api_options_page() { ?>

›

prefix.'mobile_api_logs'; // Ends the statement before the require, PHPCS would otherwise take "create" in the file name for a schema change // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $table_exists = $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %i', $table_name ) ) === $table_name; if ( !$table_exists ) require plugin_dir_path( __DIR__ ) . 'db/create.php'; // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $logs = $wpdb->get_results( $wpdb->prepare( 'SELECT * FROM %i ORDER BY timestamp DESC LIMIT 999', $table_name ) ); foreach ( $logs as $log ) { $log_id = $log->log_id; $ad_key = $log->ad_key; $action = $log->action; $timestamp = $log->timestamp; echo ''; } ?>
'.esc_html( $log_id ).''.esc_html( $ad_key ).''.esc_html( $action ).''.esc_html( $timestamp ).'
'.esc_html__( 'Provide vehicles as a data source for Google vehicle ads in Google Merchant Center. Only vehicle types allowed by Google are included: cars and motorhomes, no motorbikes or commercial vehicles.', 'ad-integration-for-mobile-de-api' ).'

'; }, 'mobile_api_google' ); register_setting( 'mobile_api_options_group_google', 'mobile_api_google_store_code', 'sanitize_text_field' ); add_settings_field( 'mobile_api_google_store_code', __( 'Store code', 'ad-integration-for-mobile-de-api' ), function() { ?>

'boolean', 'sanitize_callback' => 'rest_sanitize_boolean', 'default' => false ) ); add_settings_field( 'mobile_api_google_include_heavy', __( 'Vehicles above 3.5 t', 'ad-integration-for-mobile-de-api' ), function() { ?>