grunion_media_button

The Jetpack by WordPress.com grunion media button function.

Description

grunion_media_button(); 

Usage

  1. if ( !function_exists( 'grunion_media_button' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/contact-form/admin.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = grunion_media_button(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/modules/contact-form/admin.php  
  1. function grunion_media_button( ) { 
  2. global $post_ID, $temp_ID, $pagenow; 
  3.  
  4. if ( 'press-this.php' === $pagenow ) { 
  5. return; 
  6.  
  7. $iframe_post_id = (int) (0 == $post_ID ? $temp_ID : $post_ID); 
  8. $title = __( 'Add Contact Form', jetpack ); 
  9. $plugin_url = esc_url( GRUNION_PLUGIN_URL ); 
  10. $site_url = esc_url( admin_url( "/admin-ajax.php?post_id={$iframe_post_id}&action=grunion_form_builder&TB_iframe=true&width=768" ) ); 
  11. ?> 
  12.  
  13. <a id="insert-jetpack-contact-form" class="button thickbox" title="<?php echo esc_attr( $title ); ?>" data-editor="content" href="<?php echo $site_url ?>&id=add_form"> 
  14. <span class="jetpack-contact-form-icon"></span> <?php echo esc_html( $title ); ?> 
  15. </a> 
  16.  
  17. <?php