This file contains hidden or 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
| global $wp_embed; | |
| add_filter( 'widget_text', array( $wp_embed, 'run_shortcode' ) ); | |
| add_filter( 'widget_text', array( $wp_embed, 'autoembed') ); |
This file contains hidden or 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
| if(!function_exists('get_permalink_by_slug')): | |
| function get_permalink_by_slug($slug) { | |
| global $locale; | |
| $permalink = get_permalink(get_page_by_path($slug)); | |
| if(function_exists('bogo_get_url_with_lang')) | |
| return bogo_get_url_with_lang($permalink, $locale); | |
| return $permalink; |
This file contains hidden or 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
| add_filter( 'option_blogname', function($blogname) { | |
| return __($blogname, 'theme_textdomain'); | |
| }); |
This file contains hidden or 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
| add_filter( 'option_blogdescription', function($blogdescription){ | |
| return __($blogdescription, 'theme_textdomain'); | |
| }); |
This file contains hidden or 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 | |
| /** | |
| * この商品を買った人はこんな商品も買っています。 | |
| * @param int $product_id 商品ID | |
| * @param int $interval 集計期間(ヶ月) | |
| * @param int $limit 表示件数 | |
| * @return type | |
| */ | |
| function lfGetRecommendProducts($product_id, $interval = 6, $limit = 10) | |
| { |
This file contains hidden or 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 | |
| /* | |
| Plugin Name: Simple CSV Exporter | |
| Version: 0.1-alpha | |
| Description: simple csv expoeter | |
| Author: kurozumi | |
| Author URI: http://a-zuim.net | |
| Plugin URI: http://a-zuim.net | |
| Text Domain: simple-csv-exporter | |
| Domain Path: /languages |
This file contains hidden or 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('widgets_init', function () { | |
| register_widget("My_Widget"); | |
| class My_Widget extends WP_Widget | |
| { | |
| /** | |
| * PHP5 constructor. | |
| * | |
| * @since 2.8.0 |
This file contains hidden or 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
| add_filter('admin_memory_limit', function($memory_limit){ | |
| return '512M'; | |
| }); |
This file contains hidden or 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
| add_filter("post_row_actions", function($actions, $post){ | |
| if($post->post_status == "publish"){ | |
| $num_comments = wp_count_comments($post->ID); | |
| $actions['spam'] = sprintf('<a href="%s">' . __('Spam') . '(%s)</a>', sprintf(admin_url('edit-comments.php?comment_status=spam&p=%d'), $post->ID), $num_comments->spam); | |
| } | |
| return $actions; | |
| }, 0, 2); |
This file contains hidden or 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
| function lfGetProductsFromProductStatus($name){ | |
| $objQuery =& SC_Query_Ex::getSingletonInstance(); | |
| $sql = <<< __EOS__ | |
| SELECT | |
| dtb_products.* | |
| FROM dtb_products | |
| JOIN dtb_product_status T1 | |
| ON T1.product_id = dtb_products.product_id | |
| WHERE T1.product_status_id = ( |