' . __( 'Github', 'simple-embed-code' ) . '' ), array( '' . __( 'Support', 'simple-embed-code' ) . '' ), array( '' . __( 'Donate', 'simple-embed-code' ) . '' ), array( '' . str_repeat( '', 5 ) . '' ), ); } return $links; } add_filter( 'plugin_row_meta', 'sec_plugin_meta', 10, 2 ); /** * Modify actions links. * * Add or remove links for the actions listed against this plugin * * @version 1.1 * @param string $actions Current actions. * @param string $plugin_file The plugin. * @return string Actions, now with deactivation removed! */ function sec_action_links( $actions, $plugin_file ) { // Make sure we only perform actions for this specific plugin! if ( strpos( $plugin_file, 'simple-code-embed.php' ) !== false ) { // Add link to the settings page. if ( current_user_can( 'manage_options' ) ) { array_unshift( $actions, '' . __( 'Settings', 'simple-embed-code' ) . '' ); } } return $actions; } add_filter( 'plugin_action_links', 'sec_action_links', 10, 2 ); /** * WordPress Requirements Check * * Deactivate the plugin if certain requirements are not met. * * @version 1.1 */ function sec_requirements_check() { $reason = ''; // Grab the plugin details. $plugins = get_plugins(); $name = $plugins[ CODE_EMBED_PLUGIN_BASE ]['Name']; // Check for a fork. if ( function_exists( 'calmpress_version' ) || function_exists( 'classicpress_version' ) ) { /* translators: 1: The plugin name. */ $reason .= '
' . sprintf( __( '%1$s has been deactivated', 'simple-embed-code' ), $name ) . '
' . __( 'Reason:', 'simple-embed-code' ) . '