Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/
./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent
How to Use | |
Step 1. | |
Copy the custom_widget.php file and place it in your WordPress theme folder. Assuming WordPress is installed in the root of your server the file will be place in /wp-content/themes/yourtheme/ | |
Step 2. | |
Open up functions.php and include the following piece of code somewhere in the file. include TEMPLATEPATH . '/custom_widget.php'; | |
Step 3. | |
Edit the custom_widget.php file to suit your needs. |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = array( |
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
<?php | |
function my_print_r($thing,$description=false){ | |
echo '<pre style="background:#fff; padding:10px; color:#111; font-family:monospace; font-size:12px; border:1px solid #555">'; | |
if($description) echo '<strong>'.$description.'</strong><br><br>'; | |
print_r($thing); | |
echo '</pre>'; | |
} | |
//Usage |
<?php | |
function log_post($post){ | |
$p_title = $post->post_title; | |
$p_type = $post->post_type; | |
$p_cat = get_the_category( $post->ID ); | |
$summary = '<strong>Post Title: </strong>' . $p_title; | |
$summary .= ' | <strong>Post Type:</strong> ' . $p_type; |
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
#wp-log-output{ | |
padding:10px; | |
background:#fff; | |
border:1px solid #eee; | |
font-family:Helvetica; | |
color:#555; |
<?php | |
// An example of creating two separate WP queries, combining the results, | |
// sorting by date and formatting the results for us in a loop like a regular query. | |
// order the posts by date in descending order (should go in functions.php to keep things tidy) | |
function order_by_date( $a, $b ) | |
{ | |
return strcmp( $b->post_date, $a->post_date ); | |
} |
<div class="category-navigation"> | |
<?php | |
// get the root category id | |
$root_cat_id = Mage::app()->getStore()->getRootCategoryId(); | |
// get the current category object and ID | |
$current_cat_obj = Mage::registry('current_category'); | |
$current_cat_id = $current_cat_obj->getId(); |
# Update LS colors | |
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then | |
export TERM=gnome-256color | |
elif infocmp xterm-256color >/dev/null 2>&1; then | |
export TERM=xterm-256color | |
fi |