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
#!/bin/bash | |
# Copyright © 2015 Bjørn Johansen | |
# This work is free. You can redistribute it and/or modify it under the | |
# terms of the Do What The Fuck You Want To Public License, Version 2, | |
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
WP_PATH="/your/wp/path/" | |
WP_CLI="/usr/local/bin/php /usr/local/bin/wp" | |
# Check if WP-CLI is available |
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
/** | |
* @param array $fields | |
* @param WP_Widget $widget_obj | |
* | |
* @return array | |
*/ | |
function pojo28831_add_custom_post_type_in_recent_posts_widget( $fields, $widget_obj ) { | |
$fields[] = array( | |
'id' => '_custom_post_type', | |
'title' => __( 'Post Type:', 'pojo' ), |
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 | |
global $wpdb; | |
$license_ids = $wpdb->get_col( | |
"SELECT `post_id` FROM {$wpdb->postmeta} | |
WHERE `meta_key` LIKE '_edd_sl_user_id' | |
AND `meta_value` = '0';" | |
); | |
if ( ! empty( $license_ids ) ) { | |
$payment_ids = array(); |
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
function pojo_wpml_get_multilang_sticky_logo( $value ) { | |
if ( defined( 'ICL_LANGUAGE_CODE' ) ) { | |
$logos = array( | |
'en' => 'logo-sticky-en.png', | |
'he' => 'logo-sticky-he.png', | |
); | |
$default_logo = $logos['en']; | |
$current_lang = ICL_LANGUAGE_CODE; | |
$assets_url = get_stylesheet_directory_uri() . '/assets/images/'; | |
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
function pojo_polylang_get_multilang_sticky_logo( $value ) { | |
if ( function_exists( 'pll_current_language' ) ) { | |
$logos = array( | |
'en' => 'logo-sticky-en.png', | |
'he' => 'logo-sticky-he.png', | |
); | |
$default_logo = $logos['en']; | |
$current_lang = pll_current_language(); | |
$assets_url = get_stylesheet_directory_uri() . '/assets/images/'; | |
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
function pojo6891_print_custom_css_codes( Pojo_Create_CSS_Code $css_code ) { | |
$css_code->add_value( '.product-title', 'color', get_theme_mod( 'secondary_color' ) ); | |
} | |
add_filter( 'pojo_wp_head_custom_css_code', 'pojo6891_print_custom_css_codes' ); |
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
import sys | |
if sys.platform == 'win32': | |
from ctypes import * | |
class LASTINPUTINFO(Structure): | |
_fields_ = [ | |
('cbSize', c_uint), | |
('dwTime', c_int), | |
] |
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
# ------------------------------------------------------------------------------ | |
# | Proper MIME types for all files | | |
# ------------------------------------------------------------------------------ | |
<IfModule mod_mime.c> | |
# Audio | |
AddType audio/mp4 m4a f4a f4b | |
AddType audio/ogg oga ogg |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 pojo4321_add_sidebar_area( $content ) { | |
ob_start(); | |
dynamic_sidebar( 'YOUR SIDEBAR AREA NAME' ); | |
$content .= ob_get_clean(); | |
return $content; | |
} | |
add_filter( 'the_content', 'pojo4321_add_sidebar_area', 9999 ); |
NewerOlder