This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Your_Plugin { | |
/** | |
* Post Type slug modification | |
* | |
* @since 1.0.0 | |
* @return null | |
*/ | |
function modifySlug($link, $post) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Convert multi dimension array to 1 dimension array. Use this function when you need to convert | |
* wpdb results array to one dimension array | |
* | |
* @since 1.4.1 | |
* @return string | |
*/ | |
function flatten($v) { | |
if(count($v, COUNT_RECURSIVE) !== count($v)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
—– BEGIN LICENSE —– | |
Michael Barnes | |
Single User License | |
EA7E-821385 | |
8A353C41 872A0D5C DF9B2950 AFF6F667 | |
C458EA6D 8EA3C286 98D1D650 131A97AB | |
AA919AEC EF20E143 B361B1E7 4C8B7F04 | |
B085E65E 2F5F5360 8489D422 FB8FC1AA | |
93F6323C FD7F7544 3F39C318 D95E6480 | |
FCCC7561 8A4A1741 68FA4223 ADCEDE07 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getCountryCode($phoneNumber) { | |
// get your list of country codes | |
$countries = getCountries(); | |
$countries = array(array("US","1","US (+1)"),array("GB","44","GB (+44)")) + $countries; | |
foreach( $countries as $country ) | |
{ | |
if ( substr( $phoneNumber, 0, strlen( '+'.$country[1] ) ) == '+'.$country[1] ) | |
{ | |
// match |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"main.js": { | |
"files": [ | |
"scripts/main.js" | |
], | |
"main": true | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"main.js": { | |
"files": [ | |
"scripts/test-1.js", // đặt lên trước thì nó sẽ load trước. | |
"scripts/main.js", | |
"scripts/test-2.js" // đặt sau thì nó sẽ load sau. | |
], | |
"main": true | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
# END WordPress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod +x wp-cli.phar | |
sudo mv wp-cli.phar /usr/local/bin/wp |
OlderNewer