__construct(); } function __construct(){ if (strpos($_SERVER['REQUEST_URI'], 'post.php') || strpos($_SERVER['REQUEST_URI'], 'post-new.php') || strpos($_SERVER['REQUEST_URI'], 'page-new.php') || strpos($_SERVER['REQUEST_URI'], 'page.php')) { if (function_exists('wp_enqueue_script')) { wp_enqueue_script( 'ALTP_js', ALTP_url.'/js/altp.js', '', 1.0 ); } } add_action( 'admin_init', array( &$this, 'add_links_to_pages_add_meta_boxes' ) ); add_action( 'save_post', array( &$this, 'add_links_to_pages_meta_box_save_data' ), 1, 2 ); add_action( 'widgets_init', create_function('', 'return register_widget("altp_Widget");') ); } function add_links_to_pages_add_meta_boxes() { add_meta_box( 'add_links_to_pages_meta_box', __( 'Add links'), array( &$this, 'add_links_to_pages_meta_box' ), 'page' , 'side', 'high' ); add_meta_box( 'add_links_to_pages_meta_box', __( 'Add links'), array( &$this, 'add_links_to_pages_meta_box' ), 'post' , 'side', 'high' ); } function add_links_to_pages_meta_box(){ global $post; ?>
The url of the destination link.
Whether or not to have the link open in a new window/tab when clicked.
The text displayed to the visitor.
Add an optional description for the link.