/**
  * Load style and markup templates to $mla_templates
  *
  * @since 0.80
  *
  * @return	void
  */
 private static function _load_option_templates()
 {
     self::$mla_option_templates = MLAData::mla_load_template('mla-option-templates.tpl');
     /* 	
      * Load the default templates
      */
     if (is_null(self::$mla_option_templates)) {
         MLA::mla_debug_add('<strong>mla_debug _load_option_templates()</strong> ' . __('error loading tpls/mla-option-templates.tpl', 'media-library-assistant'));
         return;
     } elseif (!self::$mla_option_templates) {
         MLA::mla_debug_add('<strong>mla_debug _load_option_templates()</strong> ' . __('tpls/mla-option-templates.tpl not found', 'media-library-assistant'));
         $mla_option_templates = null;
         return;
     }
     /*
      * Add user-defined Style and Markup templates
      */
     $templates = self::mla_get_option('style_templates');
     if (is_array($templates)) {
         foreach ($templates as $name => $value) {
             self::$mla_option_templates[$name . '-style'] = $value;
         }
         // foreach $templates
     }
     // is_array
     $templates = self::mla_get_option('markup_templates');
     if (is_array($templates)) {
         foreach ($templates as $name => $value) {
             self::$mla_option_templates[$name . '-open-markup'] = $value['open'];
             self::$mla_option_templates[$name . '-row-open-markup'] = $value['row-open'];
             self::$mla_option_templates[$name . '-item-markup'] = $value['item'];
             self::$mla_option_templates[$name . '-row-close-markup'] = $value['row-close'];
             self::$mla_option_templates[$name . '-close-markup'] = $value['close'];
         }
         // foreach $templates
     }
     // is_array
 }
Exemplo n.º 2
0
 /**
  * Load option settings templates to $mla_option_templates
  *
  * @since 0.80
  *
  * @return	void
  */
 private static function _load_option_templates()
 {
     MLAOptions::$mla_option_templates = MLACore::mla_load_template('mla-option-templates.tpl');
     /* 	
      * Load the option settings templates
      */
     if (is_null(MLAOptions::$mla_option_templates)) {
         MLACore::mla_debug_add('<strong>mla_debug _load_option_templates()</strong> ' . __('error loading tpls/mla-option-templates.tpl', 'media-library-assistant'));
         return;
     } elseif (!MLAOptions::$mla_option_templates) {
         MLACore::mla_debug_add('<strong>mla_debug _load_option_templates()</strong> ' . __('tpls/mla-option-templates.tpl not found', 'media-library-assistant'));
         MLAOptions::$mla_option_templates = NULL;
         return;
     }
 }
Exemplo n.º 3
0
 /**
  * Load style and markup templates to $mla_templates
  *
  * @since 0.80
  *
  * @return	void
  */
 private static function _load_option_templates()
 {
     self::$mla_option_templates = MLAData::mla_load_template(MLA_PLUGIN_PATH . 'tpls/mla-option-templates.tpl');
     /* 	
      * Load the default templates
      */
     if (is_null(self::$mla_option_templates)) {
         MLAShortcodes::$mla_debug_messages .= '<p><strong>_load_option_templates()</strong> error loading tpls/mla-option-templates.tpl';
         return;
     } elseif (!self::$mla_option_templates) {
         MLAShortcodes::$mla_debug_messages .= '<p><strong>_load_option_templates()</strong>tpls/mla-option-templates.tpl not found';
         $mla_option_templates = null;
         return;
     }
     /*
      * Add user-defined Style and Markup templates
      */
     $templates = self::mla_get_option('style_templates');
     if (is_array($templates)) {
         foreach ($templates as $name => $value) {
             self::$mla_option_templates[$name . '-style'] = $value;
         }
         // foreach $templates
     }
     // is_array
     $templates = self::mla_get_option('markup_templates');
     if (is_array($templates)) {
         foreach ($templates as $name => $value) {
             self::$mla_option_templates[$name . '-open-markup'] = $value['open'];
             self::$mla_option_templates[$name . '-row-open-markup'] = $value['row-open'];
             self::$mla_option_templates[$name . '-item-markup'] = $value['item'];
             self::$mla_option_templates[$name . '-row-close-markup'] = $value['row-close'];
             self::$mla_option_templates[$name . '-close-markup'] = $value['close'];
         }
         // foreach $templates
     }
     // is_array
 }