Skip to content

Instantly share code, notes, and snippets.

View siaeb's full-sized avatar
🎯
Focusing

SiavashEbrahimi siaeb

🎯
Focusing
View GitHub Profile
@meorajrul
meorajrul / Laragon Multiple PHP Version (package-manager).md
Last active May 10, 2024 13:06
laragon-multi-php-version-via-package-manager.md

Manage your php version via Laragon PHP UI switcher with help of powershell package manager.

For this sake ill be using https://github.com/mlocati/powershell-phpmanager) package manage to handle multi version instead of download the zip file manually. The reason why i want to using this package manager is because it easy for me to add new extension like how linux and mac do. For example, installing imagick on windows is such a hassle. Not to mention if you keep switching your laptop or pc it could make it hard to just install all back without any semi or automated script laying around.

Disclaimer

@MoienTajik
MoienTajik / iranian-phone-numbers-regex.md
Last active May 7, 2024 12:55
Regex For Iranian Mobile Phone Numbers

Regex For Iranian Phone Numbers

This regex supports all kinds of Iranian mobile phone numbers :

^(\+98|0)?9\d{9}$


Regex Visualized

@jameslaws
jameslaws / get_form_id_name.php
Created November 18, 2015 13:59
Ninja Forms - Get all form IDs and Names
<?php
$forms = Ninja_Forms()->form()->get_forms();
foreach ( $forms as $form ) {
$form_id = $form->get_id();
$form_name = $form->get_setting( 'title' );
// Do more stuff
}
@mattradford
mattradford / licence activation.php
Last active October 28, 2023 19:25
ACF5 Pro licence activation. Could be adapted for any other plugin that requires a licence key, but doesn't yet support defining it in wp-config. Fires on theme activation.
// Place this in wp-config
define( 'ACF_5_KEY', 'yourkeyhere' );
// Set ACF 5 license key on theme activation. Stick in your functions.php or equivalent.
function auto_set_license_keys() {
if ( ! get_option( 'acf_pro_license' ) && defined( 'ACF_5_KEY' ) ) {
$save = array(
'key' => ACF_5_KEY,
@llbbl
llbbl / awesome-php.md
Last active April 5, 2024 09:51 — forked from ziadoz/awesome-php.md
Awesome PHP Libraries and Resources

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Categories

  • Composer
  • Composer Related
  • Frameworks
  • Micro Frameworks
@Dimasmagadan
Dimasmagadan / WP_Query.php
Last active November 21, 2022 06:27 — forked from luetkemj/wp-query-ref.php
#WordPress query with args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
//////Author Parameters - Show posts associated with certain author.