Changeset 2364311
- Timestamp:
- 08/18/2020 09:14:12 PM (5 years ago)
- Location:
- duplicate-wp-page-post/trunk
- Files:
-
- 2 edited
-
duplicate-wp-page-post.php (modified) (11 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
duplicate-wp-page-post/trunk/duplicate-wp-page-post.php
r2351903 r2364311 3 3 Plugin Name: Duplicate Page and Post 4 4 Plugin URI: https://wordpress.org/plugins/duplicate-wp-page-post/ 5 Description: This plugin quickly creates a clone of page orpost and supports Gutenberg.5 Description: Quickly clone a page, post or custom post and supports Gutenberg. 6 6 Author: Arjun Thakur 7 7 Author URI: https://profiles.wordpress.org/arjunthakur#content-plugins 8 Version: 2.6. 18 Version: 2.6.2 9 9 License: GPLv2 or later 10 10 Text Domain: dpp_wpp_page … … 22 22 register_activation_hook(__FILE__, array(&$this, 'dpp_wpp_page_install')); 23 23 add_action('admin_menu', array(&$this, 'dpp_page_options_page')); 24 add_filter( 'plugin_action_links', array(&$this, 'dpp_ page_plugin_action_links'), 10, 2 );24 add_filter( 'plugin_action_links', array(&$this, 'dpp_settings_link'), 10, 2 ); 25 25 add_action( 'admin_action_dt_dpp_post_as_draft', array(&$this,'dt_dpp_post_as_draft') ); 26 26 add_filter( 'post_row_actions', array(&$this,'dt_dpp_post_link'), 10, 2); … … 51 51 } 52 52 53 /* Plugin Action Links(Dashboard) */54 public function dpp_page_plugin_action_links($links, $file){55 return $links;56 }57 53 58 54 /* Page Title and Dashboard Menu (Setting options) */ … … 90 86 $redirectit = !empty($opt['dpp_post_redirect']) ? $opt['dpp_post_redirect'] : 'to_list'; 91 87 92 //if (! ( isset( $get_copy ) || isset( $post_copy ) || ( isset($request_copy) && 'dt_dpp_post_as_draft' == $request_copy ) ) ) {93 88 if (!(isset($_GET['post']) || isset($_POST['post']) || (isset($_REQUEST['action']) && 'dt_dpp_post_as_draft' == $_REQUEST['action']))) { 94 89 wp_die('No post!'); 95 90 } 96 91 $returnpage = ''; 97 98 /* Get post id */99 //$post_id = (isset($get_copy) ? $get_copy : $post_copy );100 92 101 93 $post = get_post( $post_id ); … … 161 153 162 154 /*Add link to action*/ 163 public function dt_dpp_post_link( $actions, $post ) { 155 public function dt_dpp_post_link( $actions, $post ) 156 { 164 157 $opt = get_option('dpp_wpp_page_options'); 165 158 $link_title = !empty($opt['dpp_post_link_title']) ? $opt['dpp_post_link_title'] : 'Duplicate'; … … 173 166 174 167 /*Add link to edit Post*/ 175 public function dpp_wpp_page_custom_button(){ 168 public function dpp_wpp_page_custom_button() 169 { 176 170 $opt = get_option('dpp_wpp_page_options'); 177 171 $link_title = !empty($opt['dpp_post_link_title']) ? $opt['dpp_post_link_title'] : 'Duplicate'; … … 203 197 var dpp_posttitle = "Duplicate this as <?php echo $post_status; ?>"; 204 198 var dpp_duplicatelink = '<div class="link_gutenberg">'; 205 dpp_duplicatelink += '<a href="admin.php?action=dt_dpp_post_as_draft&post='+dpp_postid '&nonce='+dtnonce+'" title="'+dpp_posttitle+'">Duplicate</a>';199 dpp_duplicatelink += '<a href="admin.php?action=dt_dpp_post_as_draft&post='+dpp_postid+'&nonce='+dtnonce+'" title="'+dpp_posttitle+'">Duplicate</a>'; 206 200 dpp_duplicatelink += '</div>'; 207 201 jQuery('.edit-post-post-status').append(dpp_duplicatelink); … … 215 209 /*Click here to clone Admin Bar*/ 216 210 public function dpp_wpp_page_admin_bar_link() 217 {211 { 218 212 global $wp_admin_bar; 219 213 global $post; … … 234 228 } 235 229 230 236 231 /*WP Url Redirect*/ 237 232 static function dp_redirect($url) … … 239 234 echo '<script>window.location.href="'.$url.'"</script>'; 240 235 } 241 } 242 new dpp_wpp_page; 243 236 244 237 /*plugin settings page link*/ 245 add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'dpp_settings_link');246 238 function dpp_settings_link( $links ) { 247 239 $links[] = '<a href="' . … … 250 242 return $links; 251 243 } 244 245 } 246 new dpp_wpp_page(); 252 247 253 248 endif; 254 255 256 249 ?> -
duplicate-wp-page-post/trunk/readme.txt
r2351903 r2364311 3 3 Tags: duplicate post, duplicate page, clone page, clone post, duplicate custom posts, clone custom post, wordpress page duplicator, wordpress post duplicator, page duplicate, clone page and post, wp post clone. 4 4 Requires at least: 3.5 5 Tested up to: 5. 4.25 Tested up to: 5.5 6 6 Requires PHP: 5.2.4 7 Stable tag: 2.6. 18 Version: 2.6. 17 Stable tag: 2.6.2 8 Version: 2.6.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.