本文整理汇总了PHP中td_demo_media::remove方法的典型用法代码示例。如果您正苦于以下问题:PHP td_demo_media::remove方法的具体用法?PHP td_demo_media::remove怎么用?PHP td_demo_media::remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类td_demo_media
的用法示例。
在下文中一共展示了td_demo_media::remove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ajax_stacks_controller
function ajax_stacks_controller()
{
if (!current_user_can('switch_themes')) {
echo 'Permission denied!';
}
// try to extend the time limit
@set_time_limit(240);
$td_demo_action = td_util::get_http_post_val('td_demo_action');
$td_demo_id = td_util::get_http_post_val('td_demo_id');
/* ----------------------------------------------------------------------------
Uninstall button - do uninstall with content
*/
if ($td_demo_action == 'uninstall_demo') {
// remove our content
td_demo_media::remove();
td_demo_content::remove();
td_demo_category::remove();
td_demo_menus::remove();
td_demo_widgets::remove();
// restore all settings to the state before a demo was loaded
$td_demo_history = new td_demo_history();
$td_demo_history->restore_all();
// update our state - no stack installed
td_demo_state::update_state('', '');
} else {
if ($td_demo_action == 'remove_content_before_install_no_content') {
// save the history - this class will save the history only when going from user settings -> stack
$td_demo_history = new td_demo_history();
$td_demo_history->save_all();
// clean the user settings
td_demo_media::remove();
td_demo_content::remove();
td_demo_category::remove();
td_demo_menus::remove();
td_demo_widgets::remove();
// remove panel settings and recompile the css as empty
foreach (td_global::$td_options as $option_id => $option_value) {
td_global::$td_options[$option_id] = '';
}
//typography settings
td_global::$td_options['td_fonts'] = '';
//css font files (google) buffer
td_global::$td_options['td_fonts_css_files'] = '';
//compile user css if any
td_global::$td_options['tds_user_compile_css'] = td_css_generator();
update_option(TD_THEME_OPTIONS_NAME, td_global::$td_options);
} else {
if ($td_demo_action == 'install_no_content_demo') {
td_demo_state::update_state($td_demo_id, 'no_content');
// load panel settings - this will also recompile the css
$this->import_panel_settings(td_global::$demo_list[$td_demo_id]['folder'] . 'td_panel_settings.txt', false);
} else {
if ($td_demo_action == 'remove_content_before_install') {
// save the history - this class will save the history only when going from user settings -> stack
$td_demo_history = new td_demo_history();
$td_demo_history->save_all();
// clean the user settings
td_demo_media::remove();
td_demo_content::remove();
td_demo_category::remove();
td_demo_menus::remove();
td_demo_widgets::remove();
} else {
if ($td_demo_action == 'td_media_1') {
// change our state
td_demo_state::update_state($td_demo_id, 'full');
// load panel settings
$this->import_panel_settings(td_global::$demo_list[$td_demo_id]['folder'] . 'td_panel_settings.txt', true);
// load the media import script
require_once td_global::$demo_list[$td_demo_id]['folder'] . 'td_media_1.php';
} else {
if ($td_demo_action == 'td_media_2') {
// load the media import script
require_once td_global::$demo_list[$td_demo_id]['folder'] . 'td_media_2.php';
} else {
if ($td_demo_action == 'td_media_3') {
// load the media import script
require_once td_global::$demo_list[$td_demo_id]['folder'] . 'td_media_3.php';
} else {
if ($td_demo_action == 'td_media_4') {
// load the media import script
require_once td_global::$demo_list[$td_demo_id]['folder'] . 'td_media_4.php';
} else {
if ($td_demo_action == 'td_media_5') {
// load the media import script
require_once td_global::$demo_list[$td_demo_id]['folder'] . 'td_media_5.php';
} else {
if ($td_demo_action == 'td_media_6') {
// load the media import script
require_once td_global::$demo_list[$td_demo_id]['folder'] . 'td_media_6.php';
} else {
if ($td_demo_action == 'td_import') {
require_once td_global::$demo_list[$td_demo_id]['folder'] . 'td_import.php';
}
}
}
}
}
}
}
//.........这里部分代码省略.........