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 remove_submenus() { | |
if(!current_user_can('activate_plugins')) { | |
global $submenu; | |
unset($submenu['edit.php?post_type=your_custom_post-type'][10]); // Removes 'Add New'. | |
} | |
} | |
add_action('admin_menu', 'remove_submenus'); | |
function hide_that_stuff() { |
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 | |
//* Load Marmelad Google fonts | |
add_action( 'wp_enqueue_scripts', 'custom_load_google_fonts' ); | |
function custom_load_google_fonts() { | |
wp_enqueue_style( 'google-font', 'http://fonts.googleapis.com/css?family=Marmelad', array(), PARENT_THEME_VERSION ); | |
} | |
?> |
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 | |
// Note for %payment-code% | |
// CashonDeliver = 'cod' | |
// PayPal = 'paypal' | |
// Basic Payment = 'bacs' | |
// Cheque payment = 'cheque' | |
// Mijireh Gatway = 'mijireh_checkout' | |
// Note for %countrycode% | |
// India = 'IN' |
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 | |
$id=47; // Id of your Page/Post/CustomPost type | |
$post = get_page($id); | |
$content = apply_filters('the_content', $post->post_content); | |
echo $content; | |
?> |
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 remove_the_dashboard () { | |
if (current_user_can('level_10')) { | |
return; | |
} else { | |
global $menu, $submenu, $user_ID; | |
$the_user = new WP_User($user_ID); | |
reset($menu); $page = key($menu); | |
while ((__('Dashboard') != $menu[$page][0]) && next($menu)) | |
$page = key($menu); |
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 | |
add_action('wp_dashboard_setup', 'remove_dashboard_widgets'); | |
if( !function_exists('remove_dashboard_widgets') ) : | |
/** | |
* | |
*/ | |
function remove_dashboard_widgets() { | |
remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // Incoming Links | |
remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // Plugins |
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 | |
add_action('admin_menu', 'remove_menu_items'); | |
if( !function_exists('remove_menu_items') ) : | |
/** | |
* | |
*/ | |
function remove_menu_items() { | |
global $menu; | |
$restricted = array(__('Links'), __('Comments'), |
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
{"lastUpload":"2021-05-29T15:19:59.018Z","extensionVersion":"v3.4.3"} |
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
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE TABLE `catalog_product_bundle_option`; | |
TRUNCATE TABLE `catalog_product_bundle_option_value`; | |
TRUNCATE TABLE `catalog_product_bundle_selection`; | |
TRUNCATE TABLE `catalog_product_entity_datetime`; | |
TRUNCATE TABLE `catalog_product_entity_decimal`; | |
TRUNCATE TABLE `catalog_product_entity_gallery`; | |
TRUNCATE TABLE `catalog_product_entity_int`; | |
TRUNCATE TABLE `catalog_product_entity_media_gallery`; | |
TRUNCATE TABLE `catalog_product_entity_media_gallery_value`; |
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 | |
$sku = 'Your Product Sku'; | |
$id = Mage::getModel('catalog/product')->getIdBySku($sku); | |
if ($id){ | |
echo "SKU {$sku} exists"; | |
} | |
else{ | |
echo "SKU {$sku} does not exist"; | |
} | |
?> |
OlderNewer