当前位置: 首页>>代码示例>>PHP>>正文


PHP RevOperations::moveOldCaptionsCss方法代码示例

本文整理汇总了PHP中RevOperations::moveOldCaptionsCss方法的典型用法代码示例。如果您正苦于以下问题:PHP RevOperations::moveOldCaptionsCss方法的具体用法?PHP RevOperations::moveOldCaptionsCss怎么用?PHP RevOperations::moveOldCaptionsCss使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RevOperations的用法示例。


在下文中一共展示了RevOperations::moveOldCaptionsCss方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createTable

 /**
  * 
  * craete tables
  */
 public static function createTable($tableName)
 {
     global $wpdb;
     $parseCssToDb = false;
     //check if database is empty
     $result = $wpdb->get_row("SELECT COUNT( DISTINCT id ) AS NumberOfEntrys FROM " . self::$table_prefix . GlobalsRevSlider::TABLE_CSS_NAME);
     if ($result->NumberOfEntrys == 0) {
         $parseCssToDb = true;
     }
     if ($parseCssToDb) {
         $revOperations = new RevOperations();
         $revOperations->importCaptionsCssContentArray();
         $revOperations->moveOldCaptionsCss();
         $revOperations->updateDynamicCaptions(true);
     }
     /*
     
     //if table exists - don't create it.
     $tableRealName = self::$table_prefix.$tableName;
     if(UniteFunctionsWPRev::isDBTableExists($tableRealName))
     	return(false);
     	
     $charset_collate = '';
     if(method_exists($wpdb, "get_charset_collate"))
     	$charset_collate = $wpdb->get_charset_collate();
     else{
     	if ( ! empty($wpdb->charset) )
     		$charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
     	if ( ! empty($wpdb->collate) )
     		$charset_collate .= " COLLATE $wpdb->collate";
     }
     
     switch($tableName){
     	case GlobalsRevSlider::TABLE_SLIDERS_NAME:					
     	$sql = "CREATE TABLE " .self::$table_prefix.$tableName ." (
     				  id int(9) NOT NULL AUTO_INCREMENT,
     				  title tinytext NOT NULL,
     				  alias tinytext,
     				  params text NOT NULL,
     				  PRIMARY KEY (id)
     				)$charset_collate;";
     	break;
     	case GlobalsRevSlider::TABLE_SLIDES_NAME:
     		$sql = "CREATE TABLE " .self::$table_prefix.$tableName ." (
     					  id int(9) NOT NULL AUTO_INCREMENT,
     					  slider_id int(9) NOT NULL,
     					  slide_order int not NULL,	
     					  params text NOT NULL,
     					  layers text NOT NULL,
     					  PRIMARY KEY (id)
     					)$charset_collate;";
     	break;
     	case GlobalsRevSlider::TABLE_SETTINGS_NAME:
     		$sql = "CREATE TABLE " .self::$table_prefix.$tableName ." (
     					  id int(9) NOT NULL AUTO_INCREMENT,
     					  general TEXT NOT NULL,
     					  params TEXT NOT NULL,
     					  PRIMARY KEY (id)
     					)$charset_collate;";
     	break;
     	case GlobalsRevSlider::TABLE_CSS_NAME:
     		$sql = "CREATE TABLE " .self::$table_prefix.$tableName ." (
     					  id int(9) NOT NULL AUTO_INCREMENT,
     					  handle TEXT NOT NULL,
     					  settings TEXT,
     					  hover TEXT,
     					  params TEXT NOT NULL,
     					  PRIMARY KEY (id)
     					)$charset_collate;";
     		$parseCssToDb = true;
     	break;
     	case GlobalsRevSlider::TABLE_LAYER_ANIMS_NAME:
     		$sql = "CREATE TABLE " .self::$table_prefix.$tableName ." (
     					  id int(9) NOT NULL AUTO_INCREMENT,
     					  handle TEXT NOT NULL,
     					  params TEXT NOT NULL,
     					  PRIMARY KEY (id)
     					)$charset_collate;";
     	break;
     	
     	default:
     		UniteFunctionsRev::throwError("table: $tableName not found");
     	break;
     }
     
     require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
     dbDelta($sql);
     */
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:93,代码来源:revslider_admin.php

示例2: sds_caption_css_init

 public static function sds_caption_css_init($parseCssToDb)
 {
     if ((bool) $parseCssToDb === true) {
         $revOperations = new RevOperations();
         $revOperations->importCaptionsCssContentArray();
         $revOperations->moveOldCaptionsCss();
         $revOperations->updateDynamicCaptions(true);
         return TRUE;
     }
 }
开发者ID:rinodung,项目名称:opencart-15x-flat-admin,代码行数:10,代码来源:revslider_admin.php

示例3: createTable

 /**
  * 
  * craete tables
  */
 public static function createTable($tableName)
 {
     global $wpdb;
     $parseCssToDb = false;
     $checkForTablesOneTime = get_option('revslider_checktables', '0');
     if ($checkForTablesOneTime == '0') {
         update_option('revslider_checktables', '1');
         if (UniteFunctionsWPRev::isDBTableExists(self::$table_prefix . GlobalsRevSlider::TABLE_CSS_NAME)) {
             //check if database is empty
             $result = $wpdb->get_row("SELECT COUNT( DISTINCT id ) AS NumberOfEntrys FROM " . self::$table_prefix . GlobalsRevSlider::TABLE_CSS_NAME);
             if ($result->NumberOfEntrys == 0) {
                 $parseCssToDb = true;
             }
         }
     }
     if ($parseCssToDb) {
         $revOperations = new RevOperations();
         $revOperations->importCaptionsCssContentArray();
         $revOperations->moveOldCaptionsCss();
         //$revOperations->updateDynamicCaptions(true);
     }
     //if table exists - don't create it.
     $tableRealName = self::$table_prefix . $tableName;
     if (UniteFunctionsWPRev::isDBTableExists($tableRealName)) {
         return false;
     }
     $charset_collate = '';
     if (method_exists($wpdb, "get_charset_collate")) {
         $charset_collate = $wpdb->get_charset_collate();
     } else {
         if (!empty($wpdb->charset)) {
             $charset_collate = "DEFAULT CHARACTER SET {$wpdb->charset}";
         }
         if (!empty($wpdb->collate)) {
             $charset_collate .= " COLLATE {$wpdb->collate}";
         }
     }
     switch ($tableName) {
         case GlobalsRevSlider::TABLE_SLIDERS_NAME:
             $sql = "CREATE TABLE " . self::$table_prefix . $tableName . " (\n\t\t\t\t\t\t\t  id int(9) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t  title tinytext NOT NULL,\n\t\t\t\t\t\t\t  alias tinytext,\n\t\t\t\t\t\t\t  params text NOT NULL,\n\t\t\t\t\t\t\t  PRIMARY KEY (id)\n\t\t\t\t\t\t\t){$charset_collate};";
             break;
         case GlobalsRevSlider::TABLE_SLIDES_NAME:
             $sql = "CREATE TABLE " . self::$table_prefix . $tableName . " (\n\t\t\t\t\t\t\t\t  id int(9) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t\t  slider_id int(9) NOT NULL,\n\t\t\t\t\t\t\t\t  slide_order int not NULL,\t\n\t\t\t\t\t\t\t\t  params text NOT NULL,\n\t\t\t\t\t\t\t\t  layers text NOT NULL,\n\t\t\t\t\t\t\t\t  PRIMARY KEY (id)\n\t\t\t\t\t\t\t\t){$charset_collate};";
             break;
         case GlobalsRevSlider::TABLE_STATIC_SLIDES_NAME:
             $sql = "CREATE TABLE " . self::$table_prefix . $tableName . " (\n\t\t\t\t\t\t\t\t  id int(9) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t\t  slider_id int(9) NOT NULL,\n\t\t\t\t\t\t\t\t  params text NOT NULL,\n\t\t\t\t\t\t\t\t  layers text NOT NULL,\n\t\t\t\t\t\t\t\t  PRIMARY KEY (id)\n\t\t\t\t\t\t\t\t){$charset_collate};";
             break;
         case GlobalsRevSlider::TABLE_SETTINGS_NAME:
             $sql = "CREATE TABLE " . self::$table_prefix . $tableName . " (\n\t\t\t\t\t\t\t\t  id int(9) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t\t  general TEXT NOT NULL,\n\t\t\t\t\t\t\t\t  params TEXT NOT NULL,\n\t\t\t\t\t\t\t\t  PRIMARY KEY (id)\n\t\t\t\t\t\t\t\t){$charset_collate};";
             break;
         case GlobalsRevSlider::TABLE_CSS_NAME:
             $sql = "CREATE TABLE " . self::$table_prefix . $tableName . " (\n\t\t\t\t\t\t\t\t  id int(9) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t\t  handle TEXT NOT NULL,\n\t\t\t\t\t\t\t\t  settings TEXT,\n\t\t\t\t\t\t\t\t  hover TEXT,\n\t\t\t\t\t\t\t\t  params TEXT NOT NULL,\n\t\t\t\t\t\t\t\t  PRIMARY KEY (id)\n\t\t\t\t\t\t\t\t){$charset_collate};";
             $parseCssToDb = true;
             break;
         case GlobalsRevSlider::TABLE_LAYER_ANIMS_NAME:
             $sql = "CREATE TABLE " . self::$table_prefix . $tableName . " (\n\t\t\t\t\t\t\t\t  id int(9) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t\t  handle TEXT NOT NULL,\n\t\t\t\t\t\t\t\t  params TEXT NOT NULL,\n\t\t\t\t\t\t\t\t  PRIMARY KEY (id)\n\t\t\t\t\t\t\t\t){$charset_collate};";
             break;
         default:
             UniteFunctionsRev::throwError("table: {$tableName} not found");
             break;
     }
     require_once ABSPATH . 'wp-admin/includes/upgrade.php';
     dbDelta($sql);
     if ($parseCssToDb) {
         $revOperations = new RevOperations();
         $revOperations->importCaptionsCssContentArray();
         $revOperations->moveOldCaptionsCss();
         //$revOperations->updateDynamicCaptions(true);
     }
 }
开发者ID:Alderx,项目名称:publioriente,代码行数:74,代码来源:revslider_admin.php


注:本文中的RevOperations::moveOldCaptionsCss方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。