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 this function to theme's functions.php | |
// Check if function doest not exists. | |
if ( ! function_exists( 'rtmedia_wp_footer_add_js_remove_link' ) ) { | |
/** | |
* Remove link from activity url preview content. | |
*/ | |
function rtmedia_wp_footer_add_js_remove_link() { | |
?> | |
<script type="text/javascript"> |
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 this code to theme's functions.php | |
// Remove title attribute from media page. | |
// Check if function doest not exists. | |
if ( ! function_exists( 'rtmedia_wp_footer_remove_title' ) ) { | |
function rtmedia_wp_footer_remove_title() { | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
function remove_title() { |
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 this function to theme's functions.php | |
* Remove the random number from the transcoded filename | |
* | |
* @param string $tempname Transcoded file's temporary name. | |
* @return string $tempname Updated filename. | |
*/ | |
function rtmc_transcoded_temp_filename( $tempname ) { | |
if ( class_exists( 'RT_Transcoder_Admin' ) ) { |
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 this code snippet to theme's functions.php | |
* | |
* Add currecnt languge slug of WPML to media url in activity stream. | |
* | |
*/ | |
if ( ! function_exists( 'rtmedia_wpml_activity_urls' ) ) { | |
function rtmedia_wpml_activity_urls( $permalink, $media, $id ) { | |
global $sitepress; |
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 this code into theme's functions.php | |
function custom_get_rtmedia_permalink( $permalink, $media, $id ) { | |
$post = get_post( $media[0]->media_id ); | |
$title = isset( $post->post_name ) ? $post->post_name : ''; | |
if ( ! empty( $title ) ) { | |
$permalink = str_replace( '/' . $id , '/' . $title, $permalink ); | |
} |
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 | |
/** | |
* | |
* Fix - Show pics on buddyboss photo page. | |
* Photos will not show if BuddyBoss is used with rtMedia with "Privacy Settings" enabled. | |
* So add this snippet to theme's functions.php | |
* | |
*/ | |
function rtmc_show_pics_buddyboss() { |
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 this function into theme's functions.php | |
* | |
* This function will replace domain with amazon s3 bucket url for image's srcset. | |
*/ | |
function rtawss3_wp_calculate_image_srcset_latin( $sources, $size_array, $image_src, $image_meta, $attachment_id ) { | |
if ( ! class_exists( 'RTAWSS3_Class' ) ) { |
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 | |
/** | |
* Get media of perticular topic or forum | |
* | |
* @param int $item_id Id of forum | |
* @return array Array of media ids associated with the forum | |
*/ | |
function rtcamp_get_perticular_forum_media( $item_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 | |
/** | |
* Add this function to theme's functions.php | |
* | |
* Add links to BuddyPress navigation. | |
* This will add photo, video and music link to BuddyPress navigation. | |
* | |
* If you don't want to display "Media" tab, then add following css to | |
* rtMedia->Settings->Custom CSS: | |
* |
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
RewriteCond %{REQUEST_FILENAME} -s | |
RewriteRule ^wp-content/uploads/(.*)$ dl-file.php?file=$1 [QSA,L] |