echo SendPress_Admin::link('Reports');
        ?>
">Reports</a> |
		<a href="<?php 
        echo SendPress_Admin::link('Subscribers');
        ?>
">Subscribers</a> |
		<a href="<?php 
        echo SendPress_Admin::link('Queue');
        ?>
">Queue</a> |
		<a href="<?php 
        echo SendPress_Admin::link('Settings');
        ?>
">Settings</a> 
		
		|
		<a href="<?php 
        echo SendPress_Admin::link('Pro');
        ?>
">Pro</a>
</div>
<br>
</div>
-->
		<?php 
    }
}
// Add Access Controll!
SendPress_Admin::add_cap('Emails_Templates', 'sendpress_email');
//SendPress_View_Overview::cap('sendpress_access');
        _e('Subject', 'sendpress');
        ?>
: <?php 
        echo $post->post_title;
        ?>
</p>
   <p><?php 
        _e('Date', 'sendpress');
        ?>
: <?php 
        echo date_i18n('Y/m/d @ h:i A', strtotime($info));
        ?>
</p>
    <?php 
        SendPress_Data::nonce_field();
        ?>
    <button class="btn" value="cancel" name="submit"><?php 
        _e('Cancel', 'sendpress');
        ?>
</button>
    <button class="btn btn-danger" value="delete" name="submit"><?php 
        _e('Delete Scheduled Email', 'sendpress');
        ?>
</button>
</div>
</form>
		<?php 
    }
}
SendPress_Admin::add_cap('Emails_Send_Cancel', 'sendpress_email_send');
    
</div><input type="hidden" id="post_ID" name="post_ID" value="<?php 
        echo $post->ID;
        ?>
" /><input type="hidden" id="reporttoqueue" name="reporttoqueue" value="<?php 
        echo $lists;
        ?>
" />
<div class='well' id="confirm-queue-add">
    <h2><strong><?php 
        _e('Adding Subscribers to Queue', 'sendpress');
        ?>
</strong></h2><br>
   <!-- <p>email:  <?php 
        echo stripslashes(esc_attr(htmlspecialchars($subject)));
        ?>
</p>-->
    <div class="progress progress-striped active">
        <div class="progress-bar sp-queueit" style="width: 0%;"></div>
    </div>
    <span id="queue-total">0</span> of <span id="list-total"><?php 
        echo $subs;
        ?>
</span>
</div>

        <?php 
    }
}
SendPress_Admin::add_cap('Emails_Send_Queue', 'sendpress_email_send');
.<br>
	<?php 
        _e('To change these settings go to', 'sendpress');
        ?>
 <a href="<?php 
        echo SendPress_Admin::link('Settings_Account');
        ?>
"> <?php 
        _e('Settings', 'sendpress');
        ?>
 > <?php 
        _e('Sending Account', 'sendpress');
        ?>
</a>.
  </div>
  <div class="modal-footer">
   <?php 
        _e('If you close this window sending will stop. ', 'sendpress');
        ?>
<a href="#" class="btn btn-primary" data-dismiss="modal"><?php 
        _e('Close', 'sendpress');
        ?>
</a>
  </div>
</div>
</div></div>
<?php 
    }
}
SendPress_Admin::add_cap('Queue', 'sendpress_queue');
</h2><br>
     <div class="tab-pane fade in active" id="home"><?php 
        wp_editor(get_post_meta($postdata->ID, '_footer_page', true), 'footer-content');
        ?>
</div>
     <br><br>
     <?php 
        _e('Default Content', 'sendpress');
        ?>
<textarea class="form-control" rows="3">
<?php 
        $sys = false;
        get_post_meta($postdata->ID, '_system_template', true);
        if (true == get_post_meta($postdata->ID, '_system_template', true)) {
            $sys = true;
        }
        echo SendPress_Tag_Footer_Page::content(true);
        ?>
</textarea>
     
		<?php 
        SendPress_Data::nonce_field();
        ?>
     </form>

<?php 
        $this->popup();
    }
}
SendPress_Admin::add_cap('Emails_Tempstyle', 'sendpress_email');
        ?>
	</div>
	<div id='postbox-container-4' class='postbox-container'>
	<?php 
        do_meta_boxes($screen->id, 'column4', '');
        ?>
	</div>
</div>

<?php 
        wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
        wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
    }
}
// Add Access Controll!
SendPress_Admin::add_cap('Help', 'sendpress_view');
//SendPress_View_Overview::cap('sendpress_access');
function _sp_help_control_callback($dashboard, $meta_box)
{
    echo '<form action="" method="post" class="dashboard-widget-control-form">';
    wp_dashboard_trigger_widget_control($meta_box['id']);
    echo '<input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" />';
    submit_button(__('Submit'));
    echo '</form>';
}
function sp_add_help_widget($widget_id, $widget_name, $callback, $location = null, $control_callback = null)
{
    $screen = get_current_screen();
    global $wp_dashboard_control_callbacks;
    if ($control_callback && current_user_can('edit_dashboard') && is_callable($control_callback)) {
        $wp_dashboard_control_callbacks[$widget_id] = $control_callback;
        $sp_reports_table->display();
        ?>
		    <?php 
        wp_nonce_field($this->_nonce_value);
        ?>
		</form>
		<h3><?php 
        _e('Information', 'sendpress');
        ?>
</h3>
		<div class='well'>
		<span class="label label-success"><?php 
        _e('Unique', 'sendpress');
        ?>
</span> <?php 
        _e('The total number of different recipients that have clicked on a link or opened an email.', 'sendpress');
        ?>
<br><br>

		<span class="label label-info"><?php 
        _e('Total', 'sendpress');
        ?>
</span> <?php 
        _e('The total number of clicks or opens that have happened. Regardless of who clicked or opened the email.', 'sendpress');
        ?>
		</div>
		<?php 
    }
}
SendPress_Admin::add_cap('Reports', 'sendpress_reports');
            wp_enqueue_script('sendpress_codemirror');
            wp_register_script('sendpress_codemirror_mode', SENDPRESS_URL .'codemirror/mode/htmlmixed/htmlmixed.js' ,'',SENDPRESS_VERSION);
            wp_enqueue_script('sendpress_codemirror_mode');
            wp_register_style( 'sendpress_codemirror_css', SENDPRESS_URL . 'codemirror/lib/codemirror.css', '', SENDPRESS_VERSION );
            wp_enqueue_style( 'sendpress_codemirror_css' );
            */
        }
        function save()
        {
            $template = get_post($_POST['post_ID']);
            $template->post_content = stripcslashes($_POST['template-content']);
            $template->post_title = $_POST['post_subject'];
            wp_update_post($template);
            SendPress_Admin::redirect('Emails_Tempedit', array('templateID' => $_GET['templateID']));
        }
        function screen_options()
        {
            $screen = get_current_screen();
            $args = array('label' => __('Emails per page', 'sendpress'), 'default' => 10, 'option' => 'sendpress_emails_per_page');
            add_screen_option('per_page', $args);
        }
        function prerender($sp = false)
        {
        }
        function html($sp)
        {
            SendPress_Tracking::event('Emails Tab');
        }
    }
    SendPress_Admin::add_cap('Emails_Tempedit', 'sendpress_email');
}
		<div id="taskbar" class="lists-dashboard rounded group">

		<div id="button-area">
			<a class="btn btn-primary btn-large" href="?page=<?php 
            echo SPNL()->validate->page($_REQUEST['page']);
            ?>
&view=create"><?php 
            _e('Create Email', 'sendpress');
            ?>
</a>
		</div>

	</div>
		<!-- For plugins, we also need to ensure that the form posts back to our current page -->
	    <input type="hidden" name="page" value="<?php 
            echo SPNL()->validate->page($_REQUEST['page']);
            ?>
" />
	    <!-- Now we can render the completed list table -->
	    <?php 
            $testListTable->display();
            ?>
	    <?php 
            wp_nonce_field($this->_nonce_value);
            ?>
	</form>
	<?php 
        }
    }
    SendPress_Admin::add_cap('Emails', 'sendpress_email');
}
            echo $key;
            ?>
" value="<?php 
            echo $xlink;
            ?>
" class="form-control" placeholder="<?php 
            echo __('URL da mídia social: por favor, inclua http:// ou https://', 'jaiminho');
            ?>
" />

    </div>
		<?php 
        }
        ?>
</div>
</div>

<?php 
        $this->panel_end();
        ?>
		

<?php 
        wp_nonce_field($this->_nonce_value);
        ?>
</form>
<?php 
    }
}
SendPress_Admin::add_cap('Emails_Social', 'sendpress_email');
			<a class="btn btn-primary btn-large" href="?page=<?php 
        echo $_REQUEST['page'];
        ?>
&view=listcreate"><?php 
        _e('Create List', 'sendpress');
        ?>
</a>
		</div>
		<h2><?php 
        _e('Lists', 'sendpress');
        ?>
</h2>
		<form id="sendpress-lists" method="get">
			<!-- For plugins, we also need to ensure that the form posts back to our current page -->
		    <input type="hidden" name="page" value="<?php 
        echo $_REQUEST['page'];
        ?>
" />
		    <!-- Now we can render the completed list table -->
		    <?php 
        $testListTable->display();
        ?>
		    <?php 
        wp_nonce_field($sp->_nonce_value);
        ?>
		</form>
	<?php 
    }
}
SendPress_Admin::add_cap('Subscribers', 'sendpress_subscribers');
		<a href="<?php 
        echo SendPress_Admin::link('Reports');
        ?>
">Reports</a> |
		<a href="<?php 
        echo SendPress_Admin::link('Subscribers');
        ?>
">Subscribers</a> |
		<a href="<?php 
        echo SendPress_Admin::link('Queue');
        ?>
">Queue</a> |
		<a href="<?php 
        echo SendPress_Admin::link('Settings');
        ?>
">Settings</a> 
		
		|
		<a href="<?php 
        echo SendPress_Admin::link('Pro');
        ?>
">Pro</a>
</div>
<br>
</div>
		<?php 
    }
}
// Add Access Controll!
SendPress_Admin::add_cap('Pro', 'sendpress_view');
//SendPress_View_Overview::cap('sendpress_access');
        ?>
<iframe src="<?php 
        echo $link;
        ?>
" width="100%" height="600px"></iframe>

<small><?php 
        _e('Displaying a 404? Please try saving your permalinks', 'sendpress');
        ?>
 <a href="<?php 
        echo admin_url('options-permalink.php');
        ?>
"><?php 
        _e('here', 'sendpress');
        ?>
</a>.</small>
</div>
<?php 
        wp_nonce_field($sp->_nonce_value);
        ?>
<br><br>
</div>
</div>
<br class="clear" />
	</div>
	</form>
	<?php 
    }
}
SendPress_Admin::add_cap('Emails_Send_Confirm', 'sendpress_email_send');
            ?>
                <a class="btn disabled btn-default btn-activate" href="#">Activate</a>
            <?php 
        }
        ?>
            </div>         
            
            </div>
        </div>
        -->
          <br class="clear">
        <br><br>

        <?php 
    }
    function get_module_class($module = false)
    {
        if ($module !== false) {
            $module = str_replace('-', ' ', $module);
            $module = ucwords($module);
            $module = str_replace(' ', '_', $module);
            $class = "SendPress_Module_{$module}";
            if (class_exists($class)) {
                return $class;
            }
        }
        return false;
    }
}
SendPress_Admin::add_cap('Pro', 'sendpress_addons');
        echo SendPress_Admin::link('Settings_Styles');
        ?>
"><i class="icon-pencil "></i> <?php 
        _e('Styles', 'sendpress');
        ?>
</a>
		 </li>
		 
		<?php 
        do_action('sendpress_view_settings_menu', $sp->_current_view);
        ?>

		</ul>

	</div>
</div>
	<?php 
    }
    function prerender($sp = false)
    {
        if ($sp->_current_view == '') {
            SendPress_Admin::redirect('Settings_Account');
        }
    }
    function html($sp)
    {
        echo "Parent view needs a child.";
    }
}
SendPress_Admin::add_cap('Settings', 'sendpress_settings');
	  </div>
	</div>
  <?php 
            }
            ?>
</div>
</div>

<script>
jQuery( document ).ready(function($) {
        $('.chartid').circliful();
    });
</script>
<!--
<div class="panel panel-default">
  <div class="panel-body">
   <h2>Welcome to SendPress</h2>
  </div>
</div>

-->
<?php 
            if (SendPress_Option::get('feedback') == 'yes' || SendPress_Option::get('allow_tracking') == 'yes') {
                SendPress_Tracking::data();
            }
        }
    }
    // Add Access Controll!
    SendPress_Admin::add_cap('Overview', 'sendpress_view');
    //SendPress_View_Overview::cap('sendpress_access');
}
Esempio n. 17
0
 function init()
 {
     //add_action('register_form',array( $this , 'add_registration_fields'));
     SendPress_Ajax_Loader::init();
     //SendPress_Signup_Shortcode::init();
     SendPress_Sender::init();
     SendPress_Cron::get_instance();
     SendPress_Videos::init();
     sendpress_register_sender('SendPress_Sender_Website');
     sendpress_register_sender('SendPress_Sender_Gmail');
     add_action('sendpress_event', array('SendPress_Tracking', 'event'), 1, 1);
     do_action('sendpress_init');
     SendPress_Admin::add_cap('Emails_Send', 'sendpress_email_send');
     $indexer = "";
     $permalinks = get_option('permalink_structure');
     if ($permalinks) {
         $pos = strpos($permalinks, "index.php");
         if ($pos > 0) {
             // note: three equal signs
             $indexer = "index.php/";
         }
     }
     add_rewrite_rule("^{$indexer}sendpress/([^/]+)/?", 'index.php?sendpress=$matches[1]', "top");
     if (defined('WP_ADMIN') && WP_ADMIN == true) {
         $sendpress_screen_options = new SendPress_Screen_Options();
     }
     $this->add_custom_post();
     //add_filter( 'cron_schedules', array($this,'cron_schedule' ));
     //add_action( 'wp_loaded', array( $this, 'add_cron' ) );
     if (is_admin()) {
         SendPress_Pro_Manager::init();
         SendPress_Tracking::init();
         SendPress_Notifications_Manager::init();
         if (isset($_GET['spv'])) {
             SendPress_Option::set('version', $_GET['spv']);
         }
         if (isset($_GET['sp-admin-code']) && current_user_can('manage_options')) {
             switch ($_GET['sp-admin-code']) {
                 case 'install-tables':
                     $this->install_tables();
                     break;
                 case 'remove-key':
                     SendPress_Option::set('api_key', '');
                     SendPress_Pro_Manager::set_pro_state(false);
                     //this will delete the transient
                     break;
                 default:
                     # code...
                     break;
             }
         }
         $this->ready_for_sending();
         add_action('admin_menu', array($this, 'admin_menu'));
         add_action('admin_init', array($this, 'admin_init'));
         add_action('admin_notices', array($this, 'admin_notice'));
         add_action('admin_print_scripts', array($this, 'editor_insidepopup'));
         add_filter('gettext', array($this, 'change_button_text'), null, 2);
         add_action('sendpress_notices', array($this, 'sendpress_notices'));
         add_filter('user_has_cap', array($this, 'user_has_cap'), 10, 3);
         //SendPress_Option::set('default-signup-widget-settings',false);
     } else {
         if (SendPress_Option::get('sp_widget_shortdoces')) {
             add_filter('widget_text', 'do_shortcode');
         }
     }
     add_image_size('sendpress-max', 600, 600);
     add_filter('template_include', array($this, 'template_include'), 5);
     add_action('sendpress_cron_action', array($this, 'sendpress_cron_action_run'));
     //using this for now, might find a different way to include things later
     // global $load_signup_js;
     // $load_signup_js = false;
     add_action('wp_enqueue_scripts', array($this, 'add_front_end_scripts'));
     add_action('wp_enqueue_scripts', array($this, 'add_front_end_styles'));
     add_action('wp_head', array($this, 'handle_front_end_posts'));
 }