Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wp_124_change_shortcode_route_order() {?>
- <script>
- jQuery( document ).ready(function() {
- ph.hooks.addFilter('ph.dashboardShortcode.routes', 'my-custom-function', function(routes) {
- // make sure we have routes
- if ( !( routes && routes.length ) ) {
- return;
- }
- // this makes mockups the default route
- _.each(routes, function(route){
- if ( route.path == "/" || route.path =="*" ) {
- route.redirect = "/mockups";
- }
- });
- // this next part is optional - change the order to activity tab to last
- var activity = routes.shift();
- routes.push(activity);
- // return
- return routes;
- });
- });
- </script>
- <?php
- }
- add_action( 'ph_shortcodes_enqueue_script', 'wp_124_change_shortcode_route_order' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement