View all sites to find the ID.', 'wp-domain-mapping' ), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url( $site_list_url ) ); ?>

active : 0, 1 ); ?> />

prepare( "domain LIKE %s", '%' . $wpdb->esc_like( sanitize_text_field( $_GET['s'] ) ) . '%' ); } if ( ! empty( $_GET['blog_id'] ) ) { $where[] = $wpdb->prepare( "blog_id = %d", absint( $_GET['blog_id'] ) ); } if ( isset( $_GET['active'] ) && $_GET['active'] !== '' ) { $where[] = $wpdb->prepare( "active = %d", absint( $_GET['active'] ) ); } $where_sql = $where ? ' WHERE ' . implode( ' AND ', $where ) : ''; $tables = dm_get_table_names(); // Count total items for pagination $total_items = $wpdb->get_var( "SELECT COUNT(*) FROM {$tables['domains']}" . $where_sql ); $total_pages = ceil( $total_items / $per_page ); // Get the domains with pagination $rows = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$tables['domains']}" . $where_sql . " ORDER BY id DESC LIMIT %d, %d", $offset, $per_page )); // Display the domains table dm_domain_listing( $rows ); // Pagination if ( $total_pages > 1 ) : ?>
add_query_arg( 'paged', '%#%' ), 'format' => '', 'prev_text' => __( '«' ), 'next_text' => __( '»' ), 'total' => $total_pages, 'current' => $paged, 'mid_size' => 2, 'end_size' => 1, ) ); ?>

Note: %s', 'wp-domain-mapping' ), dm_idn_warning() ); ?>

get_var( "SELECT COUNT(DISTINCT blog_id) FROM {$tables['domains']}" ); echo esc_html( $sites_with_domains ); ?>

' . esc_html__( 'No domains found.', 'wp-domain-mapping' ) . '

'; return; } $edit_url = network_admin_url( file_exists( ABSPATH . 'wp-admin/network/site-info.php' ) ? 'site-info.php' : ( file_exists( ABSPATH . 'wp-admin/ms-sites.php' ) ? 'ms-sites.php' : 'wpmu-blogs.php' ) ); ?>
blog_id, 'blogname', esc_html__( 'Unknown', 'wp-domain-mapping' ) ); ?>
blog_id ); ?> domain ); ?> active == 1 ) : ?>
active != 1 ) : ?>

get_var( "SHOW TABLES LIKE '{$tables['logs']}'" ) != $tables['logs'] ) { echo '

' . esc_html__('Domain mapping logs table is missing. Please deactivate and reactivate the plugin.', 'wp-domain-mapping') . '

'; return; } // Get pagination parameters $per_page = isset( $_GET['logs_per_page'] ) ? absint( $_GET['logs_per_page'] ) : 50; $paged = isset( $_GET['logs_paged'] ) ? absint( $_GET['logs_paged'] ) : 1; $offset = ( $paged - 1 ) * $per_page; // Get action filter $action_filter = isset( $_GET['log_action'] ) ? sanitize_text_field( $_GET['log_action'] ) : ''; // Build WHERE clause for filtering $where = array(); if ( ! empty( $action_filter ) ) { $where[] = $wpdb->prepare( "action = %s", $action_filter ); } $where_sql = $where ? ' WHERE ' . implode( ' AND ', $where ) : ''; // Count total logs for pagination $total_logs = $wpdb->get_var( "SELECT COUNT(*) FROM {$tables['logs']}" . $where_sql ); $total_pages = ceil( $total_logs / $per_page ); // Get logs with pagination $logs = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$tables['logs']}" . $where_sql . " ORDER BY timestamp DESC LIMIT %d, %d", $offset, $per_page )); // Get available actions for filter $actions = $wpdb->get_col( "SELECT DISTINCT action FROM {$tables['logs']}" ); if ( ! $logs ) { echo '

' . esc_html__( 'No domain mapping logs available.', 'wp-domain-mapping' ) . '

'; return; } // Include the logs table template include WP_DOMAIN_MAPPING_DIR_PATH . 'admin/logs-table.php'; } ?>