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
<config> | |
<modules> | |
<Namespace_Modulename> | |
<version>0.1.0</version> | |
</Namespace_Modulename> | |
</modules> | |
</config> |
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
require_once "ABSOLUTE_PATH/script/wp-load.php"; |
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 | |
$slug = 'your-post-slug'; | |
$title= 'Your post title'; | |
$post_content = 'Your lonng post title'; | |
$post_id = wp_insert_post( | |
array( | |
'comment_status' => 'closed', | |
'ping_status' => 'closed', | |
'post_author' => $author_id, |
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 | |
require_once('ABSOLUTE_PATH/wp-admin/includes/media.php'); | |
require_once('ABSOLUTE_PATH/wp-admin/includes/file.php'); | |
require_once('ABSOLUTE_PATH/wp-admin/includes/image.php'); | |
$media = media_sideload_image($image, $post_id); //$post_id from wp_insert_post | |
// therefore we must find it so we can set it as featured ID | |
if(!empty($media) && !is_wp_error($media)){ |
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
<?xml version="1.0"?> | |
<config> | |
<modules> | |
<Namespace_Contacts> | |
<active>true</active> | |
<codePool>local</codePool> | |
</Namespace_Contacts> | |
</modules> | |
</config> |
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
<?xml version="1.0"?> | |
<config> | |
<modules> | |
<Namespace_Contacts> | |
<version>0.0.1</version> | |
</Namespace_Contacts> | |
</modules> | |
<frontend> | |
<routers> | |
<contacts> |
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
$product = Mage::getModel('catalog/product')->load($productId); | |
$cats = $product->getCategoryIds(); | |
foreach ($cats as $category_id) { | |
$_cat = Mage::getModel('catalog/category')->load($category_id) ; | |
echo $_cat->getName(); | |
} |
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
<?xml version="1.0"?> | |
<config> | |
<modules> | |
<Writeyoucode_Customer> | |
<active>true</active> | |
<codePool>local</codePool> | |
</Writeyoucode_Customer> | |
</modules> | |
</config> |
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
<?xml version="1.0"?> | |
<config> | |
<modules> | |
<Writeyourcode_Customer> | |
<version>1.0</version> | |
</Writeyourcode_Customer> | |
</modules> | |
<frontend> | |
<routers> |
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 | |
/** | |
* Account controller | |
* | |
*/ | |
require_once 'Mage/Customer/controllers/AccountController.php'; | |
class Writeyourcode_Customer_AcccountController extends Mage_Customer_AccountController | |
{ | |
/** | |
* Product view action |
OlderNewer