Plugin Directory

Changeset 213089


Ignore:
Timestamp:
03/04/2010 05:37:36 PM (16 years ago)
Author:
geraint
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • file-proxy/trunk/com/twothirdsdesign/file-proxy/admin/admin.php

    r212172 r213089  
    2020        $this->domain = $this->m->get_domain();
    2121       
    22         add_action( 'init', array(&$this, 'init') );
     22        add_action( 'init', array(&$this, 'init') );   
    2323    }
    2424   
     
    3333        /* Initialize the theme settings page. */
    3434        add_action( 'admin_menu', array(&$this, 'settings_page_init' ) );
    35    
    36         /* Save settings page meta boxes. */
    37         //add_action( "ttd_file_proxy_update_settings_page", 'ttd_file_proxy_settings' );
    38    
    39         /* Add a new meta box to the post editor. */
    40         //add_action( 'admin_menu', 'ttd_file_proxy_post_meta_box' );
    41     }
     35       
     36        /* Adds file proxy button to the upload manager */
     37        add_filter( 'attachment_fields_to_edit', array(&$this, 'upload_form_filter'), 999, 2 );
     38    }
     39   
     40    function upload_form_filter( $form_fields, $post ){
     41        $link = $this->m->generate_url( $post->ID );
     42        $form_fields['url']['html'] = $form_fields['url']['html'] . "<button type='button' class='button urlfileproxy' title='" . esc_attr($link) . "'>" . __( 'File Proxy', $this->domain ) . "</button>";
     43        return $form_fields;
     44    }
     45   
    4246   
    4347    /**
     
    6973   
    7074        /* Create the theme settings page. */
    71         $this->settings_page =  add_submenu_page( $this->menu_parent, __('File Proxy Settings'), __('File Proxy') , '10', $this->setting_identifier, array(&$this, 'render_settings_page') );
     75        $this->settings_page =  add_submenu_page( $this->menu_parent, __('File Proxy Settings' , $this->domain ), __('File Proxy', $this->domain ) , '10', $this->setting_identifier, array(&$this, 'render_settings_page') );
    7276       
    7377        /* Register the default theme settings meta boxes. */
Note: See TracChangeset for help on using the changeset viewer.