Changeset 365888
- Timestamp:
- 03/28/2011 04:26:14 PM (15 years ago)
- File:
-
- 1 edited
-
prophoto-beta-tester/trunk/pp-beta-tester.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
prophoto-beta-tester/trunk/pp-beta-tester.php
r351153 r365888 5 5 Description: Facilitates beta-testing for future releases of the ProPhoto theme 6 6 Author: Jared Henderson 7 Version: 0.0 27 Version: 0.03 8 8 Author URI: http://www.prophotoblogs.com/beta-testing-plugin/ 9 9 */ … … 24 24 } 25 25 26 add_action( 'post_pp_loaded', array( &$this, 'importP3Menu' ) ); 26 27 add_action( 'post_pp_loaded', array( &$this, 'updateSeoTerms' ) ); 28 } 29 30 31 function importP3Menu() { 32 if ( pp::site()->svn > 280 ) { 33 return; 34 } 35 36 if ( ppOpt::test( 'p3_menu_imported', 'yes_imported' ) ) { 37 return; 38 } 39 40 $conf = ppUtil::loadConfig( 'options' ); 41 if ( ppOpt::id( 'main_menu_structure' ) != $conf['main_menu_structure'] && is_array( json_decode( ppOpt::id( 'main_menu_structure' ) ) ) ) { 42 return; 43 } 44 if ( pp::site()->svn < 264 ) { 45 return; 46 } 47 48 49 if ( is_admin() ) { 50 if ( NrUtil::GET( 'page', 'p4-customize' ) && NrUtil::GET( 'pp_tab', 'menu' ) ) { 51 // run the import in admin only if on the menu page 52 } else { 53 return; 54 } 55 } 56 57 $design = array( 'options' => ppActiveDesign::options(), 'images' => ppActiveDesign::imgs() ); 58 $contactText = ppOpt::id( 'contactform_link_text' ) ? ppOpt::id( 'contactform_link_text' ) : 'Contact'; 59 60 $imported = ppImportP3Menu::importMenu( $design, $contactText ); 61 $imported['options']['p3_menu_imported'] = 'yes_imported'; 62 ppOpt::updateMultiple( $imported['options'] ); 63 ppOpt::updateMultiple( $imported['images'] ); 64 65 foreach ( ppImportP3Menu::eliminatedOptions() as $eliminatedOptionID ) { 66 ppOpt::delete( $eliminatedOptionID ); 67 } 27 68 } 28 69
Note: See TracChangeset
for help on using the changeset viewer.