Skip to content

Instantly share code, notes, and snippets.

@Dinamiko
Last active February 24, 2016 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dinamiko/8d47d0936ee646c8f891 to your computer and use it in GitHub Desktop.
Save Dinamiko/8d47d0936ee646c8f891 to your computer and use it in GitHub Desktop.
<?php
function run_tablepress_shortcodes_in_admin() {
if ( is_admin() ) {
TablePress::$model_options = TablePress::load_model( 'options' );
TablePress::$model_table = TablePress::load_model( 'table' );
$GLOBALS['tablepress_frontend_controller'] = TablePress::load_controller( 'frontend' );
}
}
add_action( 'tablepress_run', 'run_tablepress_shortcodes_in_admin' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment