Skip to content

Instantly share code, notes, and snippets.

@manishtiwari25
manishtiwari25 / world_currency_symbols.json
Last active July 18, 2024 00:37
List Of Countries With States And Other Useful Information, Updated On 07/01/2024 00:08:48
[
{
"Flag": "",
"CountryName": "Andorra",
"Currency": "Euro Member Countries",
"Code": "EUR",
"Symbol": "\u20AC",
"SymbolImage": "https://www.xe.com/symbols-page/symbols/curSymbol8364.gif"
},
{
@alexmustin
alexmustin / form-content.html
Created February 4, 2018 21:31
WordPress AJAX Live Search of Post Title
<!-- // The HTML (could be part of page content) // -->
<input type="text" name="keyword" id="keyword" onkeyup="fetch()"></input>
<div id="datafetch">Search results will appear here</div>
@pauln
pauln / README.md
Created May 5, 2017 00:11
Simple WordPress bulk insert function

Simple WordPress Bulk Insert

A very simple function to perform bulk SQL inserts, since WPDB doesn't provide one directly. The aim is for simplicity - both in the function itself, and in using it - rather than being a massive beast which covers all possible incorrect usage scenarios. Provide it with clean, consistent data, and it should hopefully be able to do what you want without issue.

Notes:

  • Provide a table name and an array of associative arrays of rows to insert
  • Column names are pulled from the first row of data automatically
  • Make sure you provide the same fields in each row (there's no protection for this)
  • Data types (for WPDB placeholders) are auto-detected for each individual value (using is_numeric())
  • There is no protection for exceeding maximum query size (i.e. MySQL's max_allowed_packet); you could pre-batch into smaller "safe" chunks if you need to handle this case - or just find a better way to insert such a large amount of data
@Elgameel
Elgameel / functions.php
Last active April 29, 2022 06:17
Add the following code to your Genesis Child theme functions.php file. Read the full guide here: https://wp-me.com/last-updated-date-post-meta-data-genesis/
<?php // Ignore this line
/*
* Replace Post publish date with Post update date in Genesis
* More info: https://wp-me.com/last-updated-date-post-meta-data-genesis/
*/
add_filter( 'genesis_post_info', 'wpme_post_info_filter' );
function wpme_post_info_filter($post_info) {
if ( !is_page() ) {
$post_info = '[post_modified_date] ' . __( 'by', 'genesis' ) . ' [post_author_posts_link] [post_comments] [post_edit]';
@JiveDig
JiveDig / edd_download_slug.php
Created November 6, 2013 17:51
Change Easy Digital Downloads (EDD) 'download' slug to something else. Refresh permalinks after changing this.
// Change 'download' slug to something else
define('EDD_SLUG', 'books');
@SeanJA
SeanJA / GIFEncoder.class.php
Last active November 8, 2021 17:39
dynamic animated gif clock
<?php
/*
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Formerly known as:::
:: GIFEncoder Version 2.0 by László Zsidi, http://gifs.hu
::
:: This class is a rewritten 'GifMerge.class.php' version.
::
:: Modification: