本文整理汇总了PHP中td_demo_media类的典型用法代码示例。如果您正苦于以下问题:PHP td_demo_media类的具体用法?PHP td_demo_media怎么用?PHP td_demo_media使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了td_demo_media类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1:
<?php
/**
* Created by ra on 6/13/2015.
*/
//ads
td_demo_media::add_image_to_media_gallery('td_blog_full_ad', "http://demo_content.tagdiv.com/Newspaper_6/blog/rec728.jpg");
td_demo_media::add_image_to_media_gallery('td_blog_sidebar_ad', "http://demo_content.tagdiv.com/Newspaper_6/blog/rec300.jpg");
开发者ID:luxifel,项目名称:Bionerd,代码行数:8,代码来源:td_media_6.php
示例2:
<?php
td_demo_media::add_image_to_media_gallery('td_pic_p1', "http://demo_content.tagdiv.com/Newspaper_6/travel/p1.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_p2', "http://demo_content.tagdiv.com/Newspaper_6/travel/p2.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_p3', "http://demo_content.tagdiv.com/Newspaper_6/travel/p3.jpg");
开发者ID:weerapat,项目名称:wp-daily,代码行数:5,代码来源:td_media_4.php
示例3:
<?php
/**
* Created by ra on 6/13/2015.
*/
td_demo_media::add_image_to_media_gallery('td_pic_p3', "http://demo_content.tagdiv.com/Newspaper_6/video/p3.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_p4', "http://demo_content.tagdiv.com/Newspaper_6/video/p4.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_p5', "http://demo_content.tagdiv.com/Newspaper_6/video/p5.jpg");
//logo
td_demo_media::add_image_to_media_gallery('td_pic_logo_desktop', 'http://demo_content.tagdiv.com/Newspaper_6/video/video-stack-logo.png');
开发者ID:luxifel,项目名称:Bionerd,代码行数:10,代码来源:td_media_5.php
示例4:
<?php
/**
* Created by ra on 5/14/2015.
*/
//homepage images
td_demo_media::add_image_to_media_gallery('td_pic_1', "http://demo_content.tagdiv.com/Newspaper_6/tech/1.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_2', "http://demo_content.tagdiv.com/Newspaper_6/tech/2.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_3', "http://demo_content.tagdiv.com/Newspaper_6/tech/3.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_4', "http://demo_content.tagdiv.com/Newspaper_6/tech/4.jpg");
开发者ID:tuanlibra,项目名称:thptxuanang,代码行数:10,代码来源:td_media_1.php
示例5:
<?php
// post photos
td_demo_media::add_image_to_media_gallery('td_pic_p4', "http://demo_content.tagdiv.com/Newspaper_6/wedding/p4.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_p5', "http://demo_content.tagdiv.com/Newspaper_6/wedding/p5.jpg");
// smartlist photos
td_demo_media::add_image_to_media_gallery('td_pic_s1', "http://demo_content.tagdiv.com/Newspaper_6/wedding/s1.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_s2', "http://demo_content.tagdiv.com/Newspaper_6/wedding/s2.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_s3', "http://demo_content.tagdiv.com/Newspaper_6/wedding/s3.jpg");
开发者ID:luxifel,项目名称:Bionerd,代码行数:9,代码来源:td_media_4.php
示例6:
<?php
td_demo_media::add_image_to_media_gallery('td_logo_header', 'http://demo_content.tagdiv.com/Newspaper_6/health/health-header.png');
td_demo_media::add_image_to_media_gallery('td_logo_footer', 'http://demo_content.tagdiv.com/Newspaper_6/health/health-footer.png');
开发者ID:weerapat,项目名称:wp-daily,代码行数:4,代码来源:td_media_5.php
示例7:
<?php
//ads
td_demo_media::add_image_to_media_gallery('td_travel_post_ad', "http://demo_content.tagdiv.com/Newspaper_6/travel/rec-post.jpg");
td_demo_media::add_image_to_media_gallery('td_travel_smart6_ad', "http://demo_content.tagdiv.com/Newspaper_6/travel/rec-smart.jpg");
开发者ID:weerapat,项目名称:wp-daily,代码行数:5,代码来源:td_media_6.php
示例8:
<?php
/**
* Created by ra on 6/13/2015.
*/
td_demo_media::add_image_to_media_gallery('td_pic_p3', "http://demo_content.tagdiv.com/Newspaper_6/blog/p3.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_avatar', "http://demo_content.tagdiv.com/Newspaper_6/blog/avatar.jpg");
//logo
td_demo_media::add_image_to_media_gallery('td_pic_logo_desktop', 'http://demo_content.tagdiv.com/Newspaper_6/blog/classic-blog-logo.png');
td_demo_media::add_image_to_media_gallery('td_pic_logo_footer', 'http://demo_content.tagdiv.com/Newspaper_6/blog/classic-blog-logo-footer.png');
开发者ID:tuanlibra,项目名称:thptxuanang,代码行数:10,代码来源:td_media_5.php
示例9: 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';
}
}
}
}
}
}
}
//.........这里部分代码省略.........
开发者ID:luxifel,项目名称:Bionerd,代码行数:101,代码来源:td_demo_installer.php
示例10: add_post
static function add_post($params)
{
$new_post = array('post_title' => $params['title'], 'post_status' => 'publish', 'post_type' => 'post', 'post_content' => self::parse_content_file($params['file']), 'comment_status' => 'open', 'post_category' => $params['categories_id_array'], 'guid' => td_global::td_generate_unique_id());
//new post / page
$post_id = wp_insert_post($new_post);
// add our demo custom meta field, using this field we will delete all the pages
update_post_meta($post_id, 'td_demo_content', true);
if (!empty($params['post_format'])) {
set_post_format($post_id, $params['post_format']);
}
set_post_thumbnail($post_id, td_demo_media::get_by_td_id($params['featured_image_td_id']));
if (!empty($params['template'])) {
$td_post_theme_settings['td_post_template'] = $params['template'];
update_post_meta($post_id, 'td_post_theme_settings', $td_post_theme_settings, true);
}
if (!empty($params['featured_video_url'])) {
$tmp_meta['td_video'] = $params['featured_video_url'];
update_post_meta($post_id, 'td_post_video', $tmp_meta);
}
return $post_id;
}
开发者ID:Che234,项目名称:andreatelo,代码行数:21,代码来源:td_demo_util.php
示例11:
<?php
td_demo_media::add_image_to_media_gallery('td_pic_7', "http://demo_content.tagdiv.com/Newspaper_6/health/7.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_8', "http://demo_content.tagdiv.com/Newspaper_6/health/8.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_9', "http://demo_content.tagdiv.com/Newspaper_6/health/9.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_10', "http://demo_content.tagdiv.com/Newspaper_6/health/10.jpg");
开发者ID:luxifel,项目名称:Bionerd,代码行数:6,代码来源:td_media_3.php
示例12:
<?php
/**
* Created by ra on 6/13/2015.
*/
td_demo_media::add_image_to_media_gallery('td_pic_13', "http://demo_content.tagdiv.com/Newspaper_6/default/13.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_14', "http://demo_content.tagdiv.com/Newspaper_6/default/14.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_15', "http://demo_content.tagdiv.com/Newspaper_6/default/15.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_16', "http://demo_content.tagdiv.com/Newspaper_6/default/16.jpg");
开发者ID:tuanlibra,项目名称:thptxuanang,代码行数:9,代码来源:td_media_4.php
注:本文中的td_demo_media类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论