Video User Manuals - Version 1.0

Version Description

Download this release

Release Info

Developer markethax
Plugin Icon 128x128 Video User Manuals
Version 1.0
Comparing to
See all releases

Version 1.0

Files changed (2) hide show
  1. readme.txt +18 -0
  2. video-user-manuals.php +97 -0
readme.txt ADDED
@@ -0,0 +1,18 @@
1
+ === Video User Manuals ===
2
+ Tags: tutorials, manual
3
+ Requires at least: 4.0
4
+ Tested up to: 5.1
5
+ Requires PHP: 5.2.4
6
+ Stable tag: 1.0
7
+ License: GPLv2 or later
8
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
+
10
+ === Description ===
11
+
12
+ This plugin enables you to upload your video tutorials for your clients about how to use their new wordpress site.
13
+
14
+ == Screenshots ==
15
+
16
+ 1. This is how your clients will see your videotutorials in the screen.
17
+
18
+
video-user-manuals.php ADDED
@@ -0,0 +1,97 @@
1
+ <?php
2
+ /**
3
+ * Plugin Name: Video User Manuals
4
+ * Plugin URI: https://markethax.com/plugins-wordpress/video-user-manuals
5
+ * Description: A video tutorial plugin to teach your clients how to use their brand new websites.
6
+ * Version: 1.0
7
+ * Author: MarketHax
8
+ * Author URI: https://markethax.com
9
+ **/
10
+
11
+ function VUMA_register_cpt_tutorial_resource() {
12
+
13
+ $labels = array(
14
+ 'name' => _x( 'Tutoriales', 'tutorial_resource' ),
15
+ 'singular_name' => _x( 'Tutorial', 'tutorial_resource' ),
16
+ 'add_new' => _x( 'Añadir nuevo', 'tutorial_resource' ),
17
+ 'add_new_item' => _x( 'Añadir nuevo tutorial', 'tutorial_resource' ),
18
+ 'edit_item' => _x( 'Editar tutorial', 'tutorial_resource' ),
19
+ 'new_item' => _x( 'Nuevo tutorial', 'tutorial_resource' ),
20
+ 'view_item' => _x( 'Ver tutorial', 'tutorial_resource' ),
21
+ 'search_items' => _x( 'Buscar tutorial', 'tutorial_resource' ),
22
+ 'not_found' => _x( 'No se encontraron tutoriales', 'tutorial_resource' ),
23
+ 'not_found_in_trash' => _x( 'No se encontraron videos en el basurero', 'tutorial_resource' ),
24
+ 'menu_name' => _x( 'Manual', 'tutorial_resource' ),
25
+ );
26
+
27
+ $args = array(
28
+ 'labels' => $labels,
29
+ 'hierarchical' => true,
30
+ 'description' => 'Tutoriales para administrar tu sitio web',
31
+ 'supports' => array( 'title', 'editor'),
32
+ 'public' => true,
33
+ 'show_ui' => true,
34
+ 'show_in_menu' => true,
35
+ 'menu_position' => 2,
36
+ 'menu_icon' => 'dashicons-media-spreadsheet',
37
+ 'show_in_nav_menus' => true,
38
+ 'publicly_queryable' => true,
39
+ 'exclude_from_search' => false,
40
+ 'has_archive' => true,
41
+ 'query_var' => 'film',
42
+ 'can_export' => true,
43
+ 'rewrite' => true,
44
+ 'capability_type' => 'post'
45
+ );
46
+
47
+ register_post_type( 'tutorial_resource', $args );
48
+ }
49
+ add_action( 'init', 'VUMA_register_cpt_tutorial_resource' );
50
+
51
+
52
+ function VUMA_custom_menu()
53
+ {
54
+ add_menu_page( 'Page Title', 'Tutoriales', 'edit_posts', 'menu_slug', 'VUMA_xs_tutorial', 'dashicons-format-video', 3);
55
+ }
56
+ add_action('admin_menu', 'VUMA_custom_menu');
57
+
58
+ function VUMA_xs_tutorial() {
59
+ $type = 'tutorial_resource';
60
+ $args=array(
61
+ 'post_type' => $type,
62
+ 'post_status' => 'publish');
63
+
64
+ $my_query = new WP_Query($args);
65
+ $maxcols = 3;
66
+ $i = 0;
67
+ echo "<table>";
68
+ echo "<tr>";
69
+ if( $my_query->have_posts() ) {
70
+ while ($my_query->have_posts()) : $my_query->the_post(); ?>
71
+ <?php
72
+ if ($i == $maxcols) {
73
+ $i = 0;
74
+ echo "</tr><tr>";
75
+ }
76
+ ?>
77
+
78
+ <td>
79
+ <p style="font-size:16px"><strong><?php the_title(); ?></strong></p>
80
+ <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_content(); ?></a></p>
81
+ </td>
82
+ <?php
83
+ $j = 0;
84
+ while ($j <= 5) {
85
+ echo "<td>&nbsp;</td>";
86
+ $j++;
87
+ }
88
+ ?>
89
+ <?php
90
+ $i++;?>
91
+ <?php
92
+ endwhile;
93
+ }
94
+ echo "</table>";
95
+ wp_reset_query();
96
+
97
+ }