Changeset 2148498
- Timestamp:
- 08/30/2019 02:07:38 PM (6 years ago)
- Location:
- team-118group-agent/trunk
- Files:
-
- 21 added
- 3 edited
-
modules/ajax.php (added)
-
modules/css (added)
-
modules/css/admin.css (added)
-
modules/css/front.css (added)
-
modules/css/loader.gif (added)
-
modules/hooks.php (modified) (4 diffs)
-
modules/images (added)
-
modules/images/icon_16x16.png (added)
-
modules/images/icon_20x20.png (added)
-
modules/images/icon_25x25.png (added)
-
modules/images/loader.gif (added)
-
modules/inc (added)
-
modules/inc/assets (added)
-
modules/inc/assets/css (added)
-
modules/inc/assets/css/glyphicons-halflings-white.png (added)
-
modules/inc/assets/css/glyphicons-halflings.png (added)
-
modules/inc/assets/css/tw-bs4.css (added)
-
modules/js (added)
-
modules/js/admin.js (added)
-
modules/js/front.js (added)
-
modules/scripts.php (added)
-
modules/settings.php (added)
-
readme.txt (modified) (2 diffs)
-
wp-tga-filter.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
team-118group-agent/trunk/modules/hooks.php
r2143202 r2148498 1 1 <?php 2 3 // gravity form entries listing 2 4 add_action('rest_api_init', function () { 3 5 register_rest_route( 'gfdata/v1', 'date/(?P<date>[a-zA-Z0-9-]+)',array( … … 52 54 53 55 $out_entry[] = array( 56 'submission_id' => $single_item->id, 54 57 'form_id' => $single_item->form_id, 58 55 59 'form_title' => $form_title->title, 56 60 'form_is_active' => $form_title->is_active, … … 72 76 } 73 77 74 78 // Alog plugin log return 75 79 add_action('rest_api_init', function () { 76 80 register_rest_route( 'alog/v1', 'date/(?P<date>[a-zA-Z0-9-]+)',array( … … 128 132 } 129 133 134 // sitemap generation 135 add_action('rest_api_init', function () { 136 register_rest_route( 'sitemap/v1', '/generate',array( 137 'methods' => 'GET', 138 'callback' => 'wtgaf_generate_sitemap' 139 )); 140 }); 141 142 function wtgaf_generate_sitemap($request) { 143 global $wpdb; 144 145 146 $args = array( 147 'showposts' => -1, 148 'post_type' => 'any' 149 ); 150 $all_posts = get_posts($args); 151 152 $json_sitemap = array(); 153 154 if( count( $all_posts ) > 0 ){ 155 foreach( $all_posts as $single_post ){ 156 157 $json_sitemap[] = array( 158 'url' => get_permalink( $single_post->ID ), 159 'post_type' => $single_post->post_type, 160 'last_mod' => $single_post->post_modified 161 162 ); 163 164 } 165 } 166 167 168 $response = new WP_REST_Response( $json_sitemap ); 169 $response->set_status(200); 170 171 return $response; 172 173 174 } 175 176 177 // insertin link to plugin 178 add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'wtgaf_add_action_links' ); 179 function wtgaf_add_action_links ( $links ) { 180 $mylinks = array( 181 '<a href="' . admin_url( 'options-general.php?page=myplugin' ) . '">Usage Info</a>', 182 ); 183 return array_merge( $links, $mylinks ); 184 } 185 186 187 // 404 functionality 188 add_Action('template_redirect', 'wtf_template_redirect'); 189 function wtf_template_redirect(){ 190 if( is_404() ){ 191 global $wp, $wpdb; 192 193 $table_name = 'wtf_404_log'; 194 $table_name = $wpdb->prefix.$table_name; 195 196 197 198 $current_url = home_url(add_query_arg(array(), $wp->request)); 199 date_default_timezone_set('US/Eastern'); 200 201 // check if exists 202 203 204 205 $res = $wpdb->get_results($wpdb->prepare( "SELECT * FROM $table_name WHERE request_url = %s", $current_url) ); 206 207 if( count($res) == 0 ){ 208 $res = $wpdb->insert( 209 $table_name, 210 array( 211 'request_url' => $current_url , 212 'refferal_url' => ( $_SERVER['HTTP_REFERER'] ? $_SERVER['HTTP_REFERER'] : '' ), 213 'timestamp' => time() , 214 215 ), 216 array( 217 '%s', 218 '%s', 219 '%d' 220 ) 221 ); 222 223 } 224 } 225 } 130 226 131 227 ?> -
team-118group-agent/trunk/readme.txt
r2143535 r2148498 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html 9 Stable tag: 1. 3.210 Version: 1. 3.29 Stable tag: 1.5 10 Version: 1.5 11 11 12 12 Performs a variety of functions to assist your web designer with wordpress data and system care … … 15 15 16 16 This plugin can be called and displays Gravity Forms Entries Using a simple URL: https://www.mydomain.com/wp-json/gfdata/v1/date/MM-DD-YYYY 17 18 This plugin can be called and displays WP Security Audit Log Entries Using a simple URL: https://www.mydomain.com/wp-json/alog/v1/date/MM-DD-YYYY 19 20 This plugin can be called and displays JSON Sitemap using a simple URL: https://www.mydomain.com/wp-json/sitemap/v1/generate 21 22 17 23 18 24 Replace MM-DD-YYYY with any date and only entries on or after that date will be displayed. -
team-118group-agent/trunk/wp-tga-filter.php
r2143535 r2148498 3 3 Plugin Name: Team 118GROUP Agent 4 4 Description: Team 118GROUP Web Design Plugin to assist with monitoring your WordPress installation and assisting with system care 5 Version: 1. 3.25 Version: 1.5 6 6 Author: Team118GROUP 7 7 Author URI: http://www.118group.com 8 Stable tag: 1. 3.28 Stable tag: 1.5 9 9 */ 10 10 … … 41 41 new vooMainStart('wtf', array( 42 42 'modules/hooks.php', 43 'modules/ajax.php', 44 'modules/settings.php', 45 'modules/scripts.php', 43 46 ), dirname(__FILE__).'/' ); 47 48 49 register_activation_hook( __FILE__, 'wtf_activate' ); 50 function wtf_activate() { 51 require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); 52 global $wpdb; 53 $table_name = 'wtf_404_log'; 54 $table_name = $wpdb->prefix.$table_name; 55 56 57 $wpdb->query("DROP TABLE ".$table_name ); 58 59 $sql = "CREATE TABLE IF NOT EXISTS $table_name ( 60 `id` mediumint(9) NOT NULL AUTO_INCREMENT, 61 `request_url` longtext NOT NULL , 62 `refferal_url` longtext NOT NULL, 63 `timestamp` longtext NOT NULL, 64 `redirect_url` longtext NOT NULL, 65 66 UNIQUE KEY `id` (`id`) 67 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"; 68 69 dbDelta($sql); 44 70 45 71 46 72 47 73 74 } 75 48 76 49 77 ?>
Note: See TracChangeset
for help on using the changeset viewer.