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 | |
/** | |
* rtmedia_bp_get_activity_user_link_callback Change the User link to User Media link | |
* | |
* @param [type] $link Original link of the Author | |
*/ | |
function rtmedia_bp_get_activity_user_link_callback( $link ) { | |
// copy original link to new variable | |
$new_link = $link; |
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 | |
// check if function does not exists | |
if ( ! function_exists( 'rtmedia_bp_activity_allowed_tags_callback' ) ) { | |
function rtmedia_bp_activity_allowed_tags_callback( $activity_allowedtags ) { | |
global $activities_template; | |
$rtmedia_type = array( 'rtmedia_update', 'rtmedia_like_activity', 'rtmedia_comment_activity' ); | |
// $activities_template exists and type not like $rtmedia_type. | |
if ( is_object( $activities_template ) && isset( $activities_template->activity ) && is_object( $activities_template->activity ) && isset( $activities_template->activity->type ) && ! in_array( $activities_template->activity->type, $rtmedia_type ) ) { | |
// check if ul exists. | |
if ( isset( $activity_allowedtags['ul'] ) ) { |
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 | |
// Check if function doest not exists. | |
if ( ! function_exists( 'rtmedia_wp_footer_add_js_callback' ) ) { | |
function rtmedia_wp_footer_add_js_callback() { | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
// Event will fire when someone click on edit button of media. | |
jQuery( 'body' ).on( 'click', '.rtmedia-gallery-item-actions a',function(){ | |
var target = jQuery( this ).attr( 'target' ); |
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 | |
/** | |
* This snippet is used to fix issue mentioned | |
* at https://rtmedia.io/ticket/506359/ | |
*/ | |
if ( ! function_exists( 'rtmedia_wp_head_fix_sorting_button' ) ) { | |
function rtmedia_wp_head_fix_sorting_button() { | |
// Check if the constant RTMEDIA_SORTING_VERSION exists | |
if ( defined( 'RTMEDIA_SORTING_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 | |
// check if function does not exists | |
if ( ! function_exists( 'rtmedia_add_extra_sub_nav_for_upload' ) ) { | |
function rtmedia_add_extra_sub_nav_for_upload() { | |
// IMPORTANT Please change the page_slug | |
$page_slug = 'file-upload'; | |
// check if function does not exists | |
if ( function_exists( 'get_page_by_path' ) ) { |
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 | |
// check if function does not exists | |
if ( ! function_exists( 'rtmedia_add_admin_bar_media_sub_menu_for_upload' ) ) { | |
function rtmedia_add_admin_bar_media_sub_menu_for_upload() { | |
// Please change the page_slug if you want from here | |
$page_slug = 'file-upload'; | |
// check if function does not exists and RTMEDIA_MEDIA_SLUG is alredy defined |
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 | |
// check if function does not exists | |
if ( ! function_exists( 'rtmedia_add_extra_sub_nav_for_upload' ) ) { | |
function rtmedia_add_extra_sub_nav_for_upload() { | |
// Check if user is logged in and RTMEDIA_MEDIA_SLUG is already defined | |
if ( is_user_logged_in() && defined( 'RTMEDIA_MEDIA_SLUG' ) ) { | |
// IMPORTANT Please change the page_slug | |
$page_slug = 'file-upload'; |
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 | |
// check if function does not exist | |
if ( ! function_exists( 'rtmedia_add_admin_bar_media_sub_menu_for_upload' ) ) { | |
function rtmedia_add_admin_bar_media_sub_menu_for_upload() { | |
// Please change the page_slug if you want from here | |
$page_slug = 'file-upload'; | |
// check if RTMEDIA_MEDIA_SLUG is already defined |
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 | |
// check if function does not exists | |
if ( ! function_exists( 'rtmedia_after_media_gallery_show_upload_button' ) ) { | |
function rtmedia_after_media_gallery_show_upload_button() { | |
// Please change the page_slug from here | |
$page_slug = 'file-upload'; | |
if ( isset( $_GET[ $page_slug ] ) && ! empty( $_GET[ $page_slug ] ) ) { |
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 | |
// Check if function doest not exists. | |
if ( ! function_exists( 'rtmedia_gallery_after_title_add_media_count' ) ) { | |
function rtmedia_gallery_after_title_add_media_count() { | |
global $rtmedia_query; | |
// Check for gallery shortcode | |
if ( isset( $rtmedia_query->is_gallery_shortcode ) && true === $rtmedia_query->is_gallery_shortcode ) { | |
// Defalut value for media count. | |
$media_count = 0; | |
if ( isset( $rtmedia_query->is_gallery_shortcode ) ) { |
OlderNewer