File: /home/undanet/dump/db/portalempleo_wp_des_wp_snippets.sql
CREATE DATABASE IF NOT EXISTS `portalempleo_wp_des` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `portalempleo_wp_des`;
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: SRVDESARROLLO Database: portalempleo_wp_des
-- ------------------------------------------------------
-- Server version 8.0.23
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `wp_snippets`
--
DROP TABLE IF EXISTS `wp_snippets`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `wp_snippets` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` tinytext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`code` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`tags` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`scope` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'global',
`priority` smallint NOT NULL DEFAULT '10',
`active` tinyint(1) NOT NULL DEFAULT '0',
`modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `wp_snippets`
--
LOCK TABLES `wp_snippets` WRITE;
/*!40000 ALTER TABLE `wp_snippets` DISABLE KEYS */;
INSERT INTO `wp_snippets` VALUES (1,'Ejemplo de shortcode HTML','Este es un fragmento de código de ejemplo para demostrar cómo añadir a tu web un shortcode HTML.\n\nPuedes eliminarlo o editarlo para añadir tu propio contenido.','\nadd_shortcode( \'shortcode_name\', function () {\n\n $out = \'<p>teclea aquí el contenido de tu shortcode HTML</p>\';\n\n return $out;\n} );','shortcode','global',10,0,'2020-12-04 07:15:09'),(2,'Ejemplo de fragmento de código para CSS','Este es un fragmento de código de ejemplo para demostrar cómo añadir a tu web código CSS personalizado.\n\nPuedes eliminarlo o editarlo para añadir tu propio contenido.','\nadd_action( \'wp_head\', function () { ?>\n<style>\n\n /* escribe aquí tu código CSS */\n\n</style>\n<?php } );\n','css','front-end',10,0,'2020-12-04 07:15:09'),(3,'Ejemplo de fragmento de código para JavaScript','Este es un fragmento de código de ejemplo para demostrar cómo añadir a tu web código JavaScript personalizado.\n\nPuedes eliminarlo o editarlo para añadir tu propio contenido.','\nadd_action( \'wp_head\', function () { ?>\n<script>\n\n /* escribe aquí tu código JavaScript */\n\n</script>\n<?php } );\n','javascript','front-end',10,0,'2020-12-04 07:15:09'),(4,'Ordenar los fragmentos de código por nombre','Por defecto, ordena los fragmentos de código por nombre en la tabla de fragmentos de código.','\nadd_filter( \'code_snippets/list_table/default_orderby\', function () {\n return \'name\';\n} );\n','code-snippets-plugin','admin',10,0,'2020-12-04 07:15:09'),(5,'Ordenar los fragmentos de código por fecha','Ordenar por defecto los fragmentos de código por la fecha de última modificación en la tabla de fragmentos de código.','\nadd_filter( \'code_snippets/list_table/default_orderby\', function () {\n return \'modified\';\n} );\n\nadd_filter( \'code_snippets/list_table/default_order\', function () {\n return \'desc\';\n} );\n','code-snippets-plugin','admin',10,0,'2020-12-04 07:15:09'),(6,'Codigo de ejemplo','',' //define el wp_head callback\r\n function action_wp_head() {\r\n echo \"<meta name=\'prueba\' content=\'prueba\' />\";\r\n };\r\n \r\n //añadir el hook, los parámetros son:-> (nombre del disparador, funcion a ejecutar, prioridad, numero de argumentos)\r\n add_action(\'wp_head\', \'action_wp_head\', 10, 0);','','front-end',10,1,'2020-12-04 07:27:58'),(7,'codigo de ejemplo de hook tipo filter','',' function filter_the_content($post_post_content) {\r\n return $post_post_content . \"<br/>Esto ira al final de todo el contenido...\";\r\n };\r\n\r\n //add the filter\r\n add_filter(\'the_content\', \'filter_the_content\', 10, 1);','','global',10,0,'2020-12-04 07:34:32'),(8,'comprobar_idioma_url_amigables','',' //define el wp_head callback\r\n function action_lang_head() {\r\n $actual_link = (isset($_SERVER[\'HTTPS\']) && $_SERVER[\'HTTPS\'] === \'on\' ? \"https\" : \"http\") . \"://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\r\n $cad = \'/en/\'; \r\n \r\n if (0 == strlen(strpos($actual_link, $cad))) {\r\n if(!isset($_GET[\'lang\'])){\r\n $_GET[\'lang\'] = \'es\';\r\n }\r\n }\r\n else {\r\n if(!isset($_GET[\'lang\'])){\r\n $_GET[\'lang\'] = \'en\';\r\n }\r\n }\r\n };\r\n \r\n //añadir el hook, los parámetros son:-> (nombre del disparador, funcion a ejecutar, prioridad, numero de argumentos)\r\n add_action(\'wp_head\', \'action_lang_head\', 10, 0);','','front-end',10,1,'2021-01-14 16:16:17'),(9,'comprobaciones_urls_amigables','',' //define el wp_head callback\r\n function action_user_head() {\r\n $actual_link = (isset($_SERVER[\'HTTPS\']) && $_SERVER[\'HTTPS\'] === \'on\' ? \"https\" : \"http\") . \"://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\r\n $cad = \'/user/\'; \r\n \r\n if (0 != strlen(strpos($actual_link, $cad)) && !isset($_GET[\'um_user\'])) {\r\n $url=parse_url(\"$actual_link\");\r\n \r\n //echo\'<script type=\"text/javascript\">alert(\"\' . $url . \'\");</script>\';\r\n //echo var_dump($url[\"path\"]);\r\n //echo $url[\"path\"];\r\n //echo $url[\"fragment\"]; //This variable contains the fragment\r\n \r\n $uriData=explode(\"/\",substr($url[\"path\"], 1));\r\n //echo var_dump($uriData);\r\n \r\n $pos = array_search(\"user\", $uriData);\r\n if ( $pos != 0) {\r\n $_GET[\'um_user\'] = $uriData[array_search(\"user\", $uriData)+1];\r\n $url_redirigida = (isset($_SERVER[\'HTTPS\']) && $_SERVER[\'HTTPS\'] === \'on\' ? \"https\" : \"http\") . \"://$_SERVER[HTTP_HOST]\";\r\n for ($i = 0; $i <= $pos; $i++) {\r\n $url_redirigida = $url_redirigida . \'/\' . $uriData[$i];\r\n }\r\n \r\n //echo $url_redirigida;\r\n $url_redirigida = $url_redirigida . \'/?um_user=\' . $uriData[array_search(\"user\", $uriData)+1] . \'&um_action=edit\';\r\n echo\'<script type=\"text/javascript\">window.location.href=\"\' . $url_redirigida . \'\";</script>\';\r\n }\r\n }\r\n };\r\n \r\n //añadir el hook, los parámetros son:-> (nombre del disparador, funcion a ejecutar, prioridad, numero de argumentos)\r\n add_action(\'template_redirect\', \'action_user_head\', 10, 0);','','front-end',10,1,'2021-02-15 14:18:45'),(10,'comprobaciones_urls_privados','',' //define el wp_head callback\r\n function action_user_head() {\r\n $actual_link = (isset($_SERVER[\'HTTPS\']) && $_SERVER[\'HTTPS\'] === \'on\' ? \"https\" : \"http\") . \"://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\r\n $url_redirigida = (isset($_SERVER[\'HTTPS\']) && $_SERVER[\'HTTPS\'] === \'on\' ? \"https\" : \"http\") . \"://$_SERVER[HTTP_HOST]\";\r\n $cad = \'.\'; \r\n \r\n if (0 != strlen(strpos($actual_link, $cad))) {\r\n echo\'<script type=\"text/javascript\">window.location.href=\"\' . $url_redirigida . \'\";</script>\';\r\n }\r\n };\r\n \r\n //añadir el hook, los parámetros son:-> (nombre del disparador, funcion a ejecutar, prioridad, numero de argumentos)\r\n add_action(\'template_redirect\', \'action_user_head\', 10, 0);','','front-end',10,0,'2021-02-15 14:15:10');
/*!40000 ALTER TABLE `wp_snippets` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2021-05-06 14:12:54