"; //Needs an unbranded version? Upgrade to a PRO membership for just $19.99/month. Read more here https://help.appointy.com/entries/20165487-Can-you-unbrand-Appointy-for-me- $poweredby = "
"; add_action('init', 'appointy_calendar_init'); add_action('widgets_init', 'widget_init_appointy'); add_filter('the_content','appointy_insert'); function appointy_insert($content) { if (preg_match('{APPOINTY}',$content)) { $content = str_replace('{APPOINTY}',appointy(),$content); } //echo $content; return $content; } function appointy() { global $userdata, $table_prefix, $wpdb, $appointy_installed, $poweredby; get_currentuserinfo(); // $user_login = $userdata->user_login; $str=''; if( !appointy_calendar_installed() ) $appointy_installed = appointy_calendar_install(); //echo "-->" . $appointy_installed; if( !$appointy_installed ) { echo "PLUGIN NOT CORRECTLY INSTALLED, PLEASE CHECK ALL INSTALL PROCEDURE!"; return; } $query = " SELECT code AS code FROM ".$table_prefix."appointy_calendar LIMIT 1 "; //echo $query; $code = $wpdb->get_var( $query ); $code .= $poweredby; //} ?> '; if( $code === null ) { $str.= '
';
echo $after_widget;
}
function appointy_widget_init() {
global $table_prefix, $wpdb;
if( !appointy_calendar_install() )
{
echo "PLUGIN NOT CORRECTLY INSTALLED, PLEASE CHECK ALL INSTALL PROCEDURE!";
return;
}
$query = "
SELECT code AS code
FROM ".$table_prefix."appointy_calendar LIMIT 1
";
$code = $wpdb->get_var( $query );
return appointy_get_booking_url($code);
}
function appointy_get_booking_url($codeURL)
{
$bookingURL = preg_match("/https?:\/\/(.*).com/", $codeURL, $matches);
if ($bookingURL = true)
{
$bookingURL = htmlentities($matches['0']);
}
return $bookingURL;
}
//******************* WIDGET CODE ENDS HERE **************************
function appointy_calendar_init()
{
global $appointy_calendar_privileges, $table_prefix, $wpdb, $appointy_path, $appointy_default, $appointy_installed;
add_action('admin_menu', 'appointy_calendar_config_page');
}
function appointy_calendar_config_page()
{
if ( function_exists('add_submenu_page') )
{
add_menu_page('appointy Calendar', 'Appointy Calendar', 8, __FILE__, 'appointy_calendar_main_page');
//add_submenu_page(__FILE__, 'Settings', 'Settings', $appointy_calendar_privileges, 'maintenance', 'appointy_calendar_manage_page');
//add_submenu_page(__FILE__, 'Admin Settings', 'Admin Settings', 8, 'admin_maitenance', 'appointy_calendar_admin_manage_page');
}
}
function appointy_calendar_main_page()
{
global $appointy_default, $userdata, $table_prefix, $wpdb, $appointy_installed, $iFrameVal;
get_currentuserinfo();
if( !appointy_calendar_installed() )
$appointy_installed = appointy_calendar_install();
if( !$appointy_installed )
{
echo "PLUGIN NOT CORRECTLY INSTALLED, PLEASE CHECK ALL INSTALL PROCEDURE!";
return;
}
?>
STEP » 2 Create a new page.
Goto "Write" --> "Write Page". Enter a Title e.g. "Schedule an appointment" (This would be shown as a link on your page. So make sure you chose the right title) and in Page Content write {APPOINTY} (including brackets). See preview.
Note: If it overlaps your sidebar then create a new template from your theme without sidebar and use it for Appointy page. Click here to see step by step instructions.
STEP » 3 You are done. Now manage Appointments and clients from admin area easily.
You are all done. Now test your blog. Appointy is easy to use and your clients would love scheduling with you. If you want to change your business hours, block days or times, add staff or service, approve appointment etc then click the link below and login to your powerful admin area on Appointy.
target="_blank" class="button"> Goto Admin Area »
Uninstall Appointy Plugin: UNINSTALL