Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

replaced analytics with page load analytics

  • Loading branch information...
commit 6abd7820bcbd0fe940ff249e94f2a548aea71d3b 1 parent 2922278
@jonparis jonparis authored
Showing with 11 additions and 11 deletions.
  1. +4 −0 astrid_post_loaded.js
  2. +0 −1  astridcta.js
  3. +7 −10 astridcta.php
View
4 astrid_post_loaded.js
@@ -0,0 +1,4 @@
+function rm_link_shown(){
+ jQuery.post("http://astrid.com/widgets/remind_me_t");
+}
+jQuery(document).ready(rm_link_shown);
View
1  astridcta.js
@@ -69,5 +69,4 @@ function astrid_popover_size(){
});
}
-
window.addEventListener("load", astrid_popover_size, false);
View
17 astridcta.php
@@ -24,7 +24,6 @@ function __construct() {
add_action( 'cmd_validate_acta_action', array( &$this, 'validate_acta_action' ), 10, 3 );
- //add_action( 'wp_footer', array( &$this, 'acta_footer_actions' ), 100 );
add_action( 'the_content', array( &$this, 'acta_content_footer' ), 100 );
}
@@ -68,9 +67,14 @@ function init_acta() {
function print_scripts() {
wp_register_script( 'astridcta', ACTA_URL . 'astridcta.js', array( 'jquery' ), '1.0' );
wp_enqueue_script( 'astridcta' );
-
+ if ( is_singular() && is_main_query() ){
+ wp_register_script('astrid_post_loaded', ACTA_URL . 'astrid_post_loaded.js', array('jquery'), '1.0' );
+ wp_enqueue_script( 'astrid_post_loaded' );
+ }
wp_register_style( 'astridcta', ACTA_URL . 'astridcta.css' );
wp_enqueue_style( 'astridcta' );
+
+
}
function encodeURIComponent($str) {
@@ -143,13 +147,8 @@ function acta_content_footer( $content ) {
$content .= '</li>';
}
$content .= '</ul>';
- $content .= '<div style="display:none;background-image:url(\'http://astrid.com/widgets/remind_me_t.png\')"></div>';
$content .= '</div>';
}
- elseif (strpos($content,"astrid-reminder-link")!== false){
- $content .= '<div style="display:none;background-image:url(\'http://astrid.com/widgets/remind_me_t.png\')"></div>';
- }
-
}
return $content;
@@ -180,17 +179,15 @@ function get_astrid_cta_option($option) {
return stripslashes($option_return);
}
-// Init plugin options to white list our options
function astrid_cta_init(){
register_setting( 'astrid_cta_options', 'astrid_cta', 'astrid_cta_validate' );
}
-// Add menu page
function astrid_cta_add_page() {
add_options_page('Astrid Calls To Action', 'Astrid Calls-to-Action', 'manage_options', 'astrid_cta', 'astrid_cta_do_page');
}
-// Draw the menu page itself
+// Draw menu page
function astrid_cta_do_page() {
?>
<div class="wrap">
Please sign in to comment.
Something went wrong with that request. Please try again.