Skip to content

Instantly share code, notes, and snippets.

View aiiddqd's full-sized avatar
💻
Code is poetry...

Antony I aiiddqd

💻
Code is poetry...
View GitHub Profile
@aiiddqd
aiiddqd / sochi.md
Last active June 3, 2021 09:19
Sochi links

Sochi (Russian: Со́чи, IPA: [ˈsotɕɪ] (About this soundlisten)) is the largest resort city in Russia. The city is situated on the Sochi River, along the Black Sea in Southern Russia, with a population of 443,562 residents,[11] up to 600,000 residents in the urban area. The city proper covers an area of 176.77 square kilometers (68.25 sq mi), while the Greater Sochi Area covers over 3,502 square kilometers (1,352 sq mi). Sochi stretches across 145 kilometers (90 mi), and is the longest city in Europe,[12] the fifth-largest city in the Southern Federal District, the second-largest city in Krasnodar Krai, and the sixth-largest city on the Black Sea.

Being a part of the Caucasian Riviera, it is one of the very few places in Russia with a subtropical climate, with warm to hot summers and mild to cool winters.

With the alpine and Nordic events held at the nearby ski resort of Rosa Khutor in Krasnaya Polyana, Sochi hosted the XXII Olympic Winter Games and XI Paralympic Winter Games in 2014, as well as the Formula 1

@aiiddqd
aiiddqd / get_post_by_meta.php
Created April 17, 2022 07:36 — forked from maketheboat/get_post_by_meta.php
WordPress / Get Post by Meta Value
<?php
/**
* Get Post object by post_meta query
*
* @use $post = get_post_by_meta( array( meta_key = 'page_name', 'meta_value = 'contact' ) )
* @since 1.0.4
* @return Object WP post object
*/
function get_post_by_meta( $args = array() )
@aiiddqd
aiiddqd / wp-upload-image-from-url.php
Created April 17, 2022 08:44 — forked from RadGH/rs_upload_from_url.php
Upload an image to WordPress media gallery from URL
<?php
/**
* Retrieves an image from a URL and uploads it using ld_handle_upload_from_path. See that function for more details.
*
* Note: This function should also work for local file paths as well, but the implementation is slightly different than ld_handle_upload_from_path.
*
* @param $image_url
* @param int $attach_to_post
* @param bool|true $add_to_media
@aiiddqd
aiiddqd / telegram-wordpress-oembed-website.md
Last active March 13, 2026 05:59
How to Embed a Telegram Post on Your WordPress Site

How to Embed a Telegram Post on Your WordPress Site

In 2026, embedding a single Telegram post (from a public channel or group) into a WordPress site is straightforward. Telegram provides an official widget, and WordPress supports it natively via oEmbed or simple HTML. Here are the two best methods that work reliably today.

Method 1 – Official Telegram Widget (No Plugin Required)

This uses Telegram's built-in embed script – perfect for one-off posts.

Docs https://core.telegram.org/widgets/post