You can use the .phar
for PHPCS, but it's easier to pull the repo down from git to then choose what version to use.
cd ~
mkdir -p code
cd code
git clone https://github.com/squizlabs/PHP_CodeSniffer.git phpcs
<?php | |
/** | |
* Add to your PMPro Customizations plugin -- Note: you only need the code below, not the first 4 lines. | |
*/ | |
function check_pmpro_account_page() { | |
$account_page = get_theme_file_path( 'paid-memberships-pro/pages/account.php' ); | |
if ( file_exists( $account_page ) ) { | |
require( $account_page ); | |
} | |
} |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
[ | |
{name: 'Afghanistan', code: 'AF'}, | |
{name: 'Åland Islands', code: 'AX'}, | |
{name: 'Albania', code: 'AL'}, | |
{name: 'Algeria', code: 'DZ'}, | |
{name: 'American Samoa', code: 'AS'}, | |
{name: 'AndorrA', code: 'AD'}, | |
{name: 'Angola', code: 'AO'}, | |
{name: 'Anguilla', code: 'AI'}, | |
{name: 'Antarctica', code: 'AQ'}, |
/** | |
* Testing if this is synced or embedded | |
* | |
*/ | |
add_filter( 'gettext', 'my_pmpro_gettext_changes', 20, 3 ); | |
function my_pmpro_gettext_changes( $translated_text, $text, $domain ) { | |
$original = 'Drag and drop membership levels to reorder them on the Levels page.'; | |
$replacement = 'Whatever I want to replace that text with'; | |
$text_domain = 'paid-memberships-pro'; | |
if ( $text_domain === $domain ) { |
/** | |
* The function my_pmpro_levels_array is an arbitrarily named function, which | |
* you can rename to something more meaningful, as long as it is uniquely | |
* named on this site. | |
* | |
* @param array $levels Input the array of levels from your site | |
* @return array Output all paid levels, ie NOT the free level(s) | |
*/ | |
function my_pmpro_levels_array( $levels ) { | |
$newlevels = array(); |
var countryCodes = { | |
'Afghanistan': '93', | |
'Albania': '355', | |
'Algeria': '213', | |
'American Samoa': '684', | |
'Andorra': '376', | |
'Angola': '244', | |
'Antigua and Barbuda': '1-268', | |
'Argentina': '54', | |
'Armenia': '374', |
{ | |
"icons": [ | |
{ | |
"name": "Glass", | |
"id": "glass", | |
"unicode": "f000", | |
"created": 1, | |
"categories": [ | |
"Web Application Icons" | |
] |
Development-related files that might be found in version-controlled projects. Doesn't include editor-specific files.
.editorconfig
- EditorConfig define and maintain consistent coding styles between different editors and IDEs..gitignore
- ignore files from version control. Note, don't add system files - contributors should be globally ignoring these on their local machines. Only use for files created during project build, credentials files etc.