-
Notifications
You must be signed in to change notification settings - Fork 4
/
WPRiders - WP PHP.xml
132 lines (132 loc) · 10.5 KB
/
WPRiders - WP PHP.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<templateSet group="WPRiders - WP PHP">
<template name="wprAjaxActionFN" value="add_action( 'wp_ajax_nopriv_$ajax_action_acept$', '$php_parsing_function$' ); add_action( 'wp_ajax_$ajax_action_acept$', '$php_parsing_function$' ); function $php_parsing_function$(){ $response = array(); $END$ wp_send_json( $response ); }" description="" toReformat="true" toShortenFQNames="true">
<variable name="ajax_action_acept" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="php_parsing_function" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="wprClassSimple" value="class $Name${ function __construct(){ $END$ } }" description="Create simple class" toReformat="true" toShortenFQNames="true">
<variable name="Name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="wprPluginHeader" value="/** * $pluginName$ * * @package $pluginPackage$ * @author $authorName$ * @copyright $date$ $client_name$ * @license GPL-2.0+ * * @wordpress-plugin * Plugin Name: $pluginName$ * Plugin URI: https://www.wpriders.com/hire-us * Description: $pluginDescription$ * Version: 1.0.0 * Author: $authorName$ from WPRiders * Author URI: https://www.wpriders.com/hire-us * Text Domain: $plugin_lang$ * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt */ $END$" description="Insert the required Plugin Header" toReformat="true" toShortenFQNames="true">
<variable name="pluginName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="pluginDescription" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="pluginPackage" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="authorName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="date" expression="date("Y")" defaultValue="" alwaysStopAt="true" />
<variable name="client_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="plugin_lang" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="wprWP_Query" value="$query_args$ = array( 		'paged' => 1, 		'posts_per_page' => $perPage$, 		'post_type' => array( 'post'), 		'post_status' => 'publish' 	); $posts$ = new WP_Query( $query_args$ ); if ( $posts$->have_posts() ) { while ( $posts$->have_posts() ) { $posts$->the_post(); // Loop code here $END$ } wp_reset_postdata(); }" description="Basic WP_Query code" toReformat="true" toShortenFQNames="true">
<variable name="query_args" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="perPage" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="posts" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="wprPluginRestrict" value="if ( ! defined( 'ABSPATH' ) ) { 	header( 'Status: 403 Forbidden' ); 	header( 'HTTP/1.1 403 Forbidden' ); 	exit; }" description="Restrict direct access to this file" toReformat="true" toShortenFQNames="true">
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="wprPluginDefinePaths" value="// Usage $urlPathCon$ . "some_image.png" from plugin folder define( '$urlPathCon$', plugins_url() . "/" . dirname( plugin_basename( __FILE__ ) ).'/' ); // Usage require_once $absPathCon$ . "some_plugin_file.php"; from plugin folder define( '$absPathCon$', plugin_dir_path( __FILE__ ) ); $END$" description="Define Constant values for plugin file path and url path" toReformat="true" toShortenFQNames="true">
<variable name="urlPathCon" expression="capitalizeAndUnderscore(String)" defaultValue=""WPR_PATH_URL"" alwaysStopAt="true" />
<variable name="absPathCon" expression="capitalizeAndUnderscore(String)" defaultValue=""WPR_PATH_FILE"" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="wprShortcodeNoContent" value="function $shortcodeMethod$( $atts ) { // Helpers: // $theme_path = get_template_directory(); // $theme_path_url = get_template_directory_uri(); $result = ""; 	// Attributes 	$atts = shortcode_atts( 		array( 			'text' => '', 			'color' => '#2f2f30', 		), 		$atts 	); 	 $END$ 	return $result; } add_shortcode( '$shortcode_name$', '$shortcodeMethod$' );" description="" toReformat="true" toShortenFQNames="true">
<variable name="shortcodeMethod" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="shortcode_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
<option name="PHP Comment" value="false" />
</context>
</template>
<template name="wprGet_Post_Meta" value="$VAR_NAME$ = get_post_meta( $POST_ID$, '$META_KEY$', true ); if ( ! empty( $VAR_NAME$ ) ) { 	// It has a value 	$END$ }" description="" toReformat="false" toShortenFQNames="true">
<variable name="VAR_NAME" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="POST_ID" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="META_KEY" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="wprPrintR" value="echo '<pre>'; print_r($variable$); echo '</pre>'; die();" description="Print_r" toReformat="false" toShortenFQNames="true">
<variable name="variable" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="wprAddFilter" value="add_filter('$wheretoapply$','$namethefunction$'); function $namethefunction$($atts$){ $END$ }" description="Add filter code and function" toReformat="false" toShortenFQNames="true">
<variable name="wheretoapply" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="namethefunction" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="atts" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="DebugLog" value="define('WP_DEBUG', true); // Turn debugging ON define('WP_DEBUG_DISPLAY', false); // Turn forced display OFF define('WP_DEBUG_LOG', true); // Turn logging to wp-content/debug.log ON" description="Add to wp-config.php" toReformat="false" toShortenFQNames="true">
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="wphome" value="define( 'WP_SITEURL', '$SET_URL$' ); define( 'WP_HOME', '$SET_URL$' ); $END$" description="Add home path and site path" toReformat="true" toShortenFQNames="true">
<variable name="SET_URL" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="wp_script_enqueue" value="wp_enqueue_script( $handle$, $src$, $dependencies$, $VERSION$, $FOOTER$ ); $END$" description="Enqueue script" toReformat="true" toShortenFQNames="true">
<variable name="handle" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="src" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="dependencies" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="VERSION" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="FOOTER" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="wp_style_enqueue" value="wp_enqueue_style( $handle$, $src$, $deps$, $version$, $media$ );" description="Enqueue WordPress style" toReformat="true" toShortenFQNames="true">
<variable name="handle" expression="" defaultValue="slug" alwaysStopAt="true" />
<variable name="src" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="deps" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="version" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="media" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="wpr-translators" value="/* translators: describe_variables_with_comma_as_separator */" description="Translators string helper for i18n WP" toReformat="false" toShortenFQNames="true">
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="wprVarDump" value="echo '<pre>'; var_dump($variable$); echo '</pre>'; die();" shortcut="TAB" description="" toReformat="false" toShortenFQNames="true">
<variable name="variable" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="export_log" value="error_log( '$STRING_MESSAGE$: ' . var_export( $VARIABLE_NAME$, true ) );$END$" description="error log and var export" toReformat="true" toShortenFQNames="true">
<variable name="STRING_MESSAGE" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="VARIABLE_NAME" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="memorywp" value="define('WP_MEMORY_LIMIT', '$NUMBER$M');" description="Change how much memory is assigned to WrodPRess" toReformat="false" toShortenFQNames="true">
<variable name="NUMBER" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
</templateSet>