$plugin_data){ switch (basename($plugin_file)){ case 'wpts_matrix.php': $gridlayout=true; break; case 'wpts_slider.php'://plugin file name for jqueryslidershock $jqueryslider=true; break; } } if ($gridlayout===false || $jqueryslider===false ): ?>
Create any kind of grid layout (pinterest-like) using your post, taxonomies or custom post types, and external sources Download
Create any kind if slider from your (or external) data, with tons of options and features, the most complete slider ever Download
Using the Shortcode, You can repost all your products, services and galleries in any page. Only you need copy the shortcode and paste in every page you want the galleries, products or services appear.
;?>/img/frame_gallery/loading.gif)
'.$themename.' settings saved.
'; if ( isset($_POST['reset'] )) echo ''.$themename.' settings reset.
'.$GLOBALS['arg_text_logo'][0].'
'; }else{ if($GLOBALS['logo_type'] == 'image'){ $img_logo = ''.$GLOBALS['logo_text_options']['logo_text'].'
'; } } return ''.$img_logo.''; } /* funciton para quitar los puntos suspensivos del excerpt */ function trim_excerpt($text) { return str_replace(" [...]", '...', $text); } add_filter('get_the_excerpt', 'trim_excerpt'); function trim_the_content( $the_contents, $read_more_tag = ' READ MORE...', $perma_link_to = '', $all_words = 45 ) { $allowed_tags = array( 'a', 'abbr', 'b', 'blockquote', 'b', 'cite', 'code', 'div', 'em', 'fon', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'label', 'i', 'p', 'pre', 'span', 'strong', 'title', 'ul', 'ol', 'li', 'object', 'embed', 'input' ); if( $the_contents != '' ) { $allowed_tags = '<' . implode( '><', $allowed_tags ) . '>'; $the_contents = str_replace( ']]>', ']]>', $the_contents ); $the_contents = strip_tags( $the_contents, $allowed_tags ); if( $all_words > count( preg_split( '/[\s]+/', strip_tags( $the_contents ), -1 ) ) ) return $the_contents; $all_chunks = preg_split( '/([\s]+)/', $the_contents, -1, PREG_SPLIT_DELIM_CAPTURE ); $the_contents = ''; $count_words = 0; $enclosed_by_tag = false; foreach( $all_chunks as $chunk ) { if( 0 < preg_match( '/<[^>]*$/s', $chunk ) ) $enclosed_by_tag = true; elseif( 0 < preg_match( '/>[^<]*$/s', $chunk ) ) $enclosed_by_tag = false; if( !$enclosed_by_tag && '' != trim( $chunk ) && substr( $chunk, -1, 1 ) != '>' ) $count_words ++; $the_contents .= $chunk; if( $count_words >= $all_words && !$enclosed_by_tag ) break; } $the_contents = $the_contents . '' . $read_more_tag . ''; $the_contents = force_balance_tags( $the_contents ); } return $the_contents; } /* funcion para actualizar el estado de los post type recibe dos parametros el post name, y el estado nuevo */ function statusCustomPostType($wtsPostName, $wtsStatus){ global $wpdb, $post; (isset($_POST['themeshock_enablePostTypeGallery']) || isset($_POST['themeshock_enablePostTypePortfolio']) || isset($_POST['themeshock_enablePostTypeServices']) || isset($_POST['themeshock_enablePostTypeProducts']) || isset($_POST['themeshock_enablePostTypeTestimonials']))?$redirect_warr = 'true':$redirect_warr = 'false'; if (is_user_logged_in()){ $wpdb->query(" UPDATE $wpdb->posts SET post_status = '".$wtsStatus."' WHERE post_name = '".$wtsPostName."';" ); $menu_current = get_theme_mod('nav_menu_locations'); if($menu_current['shock_menu'] != 0){ $term_shock_menu = get_term_by('term_id', $menu_current['shock_menu'], 'nav_menu'); $idsPostNameWts = $wpdb->get_results("SELECT ID FROM wp_posts w where post_name like '%wts%' and post_status = 'trash'"); $resultMenuItems = $wpdb->get_results($wpdb->prepare("SElECT post_id, meta_value FROM wp_term_relationships rs, wp_postmeta pm where rs.term_taxonomy_id = %s and rs.object_id = pm.post_id and meta_key = '_menu_item_object_id';", $term_shock_menu->term_taxonomy_id)); foreach($idsPostNameWts as $idPostName){ foreach($resultMenuItems as $resultMenuItem){ if($resultMenuItem->meta_value === $idPostName->ID){ $wpdb->query($wpdb->prepare("DELETE FROM $wpdb->term_relationships WHERE object_id = %s;", $resultMenuItem->post_id)); $wpdb->query($wpdb->prepare("DELETE FROM $wpdb->posts WHERE id = %s;", $resultMenuItem->post_id)); $wpdb->query($wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE post_id = %s;", $resultMenuItem->post_id)); } } } ($redirect_warr === 'true')?header('Location: '.$_SERVER['REQUEST_URI']):''; } } } /* funcion para habilitar o desabilitar las taxonomias (portfolio, services, products.. etc)en el dashboard */ function activeCustomPostType($CustomPostType, $wtsPostType, $wtsPostName){ global $wpdb; if(get_option('themeshock_enablePostType'.$CustomPostType) === 'true'): statusCustomPostType($wtsPostName, 'publish'); add_action('init', $wtsPostType); else: statusCustomPostType($wtsPostName, 'trash'); remove_action('init', $wtsPostType); endif; } /* funcion que verifica si el dominio es wpthemegenerator */ function is_wpthemegenerator(){ if($_SERVER['HTTP_HOST'] == 'www.wpthemegenerator.com'){ return true; }else{ return false; } } /* Esta funcion es la forma correcta para el upload de las imagenes del logo y la de los sliders, adicionalemnte es la que sube las imagenes por primera vez del logo y el slider. Los parametos que soportan son 4 (el directorio del archivo, el nombre, los atributos del archivo y uno opcional que es para especificar si se va usar para crear las imagenes por primera vez o en cada subida de la imagen ya sea logo o slider) */ function check_filesystem($directory_file, $file_name, $file_info, $trigger = 'qq-uploader') { define('FS_METHOD', 'direct'); require_once(ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php'); global $wp_filesystem; //check_admin_referer(); $method = 'direct'; if ( ! $method ) return false; if ( ! class_exists("WP_Filesystem_$method") ) { $abstraction_file = apply_filters('filesystem_method_file', ABSPATH . 'wp-admin/includes/class-wp-filesystem-' . $method . '.php', $method); if ( ! file_exists($abstraction_file) ) return; require_once($abstraction_file); } if ( !defined('FS_CHMOD_DIR') ) define('FS_CHMOD_DIR', 0755 ); if ( !defined('FS_CHMOD_FILE') ) define('FS_CHMOD_FILE', 0644 ); $method = "WP_Filesystem_$method"; $wp_filesystem = new $method($args); switch($trigger){ case 'qq-uploader': $filename = trailingslashit($directory_file).$file_name; $wp_filesystem->put_contents($filename, $file_info, 0777); break; case 'active-theme': $wp_filesystem->put_contents($directory_file, $wp_filesystem->get_contents($file_info), 0777); break; } return true; } /*function for captcha reload*/ function captcha_reload(){ switch ($_REQUEST['session']) { case 'reload': get_template_part('captcha/newsession'); break; case 'generate': get_template_part('captcha/image_req'); break; } exit; } if ( ! function_exists('tg_script_contact_execute') ){ function tg_script_contact_execute(){ ?>