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 my_voicewp_post_types( $post_types ) { | |
return array( 'my-custom-post-type' ); | |
} | |
add_filter( 'voicewp_post_types', 'my_voicewp_post_types' ); |
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
public function alexawp_news_request( WP_REST_Request $request ) { | |
$body = $this->access_protected( $request, 'body' ); | |
//if ( ! empty( $body ) ) { | |
try { | |
//$alexa_settings = get_option( 'alexawp-settings' ); | |
//$app_id = $alexa_settings['news_id']; | |
//$certificate = new \Alexa\Request\Certificate( $request->get_header( 'signaturecertchainurl' ), $request->get_header( 'signature' ), $app_id ); | |
$alexa = new \Alexa\Request\IntentRequest( $body, $app_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
add_filter( 'infinite_transporter_archive_supported', 'infinite_transporter_remove_single' ); | |
function infinite_transporter_remove_single( $supported ) { | |
$supported = current_theme_supports( 'infinite-transporter' ) && ( is_home() || is_archive() || is_search() ); | |
return $supported; | |
} |
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
/** | |
* Add namespace for the featured image to RSS feed | |
* | |
* @return string | |
*/ | |
function rss_img_adding_yahoo_media_tag(){ | |
echo 'xmlns:media="http://search.yahoo.com/mrss/"'; | |
} | |
add_action( 'rss_ns', 'rss_img_adding_yahoo_media_tag' ); | |
add_action( 'rss2_ns', 'rss_img_adding_yahoo_media_tag' ); |
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 mobile_single_post_ad( $content ) { | |
if( wp_is_mobile() && is_single() ) { | |
$limit = 100; //word limit | |
$contents = explode("</p>", $content); | |
$words = 0; | |
$displayed = false; | |
foreach ($contents as $paragraph) { | |
$words = $words + str_word_count($paragraph); | |
echo $paragraph . "</p>"; |
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
add_action('rss2_ns', 'wp_rss_img_adding_yahoo_media_tag'); | |
function wp_rss_img_adding_yahoo_media_tag(){ | |
echo 'xmlns:media="http://search.yahoo.com/mrss/"'; | |
} |
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
add_action('rss_item', 'wp_rss_img_include'); | |
add_action('rss2_item', 'wp_rss_img_include'); | |
function wp_rss_img_include (){ | |
global $post; | |
if( has_post_thumbnail( $post->ID ) ) { | |
$thumbnail_id = get_post_thumbnail_id( $post->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
'content' => new Fieldmanager_RichTextArea( | |
array( | |
'label' => __( 'Content', 'ev' ), | |
'sanitize' => 'wp_kses_post', | |
) | |
), |
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( $ ) { | |
$( document.body ).on( 'post-load', function () { | |
FB.XFBML.parse(); | |
} ); | |
} )( jQuery ); |
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 mytheme_infinite_transporter_init() { | |
add_theme_support( 'infinite-transporter', array( | |
'footer' => false, // boolean to enable or disable the infinite footer | string to provide an html id to derive footer width from | |
'google_analytics'=> true, // boolean if using google analytics, set to true | |
'render' => 'render_hueman', | |
) ); | |
} | |
add_action( 'init', 'mytheme_infinite_transporter_init' ); | |
function render_hueman() { |
NewerOlder