Skip to content

Instantly share code, notes, and snippets.

View KeylorCR's full-sized avatar

Keylor Mendoza KeylorCR

View GitHub Profile
@maugelves
maugelves / polylang.php
Last active June 11, 2021 05:56
This functions returns a WordPress page permalink for the current language by its slug.
<?php
/**
* This function returns a page permalink
* for the current website language.
*
* @author Mauricio Gelves <mg@maugelves.com>
* @param $page_slug string WordPress page slug
* @return string|false Page Permalink or false if the page is not found
*/
@asugai
asugai / Install composer on Amazon AMI running on EC2
Last active March 22, 2024 03:37
Install composer on Amazon AMI running on EC2
$ cd ~
$ sudo curl -sS https://getcomposer.org/installer | sudo php
$ sudo mv composer.phar /usr/local/bin/composer
$ sudo ln -s /usr/local/bin/composer /usr/bin/composer
then you can run
$ sudo composer install