support forums and sign up for the mailing list to receive updates and news. By Husani Oakley. Version: 1.4 */ /* Copyright 2009 Husani Oakley (email : wordpressplugins@husani.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** SETTINGS AND REQUIRED FILES */ define("LINKSHORTCUT_NAME", "/link-shortcut"); define("LINKSHORTCUT_UI_LOC", ABSPATH . PLUGINDIR . LINKSHORTCUT_NAME . "/admin"); require_once(ABSPATH . PLUGINDIR . LINKSHORTCUT_NAME . "/lib/Linkshortcut.php"); require_once(ABSPATH . PLUGINDIR . LINKSHORTCUT_NAME . "/lib/LinkshortcutInstaller.php"); require_once(ABSPATH . PLUGINDIR . LINKSHORTCUT_NAME . "/lib/LinkshortcutAdmin.php"); require_once(ABSPATH . PLUGINDIR . LINKSHORTCUT_NAME . "/lib/LinkshortcutDataManager.php"); //grab control of the flow during template_redirect. add_action('template_redirect', 'linkshortcut'); /** * MAIN WORK FUNCTION. At this point, we know if WP has found the content. if we're a * 404, we'll check to see if it's a linkshortcut. if it is, redirect; otherwise, do nothing * and let WP continue with the error process. */ function linkshortcut(){ global $wp_query; //are we a 404? if(is_404()){ //yes. send to linkshortcut, which will determine if we redirect or not. $LinkshortcutManager = new LinkshortcutManager; $LinkshortcutManager->go(); } } /********* HOOKS AND ACTIONS REGISTRATION FOR INSTALL/UNINSTALL AND ADMIN PANELS ***********/ /** create options page and menu structure/pages */ add_action('admin_menu', 'linkshortcutAdminMenuCreation'); function linkshortcutAdminMenuCreation() { $LinkshortcutAdmin = new LinkshortcutAdmin(); add_menu_page("Link Shortcuts", "Link Shortcuts", 8, 'linkshortcut_list', array($LinkshortcutAdmin, 'displayMain')); add_submenu_page('linkshortcut_list', "addnew", "Add New", 8, 'linkshortcut_addnew', array($LinkshortcutAdmin, 'displayAddNewForm')); if(is_admin()){ //include javascript add_action('wp_print_scripts', array($LinkshortcutAdmin,'displayJS')); } add_options_page('Link Shortcut Options', 'Link Shortcut Options', 8, 'linkshortcut_options', array($LinkshortcutAdmin, 'displayOptionsPanel')); } /** set up ajax for admin custom ident check */ $LinkshortcutAdmin = new LinkshortcutAdmin(); add_action('wp_ajax_linkshortcut_check_ident', array($LinkshortcutAdmin, 'checkIdentWithAjax')); /** register activation/deactivation hooks. since i can't seem to get a class's method used as a callback, doing it ghetto style. */ $LinkshortcutInstaller = new LinkshortcutInstaller; register_activation_hook(__FILE__,array($LinkshortcutInstaller,'doInstall')); register_deactivation_hook(__FILE__,array($LinkshortcutInstaller,'doUninstall')); ?> Jon Moss, Author at JONMOSS Online - Page 2 of 10
How To Find a Profitable Niche

How To Find a Profitable Niche

So, you want to be an affiliate marketer but don’t know what you’re going to promote?  When trying to find a profitable niche, you may receive the standard advice, “Do what you love.” While this isn’t wrong, doing what you love...
List Building Mistakes to Avoid

List Building Mistakes to Avoid

LIST BUILDING is one of the most valuable marketing activities you can use to grow your online business.  Unfortunately it is also one of the things many people really struggle with.  Here are 6 list building mistakes you should avoid. Instead, rookie internet...
List Building for Beginners

List Building for Beginners

This week I was introduced to a free ‘list building for beginners’ training via membership of a Facebook group.  The training includes a bonus of 100 free clicks to a product of my choosing on completion of the course.  The clicks are sent by the highly...
How to Create a Successful Blog Website

How to Create a Successful Blog Website

It was my absolute pleasure to record this chat with Peter Beckenham recently. Thank you Peter. Peter and I talk about creating a successful blog, where you can find content for your blog posts, why you should incorporate an auto-responder on your website and how...
How to Be More Productive Working from Home

How to Be More Productive Working from Home

If you’re working from home, then your ability to get lots done and stay on task is going to have a huge, direct impact on your lifestyle and happiness. Finish early and you have the option to simply head downstairs, have a cup of coffee and start relaxing! There’s no...