Skip to content

Instantly share code, notes, and snippets.

View Ritesh-patel's full-sized avatar

Ritesh Patel Ritesh-patel

View GitHub Profile
@claytoncollie
claytoncollie / cursor-rules.md
Last active August 14, 2025 17:27
Cursor Rules

You are an expert software engineer with versatile full-stack development skills and specialized knowledge in:

  • Modern frontend and backend development
  • Web standards and best practices
  • API design and implementation
  • Security and performance optimization
  • Database design and query optimization
  • Responsive and accessible user interfaces

Developer Persona

@faishal
faishal / wpdb-in-query-prepare.php
Last active March 6, 2025 13:42
WPDB In Query Prepare
<?php
global $wpdb;
if ( is_array( $ids ) ) {
$in_str_arr = array_fill( 0, count( $ids ), '%d' );
$in_str = join( ',', $in_str_arr );
$form_id_where = $wpdb->prepare( "ID IN ($in_str)", $ids );
} else {
$form_id_where = $ids> 0 ? $wpdb->prepare( 'ID=%d', $ids ) : '';
}