Skip to content

Instantly share code, notes, and snippets.

****** NOTE ******
$test_array should be deleted and will throw cautions on the theme options page of wordpress
<?php
/**
* A unique identifier is defined to store the options in the database and reference them from the theme.
* By default it uses the theme name, in lowercase and without spaces, but this can be changed if needed.
* If the identifier changes, it'll appear as if the options have been reset.
<?php $i = 0; ?>
<?php foreach($this->getItems() as $_item): ?>
<?php if($i++ == 3) break; ?>
<?php
/**
* Magento responsive theme
*
* @category design
@clare485
clare485 / Magento - how to find database details
Created November 20, 2013 11:34
Magento - how to find database details
app > etc > local.xml
this is where the database name, username and password are added
@clare485
clare485 / Magento - Exclude special price from discount code
Created November 20, 2013 10:49
Magento - Exclude special price from discount code
Make the condition
If ALL of these conditions are TRUE :
to
If ALL of these conditions are FALSE :
Then
\.orig\..*$
\.orig$
\.chg\..*$
\.rej$
\.conflict\~$
^wp-login\.php$
^wp-cron\.php$
^license\.txt$
^wp-load\.php$
^wp-comments-post\.php$
function enable_more_buttons($buttons) {
$buttons[] = 'hr';
/*
Repeat with any other buttons you want to add, e.g.
$buttons[] = 'fontselect';
$buttons[] = 'sup';
*/
return $buttons;
@clare485
clare485 / � �
Created November 14, 2013 11:17
� �
_
Reset a user's password
You can always reset the password for a user on your domain. This is helpful when:
A user forgets his or her password
A user's account is compromised (security concerns)
To reset a user's password:
Sign in to the Google Admin console.
@clare485
clare485 / lightbox plus colorbox ie8
Created October 28, 2013 11:40
lightbox plus colorbox ie8
I just ran into this issue, and fixed it by making sure the Initial Width and Initial Height weren't blank. You can set these values under Primary Lightbox Settings > Size tab. I set both values to 10%, and the problem went away.