Last active
April 5, 2017 12:33
-
-
Save raftaar1191/bafbc28859b7f9a66317941b4f59cc38 to your computer and use it in GitHub Desktop.
Filter to change order of media tabs in rtMedia sidebar widget gallery
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 | |
/** | |
* Change the media order tab in rtMedia sidebar widgets gallery. | |
* | |
* @since 1.3.5 | |
* | |
* @param array $allowed Contain the media tab list that will be going to be display in the rtMedia sidebar widget gallery. | |
* @param array $widgetid Contain widget id. | |
* | |
* @return array Media tab list in custom order.W | |
*/ | |
function tmp_rtm_rtmedia_gallery_widget_ordering_callback( $allowed, $widgetid = '' ) { | |
return array( 'all', 'music', 'video' , 'photo' ); | |
} | |
add_filter( 'rtmedia_gallery_widget_ordering', 'tmp_rtm_rtmedia_gallery_widget_ordering_callback', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment