Changeset 958703
- Timestamp:
- 08/01/2014 02:59:16 PM (12 years ago)
- Location:
- advertising-manager/trunk/lib/Advman
- Files:
-
- 7 added
- 4 deleted
- 1 edited
-
AdList.php (added)
-
Admin.php (modified) (11 diffs)
-
List.php (deleted)
-
Template/Ad (added)
-
Template/Ad/Create.php (added)
-
Template/Ad/Edit.php (added)
-
Template/Ad/List.php (added)
-
Template/Create.php (deleted)
-
Template/Edit (deleted)
-
Template/List.php (deleted)
-
Template/Network (added)
-
Template/Network/Edit.php (added)
Legend:
- Unmodified
- Added
- Removed
-
advertising-manager/trunk/lib/Advman/Admin.php
r958458 r958703 1 1 <?php 2 2 require_once (ADVMAN_LIB . '/Tools.php'); 3 require_once (ADVMAN_LIB . '/ List.php');3 require_once (ADVMAN_LIB . '/AdList.php'); 4 4 5 5 class Advman_Admin … … 12 12 global $wp_version; 13 13 14 add_object_page(__('Ads', 'advman'), __('Ads', 'advman'), 8, 'advman-list', array('Advman_ List','process'), ADVMAN_URL . '/images/advman-menu-icon.svg');15 $ listhook = add_submenu_page('advman-list', __('All Ads', 'advman'), __('All Ads', 'advman'), 8, 'advman-list', array('Advman_List','process'));14 add_object_page(__('Ads', 'advman'), __('Ads', 'advman'), 8, 'advman-list', array('Advman_Ad_List','process'), ADVMAN_URL . '/images/advman-menu-icon.svg'); 15 $ad_list_hook = add_submenu_page('advman-list', __('All Ads', 'advman'), __('All Ads', 'advman'), 8, 'advman-list', array('Advman_Ad_List','process')); 16 16 add_submenu_page('advman-list', __('Create New Ad', 'advman'), __('Create New', 'advman'), 8, 'advman-ad-new', array('Advman_Admin','create')); 17 17 add_submenu_page(null, __('Edit Ad', 'advman'), __('Edit', 'advman'), 8, 'advman-ad', array('Advman_Admin','edit_ad')); … … 20 20 21 21 // List items 22 add_action("load-$ listhook", array('Advman_List', 'add_options'));23 add_action("admin_head-$ listhook", array('Advman_List', 'add_contextual_help' ));24 add_action("admin_head-$ listhook", array('Advman_List', 'add_css' ));22 add_action("load-$ad_list_hook", array('Advman_Ad_List', 'add_options')); 23 add_action("admin_head-$ad_list_hook", array('Advman_Ad_List', 'add_contextual_help' )); 24 add_action("admin_head-$ad_list_hook", array('Advman_Ad_List', 'add_css' )); 25 25 26 26 add_action('admin_enqueue_scripts', array('Advman_Admin', 'admin_enqueue_scripts')); … … 50 50 case 'advman-ad-new' : Advman_Admin::import_action($action); break; 51 51 case 'advman-ad' : Advman_Admin::ad_action($action); break; 52 case 'advman-list' : Advman_ List::init(); break;52 case 'advman-list' : Advman_Ad_List::init(); break; 53 53 case 'advman-network' : Advman_Admin::network_action($action); break; 54 54 } … … 333 333 $ad = Advman_Tools::get_current_ad(); 334 334 if ($ad) { 335 $template = Advman_Tools::get_template(' Edit_Ad', $ad);335 $template = Advman_Tools::get_template('Ad_Edit', $ad); 336 336 $template->display($ad); 337 337 } … … 339 339 340 340 case 'advman-ad-new' : 341 $template = Advman_Tools::get_template(' Create');341 $template = Advman_Tools::get_template('Ad_Create'); 342 342 $template->display(); 343 343 break; … … 346 346 $network = Advman_Tools::get_current_network(); 347 347 if ($network) { 348 $template = Advman_Tools::get_template(' Edit_Network', $network);348 $template = Advman_Tools::get_template('Network_Edit', $network); 349 349 $template->display($network); 350 350 } … … 353 353 354 354 if (!$template) { 355 $template = Advman_Tools::get_template(' List');355 $template = Advman_Tools::get_template('Ad_List'); 356 356 $template->display(); 357 357 } … … 381 381 function create() 382 382 { 383 $template = Advman_Tools::get_template(' Create');383 $template = Advman_Tools::get_template('Ad_Create'); 384 384 $template->display(); 385 385 } … … 391 391 { 392 392 $ad = Advman_Tools::get_current_ad(); 393 $template = Advman_Tools::get_template(' Edit_Ad', $ad);393 $template = Advman_Tools::get_template('Ad_Edit', $ad); 394 394 $template->display($ad); 395 395 } … … 398 398 { 399 399 $network = Advman_Tools::get_current_network(); 400 $template = Advman_Tools::get_template(' Edit_Network', $network);400 $template = Advman_Tools::get_template('Network_Edit', $network); 401 401 $template->display($network); 402 402 }
Note: See TracChangeset
for help on using the changeset viewer.