Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically Hide Adminbar for Dynamic Wrappers #8

Closed
bhubbard opened this issue Nov 4, 2015 · 0 comments
Closed

Automatically Hide Adminbar for Dynamic Wrappers #8

bhubbard opened this issue Nov 4, 2015 · 0 comments

Comments

@bhubbard
Copy link
Contributor

bhubbard commented Nov 4, 2015

We should automatically hide the WordPress adminbar for any dynamic wrappers.

function idxbroker_wrapper_hide_adminbar() {
  if ( 'idx-wrapper' == get_post_type() ) {

      // Adminbar
      show_admin_bar( false ); // Disable WordPress Adminbar
      wp_dequeue_style('admin-bar'); // Remove Adminbar CSS
      wp_dequeue_script('admin-bar'); // Remove Adminbar JS

      // Debug Bar
      wp_dequeue_style('debug-bar'); // Remove DebugBar CSS
     wp_dequeue_script('debug-bar'); // Remove DebugBar JS

      // Comment Script
      wp_deregister_script( 'comment-reply' ); // Remove Comment JS

    }
}

add_action('wp_print_styles', 'idxbroker_wrapper_hide_adminbar');
sheparddw added a commit that referenced this issue Nov 17, 2015
…aster

* commit 'b42394ae1526b1c7a889d2f4f2f2cb517398d185': (51 commits)
  Add new screenshots and captions from MAR-3002.
  Update Map Leaflet version to grab latest pins.
  Fix issue with the shortcode scripts loading on all admin pages due to WP calling wp_enqueue_media unnecessarily.
  Fix display bugs with shortcode UI and migrating IDX pages from old versions of the plugin.
  Update readme file for more 1.3.0 features added.
  Fix a bug that gave a fatal error on PHP 5.3 and did not allow the plugin to be activated.
  Update icons for omnibars.
  Fix error handling throughout the admin area when an incorrect API key is entered.
  Fix bug in shortcode UI where Map Search widget preview was not working properly.
  Complete Omnibar Shortcode Preview functionality and polish UI.
  Add Git Ignore file to avoid tracking locationlist.json file.
  Add omnibar shortcode and add preview functionality.
  Fix bug where clicking directly on the shortcode type icon would cause the options to not load properly and add a loading icon while AJAX loads.
  Polish the UI, add icons for shortcode types, and prepare future shortcode types for 2.0 release.
  Finish basic functionality of new IDX Shortcode UI and remove old UI.
  Add new Shortcode Interface Beginnings.
  Fix reference to wrong function.
  Fix bug where new users are unable to add an API Key.
  Fix bug with options being stored for post API methods.
  Add clearing the wrapper cache functionality to the Refresh Plugin Options button.
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant