PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 3.1.8
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v3.1.8
3.4.2 3.4.1 3.4.0 3.3.9 3.3.8 3.3.7 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 2.3.2 All 195 releases
← All changes | includes/functions.php +0 -98 3.3.93.1.8 View file →
@@ -147,28 +147,8 @@
147 147
148 148 }
149 149
150 150 /**
151 - * Determines whether the current user can create and publish the given Post Type.
152 - *
153 - * @since 3.3.9
154 - *
155 - * @param string $post_type Post Type.
156 - * @return bool User can create and publish Post Type.
157 - */
158 -function convertkit_user_can_create_published_post_type( $post_type ) {
159 -
160 - $post_type_object = get_post_type_object( $post_type );
161 -
162 - if ( ! $post_type_object ) {
163 - return false;
164 - }
165 -
166 - return current_user_can( $post_type_object->cap->create_posts ) && current_user_can( $post_type_object->cap->publish_posts );
167 -
168 -}
169 -
170 -/**
171 151 * Helper method to get supported Post Types for Restricted Content (Member's Content)
172 152 *
173 153 * @since 2.1.0
174 154 *
@@ -254,32 +234,8 @@
254 234
255 235 }
256 236
257 237 /**
258 - * Helper method to get registered plugin sidebars.
259 - *
260 - * @since 3.3.0
261 - *
262 - * @return array Plugin sidebars
263 - */
264 -function convertkit_get_plugin_sidebars() {
265 -
266 - $plugin_sidebars = array();
267 -
268 - /**
269 - * Registers plugin sidebars for the WordPress block editor.
270 - *
271 - * @since 3.3.0
272 - *
273 - * @param array $plugin_sidebars Plugin sidebars.
274 - */
275 - $plugin_sidebars = apply_filters( 'convertkit_plugin_sidebars', $plugin_sidebars );
276 -
277 - return $plugin_sidebars;
278 -
279 -}
280 -
281 -/**
282 238 * Helper method to get registered pre-publish actions.
283 239 *
284 240 * @since 2.4.0
285 241 *
@@ -573,36 +529,8 @@
573 529
574 530 }
575 531
576 532 /**
577 - * Helper method to enqueue the frontend CSS file.
578 - *
579 - * @since 3.2.0
580 - */
581 -function convertkit_enqueue_frontend_css() {
582 -
583 - wp_enqueue_style( 'convertkit-frontend', CONVERTKIT_PLUGIN_URL . 'resources/frontend/css/frontend.css', array(), CONVERTKIT_PLUGIN_VERSION );
584 -
585 -}
586 -
587 -/**
588 - * Helper method to enqueue the frontend JS file.
589 - *
590 - * @since 3.2.0
591 - */
592 -function convertkit_enqueue_frontend_js() {
593 -
594 - wp_enqueue_script(
595 - 'convertkit-js',
596 - CONVERTKIT_PLUGIN_URL . 'resources/frontend/js/dist/frontend.min.js',
597 - array(),
598 - CONVERTKIT_PLUGIN_VERSION,
599 - true
600 - );
601 -
602 -}
603 -
604 -/**
605 533 * Helper method to enqueue Select2 scripts for use within the ConvertKit Plugin.
606 534 *
607 535 * @since 1.9.6.4
608 536 */
@@ -838,31 +766,8 @@
838 766
839 767 /**
840 768 * Deletes the stored access token, refresh token and its expiry from the Plugin settings,
841 769 * and clears any existing scheduled WordPress Cron event to refresh the token on expiry,
842 - * when the user revokes the access token.
843 - *
844 - * @since 3.2.4
845 - *
846 - * @param string $client_id OAuth Client ID used for the Access and Refresh Tokens.
847 - */
848 -function convertkit_delete_credentials( $client_id ) {
849 -
850 - // Don't delete these credentials if they're not for this Client ID.
851 - // They're for another Kit Plugin that uses OAuth.
852 - if ( $client_id !== CONVERTKIT_OAUTH_CLIENT_ID ) {
853 - return;
854 - }
855 -
856 - // Delete Access and Refresh Tokens.
857 - $settings = new ConvertKit_Settings();
858 - $settings->delete_credentials();
859 -
860 -}
861 -
862 -/**
863 - * Deletes the stored access token, refresh token and its expiry from the Plugin settings,
864 - * and clears any existing scheduled WordPress Cron event to refresh the token on expiry,
865 770 * when either:
866 771 * - The access token is invalid
867 772 * - The access token expired, and refreshing failed
868 773 *
@@ -895,11 +800,8 @@
895 800
896 801 // Update Access Token when refreshed by the API class.
897 802 add_action( 'convertkit_api_get_access_token', 'convertkit_maybe_update_credentials', 10, 2 );
898 803 add_action( 'convertkit_api_refresh_token', 'convertkit_maybe_update_credentials', 10, 2 );
899 -
900 -// Delete credentials when the user revokes the access and refresh tokens.
901 -add_action( 'convertkit_api_revoke_tokens', 'convertkit_delete_credentials', 10, 1 );
902 804
903 805 // Delete credentials if the API class uses a invalid access token.
904 806 // This prevents the Plugin making repetitive API requests that will 401.
905 807 add_action( 'convertkit_api_access_token_invalid', 'convertkit_maybe_delete_credentials', 10, 2 );