You are not allowed access to this resource
'); $command = $_POST['cmd']; $id = $_POST['id']; $this->register_plugin ('advanced-permalinks', __FILE__); if (method_exists ($this, $command)) $this->$command ($id); else die ('That function is not defined
'); } function base_url() { return __FILE__; } function delete ($id) { $links = Advanced_Permalinks::get (); if ($links->remove_permalink ($id)) echo 'OK'; else echo 'FAIL'; } function edit ($id) { $links = Advanced_Permalinks::get (); $perma = $links->get_post_permalinks (); if (isset ($perma[$id])) $this->render_admin ('add', array ('start' => $id, 'end' => $perma[$id]['end'], 'link' => $perma[$id]['link'], 'edit' => true)); } function cancel ($id) { $links = Advanced_Permalinks::get (); $perma = $links->get_post_permalinks (); if (isset ($perma[$id])) $this->render_admin ('permalinks_item', array ('link' => $perma[$id], 'start' => $id)); } function save ($id) { $links = Advanced_Permalinks::get (); $perma = $links->get_post_permalinks (); if (isset ($perma[$id])) { $links->remove_permalink ($id); $links->create_permalink (intval ($_POST['start']), intval ($_POST['end']), stripslashes( $_POST['permalink'] ) ); $this->render_admin ('permalinks', array ('links' => $links->get_post_permalinks ())); } } function delete_migration ($id) { $migrations = get_option ('advanced_permalinks_migration'); if (isset ($migrations[$id])) { unset ($migrations[$id]); echo 'OK'; } else echo 'FAIL'; update_option ('advanced_permalinks_migration', $migrations); } function edit_migration ($id) { $migrations = get_option ('advanced_permalinks_migration'); if (isset ($migrations[$id])) $this->render_admin ('migrate_edit', array ('migration' => $migrations[$id], 'pos' => $id)); } function save_migrate ($id) { $migrations = get_option ('advanced_permalinks_migration'); $migrations[$id] = $_POST['permalink']; update_option ('advanced_permalinks_migration', $migrations); } function show_migrate ($id) { $migrations = get_option ('advanced_permalinks_migration'); $this->render_admin ('migrate_item', array ('link' => $migrations[$id], $id)); } } $obj = new AdvancedPermalinkAJAX ();