about
7 years ago
css
7 years ago
img
7 years ago
js
7 years ago
menu
7 years ago
partials
7 years ago
scss
7 years ago
settings
7 years ago
admin-notices.php
7 years ago
admin.php
7 years ago
class-strong-testimonials-admin-category-list.php
7 years ago
class-strong-testimonials-admin-list.php
7 years ago
class-strong-testimonials-admin-scripts.php
7 years ago
class-strong-testimonials-defaults.php
7 years ago
class-strong-testimonials-help.php
7 years ago
class-strong-testimonials-list-table.php
7 years ago
class-strong-testimonials-page-shortcodes.php
7 years ago
class-strong-testimonials-post-editor.php
7 years ago
class-strong-testimonials-updater.php
7 years ago
class-strong-views-list-table.php
7 years ago
class-walker-strong-category-checklist.php
7 years ago
class-walker-strong-form-category-checklist.php
7 years ago
compat.php
7 years ago
custom-fields-ajax.php
7 years ago
custom-fields.php
7 years ago
form-preview.php
7 years ago
view-list-order.php
7 years ago
views-ajax.php
7 years ago
views-validate.php
7 years ago
views.php
7 years ago
compat.php
117 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Prevent other post ordering plugins, in admin_menu hook. |
| 5 | * |
| 6 | * @since 1.16.0 |
| 7 | */ |
| 8 | function wpmtst_deny_plugins_menu() { |
| 9 | |
| 10 | /** |
| 11 | * Post Types Order |
| 12 | */ |
| 13 | if ( is_plugin_active( 'post-types-order/post-types-order.php' ) ) { |
| 14 | remove_submenu_page( 'edit.php?post_type=wpm-testimonial', 'order-post-types-wpm-testimonial' ); |
| 15 | } |
| 16 | |
| 17 | } |
| 18 | add_action( 'admin_menu', 'wpmtst_deny_plugins_menu', 200 ); |
| 19 | |
| 20 | |
| 21 | /** |
| 22 | * Plugin and theme compatibility in admin. |
| 23 | * |
| 24 | * @since 2.4.0 |
| 25 | */ |
| 26 | function wpmtst_compat_admin_init() { |
| 27 | $theme = wp_get_theme(); |
| 28 | |
| 29 | /* ------------------------------------------------------------ |
| 30 | * Theme Name: Mercury |
| 31 | * Theme URI: http://themes.themegoods2.com/mercury |
| 32 | * Description: Premium Template for Photography Portfolio |
| 33 | * Version: 1.7.5 |
| 34 | * Author: Peerapong Pulpipatnan |
| 35 | * Author URI: http://themeforest.net/user/peerapong |
| 36 | * ------------------------------------------------------------ |
| 37 | * Mercury enqueues its scripts and styles poorly. |
| 38 | * 1. on the `admin_init` hook |
| 39 | * 2. UNconditionally |
| 40 | */ |
| 41 | if ( 'Mercury' == $theme->get( 'Name' ) && 'http://themes.themegoods2.com/mercury' == $theme->get( 'ThemeURI' ) ) { |
| 42 | |
| 43 | /** Screen information is not available yet. */ |
| 44 | //$screen = get_current_screen(); |
| 45 | //if ( $screen && 'wpm-testimonial' == $screen->post_type ) { |
| 46 | |
| 47 | if ( false !== strpos( $_SERVER['QUERY_STRING'], 'post_type=wpm-testimonial' ) ) { |
| 48 | if ( function_exists( 'pp_add_init' ) ) { |
| 49 | remove_action( 'admin_init', 'pp_add_init' ); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | } |
| 54 | } |
| 55 | add_action( 'admin_init', 'wpmtst_compat_admin_init', 1 ); |
| 56 | |
| 57 | |
| 58 | /** |
| 59 | * Prevent other post ordering plugins, in admin_init hook. |
| 60 | * |
| 61 | * @since 1.16.0 |
| 62 | */ |
| 63 | function wpmtst_deny_plugins_init() { |
| 64 | |
| 65 | /** |
| 66 | * Intuitive Custom Post Order |
| 67 | */ |
| 68 | if ( is_plugin_active( 'intuitive-custom-post-order/intuitive-custom-post-order.php' ) ) { |
| 69 | $options = get_option( 'hicpo_options' ); |
| 70 | $update = false; |
| 71 | |
| 72 | if ( isset( $options['objects'] ) && is_array( $options['objects'] ) ) { |
| 73 | if ( in_array( 'wpm-testimonial', $options['objects'] ) ) { |
| 74 | $options['objects'] = array_diff( $options['objects'], array( 'wpm-testimonial' ) ); |
| 75 | $update = true; |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | if ( isset( $options['tags'] ) && is_array( $options['tags'] ) ) { |
| 80 | if ( in_array( 'wpm-testimonial-category', $options['tags'] ) ) { |
| 81 | $options['tags'] = array_diff( $options['tags'], array( 'wpm-testimonial-category' ) ); |
| 82 | $update = true; |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | if ( $update ) |
| 87 | update_option( 'hicpo_options', $options ); |
| 88 | } |
| 89 | |
| 90 | /** |
| 91 | * Simple Custom Post Order |
| 92 | */ |
| 93 | if ( is_plugin_active( 'simple-custom-post-order/simple-custom-post-order.php' ) ) { |
| 94 | $options = get_option( 'scporder_options' ); |
| 95 | $update = false; |
| 96 | |
| 97 | if ( isset( $options['objects'] ) && is_array( $options['objects'] ) ) { |
| 98 | if ( in_array( 'wpm-testimonial', $options['objects'] ) ) { |
| 99 | $options['objects'] = array_diff( $options['objects'], array( 'wpm-testimonial' ) ); |
| 100 | $update = true; |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | if ( isset( $options['tags'] ) && is_array( $options['tags'] ) ) { |
| 105 | if ( in_array( 'wpm-testimonial-category', $options['tags'] ) ) { |
| 106 | $options['tags'] = array_diff( $options['tags'], array( 'wpm-testimonial-category' ) ); |
| 107 | $update = true; |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | if ( $update ) |
| 112 | update_option( 'scporder_options', $options ); |
| 113 | } |
| 114 | |
| 115 | } |
| 116 | add_action( 'admin_init', 'wpmtst_deny_plugins_init', 200 ); |
| 117 |